4 ms·
Don't worry, use Happy. The new Ruby web framework.
- mrgreenfur 14y agoHow does this compare with the existing, tested and awesome framework Ramaze? Have you tried it? More info: http://ramaze.net/ http://ramaze.net/
- moeffju 14y agoI haven't tried Ramaze, but from a cursory look I find the whole `map ...` thing harder to follow than Happy's route method. It also looks like Ramaze makes you write out more things explicitly, like: Ramaze.start(:root => Ramaze.options.roots, :started => true) or Ramaze.options.roots = [__DIR__] require __DIR__('controller/tutorial') Also, the URL to method mapping is done with yet another separate method 'trait'? Ramaze doesn't really jive with me right now. I'll have a closer look at it over the weekend.
- dublinclontarf 14y agoHow does it compare to Padrino? Which also fills the gap between sinatra and rails.
- moeffju 14y agoPadrino is nice, too. It's definitely more mature than Happy, and a little more complex I guess. Now I'm thinking about trying to port the `def route` style dispatch to Padrino, because I still feel that it's superior to the `method url, options do` pattern. That might just be the Happy excitement talking, however.
- cheald 14y agoWhy do you feel it's superior? It feels distinctly clunkier to me. I'm not opposed to new things, but powerful DSLs are one of Ruby's best perks.
- moeffju 14y agoBecause then you have to handle things like route precedence, method routing, "resource" mapping, etc. The `def route` way is very linear, you have one point of entry and that's it, the code just flows from there. With a bunch of `match /xyz` statements, or even a routing layer, the connection is less direct and potentially more prone to bugs.
- omgsean 14y agoI'm interested in this but your introduction is a little lacking. "Hello, World" isn't really enough to get a feel for a framework, how about "Hello, To-Do App" or "Hello, Blog"? Regardless, congrats on your release!
- moeffju 14y agoThe full example app from the tutorial is linked from the blog article, but it was too much code to show inline. Also, the hamburg.io app gives a pretty good overview of what Happy can do. It's also linked from the blog post, or directly: https://github.com/hmans/hamburg-io https://github.com/hmans/hamburg-io
- hmans 14y agoHi, author of Happy here. A Todo or Blog app as a basic example is a great idea! I'm planning on adding more example apps to the source distribution and will make sure they'll be part of that. I'm also the author of Schnitzelpress, a Ruby-based blog engine built with Sinatra (and optimized for hosting on Heroku and similar cloud providers), and I will be porting it from Sinatra to Happy some time soon.
- mlitwiniuk 14y agoFirst pet project created in it (https://github.com/prograils/css2ap https://github.com/prograils/css2ap), framework looks really promising for tiny webapps. What I really like is this simple and straightforward flow control.
- hmans 14y agoThanks for giving it a go, and I'm really glad that you like it! However, whenever someone says that Happy is a nice framework "for tiny webapps", I like to chime in and add that the goal for Happy is to be as simple (and thus fit for tiny apps) as Sinatra, but also a great fit for large applications as it allows for a kind of modular development style that may feel a whole lot more natural to some people than what Rails is doing (and Padrino is sadly trying to mimick): controllers actually describing behavior - no matter how simple or complex - and not URLs or individual resources. I'm very much looking forward to finding out how much this resonates with other Rubyists. Upwards and onwards :)