Wednesday, May 21, 2008

Lift Diary, Day 1

I'm trying to learn Scala, and /lift/. The ultimate goal really IS to learn something, but as a way to accomplish that, I'm going to use a website that I maintain (currently java, webwork, and ibatis) as a template. Rewrite that (or significant, not-necessarily-production-quality parts of it), and I'll consider it a success.

As I do various things along this journey, I plan on jotting them down here, so please forgive the inevitable sentence fragments, missing links, misconceptions, etc. This is more a jot pad of what I'm doing, as I do it, not a finalized tutorial for anyone following me.

So, on to it then.

* Download and install the latest Scala (2.7.1 final) at http://www.scala-lang.org/downloads/. I'm using Windows for this. Yeah, I know.

* Setup the path, etc.

* Try it out.


c:\tmp>scala
Welcome to Scala version 2.7.1.final (Java HotSpot(TM) Client VM, Java 1.6.0_05).
Type in expressions to have them evaluated.
Type :help for more information.

scala> object HelloWorld {
| def main(args: Array[String]) {
| println("hello, world")
| }
| }
defined module HelloWorld

scala> HelloWorld.main(null)
hello, world


Success, but I expected that.

* Download /lift/. What the deuce? You don't download lift, you let maven do it. (http://liftweb.net/index.php/HowTo_start_a_new_liftwebapp) Ok, no problem, I use maven roughly daily for my 'real work', so I'm ok with that.

I've used the command line below, all on one line, indents are simply for looks.


mvn archetype:generate -U
-DarchetypeGroupId=net.liftweb
-DarchetypeArtifactId=lift-archetype-basic
-DarchetypeVersion=0.8
-DremoteRepositories=http://scala-tools.org/repo-releases
-DgroupId=net.liftweb.hello
-DartifactId=liftdiary


Not mentioned on the wiki, it asks for a version, then asks for confirmation for some properties its set, then completes.

(I've asked permission (since I'm kind and polite) to edit the wiki, so I can just set things right as I find them, rather than gripe about them here. Also, I've asked David if he wants me to just wiki-ize this whole experience somewhere ON the lift wiki. We'll see how that goes.)


* mvn install jetty:run

Works fine. Now to figure out how to make my OWN web app, and not blindly follow the "do this, do this, do this" pages.

1 Comments:

At May 22, 2008 at 2:23 PM , Blogger Tyler Weir said...

"(I've asked permission (since I'm kind and polite) to edit the wiki, so I can just set things right as I find them, rather than gripe about them here."

Go ahead. If you see something amiss on the wiki, have at it.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home