Can any one give me a sample project which uses these technologies: Spring MVC, any database, JSTL, javascript, Jquery, Ajax?

I can share it in a day or two. But I suggest you to start writing your own application.

Don’t go with all technologies at a time.

Sprint #1: Spring MVC, JSP/JSTL, Database — Use plain HTML forms

Sprint #2 — Enhance your application to use web services with AJAX and plain javascript

Sprint #3 — Move your code from Javascript to any JS framework of your choice. If possible add responsive design.

In case if you are waiting for an idea to start, here are a set of requirements.

  • Take Notes application
  • User should be able to write and save notes.
  • User should be able to retrieve notes.
  • User should be able to edit old notes.
  • User should be able to delete notes.

Here is the typical method I use before starting development.

  • Draw a data model on paper — It should contain all tables and columns required. This is most important step in developing an application. Without a well designed datamodel, it’d be hell to extend the application with new features. This can be done in 1–2 hours and require minimum knowledge of database and relationships.
  • For the above requirement the model needs only one table, lets call it NOTES with ID, NOTE, CREATED_DATE, UPDATED_DATE as columns.
  • Draw UI diagram on paper. The UI will have maximum of two pages. Keep it as simple as possible (I’m pretty bad in UI, so, I’d take max 30mins)
  • Create Notes page — can be reused for Update Notes as well.
  • View Notes page — Can be reused for delete notes as well.
  • Open the IDE of your choice — I choose eclipse and creates a project with maven.
  • Config can be searched in Google — I suggest you to read through and understand the documentation while copy-pasting the content.
  • Since Spring is being used, write the dispatcher-servlet with minimum config like annotation-driven and a view resolver. It is available in Spring Getting started guide.
  • Reading and understanding is a one-time activity. Once you get hold of the config, next time you don’t need to search for it.
  • The above step can be skipped and project template can be downloaded from Spring Getting Started Guides.
  • Start coding.
  • First I’d write a sample controller — this is to test if my config is loading
  • I’d start with model objects first — What should be in the request, what should be the response.
  • Then I write the controller — this contains 4 CRUD ops. As per MVC pattern, controller reads through the input and invokes Service.
  • Service class also contains 4 methods each for 4 CRUD ops.
  • A DAO class with database operations. If you use any Persistence API, Spring has one, hibernate or JPA, this layer also can be skipped.
  • Now start writing the UI with JSTL. It is pretty straight forward and there are enough tutorials in case you are struck.
  • If you are tired, create a github account and check in your code.

This helps you to understand Maven, Git along with given technologies.

Share your Github repo URL, in case you need any help.

Happy Coding.


Originally published at www.quora.com.