Hi!

Andrea Vicentini wrote:
> OK let's digress and start a new thread.
> May you explain more deeply what you mean with "it
> needs to be adapted"?

IMHO a more precise statement would be that one needs to understand how
the MVC paradigm/ideas relates to the various concepts in J2EE, and then
how to put it to practical use.

> I have experience in the development of web front
> ends, and the MVC design has never been put into
> discussion.

Which is common but unfortunate.

> I've never actually used Struts, but it seems a nice
> and handy framework to use. What do you think about
> it?

The basis is good, although IMHO the implementation can become even more
refined with a more complete understanding of MVC. It is also a good
idea to expand MVC to the notion of HMVC, or Hierarchical MVC.

For an alternative framework that utilizes (designed by self), you may
want to look at WebWork:
http://www.sourceforge.net/projects/webwork

> I've read the J2EE BluePrints, and I don't like the
> organization of the PetStore -- I find it complex and
> a bit chaotic (friendly said :)...

Likewise :-)

> To bring the discussion on EJB themes again: some
> questions ago, the point was about the development of
> "taglibs to access EJBs" -- and, if I don't
> misunderstand you, you think they're useful (or at
> least, not to avoid). May you explain why/when/under
> which conditions?

The above mentioned WebWork does indeed use taglibs as the primary form
of creating the View in MVC. The main reasons to use them are that they
are, syntactically, similar to HTML, i.e. they are tags hence making
them "easy" to use, and that one can more easily limit the range of
expressions possible, again due to the limited syntax that a custom tag
library represents.

Compare this with Java in JSP pages where it is easy to shoot onself in
the foot by accidentally "doing too much". With a taglib, such as the
WebWork one, that is designed to only allow a certain type of operations
- those purely aimed at presentation of model data - the risk for this
to happen is lessened.

> I think it even opens a question on how the beans
> should be designed... I mean, a bean that knows, it
> will be accessed from a Taglib should have a different
> architecture/design/features than a bean that knows,
> it will always used only by model and/or controller
> clients.

Probably yes. Thus, the above mentioned taglib only works in concert
with controller JavaBeans, so that the tie between the EJB's and the
taglib becomes minimal, or non-existent.

So, we have:
* EJB's represent the model, and parts of the controller (the business
logic) (MC)
* JavaBean controllers, in the servlet engine, represent controller
logic (the application logic) (C)
* The taglib used in JSP's is used to extract and view the model data.
(V)

The model used by WebWork expands upon this by allowing this system to
be used hierarchically so that a single page can be broken down into
components, each using the MVC paradigm, and which may be broken down
again into components using MVC, and so on. This gives maximum
flexibility, and ensure maximum possibilities of reuse (on all levels).

regards,
  Rickard

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to