Question

I am recent graduate with no real experience. I want to develop relatively simple web application(job listing site) in Java which works on Google App Engine for my project.

I did some research however, didn't stumble across a comparison of various framework for GAE. Some articles say that Spring 3.0 has large cold start time, but those are 3 years old articles & much must have changed in GAE science then. JSF is supposed to be community standard but complicated. Stripes/Play/..../... frameworks are there but I am not capable to make decision at this point of time.

Can you suggest me a MVC framework with following criteria.

  1. Works with GAE(or optimized for GAE)
  2. Lightweight - cold start time should be less
  3. If possible, response time should be less

Following tradeoffs can be done.

  1. No need of transaction or web service or persistence or some other high level features
  2. Can be difficult to learn(I have plenty of time), but documentation should be available
Was it helpful?

Solution

My personal choice is RESTeasy with Htmleasy. Also Jackson if you need JSON.

RESTeasy:

  1. JAX-RS standard based open-source lib from one of Java open-source leaders. Excellent support.
  2. MVC based.
  3. Great docs, lots of examples.
  4. Works on GAE without any problems.
  5. Comes bundled with Jackson if you need to serve JSON (= you have mobile clients).

Htmleasy

  1. Lightweight, builds upon JAX-RS and RESTeasy
  2. Can use different html templating engines including JSP and Mustache.
  3. Works with Mustache, which can be servers side (server Java renders template) or client side (JS renders template AJAX style).

Suggestions:

  1. Same code base can serve both HTML and JSON, supporting web and mobile clients.
  2. Find right balance between server-side rendering and client-side rendering & AJAX. Remember, biggest sites use both: servers-side to quickly give you first page, client-side & AJAX for great responsiveness to user actions.
  3. Do not put your business & database logic in JAX-RS methods, create a separate business layer classes instead.
  4. Unit test the business layer - you should have 100% coverage.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top