MultiLayer OO Design(applied in web and desktop UI on same solution)

I am starting a Java project that has web and desktop interfaces.

I am designing a multi layer solution like:

- persistence layer (PL)

- business rules layer (BL)

- UI layer (UI)

I strongly want to reuse PL and BL, independent of wich UI I am.

Should I use Java Beans as BL or PL? EJB?

What about MVC model? Does it work for me (i am not familiarized with MVC)?

I am thinking about using Servlets, calling jsp files as pieces of the final page, to control web UI. What do you think?

Tks

Felipe

[561 byte] By [felipena] at [2007-9-28 1:38:41]
# 1

First, are you sure that your application is of such a scale that it requires EJB?

If youare talking about look and feel, I guess you have to design it separately for web as well as the stand alone application. Some classes could be reused, however, that is dependent how reusable your design is.

The business logic could be made into beans - realistically.

Go to ootips.org you will find literature on MVC.

Ironluca

Ironlucaa at 2007-7-7 21:12:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

Hi,

I'm working in a project similar to yours, involving the same requeriments.

To develop the web part of the application, I suggest you take a look at struts (jakarta.apache.org/struts). It is a framework based on Model-1 pattern (MVC pattern intended to internet).

Danilo.

kovalechyna at 2007-7-7 21:12:13 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
sorry, Struts is a framework based on Model-2 pattern
kovalechyna at 2007-7-7 21:12:13 > top of Java-index,Other Topics,Patterns & OO Design...