When were JSF and JavaBeans created and is this the "correct" way tobuild web pages in Java technolo

J

jmDesktop

In my move away from Microsoft and ASP.NET to Sun and Java (various
technologies), I started reading about JSP and Servlets. I had no
other knowledge of Sun's products, and I was quickly dismayed at the
mixture of embedded code and presentation. I was wondering why this
was any better than classic ASP or PHP (no offense to anyone.) I knew
I had to be missing something. Anyway, I kept reading and finally
found Java Server Faces and JavaBeans. This made me feel much better
and unless something is trivial, I guess this is the way I'm
"supposed" to go about designing websites with Java outside of some
framework. That's simplistic, but it appears to be essentially
correct. Please let me know if I am wrong here. This appears to be
the current standard in Java when creating web pages, but I'm still
very new.

I am curious about something, though. Was JSF and JavaBeans created
as a response to the separation of layers found in ASP.NET (at least
2.0) or were they simultaneous, or just one quicker than the other to
get it to market?

Thanks.
 
A

Arne Vajhøj

jmDesktop said:
In my move away from Microsoft and ASP.NET to Sun and Java (various
technologies), I started reading about JSP and Servlets. I had no
other knowledge of Sun's products, and I was quickly dismayed at the
mixture of embedded code and presentation. I was wondering why this
was any better than classic ASP or PHP (no offense to anyone.) I knew
I had to be missing something. Anyway, I kept reading and finally
found Java Server Faces and JavaBeans. This made me feel much better
and unless something is trivial, I guess this is the way I'm
"supposed" to go about designing websites with Java outside of some
framework. That's simplistic, but it appears to be essentially
correct. Please let me know if I am wrong here. This appears to be
the current standard in Java when creating web pages, but I'm still
very new.

I am curious about something, though. Was JSF and JavaBeans created
as a response to the separation of layers found in ASP.NET (at least
2.0) or were they simultaneous, or just one quicker than the other to
get it to market?

No. Separation of presentation and code was done before ASP.NET existed.

Look for framework like Struts.

JSF is just the newest and official way of achieving the same.

Arne
 
A

Arved Sandstrom

jmDesktop said:
In my move away from Microsoft and ASP.NET to Sun and Java (various
technologies), I started reading about JSP and Servlets. I had no
other knowledge of Sun's products, and I was quickly dismayed at the
mixture of embedded code and presentation. I was wondering why this
was any better than classic ASP or PHP (no offense to anyone.) I knew
I had to be missing something. Anyway, I kept reading and finally
found Java Server Faces and JavaBeans. This made me feel much better
and unless something is trivial, I guess this is the way I'm
"supposed" to go about designing websites with Java outside of some
framework. That's simplistic, but it appears to be essentially
correct. Please let me know if I am wrong here. This appears to be
the current standard in Java when creating web pages, but I'm still
very new.

I am curious about something, though. Was JSF and JavaBeans created
as a response to the separation of layers found in ASP.NET (at least
2.0) or were they simultaneous, or just one quicker than the other to
get it to market?

Thanks.

Pretty much as soon as JSP and servlets came out people recognized that they
didn't want HTML in servlets, and they wanted minimal code in JSPs. To put
the timeline in context, back in 1999 you could obtain JSWDK 1.x (which
featured JSP 1.0 and Servlet 2.1); JSP 1.1 with custom tags is about 8 years
old itself (I stand to be corrected). And you'll find plenty of articles on
servlet/JSP MVC going back almost a decade - many of the main frameworks
that formalize this stuff started back then.

IOW, competent Java programmers were striving to do The Right Thing pretty
much from the gitgo. Didn't stop incompetent Java programmers from producing
horrible JSPs and servlets...

Incidentally JavaBeans were originally (and fundamentally still are) meant
to be components that could be manipulated by visual builders. The whole
notion of setter and getter methods named a certain way, existing for every
"property", comes from JavaBeans and this purpose.

JSF is more a different way of doing things than a new way - it is still
MVC. Where it really stands apart (in the Java Web world) is in having UI
components with events, state management etc. It's still servlets and JSPs,
though (the latter usually, not always).

AHS
 
K

Kevin McMurtrie

Lew said:
No. Separation of presentation and code was done before ASP.NET existed.

Look for framework like Struts.

JSF is just the newest and official way of achieving the same.

"Model 2", the Sun fundamental MVC pattern, has been around since at least
1999.
<http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html>

2002.
<http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2
e/web-tier/web-tier5.html>


Marty Hall, the noted Java writer and professor at Johns Hopkins, reputedly
marked ten points off for every line of scriptlet in a JSP.

I would say yes, Sun was indeed much quicker than Microsoft to get it to
market. Good point.

Seriously, according to Wikipedia,
The pattern was first described in 1979[1] by Trygve Reenskaug, then
working
on Smalltalk at Xerox PARC. The original implementation is described in
depth
in the influential paper Applications Programming in Smalltalk-80: How to
use
Model-View-Controller.[2]

MVC is a very simple design pattern that helps you organize the
interaction with a complex state machine. It was even used in the
earliest arcade games :)

Something like:

Gather button, switch, and clock states
Apply inputs to game model
Analyze game model for state changes
Exit if new state is not game play mode
Apply new states to game model
Iterate through model objects to rasterize sprites
Iterate through model state changes for hardware audio pulse
Iterate through model state changes for hardware video effects
Wait for VBL
Swap video buffers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,979
Messages
2,570,185
Members
46,728
Latest member
FernMcmull

Latest Threads

Top