Getting started with Lift
Asked Answered
T

4

10

I want to learn Lift. Unfortunately, all documentation which I tried either obsolete, unreadable, incorrect or combination of the above. I tried the following:

  • Simlply Lift. Some things from the book I tried lead to errors.
  • Exploring Lift. The structure of book is very bad. It's hard to read and try out code in the wild at the same time.
  • Lift in Action. The same as the previous but you need to pay for it.

P.S. I've seen similar questions. Most of them were asked a long time ago. Did the situation improve from the time of that writings?

P.P.S. Are there any other type safe scala web frameworks (Don't offer Play 2.0. It's not typesafe. I don't see any reason to create it in Scala).

Timmerman answered 4/7, 2012 at 21:30 Comment(4)
Which features of Play 2.0 are not type safe?Howund
@ErikEngbrecht it relies on reflection calls too much. It has a lot of things which can be made more type safe. For example session vars.Timmerman
Play session variables are type safe. They just only support one type! And I think that's by design to keep people dumping a bunch of arbitrary stuff in session since session is always stored as a cookie. Where is reflection used? It seems to rely more heavily on code generation. But I'm new to it.Howund
@ErikEngbrecht String isn't enough to represent app state so if you have to store some more or less complicated structures in session, you have to write serialization/deserialization code. Which isn't typesafe. Without reflection it would be impossible to implement code reloading which it supports. Take a look at the sources.Timmerman
C
7

It is unfortunately true that the state of Lift documentation is uneven at best and there are huge gaping holes.

However, the Lift community is just full of awesomely helpful people.

My recommendation is not to play around, but rather to try and implement something. If you get stuck, ask specific, direct questions about what you're trying to do, how you're doing it and why it isn't working.

So far, though I would wish for better documentation, I've been able to get every answer that I needed either through Google or on the Lift mailing list - though I expect I might ask more questions here in the future.

Capriola answered 5/7, 2012 at 0:48 Comment(0)
R
5

The Lift documentation is not its strong point. The philosophy is more "try and ask if you have any problem". Here are a few tips:

Assembla

One ressource that is really useful is http://www.assembla.com/wiki/show/liftweb, there are a lots of examples so you can progressively learn how it works.

Mailing List

Otherwise you can always use the mailing list if you have specific questions even if in my opinion it is really hard to explore it fast in order to solve a problem which was already encountered. http://groups.google.com/group/liftweb

Stack Overflow

Finally, a small community is present on Stackoverflow so feel free to ask in here. This is a good way of looking for answers and creating documentation in the same time.

Source code

Don't hesitate to explore the source code and the scaladoc if you have specific questions/doubts about the behavior of a function, they are often short and even sometimes commented! http://scala-tools.org/mvnsites/liftweb-2.4-M4/#package

Roe answered 5/7, 2012 at 8:35 Comment(0)
W
3

Have a look at the Lift Cookbook: http://cookbook.liftweb.net/

Wentletrap answered 5/7, 2012 at 19:48 Comment(1)
Unfortunately, for me, it's as bad as other lift documentation.Timmerman
S
3

"Simlply Lift. Some things from the book I tried lead to errors."

What exact type of errors did you have? Have you tried to follow it with "Simply Lift" examples that you can download from GitHub https://github.com/dpp/simply_lift?

Only errors I had were related to my lack of experience with SBT, but that's another story.

I have started with Lift mostly from that source (Simply Lift + examples) and in combination with its great community and Google (ChrisJamesC has listed the main links really nice) it was quite okay for me.

I would suggest you to work out all examples given in the "Simply Lift" tutorial or at least work them out unless you feel comfortable enough to jump right "in media res" and try something by yourself. That was the best way of learning Lift for me. Also, whenever you got stuck somewhere and can't find solution on the web, your questions would be welcome and answered on the Lift Google Group (https://groups.google.com/forum/?fromgroups=#!forum/liftweb). David Pollak is very often right there to answer your questions directly so I have only words of praise for this framework's community and Lift's
creator.

P.S. Lift's documentation could be better organized, some stuff could be better explained for sure, but IMHO it was just too small a price I had to pay to enjoy such beautiful framework. Learning curve is steeper than with Play, especially in the beginning, but after I "survived" the very first week it was almost impossible for me to give up of all of its advantages and original concepts (Lift's "Seven Things") and switch to another framework.

Societal answered 5/11, 2012 at 10:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.