Git Product home page Git Product logo

Comments (9)

ehelms avatar ehelms commented on July 28, 2024

I have been doing some reading, investigating and thinking and have come down to a few ways to approach turning this into a gem. No matter what route, we will be able to easily in our project Gemfiles locally pull down ConvergeUI and edit it dynamically or allow those who don't care but need to use the gem to install it from rubygems.org. Here are our options as I see them currently:

Option 1: Straight Gem

This option is simply taking what we have and wrapping it up as a standard and simple gem.

Pros:

  • Gem packaging is simple
  • keeps converge-ui as a bucket of assets that let's user compose as they wish

Cons:

  • Requires symlinking
  • Could get complex due to gem being installed in a variety of locations

Option 2: Pure Rails Engine

This option moves ConvergeUI to be packaged from head-to-toe as a rails engine.

Pros:

  • Easy integration with Rails
  • Assets available through asset pipeline, no sym-linking required

Cons:

  • Tied down to Rails
  • Assets not front and center

Option 3: Hybrid Approach

This similar to how pure gems are made available to Rails projects. Two separate gems are created, a simple gem and a Rails engine. Examples are minitest and minitest-rails, compass and compass-rails, sass and sass-rails.

Pros:

  • Allows for a simple gem and repository of assets
  • Enable usage of CUI by non-rails applications easily
  • Provides a focused and somewhat simplified Rails engine

Cons:

  • Requires maintenance of two repositories

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

For me the Rails Engine (option 2) is the way to go. With the depth we want to go with the Converge-UI we will probably be dependent on Rails ( I see some dependency in Login now ).

With the Hybrid approach I am not sure if it is worth the effort in this case. It would require maintaining two gems as well as deciding which converge-ui functionality/assets would be included in which gem and if it would work in synergy. (eg. Here is the login functionality in cui-rails gem, backed up by assets from cui gem but some of the login related assets are not usable without the cui-rails gem so they should be only in cui-rails gem ...)

from ui_alchemy-rails.

knowncitizen avatar knowncitizen commented on July 28, 2024

Agreed. I see no reason to not tie this to Rails. If demand for another type of engine or framework increases, we could consider porting it. As is, haml and sass are largely a Ruby/Rails thing. (Sinatra uses haml as well).

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Right now the only piece that is dependent upon rails is the views that we
supply and only because we use some of the automatic form generation calls
that are specific to rails. Everything else - images, fonts, stylesheets,
and javascript are independent of Rails specifically. HAML and SASS are
largely Ruby things because that is how they were originally used and
packaged, but even they provide both a basic ruby gem version and a rails
integration gem. I have used HAML and SASS in Python web apps though.

As far as I know, a Sinatra application (which for the record, there is one
that has floated the idea of using CUI but I think has just been quite busy
with other things) cannot consume a Rails engine.

On Mon, Oct 22, 2012 at 8:56 AM, Jason E. Rist [email protected]:

Agreed. I see no reason to not tie this to Rails. If demand for another
type of engine or framework increases, we could consider porting it. As is,
haml and sass are largely a Ruby/Rails thing. (Sinatra uses haml as well).


Reply to this email directly or view it on GitHubhttps://github.com/Katello/converge-ui/issues/56#issuecomment-9662550.

Go Pack and War Eagle,
Eric D. Helms

Ph.D. Student - North Carolina State University

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

How about templating - content_for, yields and partials? That is also Ruby/Rails specific, isn't it? It can be used in Sinatra with some effort but anyway...

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Good call, I forgot about those constructs as well being tied to Rails in
the views.

On Mon, Oct 22, 2012 at 10:13 AM, Jirka Tomasek [email protected]:

How about templating - content_for, yields and partials? That is also
Ruby/Rails specific, isn't it? It can be used in Sinatra with some effort
but anyway...


Reply to this email directly or view it on GitHubhttps://github.com/Katello/converge-ui/issues/56#issuecomment-9665055.

Go Pack and War Eagle,
Eric D. Helms

Ph.D. Student - North Carolina State University

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Update: After the switch to the new organization, I took a few hours to investigate packaging alchemy as a Rails engine and subsequently how to pair that up with the example application. First off you can find my work here:

https://github.com/ehelms/alchemy/tree/engine
https://github.com/ehelms/converge-ui-example/tree/engine

Things to Note:

  • Alchemy as an engine integrated seemlessly in my development environment with the Example app running 3.2 due to asset pipeline (Katello is still on 3.0 and this presents some challenges)
  • This removed all need for symlinks in the parent projects
  • To the best of my knowledge, I was able to re-do the spec file and as the branch stands, scratch builds in Katello's Koji pass on both RHEL6 and FC16/17

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Update and Integration Plan:

Work has been done by @jtomasek to integrate the engine version of Alchemy using the asset pipeline into Conductor and everything appears to be working well. That being the case, and since Katello can continue to use the engine version as a git submodule with updated pathing, I propose the following to switch us to the enginified version of Alchemy:

  1. @knowncitizen will open 1+ pull requests to fix up some work from his converge_updates in Katello
  2. All open pull requests (@knowncitizen + @jtomasek) will be promptly dealt with merged.
  3. There will be a freeze on new PRs.
  4. I will merge in newest to my engine branch, fix and open a PR to Alchemy master.
  5. Review engine PR.
  6. After merge, Katello side will update git submodule, symlinks and Jammit paths.
  7. After merge, Conductor will be able to use engine as both a gem and in development mode.

If there are any questions, or concerns, speak now or forever hold your peace.

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Resolved as of: https://github.com/ui-alchemy/alchemy/pull/123

from ui_alchemy-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.