Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC in a Google App Engine Java world

Tags:

I'm coming to Java from C# & ASP.NET MVC, I'd love to find an equivalent in the Java world that I could use on the Google App Engine. I've already started to have a play with FreeMarker and even made the first steps towards writing a very simple framework. Ideally I wouldn't have to do all the hard work though, someone must have done this already! So my question is - what frameworks are there out there that would be familiar for me coming from ASP.NET MVC and I could use them on Google App Engine for Java.

The key things I'd want are:

  • Simple Routing - /products/view/1 gets mapped to the view action of the products controller with the productid of 1
  • Template Engine - some way of easily passing 'ViewData' to the view, and from the view easily accessing it, ideally I'd love to avoid anything that is too XMLy (thus why I like FreeMarker).
like image 718
thatismatt Avatar asked May 14 '09 07:05

thatismatt


1 Answers

I am currently working on a Google App Engine app using Spring MVC. It is a lot more mature than ASP.NET MVC so you shouldn't be disappointed. As an added bonus you have the whole IoC power of Spring.

For the view layer I am trying out Velocity. It is pretty simple but I have yet to decide if I will prefer it over JSPs. I had a brief look at FreeMaker but didn't like what I saw. If you want to stay away from XML'y JSP templates than I recommend you give Velocity a spin.

The only problem I have had with Spring on GAE is file uploading. The MultipartResolver implementations both rely on a temporary file directory. After writing my own implementation I'm back to seamless uploading of files in my models.

like image 110
pjesi Avatar answered Oct 16 '22 14:10

pjesi