• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is the trend away from JSP?  RSS feed

 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a Java SE programmer who is only recently getting into Java EE web programming. From the small amount of information that I have read, it appears that JSP is no longer the preferred way to present the GUI? Or am I way off?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From where I sit, way way off. In fact, I see a trend in the other direction -- away from big frameworks that promised the world and delivered only unnecessary complexity.

You will, of course, get opinions across the entire spectrum, but that's what I'm seeing a great deal of.

Or is that not what you were asking?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way I see it is that the question framework vs. no framework is orthogonal to the question of JSP vs. no JSP - all combinations are possible. Approaches that do not use JSP (like templating engines such as FreeMarker and Velocity, and entirely different approaches like Apache Wicket and GWT) are -very slowly- gaining ground, so it stands to reason that JSP does not have the market share it used to have. But -and note that these numbers are entirely made up- now it may be at 80% when it used to be 90% 5 years ago. So, JSPs are still the dominant way to create GUIs for Java web apps by a large margin, and very likely to remain so for a long time.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the small amount of information that I have read, it appears that JSP is no longer the preferred way to present the GUI? Or am I way off?


How about, the trend is "poorly written and poorly designed Java Server Pages(JSP) are no longer the preferred way.

Sloppy, unmanageable JSPs with nested business logic are no longer in fashion
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with James. You can do quite a lot with JSP + EL, and I like its simplicity.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Clarks wrote:Sloppy, unmanageable JSPs with nested business logic are no longer in fashion

Indeed. JSPs that are purely view components, employing JSTL and EL, and no with Java code or scriptlets, is the modern best-practice standard.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much for your informative answers. I had meant to post this in the JSF forum in reference to Ed Burns's & Chris Schalk's new book, because I got the distinct impression that J2EE's trend was away from JSP, as per this quote from wiki under the topic "JavaServer Faces":

"Out of the box, JSF 1.x uses JavaServer Pages (JSP) for its display technology, but can also accommodate other technologies (such as XUL and Facelets). JSF 2 uses Facelets by default for this purpose. Facelets is a more efficient, simple, and yet more powerful view description language (VDL)."

My learning "trail" has been simple Servlet/JSP stuff. As a matter of fact I got most of my start right here in the "servlet" trail: "http://www.javaranch.com/drive/servlet/index.jsp".

Every time I start into Sun's official tutorials concerning J2EE/Servlets I begin to get the "I am overwhelmed" feeling. So instead, I started looking into Tomcat. But I am not sure of it's advantages over Orion, which I already have set up.

Point being that I am doing this for my own educational benefit and have to fit it into my regular work schedule, and therefore want the most streamlined approach. I like things as simple as possible from both a programming perspective and, for that matter, from most other perspectives as well. Thanks again for your help.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill Johnston wrote:Every time I start into Sun's official tutorials concerning J2EE/Servlets I begin to get the "I am overwhelmed" feeling.


This is a long way from "to JSP or not to JSP", but that isn't an unreasonable feeling. Programming languages are easy, if you want something done you write some code, and if you want to change that then you change the code or write more of it. But the Java EE trend is to take things out of programming and to put them into configuration.

This is a good thing to do, from the design point of view. However in practice to change the configuration you have to track down scattered bits and pieces of configuration from all over the place. A real-life example: we're upgrading our database server to a new version. So we set it up on a new server, and created a test copy of our old database. It turned out there was a bug in the current JDBC drivers for that DB so we had to include a file which patched the bug. I wrote up the process for changing the Websphere configuration for the connection pool, and by the time I finished there were 19 steps in the procedure.

And that's just a small part of the procedure for setting up a working instance of Websphere, even though we aren't using EJBs or anything complicated. If you go over to the Ranch'sWebsphere forum and scan through the posts, you'll see that many of them are about configuration problems. Most of those go unanswered because you can't say "Post your configuration and let's have a look at it".

So anyway, yeah, as the others have said, stick to JSPs for getting started in Java EE. It does take some getting used to no matter what you choose, so sticking to the standard methods is best until you know what you're doing.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can sympathize with the feeling of being overwhelmed when looking into JEE technologies. It has always seemed to me that there were a number of different technologies for any single aspect of a web application, and choosing between them required in-depth knowledge which I didn't yet have.
The application server is a good example of this. I chose JBoss AS (community edition) because I had previous experience with it.

I agree that Servlets and JavaServer Pages are not old technology (yet). There are so many tutorials that walk you through all that is needed to use them, it just takes time to go through them. To help me, I downloaded Eclipse (Galileo) and the JBossTools plugin (or whatever they call it) which provides JBoss-specific features to Eclipse. Now, it's easy to create a full JEE application which includes Servlets and JSPs, Session EJBs, Entities, etc. and deploy on my JBoss application server.

If you want help getting started, there's just no better place than Java Ranch. If you want more information on what I did to get rolling, just ask and I'll provide you with some links, etc. ... and of course you can always ask questions.

Good luck!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is far and away the dominant view technology.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you too Paul.

One quick comment concerning the " ... scattered bits and pieces of configuration from all over the place.", and about my own "Keep it simple Stupid" point of view ...


In a prior job I worked with one particular gentleman who was known to have an exceptionally high IQ, and who could routinely do the NY Times Xword puzzle in about 3 to 5 minutes, and his programming logic could be relied on as solid. He took things to an extreme, in that, as I recall, he had made it his personal quest to decouple Cobol main programs from one or more particular subprograms, by modifying the main programs that called the subprograms; because to him it was much simpler that way. Though probably all of us would agree - if I may be so bold - that it was very bad design to do so.

I guess then, that intellectual capability is not the sole reason for making things either simple or complex, and that there are always more than "one way to skin a cat" ... though I can assure you they are all messy. regards,

 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Mark and David.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As much as I love JSTL + EL + JSP, I still find that many are unaware of EL and script-less pages

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak Bala wrote:As much as I love JSTL + EL + JSP, I still find that many are unaware of EL and script-less pages

Yes, I find it quite amazing that over eight years after the introduction of JSP 2.0 with it's native EL implementation that people still write JSPs as if it were 2002.

It might be attributed to the fact that most books on JSP still teach scriptlets as part of JSP (because they still are -- not officially deprecating scriptlets with JSP 2.0 was an mistake, in my opinion) and don't emphasize good practices and use of the JSTL and EL enough.

 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm reading JSTL in Action (from Manning) and it assumes for the most part that the JSP is the entire application. There are a few comments about how the organization may have Java programmers writing "back-end" application components, but mostly, the text assumes the JSP is it.

Since I went through Servlets first, I didn't find this too distracting - I just basically ignored certain sections of the book, as it was clear to me that the code being considered would be done within the Servlet and not the JSP. I can see, though, how this may lead some in the wrong direction.

The book did a real good lob teaching me JSTL though, so don't get me wrong. I'm just glad I had an understanding of Servlets and MVC design patterns before I read it.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!