Describe the architecture you use for Java web applications?

Ok I'll do a (shorter) one:

  • Frontend : Tapestry (3 for older projects, 5 for newer projects)
  • Business layer: Spring
  • DAO's : Ibatis
  • Database : Oracle

We use Sping transaction support, and start transactions upon entering the service layer, propagating down to the DAO call's. The Service layer has the most bussines model knowledge, and the DAO's do relatively simple CRUD work.

Some more complicated query stuff is handled by more complicated queries in the backend for performance reasons.

Advantages of using Spring in our case is that we can have country/language dependant instances, which are behind a Spring Proxy class. Based on the user in the session, the correct country/language implementation is used when doing a call.

Transaction management is nearly transparent, rollback on runtime exceptions. We use unchecked exceptions as much as possible. We used to do checked exceptions, but with the introduction of Spring I see the benefits of unchecked exceptions, only handling exceptions when you can. It avoids a lot of boilerplate "catch/rethrow" or "throws" stuff.

Sorry it's shorter than your post, hope you find this interesting...


Ideal Java Based Web Development Technologies Today.

Web Layer :

HTML+CSS+Ajax+JQuery

RESTFul Web Controller/Action/Request Processing Layer :

Play Framework

Business Logic/Service Layer:

Use Pure Java Code as long as possible. One can do fusion of web services here.

XML/JSon Data Transformation Layer :

XMLTool(Search On Google Code),JSoup,Google GSon,XStream,JOOX (Search On Google Code)

Persistence Layer :

CRUD : JPA or SienaProject or QueryDSL / Complex Queries : JOOQ,QueryDSL


Here's my 5 cents

Presentation

Android, Angular.JS WebClient, OAUTHv2

API

REST, Jersey (JAX-RS), Jackson (JSON de-/serialisation), DTO-objects (different from business logic models)

Business Logic

Spring for DI and Event handling. DDD-ish approach of model objects. Longer running jobs are offloaded with SQS in worker-modules.

DAO

Repository model with Spring JDBC-templates to store Entities. Redis (JEDIS) for Leaderboards, using Ordered Lists. Memcache for Token Store.

Database

MySQL, Memcached, Redis