Site-wide Tags:  Linux(17) | CommandLine(12) | Ubuntu(10) | RemoteAccess(7) | Tools(7) | Vim(7) | LiftWeb(5) | SBT(5) | SoftwareDev(5) | Mac(5) | Scripts(4) | WebDev(4) | Diagrams(4) | Lifty(3) | NetworkDrives(3) | Processwire(3) | Security(3) | Fog(3) | VCS(3) | BestPractices(3) | RaspberryPi(2) | WebDesign(2) | Encryption(2) | Windows(2) | SSH(2) | WinCommandPrompt(2) | GitHubRepos(2) | Emacs(2) | PHP(2) | IDE(2) | ErrorMsgs(2) | JVM(2) | Hardware(2) | Bash(2) | Networks(2) | Graphviz(2) | Cloning | Cygwin | Graphics | Java | SystemRecovery | lessc | Maven | Python | PXE | Samba | LXDE | PackageManagement | LifeHacks | LESS |

This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.

Entry 3: First Steps Developing with Lift

Topic: Lift   

Tags:  WebDev   LiftWeb   SBT   Lifty   

Created on Sat, 16 Jun 2012.

Ok, so I'm going to let lifty build my project and directory structure... but, I'll make it start with the project-blank recipe.

So far, I installed sbt 0.10 and put the suggested build.sbt and project/plugins.sbt into the project's root folder. But it turns out that lifty can take care of all that now anyways (they were out of sync before the 1.7.5-SNAPSHOT).

But, it turns out that lifty was more convinient than I thought. I origionally used the 1.7.4 version, but it had issues with it and sbt .10, so the 1.7.5-SNAPSHOT version ended up working. Installing lifty is easy, as all you need to do is create the following global sbt settings:

~/.sbt/plugins/build.sbt

resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns)
addSbtPlugin("org.lifty" % "lifty" % "1.7.5-SNAPSHOT")

(leave a one line space between both statements)

~/.sbt/build.sbt

seq( Lifty.liftySettings : _*) 

And that's it to installing Lifty! Now we jsut have to teach lifty the recipes~


Since lifty will handle the .sbt files, we just need to create  a new folder to house a new Lift project, cd into that folder and run sbt.

Once you reach the sbt console, teach your lifty plugin the default recipes with:

lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json

and then you can create and run a blank lift project with:

> lifty create lift project-blank > reload > container:start 

or the sample project:

> lifty create lift project > reload > container:start 


to run the container (jetty) on a different port using sbt .10, you need to add this line to your build.sbt (be sure to leave a blank line between statements):

port in container.Configuration := 8081

Next, I found the exploring lift book to be quite clear. Starting out, and with a weaker scala background, I get lost sometimes when documentation dive right into the classes and packages that lift offers. This text uses Maven instead of sbt, but I was able to skip forward to learn the fundamentals of lift. The loose order in which I'll read this book:

- Chapter 4: Templates in Lift
- Chapter 7: Sitemap
- Chapter 5: Snippets
- Chapter 8: Mapper and Records
- Chapter 6 : Forms

Then i'll look into the advanced topics to get AJAX and COMET going



PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~

blog comments powered by Disqus

All Entries Within This Topic:

Subscribe to this topic:

Browse Topics: