Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is very cool. I am tied to Java b/c of Lucene and the Hadoop ecosystem as well. Some more things I would like to see:

-Templating. Something like SimpleTemplate Engine in Bottlepy. http://bottlepy.org/docs/dev/stpl.html

-How do I get rid of Tomcat at least for development. I would like to run java -jar MyApp.jar -Dport=8080 and get a live running webapp in my dev environment.



You can do "java -jar MyApp.jar -Dport=8080" with both Tomcat and Jetty using what they call "embedded mode". I like the Jetty embedded mode much more because it starts up so much faster. The Tomcat embedded mode does have the benefit of an easier to understand API, but it's not worth the speed trade-off for me.

Here's examples of both:

http://www.benmccann.com/dev-blog/embedded-jetty/

http://www.benmccann.com/dev-blog/embedded-tomcat/

I put together an example and uploaded it to GitHub. I'd love feedback on it:

https://github.com/benmccann/sprightly

P.S. Closure templates are cool because they can be used both client-side and server-side. I'm not aware of other templating languages that have this feature. I haven't used it much yet, but want to experiment with it more when I get time.


The list of technologies is really intimidating for outsiders. Its not like "Oh, XYZ, thats just Django templating language". When I see Struts and Hibernate, I know those things as gigantic opaque stuff that will take a long time to learn...


> How do I get rid of Tomcat at least for development.

Jetty everything. You can even keep it for production.


Take a look at Jetty (http://www.eclipse.org/jetty/) for the second option.

I tend to use 'mvn tomcat:run' to run my dev server, which I find even easier, fwiw.


Since everyones already covered the Jetty side of it, I personally like Freemarker as a templating language.

http://freemarker.sourceforge.net/

It's pretty simple and straigtforward, its what I use instead of JSP.

Also, if you're doing web stuff, I HIGHLY recommend sitemesh.

http://www.sitemesh.org/

It's a really clean way of implementing layouts and everytime I use other languages like Python, I always try and find equivalents but am always disappointed.


ruby on rails has sitemesh as its layout system. i agree, it is a great pattern for building web apps.


I've been using a very little know (and poorly named) template engine called Cambridge Template Engine (http://code.google.com/p/cambridge/) for my latest company.

The documentation is a bit thin, but the code is rock solid and very fast.

Combined with JEXL for an expression language, this is one of the best server side engines I've ever used.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: