Advanced Java Documentation (1)
Advanced Java Documentation (1)
Subject: JAVA
1
mOmkar Shiva Sai Raju
Table of Contents
1. Project Overview…..............................................................................................................................3-8
1.1 Java.......................................................................................................................................................3
1.2 Maven..................................................................................................................................................3
1.3 Spring...................................................................................................................................................4
1.4 Hibernate….........................................................................................................................................5
1.5 Log4j...................................................................................................................................................8
1.6 JUnit..............................................................................................................................................8
2. Project Analysis…..............................................................................................................................9-10
2.1 Modules.........................................................................................................................................9
3. Conception.............................................................................................................................................11
4. Configuration....................................................................................................................................12-13
4.1 Maven…......................................................................................................................................12
4.2 Server................................................................................................................................................13
5. Screenshots.......................................................................................................................................14-17
Bibliography................................................................................................................................................18
2
mOmkar Shiva Sai Raju
CHAPTER – 1
PROJECT OVERVIEW
1.1 JAVA
1.2 MAVEN
The result is a tool that can now be used for building and managing any Java-based
project. We hope that we have created something that will make the day-to-day work of Java
developers easier and generally help with the comprehension of any Java-based project.
3
mOmkar Shiva Sai Raju
1.3 SPRING
Spring is the most popular application development framework for enterprise Java.
Millions of developers around the world use Spring Framework to create high performing, easily
testable, and reusable code.
Spring framework is an open source Java platform. It was initially written by Rod
Johnson and was first released under the Apache 2.0 license in June 2003.Spring is lightweight
when it comes to size and transparency. The basic version of Spring framework is around 2MB.
The core features of the Spring Framework can be used in developing any Java
application, but there are extensions for building web applications on top of the Java EE
platform. Spring framework targets to make J2EE development easier to use and promotes good
programming practices by enabling a POJO-based programming model.
Following is the list of few of the great benefits of using Spring Framework −
4
mOmkar Shiva Sai Raju
➢ Spring is organized in a modular fashion. Even though the number of packages and
classes are substantial, you have to worry only about the ones you need and ignore the
rest.
➢ Spring does not reinvent the wheel, instead it truly makes use of some of the existing
technologies like several ORM frameworks, logging frameworks, JEE, Quartz and JDK
timers, and other view technologies.
➢ Spring's web framework is a well-designed web MVC framework, which provides a great
alternative to web frameworks such as Struts or other over-engineered or less popular
web frameworks.
➢ Spring provides a consistent transaction management interface that can scale down to a
local transaction (using a single database, for example) and scale up to global transactions
(using JTA, for example).
1.4 HIBERNATE
5
mOmkar Shiva Sai Raju
What is ORM?
ORM is a programming method to map the objects in java with the relational entities in the
database.In this,entities/classes refers to table in database,instance of classes refers to rows and
attributes of instances of classes refers to column of table in database.This provides solutions to
the problems arise while developing persistence applications using traditional JDBC method.
This also reduces the code that needs to be written.
The main advantage of ORM like hibernate is that it shields developers from messy SQL. Apart
from this, ORM provides following benefits:
Improved productivity:
➢ No SQL to write
Improved performance:
➢ Sophisticated caching
➢ Lazy loading
➢ Eager loading
6
mOmkar Shiva Sai Raju
Improved maintainability:
Improved portability:
Architecture of hibernate :
The Hibernate architecture is layered to keep you isolated from having to know the
underlying APIs.Hibernate is like a bridge between java application and relational database.
7
mOmkar Shiva Sai Raju
1.5 LOG4J
Apache Log4j is a Java-based logging utility. It was originally written by Ceki Gülcü and
is now a project of the Apache Software Foundation. Log4j is one of several Java logging
frameworks. Gülcü has since started the SLF4J and Logback projects, with the intention of
offering a successor to Log4j.
The Apache Log4j team has created a successor to Log4j 1 with version number 2. Log4j
2 was developed with a focus on the problems of Log4j 1.2, 1.3, java.util.logging and Logback,
and addresses issues which appeared in those frameworks. In addition, Log4j 2 offers a plugin
architecture which makes it more extensible than its predecessor. Log4j 2 is not backwards
compatible with 1.x versions,[5] although an "adapter" is available.
1.6 JUNIT
JUnit is a unit testing framework for the Java programming language. JUnit has been
important in the development of test-driven development, and is one of a family of unit
testing frameworks which is collectively known as xUnit that originated with SUnit. JUnit is
linked as a JAR at compile-time; the framework resides under package junit.framework for JUnit
3.8 and earlier, and under package org.junit for JUnit 4 and later.
8
mOmkar Shiva Sai Raju
CHAPTER – 2
PROJECT ANALYSIS
2.1 MODULES
The following are the modules of this project
➢ Authentication: First user enters username and password to access the application. User
can register itself and after to access the other features user need to authenticate himself
which can be achieve by using login.
➢ Create Identity: User can create identity by providing display name, e-mail address and
Date of birth and these attributes will be added in the database.
➢ Search an Identity: User can search for an entity by giving name or email address. User
enter display name and email address to fetch the related record in the database if it’s
already present in the db.
➢ Update an Identity: User can update an entity by selecting the searched entity. User can
modify entity by utilizing an already present information form which is result of user’s
search selection. User enter display name and email address to fetch the related record in
the database if it’s already present in the db.
➢ Delete an Identity: User can delete an entity by selecting the searched entity. User can
delete the entity by selecting it using radio button which is generated by search.
9
mOmkar Shiva Sai Raju
1. IAMCORE:
a. Users:
i. This module is used to handle user related activities like user registration.
b. DAO service:
i. This module is handling all database related queries using HQL.
c. Identity data module:
i. This module is used to handle all identity related operations
d. Test module:
i. This module is handling Junit Tests.
2. IAM-WEB:
a. Servlets:
i. Servlets are used to handle all control all DAO and User related activities
it’s acting like a controller.
b. JSP:
i. JSP is acting as a view. Jsp are used to build custom tags and perform java
operations and it can directly call java beans.
This application can authenticate the user and can create, delete, update and search for the
identity without any issue. The communication between application and database is smooth.
Highly sophisticated, user friendly and secure tool created for Identity and access management.
Junit Tests are utilized in this project for the testing purpose and to make sure that there are no
loopholes in the application.
10
mOmkar Shiva Sai Raju
CHAPTER – 3
CONCEPTION
3.1 ALGORITHM
The algorithms which is used for search of the identity is based on user name and user
email which user can enter to search the specific identity if it already exists.
Data structure which is used based on presentation, business and data access layer. Which
is a good technique. We can modify our application without affecting its layers.
11
mOmkar Shiva Sai Raju
CHAPTER – 4
CONFIGURATION
4.1 MAVEN
12
mOmkar Shiva Sai Raju
4.2 SERVER
Add Server
CHAPTER – 5
SCREENSHOTS
1. The Index page, where we need to enter the Login and Password for
Authentication
13
mOmkar Shiva Sai Raju
3. Identity Creation
14
mOmkar Shiva Sai Raju
15
mOmkar Shiva Sai Raju
16
mOmkar Shiva Sai Raju
6:- Modification:
7:- Updation
8:- Deletion:-
17
mOmkar Shiva Sai Raju
18