Live data from Hacker News

Lotus, a web framework for Ruby

lucaguidi.com

61–70 of 143 posts

Re: Lotus, a web framework for Ruby

#61

I'm all for new frameworks that emphasize different ideas and philosophies. If nobody ever tried experimenting with a new approach, we wouldn't have Rails in the first place. So kudos to Luca and his fine work in developing Lotus. I like much of what I see. That being said, I feel like YARWF (Yet Another Ruby Web Framework) is not the most pressing matter in the web space today, and I take exception to the notion tha…

>A complete web framework has client-side components that facilitate two-way communication to/from the server, data binding, HTML5 history state-based page/view swapping, etc. In other words, the type of stuff being addressed by Angular, etc. No. I can't possibly disagree with this any more strongly. I'm probably on the wrong side of history here, but Javascript absolutely should _not_ be a requirement for using a we…

I think the turning point is already ahead of us where the thin client server-heavy webservices will be considered a "smell" or at least the uncanonical way of developing web apps.

It pays off to do a lot in the client (good libraries provided). You have a high frequency of development iterations, direct response during development and you are working closely to the "medium" of presentation.

I have had a project that started out as a flask web app and all of the sudden, I realized that moving things to the JavaScript world in the client (I was using ClojureScript there) was actually safer, faster and better than keeping it on the server. In the end the server Did validation and database access in the sense of a Web API. It really was a clean solution

Re: Lotus, a web framework for Ruby

#62
I think it's great to see someone make a run at a more decoupled ruby web app approach. I hope it succeeds.

In my experience working on Obvious (http://obvious.retromocha.com) it is hard to get Ruby developers behind decoupled architectures because the large majority aren't Ruby devs, they are Rails devs and Rails happens to be in Ruby.

Also, the larger group of developers doesn't like the idea of an app being a giant collection of very small objects. It's like there is a gravity to the notion of objects where we think of an object as something akin to a car, not the thousands of parts that make up a car.

Last, I think the idea of MVC doesn't place the appropriate number of objects for the different roles in normal request processing. At a reasonable point of complexity really end up with routes, controllers, entities, data access objects or repositories/adaptors, presenters, views, templates, helpers, utilities/libs, and probably some other bits of random code in there somehow. That doesn't fit the 3 role view of the world that is MVC.

Lotus does a better job than most of addressing such things, but I think the MVC approach in general falls flat.

That lack of appropriate roles means that as programmers we invent a lot of names, patterns, roles, etc. to fit what our code actually ends up doing. That's why you see a lot of service patterns, presenter patterns, etc. being attached to Rails. Everybody is duct taping their approach to the notion of MVC, but very few are saying "what if we didn't see request processing as only having 3 roles?"

MVC is better and cleaner than writing a page as one giant PHP file maybe, but I've seen it fall down so many times that I no longer trust it as a useful pattern or abstraction for expressing request processing and HTML string manipulation in code.

In fact, if we were building command line apps and writing to files, I don't think we would use MVC at all. But, since we're writing strings of HTML, it's totally different right?

Re: Lotus, a web framework for Ruby

#63

I'm all for new frameworks that emphasize different ideas and philosophies. If nobody ever tried experimenting with a new approach, we wouldn't have Rails in the first place. So kudos to Luca and his fine work in developing Lotus. I like much of what I see. That being said, I feel like YARWF (Yet Another Ruby Web Framework) is not the most pressing matter in the web space today, and I take exception to the notion tha…

> A complete web framework has client-side components that facilitate two-way communication to/from the server, data binding, HTML5 history state-based page/view swapping, etc. In other words, the type of stuff being addressed by Angular, etc. What you describe sounds very much like Plato's shadows (search for "Allegory of the Cave") when compared to a native application.

Web browsers aren't operating systems. They weren't and still aren't designed to be general application execution environments.

Re: Lotus, a web framework for Ruby

#64

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

No, if I choose Sequel (http://sequel.jeremyevans.net) I want to use all the power it gives me, not some lowest common denominator.. Also not all projects needs models, you know, there's other data access patterns..

Re: Lotus, a web framework for Ruby

#65
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?

Re: Lotus, a web framework for Ruby

#66
post #39

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/ .

That's a trend indeed (and personally I like it pretty much). But lotus has a view component that allows you to do stuff """just like rails""" (many quotes intended). That's the beauty of it: it's modular and not opinionated, so you can pick an mix the tools you want to compose in order to suffice your needs.

Yeah, lotus looks like it could do a good job at letting you share/extend models and other bits of code between a Rails-like html server and a pure api server. Maybe those two things are the same server, different modules in the same server, or different servers sharing libraries. Choice is up to you since lotus looks like it can cleanly do both.

Re: Lotus, a web framework for Ruby

#67

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…

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.

This is why I prefer to use Ramaze. It feels more natural if you're already used to coding in Ruby. It also supports the evolution of development from lightweight to complex sites without having to switch frameworks.

http://ramaze.net

Re: Lotus, a web framework for Ruby

#68

Thank for great fw. I'm by no mean a Ruby expert but finding Sinatra is so simple to create complex apps, and Rails is so complex atm to pick up. I'm making slowly progress in Rails and always not sure if I done thing correctly in Rails way. Lotus seems small enough, and good enouh, balance between Sinatra and Rails for me. Keep up the good work. Thanks.

balance between Sinatra and Rails for me.

Ramaze is that sweet-spot for me.

http://ramaze.net

Re: Lotus, a web framework for Ruby

#69

"We have infinite combinations. Small components have enormous advantadges in terms of reusability." Typo: "advantages". Nitpicking, I know, but it's in the first bolded sentence on the page and it detracts from your messaging. Cool project, good luck! :)

Additional nitpick: "fewer" instead of "less", as in

"... you employ fewer DSLs and ..."

Post reply on HN