Re: Recommendations for a web application framework?



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
.



Relevant Pages

  • Re: Recommendations for a web application framework?
    ... Yet I still see this duality wherein there's a Java ... HTML templates and insert a value into a specific position in the template. ... and I think JSF does it. ... It's exactly that -- an HTML file is always associated with a Java class ...
    (comp.lang.java.programmer)
  • Re: tiny java web framework
    ... I was referring to the impression I got of the example code - pages and backing Java - that Wicket presented on its site. ... I saw no real advantages here over how I'd code those examples up using JSF and Facelets. ... From time immemorial template and toolkit purveyors have touted their approach as the miracle solution to all your application flow and deployment needs. ... Swing does not take a particularly novel outlook on GUIs - it's a fairly straightforward library and comfortably familiar for anyone who's worked on event-driven GUI platforms, which is basically all of them. ...
    (comp.lang.java.programmer)
  • Re: tiny java web framework
    ... I was referring to the impression I got of the example code - pages and backing Java - that Wicket presented on its site. ... I saw no real advantages here over how I'd code those examples up using JSF and Facelets. ... I agree that there are no framework that is less complex for all ... Many Java developers report success and satisfaction with Java Server Faces over Java Server Pages (JSP). ...
    (comp.lang.java.programmer)
  • Re: Recommendations for a web application framework?
    ... TAL do a better job of separation in both respects than JSF. ... But TAL certainly can't compete with JSF because it is just a template library, not a component oriented web framework. ... But with wicket, you could encapsulate the two components for the link and the output label into one component and you can use language features like inheritance to remove redundancy (yes, it works with HTML templates too because a HTML file is always associated with a java class). ... You have to solve too many problems that are not part of the intrinsic problem, but are introduced by the framework that you utilize to solve the intrinsic problem. ...
    (comp.lang.java.programmer)
  • Re: Brauch mal eine kleine Beratung
    ... Ist JSF ... deutlich schwergewichtiger. ... Auf EJBs kannst du bei Java verzichten - es gibt mindestens 30 ... der Domainnamen von Matthias Ernst in dieser Gruppe... ...
    (de.comp.lang.java)