Live data from Hacker News

Lotus, a web framework for Ruby

lucaguidi.com

101–110 of 143 posts

Re: Lotus, a web framework for Ruby

#101
post #98

Looks nice. I particularly like the ORM, which seems well-designed compared to ActiveRecord. That said, I have a distinct feeling this is too little, too late. I and my teams have long migrated away from frameworks, to microservices, or what some people call SOA, and we are not looking back. I strongly encourage this design over the old monolithic Rails approach. These are mostly small, highly specialized Sinatra bac…

Can you give done examples of the types of things these micro services do?

+1, I would love to take a look at an example or two, as this sounds very interesting.

Re: Lotus, a web framework for Ruby

#102
post #98

Looks nice. I particularly like the ORM, which seems well-designed compared to ActiveRecord. That said, I have a distinct feeling this is too little, too late. I and my teams have long migrated away from frameworks, to microservices, or what some people call SOA, and we are not looking back. I strongly encourage this design over the old monolithic Rails approach. These are mostly small, highly specialized Sinatra bac…

Can you give done examples of the types of things these micro services do?

Not the poster, but I've written a few small sinatra-endpoints in my time.

For example I wrote a self-hosted comment-system, which is like a very basic disqus service. The back-end is a simple sinatra service that just allows "GET /comments" and "POST comments". (http://github.com/skx/e-comments/)

Last week I wrote a webhook-consumer, again using Sinatra. It receives a POST from github, parses the received JSON, and adds some details of the body into a queue for later processing.

Both services allow simple deployment and total may 50 lines of code each.

Re: Lotus, a web framework for Ruby

#103

This is a promising start. I've felt for a while now that we need some strong alternatives to Rails for the folks who feel like the Rails Way and the Ruby Way don't always get along. It still feels a bit DSL-centric from the examples I've seen thus far, and haven't dug into things to see what the generated Ruby looks like -- but if it's anything close to simple, this is something that has a chance to become an import…

For a while, I thought Sinatra was taking that role? It might be interesting to think about what people are looking for that's neither Sinatra nor Rails, or why Sinatra didn't live up to what people were hoping (if people think that). Sometimes I think some of this is just utopian grass-is-greener thinking. While there are _many_ things I'd do differently in Rails if I had the choice (some but certainly not all of wh…

Rails is a pile of conventions. What I want isn't something more lightweight, it's something heavyweight with different conventions.

Re: Lotus, a web framework for Ruby

#104
At the moment, if I should switch from Rails to another Ruby framework, the killer feature would be a well integrated built-in streaming support (something like Lotus::Live in this case), which nowadays is a must for a web framework; otherwise the stability of Rails and the big community around it (people, gems) would win against this project, as against the many other current Ruby frameworks.

Anyway I wish good luck for this project, which was created by a person of the same country of mine (Italy), of the same city (Rome) and which I met at the only Ruby meeting ever done in Rome I suppose, a couple of years ago.

Re: Lotus, a web framework for Ruby

#105

sinatra/base, rack-urlmap and sequel, why would you want more fluff?

It looks like you're missing the point. As an example, I've built the adapter for DynamoDB[1] so you can throw sequel out in matter of minutes even for existing app, and most likely without any code change. [1] https://github.com/krasnoukhov/lotus-dynamodb

The presence of Lotus::Model was a red flag to me, until I realised that Lotus doesn't seem to depend on it being used? I don't want my web framework to dictate my model API.

Lotus::Model may be great, and I like that it's actually trying to implement the DataMapper pattern, but there are projects where all the model code was written for the backend and we only later decided to expose it as a web API for example, and switching to another model layer would be out of the question.

You might want to emphasise more strongly that these components can (assuming I'm right) be mixed and matched with other components like Sequel if you prefer, since the naming sort-of hints that it's all tied together.

Re: Lotus, a web framework for Ruby

#106

Earlier quoted context omitted.

It is very possible to organize a Sinatra project elegantly. It generally involves a combination of require_relative and Dir.glob().

That's interesting; I tend to agree with the crowd that wishes Rails didn't do any kind of auto-loading. But are you suggesting that you need to add a kind of basic auto-loading to Sinatra to keep things sane?

Rails autoloading "just happens". If you're doing explicitly require/require_relative, even on the results of Dir.glob(), the application explicitly specifies what will be loaded, and when. For my part I find that much cleaner.

Re: Lotus, a web framework for Ruby

#107
post #3

Whenever I hear lightweight and complete, I always wonder if they handle one of the hardest things to do cleanly in web-apps: user authentication and access control of resources. Does Lotus support this out of the box?

Slightly OT, but as a mobile guy who occasionally toys with server-side programming, authentication is always where I get stuck. I'd like to see some examples of how to implement authentication and sessions cleanly without too much framework magic. Any pointers?

[deleted]

Re: Lotus, a web framework for Ruby

#108
post #3

Whenever I hear lightweight and complete, I always wonder if they handle one of the hardest things to do cleanly in web-apps: user authentication and access control of resources. Does Lotus support this out of the box?

Slightly OT, but as a mobile guy who occasionally toys with server-side programming, authentication is always where I get stuck. I'd like to see some examples of how to implement authentication and sessions cleanly without too much framework magic. Any pointers?

Rolling your own? This is as simple as it gets: http://128bitstudios.com/2011/11/21/authentication-with-sina...

If you want to make it even easier, use OmniAuth: http://recipes.sinatrarb.com/p/middleware/twitter_authentica...

Re: Lotus, a web framework for Ruby

#109

At the moment, if I should switch from Rails to another Ruby framework, the killer feature would be a well integrated built-in streaming support (something like Lotus::Live in this case), which nowadays is a must for a web framework; otherwise the stability of Rails and the big community around it (people, gems) would win against this project, as against the many other current Ruby frameworks. Anyway I wish good luck…

stop complaining and start a Rome Ruby meetup group. I did that couple of months ago with Ruby Zagreb meetup group. Europe, and especially eastern Europe needs more meetup groups!

Re: Lotus, a web framework for Ruby

#110

By what I've seen I like the spirit of Lotus, but I sense a movement away from complete web frameworks to pure API back-ends with the emergence of great single page JS frameworks like Ember. One ruby one that I like is https://intridea.github.io/grape/ . One interesting node API framework I mean to try is http://loopback.io/ .

Yes, I also think that the future of backend development is micro services communicating over defined HTTP API endpoints or other message protocols.

If you look closely, rendering presentation layer on the server side and then sending it to the client is a hack and we've been doing it for a long time. It's time for changes.

Post reply on HN