3 ms·
This is one of the things that Rails gets right. There is no real need to be creative here. Rails just comes with a default layout built in, no need to 'choose
by Vitaly 15y ago
This is one of the things that Rails gets right. There is no real need to be creative here. Rails just comes with a default layout built in, no need to 'choose your own' for the 'own' sake. It doesn't, btw, mean that you can't use your own, just in this case you'll need to add the relevant directories to the path yourself. The standard layout and built in generators are just brilliant.
- chapel 15y agoOf course it is a matter of opinion, but you have to keep in mind that node itself isn't a framework like rails, and express while similar to sinatra with declaring routes is very un-opinionated about how it handles things. That is one reason I enjoy using node and a lot of the modules and add-ons created for node, giving me the freedom to do what I want from the start and not fight against the 'right' way the creators intended.
- Vitaly 15y agothis is a common misconception about rails. Rails doesn't "force" you to use their way. You don't have to call your table "people" if your model is called "person". It just that you have additional freedom not to configure anything if you are ok with the default configuration. in many other frameworks you always have to configure everything, abut in rails you might just go with the defaults and skip the configuration altogether. If express had code generators that would generate standard layout for models etc it wouldn't hurt anyones' ability to use their custom layout.
- tjholowaychuk 15y agorails apps are also very large, making them annoying/difficult to bundle up with other modules such as the nodejs Kue module which uses express for the UI. Rails modularity is quite terrible, Drupal does this much better, but yes you have to be creative with Express, which is only difficult if you're not creative. Application requirements are significantly different, myself and many others prefer a "start small" approach vs the "start huge" approach.