Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is JSP relevant in 2015?  RSS feed

 
steven branigan
Greenhorn
Posts: 6
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings and Salutations!

I am new to the forum, so hello, pleased to meet you, and thank you for your assistance and help in advance.

I am a relative newbie in the world of Java. My skills are still in their infancy, however I appreciate the power of the language and want to continue with my development.

Part of that development is learning some web based java application development principles.

The language/code base (if that's even the right way to refer to it) I have singled out is JSP.

I am currently reading Neal Fords, Art of Java Web Development.

My questions to begin with are;

1. Is JSP worth learning in 2015, or is there another Java based language that I should be looking at? Is JSP relevant in 2015?

and,

2. Is the book I am reading worth the time, or should I be reading something else?

As I said I'm a relative newbie so some feedback / direction would be greatly appreciated.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

For any Java web development, servlets and JSP represent the basic foundation. Having good knowledge in servlets will be a key to understanding many web frameworks out there like struts, spring and those mentioned in your book

A good intro book in servlets and JSP is Head First Servlets & JSP 2e by Kathy Sierra and Bert Bates.
 
steven branigan
Greenhorn
Posts: 6
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:Welcome to the Ranch

For any Java web development, servlets and JSP represent the basic foundation. Having good knowledge in servlets will be a key to understanding many web frameworks out there like struts, spring and those mentioned in your book

A good intro book in servlets and JSP is Head First Servlets & JSP 2e by Kathy Sierra and Bert Bates.


Thanks for the info.

So learning servlets and JSP is just the beginning? Eventually I will graduate to more robust frameworks like struts and spring?

Thanks for the book reference too. Appreciate it.

Steve
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets and JSP's are specifications that specify how to build web applications that are targeted to be run inside a Servlet / JSP container. Struts is a framework which itself is based on the JSP / Servlet API and provides us with some easy to use and convenient ways to tie UI with the controller.

My advice to you would be to dive into Scala / Play if you are into web development. I'm saying this because your question was "Is JSP relevant in 2015??" Having done Java EE development for over a decade, my opinion is No.. no more JSP's for me when I can do it much more lightweight, efficient and simple with HTML5, Play and a bit of Scala!
 
steven branigan
Greenhorn
Posts: 6
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Harry wrote:Servlets and JSP's are specifications that specify how to build web applications that are targeted to be run inside a Servlet / JSP container. Struts is a framework which itself is based on the JSP / Servlet API and provides us with some easy to use and convenient ways to tie UI with the controller.

My advice to you would be to dive into Scala / Play if you are into web development. I'm saying this because your question was "Is JSP relevant in 2015??" Having done Java EE development for over a decade, my opinion is No.. no more JSP's for me when I can do it much more lightweight, efficient and simple with HTML5, Play and a bit of Scala!


Maybe this is a stupid question.

I am really wanting to learn this so that I can get into developing enterprise solutions, web applications that are rich in functionality.

For example, to build front ends for ERP systems using ERP API's and iSeries Websphere.

In that instance do you still feel the same way about JSP and struts type frameworks?

Do HTML5, scala and play combined provide the same scalability and functionality in that type of situation?
 
steven branigan
Greenhorn
Posts: 6
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not so sure about scala and play. Its looks a little lightweight. Am I wrong?
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSPs are alive and well.

I'm moderator on the JavaServer Faces forum. I "eat my own dog food", so I have quite a few JSF apps in various stages of production. But that doesn't mean that I never code JSPs.

I use JSPs for things where JSF isn't appropriate. For example, one of my "showcase" apps is a mass-transit system route manager. It uses Google Maps to display routes and bus stop locations and to make that work, I have to serve up AJAX content in XML form.

JSF is not intended to output XML - it's designed for interactive form editing. So when I need XML, I lay it out on a JSP. I've got another app that outputs YAML. It, too is a JSP. I've got stuff that's using the Spring Framework web framework. JSP again.

So yeah. Lots of JSP and not just in the creaky old stuff.
 
steven branigan
Greenhorn
Posts: 6
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, Joe and K. Tsang,

Thanks for contributing to this discussion.

As you can tell, I am very much at the beginning with regards learning some web frameworks, so I am trying to make sure that I choose to learn one that is relevant. Last thing I need is to learn something that is outdated and clunky. This is really all about development and improving my skillset. So thanks for contributing.

what do you guys know about spring.boot? Is that something that would be worth looking at too, do you reckon?

Another goal here is to open my eyes to new java based technologies where learning servlets and jsp would build my knowledge and help me to get more involved in the development process, if not coding, at least contributing in some way
Steve
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't dive into Spring Boot at the expense of learning more general technologies. But Spring Boot is a good way to get a single-purpose webapp up and running with minimal fuss on the user's end.

If you're familiar with the (tomcat-based) VMWare console that was used several years back, you have an example of why Spring Boot can be useful. Most people never even knew that they had a Tomcat server running on their desktop machines.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I completely disagree with the Scala/Play advice. It is currently a very niche language and framework and is not widely used. Learn Servlets and JSP and the more widely used frameworks to start out. Niche languages and frameworks can come later at your own interest or needs.

And I say this as a user of the Play framework. It's not the first framework you want to learn.
 
steven branigan
Greenhorn
Posts: 6
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys,

I am slowly getting into servlets and JSP thanks to Neal Fords book. It looks like a potential minefield to the novice. I've managed to clear the chapters about web apps designed purely at the servlet level, web apps designed purely at the JSP level and their shortcomings. I've read the chapter on JSP tags and utilising them to try to reduce how much the logic and presentation layers are coupled. On to proper design now.

Some of the apprehension I had about JSP and servlets is dropping off, my initial research led me to believe it was a little clunky. I guess as with all coding once the proper design patterns are adhered to things can be a lot easier.

I am guessing that you guy's have experience working with web applications? If you were starting a new project, what would be your initial choice with regard to frameworks, API's etc.?

Steve
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been writing web applications since 1998.

For a first project, I would use just servlets and JSP. No other frameworks. It's the best way to make sure that you have a good solid foundation.

Then (see caveats below) I'd likely look into SpringMVC as it seems to be the most-used of the Java frameworks at this time.

Unless you have a specific need (like a job) to look into JSF, I'd avoid it like the plague. In the view I have of the industry, its appeal is in a tailspin.

Caveats: What I'd also be doing is to make sure that you are learning the client-side technologies as well. Especially JavaScript. The industry trends seems to be away from frameworks that render UI on the server and towards moving all that to the client. Server-side frameworks are beginning to have the stink of the tar pits around them.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
steven branigan wrote:If you were starting a new project, what would be your initial choice with regard to frameworks, API's etc.?

So now I'm ready to answer this. Were I starting a new project, I'd not use any server-side UI framework. I'd create a RESTful API for the server and do the rest with JavaScript on the client using client-side MVC frameworks.
 
Stefan Evans
Bartender
Posts: 1836
10
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is JSP still relevant? In my opinion, not so much.

The current trend is for richer client renderings using HTML and javascript.
Javascript frameworks like Angular.js, Backbone etc etc are becoming more prevalent.

In an application like that, the dynamic part of the view layer is done via javascript rather than JSP.
Communication is via ajax requests which exhange data back and forth, but normally very little in the way of rendered HTML.

Thats not to say that the JSP/Servlet framework is completely irrelevant. You DO need some sort of server to back up your front end code. And JSP/Servlet is a solid choice.
However I think it is less relevant than it used to be.

Thats my 2 cents anyway.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
So now I'm ready to answer this. Were I starting a new project, I'd not use any server-side UI framework. I'd create a RESTful API for the server and do the rest with JavaScript on the client using client-side MVC frameworks.


I see this as a bolstering point to my earlier suggestion of using a light weight server like Play, expose your services via REST, build the UI using HTML5 with some Javascript. The added benefit is that with Play / Scala, writing concurrent, parallel code is easy and you take advantage of the multiple core on your hardware.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, Play is not a bad choice for creating RESTful APIs -- in fact, Play 1.x is what I am using to maintain a RESTful API for one of my clients. But I'm still no-sold on Scala -- I'd still advise the OP to go with Java as it will be more relevant to the job market.

If, and I think it's a pretty big if, Scala becomes a real player at some point, or a specific job calls for it, the OP will be well-situated to look into it at a later point.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!