Re: Which do I use for web design?



"Lew" <conrad@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A92dneCoV5QU8drVnZ2dnUVZ_sKdnZ2d@xxxxxxxxxxxxxx
Arne Vajhøj wrote:
It is significant easier to write JSP pages than servlets.

JSPs are approximately as hard to write as HTML.

JSF is slightly harder, mitigated by the presence of decent visual tools.
Even with a text editor JSF isn't overly hard for what it offers, though I
admit getting into the mindset of it took me a while. FWIW, the key was a
now-lost link that advised to think of JSF as similar to Swing.

JSP and JSF make a nice staged learning ramp. Get comfy with JSP first.
Normal form widgets like <input type="text".../> are just fine for a broad
category of web apps. Then take your time to assimilate JSF, starting
with the easiest stuff first. Then dive into richer frameworks built atop
JSF, like Tomahawk and Tobago.

Luckily for us these technologies dovetail well that way.

<http://myfaces.apache.org/tomahawk/index.html>
<http://myfaces.apache.org/tobago/index.html>
<http://myfaces.apache.org/>

--
Lew

Good post (not to mention some of your others, plus Arne's). To someone who
is a bit overwhelmed by everything out there (like the OP, and like I have
been myself from time to time), I usually suggest taking the time (and it
really doesn't take that long) to design and code a best practices MVC
servlet/JSP/beans web app: servlet as controller, JSPs as view, and beans
for the model. Pretty much bare metal, and it provides the grounding for
understanding what frameworks will do for you. Let's call this Stage A.

The next stages that you mention are also ones that I would agree with.
Although any of a number of different frameworks could also be championed.
The key is to keep in touch with what the framework is doing for you that
originally you did in Stage A.

As you point out, there's typically Stage B, which is the initial framework
that replaces Stage A (you coding everything). And then there's Stage C,
which typically involves enriching the UI somehow - maybe better widgets,
maybe AJAX, maybe both.

These are all front end elaborations, really. Getting fancier with the
backend (the model), with ORMs and/or EJBs etc, is another matter. Similar
process, though. For a simple app you can get away with well-designed but
essentially hand-coded DB access...later on you'll also see that having
something else take care of that for you is nice.

Main thing though, it is very easy to lose sight of exactly what it is these
things do for you. I sympathize with the OP.

I was sort of lucky in this regard (your perspective may differ). I may date
myself, but I was already well into a second decade of programming before
HTML and Mosaic and Lynx ever showed up. CGI shortly followed. There were
obviously best practices back then, but often loosely observed. My first
exposure to J2EE was precisely of the kind I describe as Stage A - the main
reason being, it was J2EE 1.2 back on 1999-2000, and we had no choice. We
had EJB 1.1 session beans and BMP entity beans, Servlet 2.2, JSP 1.1...the
app had to deliver WML/HDML content to cellphones and HTML to browsers, so
we also used XML/XSLT, and ended up coding our own custom JSP tags for the
latter. By some incredible stroke of good luck our smallish developer team
(about half a dozen at the start in '99) was just overloaded with guys that
had reams of industry experience (*), and although MVC was new to us, it
just seemed "right". Actually, in 1999 almost everything I describe, Java
included, was more or less "new".

God knows the J2EE app servers were...we spent about three months with
Netscape trying to debug a fundamental bug that they had in iPlanet related
to primary key classes. What saved our bacon on this front was that we
discovered Evermind's Orion J2EE server (for a 2000 blurb see
http://www.serverwatch.com/sreviews/article.php/1376021), which was then
(and for a long time afterwards) a developer's first choice for J2EE. IMHO.

I would never again want to do that much work for what these days would be
classified as a small/medium enterprise application. But I never regret
having had to do it. Because now I know what all these frameworks and IDEs
are doing to save my time.

AHS


.



Relevant Pages

  • Re: JSP vs. Struts vs. JSF vs. Swing vs. Tapestry vs. Spring vs. Rails
    ... boat by not using any of the other frameworks out there. ... presentation in the JSP file, making custom tags when I need to do some ... I have seen examples of JSF (also EL in JSP ... learning Java, servlets or custom tags. ...
    (comp.lang.java.programmer)
  • Re: JavaServer Faces
    ... > architectures and frameworks: WebObjects, WebMacro, Velocity... ... No, seriously, some of the reason that we have so many web app ... JSF. ... With some better validation handling, ...
    (comp.lang.java.programmer)
  • Re: JSF code generation
    ... Seems to me that if you're going to embrace NetBeans Visual Web JSF you ... may as well go whole hog, and *not* look too much at the generated JSP. ... I prefer the cleanness of Facelets. ...
    (comp.lang.java.programmer)
  • Re: Web-Anwendungen
    ... Wer redet denn hier von JSF, ... Die Ersteller von JSPs sind gewöhnlich keine Java Entwickler wenn man das mal vom Rollenkonzept her betrachtet....Schau Dir doch einfach mal SUNs Ausführungen zum Thema ... Jochen und ich sagten man soll mit Servlets *anfangen*. ... wenn du meinst er soll sich zuerst servlets beibringen dann JSPs und dann noch irgendwelche frameworks und dann sein UI migrieren sind wir einer Meinung. ...
    (de.comp.lang.java)
  • Re: How to dynamically generate a JSF page using a bean
    ... JSF is a superset of JSP implemented through tag libraries. ... That is, take a regular JSP, add some stuff to it, and you have JSF. ... Behind JSF is an interaction model with a multi-stage lifecycle for request handling and component management. ... Combined with the standard tag library and the Expression Language it can maybe do too much? ...
    (comp.lang.java.programmer)