3 ms·
> Further, this book will not explore persistence. To me this is one of the more important parts of a web framework. Otherwise, they all provide similar featur
by IgorPartola 15y ago
> Further, this book will not explore persistence.
To me this is one of the more important parts of a web framework. Otherwise, they all provide similar features for organizing code: you link some sort of a "view" to some sort of a URL. They may add a template language, or an admin system or a caching framework. They may be event-loop based, or process based or thread based or some mixture of all of the above, but if you have no state, your code will look awesome in all of them. The big issue is "how do you deal with state?"
- igorgue 15y agoMaybe using Rouge? http://engineering.foursquare.com/2011/01/21/rogue-a-type-safe-scala-dsl-for-querying-mongodb/ http://engineering.foursquare.com/2011/01/21/rogue-a-type-sa... Persistence IMHO doesn't have to be a very important feature in a framework, since a good one should be able to be pluggable. I use Django, but in some projects I don't use their ORM (or any ORM).
- dkarl 15y agoWhy should a web framework be tied to a persistence framework? Serious question.
- jshen 15y agoI don't think it should be tied to a specific one, but it should have an api/adapter. Rails 3 is a good example of how I think it should be done. One advantage, I get form helpers that automatically know how to deal with models, display errors, etc.
- squidsoup 15y agoLift actually provides two ORMs, Mapper and Record with support for JPA.
- aaronblohowiak 15y agoYour view is not a simple string template in Lift. In most frameworks, you handle the controller first, gather all your data and pass it to a string template. In Lift, the View is parsed and then all (there are frequently many) of the required "controllers" are invoked to fulfill the view. This is somewhat, kind-of, almost like custom tags in JSP, but about a thousand times keener, because it is all parallelized and so forth. Because of this, Lift can do things like trivially bind html to changing Actors (in the erlang sense) so that when the Actor changes, the html changes in all the browsers that viewed it. Supporting this all is non-trivial. "Persistence" usually boils down to serialize, deserialize and transactions... which are ultimately not unique to Lift, so I don't see a huge need to focus on it.