Re: Recommendations for a web application framework?
- From: Chris Smith <cdsmith@xxxxxxx>
- Date: Fri, 7 Jul 2006 00:48:16 -0600
Timo Stamm <timo.stamm@xxxxxxxx> wrote:
Do you mean separation of HTML and Java or separation of business
objects and view code?
I meant separation of view code from application code. I try to avoid
words like "business logic" or "business objects", but you could assume
that we mean about the same thing. I did contribute some confusion,
though, by saying "I can actually build my entire Java code..." when I
really should have said that I can write the core application in a way
independent of the user interface. JSF *does* include Java in the view
module; but the interesting separation is between view and application
logic, not between Java and JSP/HTML/etc.
In my opinion, even PHP template libraries like
TAL do a better job of separation in both respects than JSF.
I'm convinced, then, that we are talking about different things. TAL
doesn't even get you halfway there. It's nothing more than an
abbreviation language for encoding PHP control structures into special
"tal:" attributes. It does nothing about the need to keep form
parameter names in sync between code that uses them and HTML that
generates them. It similarly does nothing about converting the data
from weird HTML for encoding rules into reasonable high-level data
structures in the web application. These are things that tie together
application code and the view, and the manual maintenance is a huge
source of hassles.
That's Struts. But Struts is the oldest (and most outdated) of all Java
Web Frameworks I know.
In a different form, it's also the Wicket example you posted, which has
two id attributes in the page corresponding to the two components; and
then a Java class representing that page, which again has to match the
id attributes on components on the page. It's a little better than
Struts, to be sure. Yet I still see this duality wherein there's a Java
class representing the form.
There are many Frameworks that hide HTTP
entirely. With some, you don't even have to care about request-response
cycles:
For most common purposes, JSF could be included in that category. JSF
does define a request processing lifecycle, but typical application code
just defines event listeners and they get called at the right time. You
have to know a few things (for example, say, that converters get called
before validators) but this is more about the JSF model than HTTP
request processing. The request processing lifecycle becomes more
important when you're generating non-JSF content (such as dynamically
generated images and such), or when you're pulling more advanced tricks
such as when I wrote a JSF component to interact with JSF backing beans
straight from JavaScript in a web page, and needed to prevent the
rendering of an HTML response to that HTTP request. I wonder how I
would have accomplished something like that if JSF hid the request
processing lifecycle just a little more.
--
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation
.
- Follow-Ups:
- Re: Recommendations for a web application framework?
- From: Timo Stamm
- Re: Recommendations for a web application framework?
- References:
- Recommendations for a web application framework?
- From: Alan Meyer
- Re: Recommendations for a web application framework?
- From: David Segall
- Re: Recommendations for a web application framework?
- From: Alan Meyer
- Re: Recommendations for a web application framework?
- From: Chris Smith
- Re: Recommendations for a web application framework?
- From: Timo Stamm
- Recommendations for a web application framework?
- Prev by Date: Use WebSphere Studio Aplication Developer 5.1 with a 5.0 server
- Next by Date: free the space after remove from hashmap
- Previous by thread: Re: Recommendations for a web application framework?
- Next by thread: Re: Recommendations for a web application framework?
- Index(es):
Relevant Pages
|