Giter Site home page Giter Site logo

Support for generators via CLI about cuba HOT 3 CLOSED

soveran avatar soveran commented on May 22, 2024
Support for generators via CLI

from cuba.

Comments (3)

soveran avatar soveran commented on May 22, 2024

Hey @aniketpant,

I use a code generator called gn and a template I made. You can
try it like this:

$ gem install gn

$ gn -i https://github.com/soveran/app

$ gn app

Then you'll have to follow the online instructions.

You can check how gn works, it's very simple and generic. I use
it for other types of projects too, like new directed graphs, etc.

from cuba.

totallymike avatar totallymike commented on May 22, 2024

Given the nature of Cuba, I would advise against such a feature.

This is a classic example of the difference between a fully-featured framework and a micro-framework. Rails is built with all sorts of assumptions as to how your program is going to look. Rails wants to make it really easy for you to follow the Golden Path towards building an MVC-style application; and if you're using Rails, chances are that's what you want.

A micro-framework such as Cuba or Sinatra, is designed to make as few assumptions as possible about how you want to build your app, and this is where my hesitation towards adding generators to Cuba comes in--you and I would very likely have different needs and a generic template may not serve those needs.

If you find yourself starting a lot of Cuba apps I suggest you use a project generator like https://github.com/ruby-ore/ore and build a template that serves your needs--or use @soveran's template ;)

from cuba.

aniketpant avatar aniketpant commented on May 22, 2024

@soveran gn looks like a great tool and I think that it will be a great addition to my app. I was about to ask you about integrating gn with Cuba but then I feel that @totallymike has given a very valid point over here.

It's a micro-framework afterall and it should be free from all the assumptions a big framework comes with. I have had my tough time with following conventions with RoR and I think that it's good when you need agile development. In other cases, Cuba/Sinatra are better choices.

I think this issue is ready for closing.

from cuba.

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.