• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Replacements for JSP and JDBC  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took Java a long time ago, and now I'd like to apply for a job as an entry-level Java programmer.

To help my chances of getting hired, I'm writing a Java project. The code
1) reads the contents of a MySQL database (using JDBC),
2) displays the database contents in a web page (using JSP), and
3) lets the user type in the web page and click buttons, in order to add, modify or delete the database items.

I plan to put a link to that project in my resume.

The problem is, I've read that JSP has been replaced with JSTL, EL and REST web services. Is that right? Has JDBC been deprecated also?

If so, then I guess I'll have to learn those technologies, so that I'll be up-to-date, and then re-write my project to include the new technologies.

What should I learn first? Do I first have to learn Java Beans, then EL, then JSTL? Is REST independent of those three subjects?

Do you have any recommendations for books or online tutorials that I should read? Thank you.
 
Rancher
Posts: 3596
39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL and EL are both used in JSP pages.  They aren't any sort of replacement for them.  They are a fundamental part of using JSPs to display data, so you should learn them now as part of your project.

REST services are a different beast, as they are not necessarily used for browser apps.  They work with anything set up to "talk" to them.
For example, a foreign exchange web service that supplies the exchange rate between two given currencies may be used to show that value on a forex web page, or may be used "behind the scenes" to convert a bill between currencies before giving the value to some other system.
For a web application, RESTful services move the GUI away from JSPs and into the realm of Javascript, via various frameworks.

JDBC is fine for what you are doing.
It's still at the heart of any Java interaction with a SQL database.

So...
Since you are looking at an entry level role, and you want to work with Java, your current project sounds fine as a demo, but make sure you have it structured correctly.
But...make sure your JSP pages use EL/JSTL and don't have any Java code in them, and any calls to the server from the browser go to a servlet, which will then forward to the JSP page to display any results.
Be aware of REST, but don't worry about it until you have a nice project using the above structure.
 
author & internet detective
Marshal
Posts: 38506
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

JSP has been replaced with JSTL, EL


This is not true. It's scriplets in JSPs that have been replaced with JSTL/EL in new code. Also, a lot of JSPs have been replaced with rich interfaces wholesale.
 
Bartender
Posts: 1844
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What should you learn first? As always the answer is "it depends"

If you are more interested in the java programming side of things, then I would suggest catching up with the changes in the java language since you last touched it. 
New Features & APIs etc.
I would also recommend you get acquainted with Spring and Spring boot.  which have some quick start modules and examples.


JDBC is still there.
But must of the time I want to talk to a database I use an ORM tool like Hibernate to abstract away the JDBC code.
And Spring provides a nifty feature such that you annotate your bean, write an interface that extends a org.springframework.data.repository.Repository and you're done.
You don't actually end up writing any jdbc code at all.


If you are interested in the web side of things, then brush up your javascript (not the same as java)
And then check out a framework such as Angular or React.

In terms of this project, you could actually do both, which might also help you on the way to understanding how web applications have evolved.

#1 - Write back end java classes to load/save your data from your database.  (spring boot data module)
#2 - Build a JSP/Servlet Web application with a form that lets you interact with the back end java code.  (Spring MVC)
#3 - Write a REST web service that exposes the back end java code (spring-boot)
#4 - Build a "Single page app" in javascript that does exactly the same as your JSP web application, just without JSP.  (angular/react)

The bits provided in brackets are suggestions only to help 'automate' the work.

But personally I would  be more impressed by a demo that utilized the frameworks out in the real world rather than having custom written java code behind them.



 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!