Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   When were JSF and JavaBeans created and is this the "correct" way tobuild web pages in Java technologies? (http://www.velocityreviews.com/forums/t615448-when-were-jsf-and-javabeans-created-and-is-this-the-correct-way-tobuild-web-pages-in-java-technologies.html)

jmDesktop 05-18-2008 03:36 AM

When were JSF and JavaBeans created and is this the "correct" way tobuild web pages in Java technologies?
 
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.

Arne Vajhj 05-18-2008 04:04 AM

Re: When were JSF and JavaBeans created and is this the "correct"way to build web pages in Java technologies?
 
jmDesktop wrote:
> 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

Arved Sandstrom 05-18-2008 05:13 AM

Re: When were JSF and JavaBeans created and is this the "correct" way to build web pages in Java technologies?
 
"jmDesktop" <needin4mation@gmail.com> wrote in message
news:e2e6b1a1-7867-4010-9b6d-3ff2379ddd65@k37g2000hsf.googlegroups.com...
> 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



Kevin McMurtrie 05-19-2008 04:01 AM

Re: When were JSF and JavaBeans created and is this the "correct" way to build web pages in Java technologies?
 
In article <FM-dnfSNavfRJrLVnZ2dnUVZ_ojinZ2d@comcast.com>,
Lew <lew@lewscanon.com> wrote:

> jmDesktop wrote:
> >> 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,

>
> Arne Vajhøj wrote:
>
> > 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/guide...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.
>
> >> or just one quicker than the other to get it to market?

>
> I would say yes, Sun was indeed much quicker than Microsoft to get it to
> market. Good point.
>
> Seriously, according to Wikipedia,
> <http://en.wikipedia.org/wiki/Model-view-controller>
> > 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

--
Block Google's spam and enjoy Usenet again.
Reply with Google and I won't hear from you.


All times are GMT. The time now is 09:54 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.