Hi All,
I put together an implementation of the SLiM Stack idea as described
by Brian Knapp here:
http://programminggeek.com/ so the idea is not
mine, but I can see its a good idea so implemented it.
The SLiM Stack is similar to LAMP, WAMP and MAMP, SLiM = Scala + Lift
+ MongoDB. It is the combination and distribution of these
technology's together.
The goals of this project are as follows:
a) Make it as easy as possible for a beginner, a PHP programmer, a
Java programmer or manager without much time on their hands to get
started with Liftweb and MongoDB on Windows to evaluate the
technology. This is aimed at the total beginner only.
b) Give many "simple" examples for common development use cases to
allow developers to accomplish the simple and common tasks of form
entry, validation, displaying data from the database.
c) To add code generators for common use cases, construction of forms,
database tables, validation, etc, i.e. as seam-gen does for SEAM
Framework. So a complete beginner could make a simple website using
this technology stack in a few hours. To have RAD development using
this technology stack.
This is an open source project, Apache 2. I'm looking for
contributions if anyone wants to help. Especially in the area of:
a) Lots of simple example code using Liftweb and MongoDB, simple means
- as simple as possible that can be explained easily.
b) Articles for the website, or on your blog or website.
b) The usual, development, bug fixing etc.
The first executable is available here, download here:
http://code.google.com/p/slim-stack/downloads/list
Google project here:
http://code.google.com/p/slim-stack/
The website will be here (nothing there yet, one or two days time).
http://www.getslimstack.net/
The source code is in the installer at the moment, so you have it if
you downlaod the exe.
What does it do? It starts a Java program which starts up MongoDB,
Liftweb and RockMongo-(to allow users to admin the database). Liftweb
is started via SBT, so when you change a Liftweb Scala file or html
template file it re-deploys and re-starts jetty so that a development
cycle like PHP can be done. The user can change a file and 5 to 10
seconds later see the result by refreshing the browser. If you put
JRebel jar file in the jrebel directory, it uses JRebel to speed up
the re-deployment so the change-view-change cycle is faster.
Note that when a user changes a file a refreshing progress bar appears
on the top right of the users screen to show the user that SLiM Stack
is refreshing so the user knows when to refresh the browser as the
cycle is not as fast as it is for a PHP developer.
How to use it? Install it, run it, it places a small program running
on the windows taskbar on bottom right. Click on the icon and it shows
the window, here you can start and stop either MongoDB, SBT (Liftweb)
and PHP for the RockMongo. On the top row is Liftweb port 8080, click
on the browser button after it has started up and you can browse the
site. Included is a simple example which allows you to add pets to a
table in MongoDB.
Why do this? LAMP, MAMP, WAMP are all very successful, why? anyone
could download PHP, Mysql and Apache and set them up themselves, but
it takes at least a hour minimum to get LAMP set up first time
yourself and most users get stuck. The same problem exists with
Liftweb and MongoDB, to get started with Liftweb, first you must get
Scala, get Liftweb, get an IDE, work out how to set it up, run a few
scala examples, wow a lot of time invested just to explore the
technology and hit lots of bumps on the way. Maybe your an I.T.
manager, you heard its good stuff BUT you just don't have the time to
do all of this.
Why write an email here? I want to get some feedback before I put the
website up and let others know about it since this influences the
image of Liftweb. Any questions or comments please reply.
I have not tested it on any other computer than my own, so maybe it
doesn't work at all for other people, let me know. Its a real hack
together as SBT doesn't have an API and I programmed in Java, not
Scala.
References:
RockMongo
http://code.google.com/p/rock-php/wiki/rock_mongo
Default user for RockMongo is admin admin
Regards, Philip