Re: [Lift] Newbie Q: Lift suitable as webgui for java 6 app with embedded webserver and no database ?

2010-03-01 Thread David Pollak
Jeppe gave a great answer.  Just to reinforce that Lift's webkit is totally
agnostic to the data being presented.  As long as that data can be
materialized as instances of objects in the JVM, you can use Lift.

On Mon, Mar 1, 2010 at 4:54 AM, Jeppe Nejsum Madsen wrote:

> mortench  writes:
>
> > Hi All,
> >
>
> [...]
>
> > How suited would Lift be for this scenario or to be more precise:
> > a) Is a lift web app as fast to startup as a normal jave jsp/servlet
> > app ?
>
> Depends mostly on your own code. If you have an empty Boot, startup is <
> 1s.
>
> > b) Can lift be used without a database and can the relate code such as
> > the OR mapped be omitted ?
>
> Yes
>
> > c) Any special considerations needed when starting and stopping an
> > embedded lift web app ?
>
> Dunno :-)
>
> > d) What does lift require of the java web server ? I.e. can some of
> > the more lightweight java web servers be used that might not support
> > the full servlet/jsp specifications such as the embedded HTTP server
> > in Java 6, Winstone, Grizzly etc.? ... What (light) java webservers
> > are lift known to work with ?
>
> You need a recent servlet implementation.


Lift needs Servlet 2.5 or higher.


> JSP is not needed. I'm using
> Jetty although not embedded, but Jetty seems like it should easily be
> embedded. During development, I launch a small Scala app that starts
> jetty (the RunWebApp class generated by the Lift archetype)
>
> > e) What would the best way for the lift web app to communicate with
> > the backend code of the java app ? By just calling into the existing
> > java code (some integration/classloader issues here?) or more loosely
> > by calling REST WS Api exposed by the Java code ?
>
> Not sure what you envision here, but REST and loosely coupled should
> work :-)
>

Given that Scala works perfectly calling Java code, I'd go with calling your
Java classes directly.


>
> > f) I am using ANT and not maven to develop the java app. Will be able
> > to make Lift work with ANT so I use the same build tool for
> > everything?
>
> Yes, but you're probably on your own
>
> > g) What version of lift should I use ? In particular does Lift 2.0
> > change anything for my scenario ?
>
> You should use the latest 2.0-SNAPSHOT or milestone (M3 is just around
> the corner)
>
> /Jeppe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Newbie Q: Lift suitable as webgui for java 6 app with embedded webserver and no database ?

2010-03-01 Thread Jeppe Nejsum Madsen
mortench  writes:

> Hi All,
>

[...]

> How suited would Lift be for this scenario or to be more precise:
> a) Is a lift web app as fast to startup as a normal jave jsp/servlet
> app ?

Depends mostly on your own code. If you have an empty Boot, startup is <
1s.

> b) Can lift be used without a database and can the relate code such as
> the OR mapped be omitted ?

Yes

> c) Any special considerations needed when starting and stopping an
> embedded lift web app ?

Dunno :-)

> d) What does lift require of the java web server ? I.e. can some of
> the more lightweight java web servers be used that might not support
> the full servlet/jsp specifications such as the embedded HTTP server
> in Java 6, Winstone, Grizzly etc.? ... What (light) java webservers
> are lift known to work with ?

You need a recent servlet implementation. JSP is not needed. I'm using
Jetty although not embedded, but Jetty seems like it should easily be
embedded. During development, I launch a small Scala app that starts
jetty (the RunWebApp class generated by the Lift archetype)

> e) What would the best way for the lift web app to communicate with
> the backend code of the java app ? By just calling into the existing
> java code (some integration/classloader issues here?) or more loosely
> by calling REST WS Api exposed by the Java code ?

Not sure what you envision here, but REST and loosely coupled should
work :-)

> f) I am using ANT and not maven to develop the java app. Will be able
> to make Lift work with ANT so I use the same build tool for
> everything?

Yes, but you're probably on your own

> g) What version of lift should I use ? In particular does Lift 2.0
> change anything for my scenario ?

You should use the latest 2.0-SNAPSHOT or milestone (M3 is just around
the corner)

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Newbie Q: Lift suitable as webgui for java 6 app with embedded webserver and no database ?

2010-03-01 Thread mortench
Hi All,

I am considering if Lift might be a good solution for implementing a
web gui frontend for a java 6 application which among other things has
an embedded web server with HTTP/HTTPS support. When the application
is launced the webserver can be started so that the web gui can be
accessed using a browser by the user (incl. the capability to shutdown/
restart the app from the web gui). The application does not include a
database and saves it's state on the local disk itself.

Being familiar with RoR, I did try the scenario first using Rails
+Jruby and while it worked I had to abandon it as Rails boot turned
out the be too slow for the users (Rails boot took > 30s). Also the
Rails JRuby/integration was tricky and I had to do considerable coding
to support consistent, MT-safe start/shutdown/cancel, reporting boot
progress, error handling etc. So NO, Rails was not a good idea here!

How suited would Lift be for this scenario or to be more precise:
a) Is a lift web app as fast to startup as a normal jave jsp/servlet
app ?
b) Can lift be used without a database and can the relate code such as
the OR mapped be omitted ?
c) Any special considerations needed when starting and stopping an
embedded lift web app ?
d) What does lift require of the java web server ? I.e. can some of
the more lightweight java web servers be used that might not support
the full servlet/jsp specifications such as the embedded HTTP server
in Java 6, Winstone, Grizzly etc.? ... What (light) java webservers
are lift known to work with ?
e) What would the best way for the lift web app to communicate with
the backend code of the java app ? By just calling into the existing
java code (some integration/classloader issues here?) or more loosely
by calling REST WS Api exposed by the Java code ?
f) I am using ANT and not maven to develop the java app. Will be able
to make Lift work with ANT so I use the same build tool for
everything?
g) What version of lift should I use ? In particular does Lift 2.0
change anything for my scenario ?

Thanks
Morten

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.