SmoothCriminel
SmoothCriminel

Reputation: 367

Application Architecture Design Question

I need your suggestions in designing a Java/J2EE web based application. Here are its characteristics:

  1. Purely database oriented application (with 10 tables). The database is Oracle.
  2. Three different types of interfaces/screens: 2.1 WebSphere Portlets (6 Interfaces/Screens) 2.2 Handheld Device (5 Interfaces/Screens) 2.3 Web Application (17 Interfaces/Screens)
  3. Few of the screens are just report which will be built using Crystal Reports.
  4. There isn't much business logic involved.

Now my concerns are:

  1. Which architecture should I go for 2 tier or 3 tier?
  2. Which frameworks should I use struts/jsf (MVC)? If any? Or should I go for simple POJO based programming without any framework.
  3. The biggest concern is packaging, I mean I don't want to replicate the business and database layer for each three different types of interfaces I want to develop. Do you think EJB will be good option to expose DB/Business layer? How should I handle this?
  4. Should I use any specific framework like sitemash for presentation layer?
  5. Should I use any specific framework for database layer JPA/Hibernate or should I use simple JDBC?

Any comments/suggestions are welcome...

BR SC

Upvotes: 0

Views: 1083

Answers (2)

StaxMan
StaxMan

Reputation: 116472

I think first answer has good baseline. I would echo most of the sentiments, but would additionally recommend jDBI for database access (see this tutorial); it nicely simplifies handling compared to 'raw' JDBC, but without requiring any mapping.

Upvotes: 1

duffymo
duffymo

Reputation: 308733

Which architecture should I go for 2 tier or 3 tier?

Three tier: view, service, and persistence.

Which frameworks should I use struts/jsf (MVC)? If any? Or should I go for simple POJO based programming without any framework.

Struts? No. JSF? No. I'd recommend Spring, since it supports both web and portal MVC and contract-first web services.

The biggest concern is packaging, I mean I don't want to replicate the business and database layer for each three different types of interfaces I want to develop. Do you think EJB will be good option to expose DB/Business layer? How should I handle this?

I wouldn't recommend EJB. I'd suggest HTTP based web services for remoting.

Should I use any specific framework like sitemash for presentation layer?

Sitemesh is fine, but it's not a presentation layer.

I'd use Velocity templates to generate straight HTML that I'd send back to clients.

Should I use any specific framework for database layer JPA/Hibernate or should I use simple JDBC?

Ten tables? That schema is small enough where JPA and Hibernate seem like overkill to me. Create a POJO interface for your persistence layer and you can isolate the implementation from clients. Start simple and switch it if you decide you need to or want to.

Upvotes: 1

Related Questions