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

Discussion in 'Java' started by jmDesktop, May 18, 2008.

  1. jmDesktop

    jmDesktop Guest

    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.
     
    jmDesktop, May 18, 2008
    #1
    1. Advertising

  2. jmDesktop

    Arne Vajhøj Guest

    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
     
    Arne Vajhøj, May 18, 2008
    #2
    1. Advertising

  3. Re: When were JSF and JavaBeans created and is this the "correct" way to build web pages in Java technologies?

    "jmDesktop" <> wrote in message
    news:...
    > 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
     
    Arved Sandstrom, May 18, 2008
    #3
  4. Re: When were JSF and JavaBeans created and is this the "correct" way to build web pages in Java technologies?

    In article <>,
    Lew <> 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/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.
    >
    > >> 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.
     
    Kevin McMurtrie, May 19, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dudu
    Replies:
    0
    Views:
    409
  2. Sebastian Fey

    JSF debugging / JSF newsgroup

    Sebastian Fey, Apr 7, 2006, in forum: Java
    Replies:
    1
    Views:
    7,699
    Danno
    Apr 7, 2006
  3. BlackIce
    Replies:
    1
    Views:
    17,223
  4. Replies:
    1
    Views:
    513
  5. Dr. Leff
    Replies:
    3
    Views:
    327
    David Mark
    Oct 15, 2007
Loading...

Share This Page