Thursday, January 23, 2014

There are multiple ways of coding a web application. From servlet-jsp way to n-tiered applications. I am explaining here the layered architecture to create a web application using Rest to communicate between front-end and back-end.

We will use the following set of technologies in this tutorial. I will try to write step by step setup instructions.

Language:
Java

Database
mysql

Framework:
Spring

ORM Tool:
Hibernate

Secondary Level cache:
EHCache

Architecture:
Layered architecture using
-Controller for REST interaction.
-Service classes for business logic
-DAO layers for basic crud operations and databse interaction
-POJO objects to represent database tables

Build tool:
Gradle

Web Server:
Tomcat

Front-end:
AngularJS

JSON Object mapping:
Jackson

Test:
Junit

Logging:
Log4j

-----------

java
download java
setup in path
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html


gradle
download gradle in users/local
create a new folder : /usr/local/gradle and give it permissions (sudo -R chmod 777 gradle)
download gradle from http://www.gradle.org/installation
unzip in the /usr/local/gradle folder: sudo jar -xvf /Users/adar2/Downloads/gradle-1.10-bin.zip
setup gradle in path
gradle adar2$ path=/usr/local/gradle/gradle-1.10/bin:$path

eclipse
http://www.eclipse.org/downloads/

step 3: install gradle plugin for eclipse
https://github.com/spring-projects/eclipse-integration-gradle/

git
https://github.com/Amitdar9/springmvc1

mysql
http://dev.mysql.com/downloads/mysql/

how to start and stop mysql
sudo /usr/local/mysql/support-files/mysql.server start 
sudo /usr/local/mysql/support-files/mysql.server stop 

tomcat
http://tomcat.apache.org/download-70.cgi

No comments:

Post a Comment