0% found this document useful (0 votes)
24 views18 pages

Java IAM Project Overview

Advance Java programming notes.

Uploaded by

harshchauhan0704
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views18 pages

Java IAM Project Overview

Advance Java programming notes.

Uploaded by

harshchauhan0704
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

mOmkar Shiva Sai Raju

Name: Omkar ShivaSai Raju

Professor: Thomas Broussard

Session: 2017 - spring

Project: Identity and Access Management

The IAM Web Application

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

2.2 Data Description…..............................................................................................................................9

2.3 Expected Results................................................................................................................................10

2.4 Scopes and Limitations.....................................................................................................................10

3. Conception.............................................................................................................................................11

3.1 Chosen Algorithm..............................................................................................................................11

3.1 Data Structures...................................................................................................................................11

3.1 Application Flow Diagram.................................................................................................................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

Java is a general-purpose computer programming language that is concurrent, class-


based, object-oriented, and specifically designed to have as few implementation dependencies as
possible. It is intended to let application developers "write once, run anywhere"
(WORA), meaning that compiled Java code can run on all platforms that support Java without
the need for recompilation. Java applications are typically compiled to bytecode that can run on
any Java virtual machine (JVM) regardless of computer architecture. As of 2016, Java is one of
the most popular programming languages in use, particularly for client-server web applications,
with a reported 9 million developers. Java was originally developed by James Gosling at Sun
Microsystems (which has since been acquired by Oracle Corporation) and released in 1995 as a
core component of Sun Microsystems' Java platform. The language derives much of
its syntax from C and C++, but it has fewer low-level facilities than either of them.

1.2 MAVEN

Maven, a Yiddish word meaning accumulator of knowledge, was originally started as an


attempt to simplify the build processes in the Jakarta Turbine project. There were several
projects each with their own Ant build files that were all slightly different and JARs were
checked into CVS. We wanted a standard way to build the projects, a clear definition of what the
project consisted of, an easy way to publish project information and a way to share JARs across
several projects.

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

Maven’s primary goal is to allow a developer to comprehend the complete state of a


development effort in the shortest period of time. In order to attain this goal there are several
areas of concern that Maven attempts to deal with:

➢ Making the build process easy

➢ Providing a uniform build system

➢ Providing quality project information

➢ Providing guidelines for best practices development

➢ Allowing transparent migration to new features

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 [Link] 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 −

➢ Spring enables developers to develop enterprise-class applications using POJOs. The


benefit of using only POJOs is that you do not need an EJB container product such as an
application server but you have the option of using only a robust servlet container such as
Tomcat or some commercial product.

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.

➢ Testing an application written with Spring is simple because environment-dependent


code is moved into this framework. Furthermore, by using JavaBeanstyle POJOs, it
becomes easier to use dependency injection for injecting test data.

➢ 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 convenient API to translate technology-specific exceptions (thrown by


JDBC, Hibernate, or JDO, for example) into consistent, unchecked exceptions.

➢ Lightweight IoC containers tend to be lightweight, especially when compared to EJB


containers, for example. This is beneficial for developing and deploying applications on
computers with limited memory and CPU resources.

➢ 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

Hibernate is a high-performance Object/Relational persistence and query service which is


licensed under the open source GNU Lesser General Public License (LGPL) and is free to
download. Hibernate not only takes care of the mapping from Java classes to database tables
(and from Java data types to SQL data types), but also provides data query and retrieval
facilities.

5
mOmkar Shiva Sai Raju

Before understanding hibernate framework,we need to understand Object Relational


Mapping(ORM).

What is ORM?

ORM is a programming method to map the objects in java with the relational entities in the
[Link] 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 [Link] provides solutions to
the problems arise while developing persistence applications using traditional JDBC method.
This also reduces the code that needs to be written.

Need for tools like hibernate:

The main advantage of ORM like hibernate is that it shields developers from messy SQL. Apart
from this, ORM provides following benefits:

Improved productivity:

➢ High-level object-oriented API

➢ Less Java code to write

➢ No SQL to write

Improved performance:

➢ Sophisticated caching

➢ Lazy loading

➢ Eager loading

6
mOmkar Shiva Sai Raju

Improved maintainability:

➢ A lot less code to write

Improved portability:

➢ ORM framework generates database-specific SQL for you

Architecture of hibernate :

Following is a detailed view of the Hibernate Application Architecture with few


important core classes.

The Hibernate architecture is layered to keep you isolated from having to know the
underlying [Link] 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, [Link] 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 [Link] for JUnit
3.8 and earlier, and under package [Link] 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.

This application is operating in reduced cost, independent.

2.2 DATA DESCRIPTION


Modular approach is used for the development of this project.

There are three basic modules of this project:

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.

2.3 EXPECTED RESULTS

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.

2.4 SCOPE AND LIMITATIONS

The password is storing in database without encryption.

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.

3.2 DATA STRUCTURE

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.

3.3 APPLICATION FLOW DIAGRAM

11
mOmkar Shiva Sai Raju

CHAPTER – 4

CONFIGURATION

4.1 MAVEN

➢ Open Eclipse and go to: Help / Eclipse Marketplace.


➢ Insert on search: "Maven" and look for "Maven Integration for Eclipse WTP" and install
it.
➢ If the installation was successfully made in Window/Preferences, the Maven option will
be visible.
➢ Download the last version from here:
o [Link] and put it on a folder in C partition (or
other partitions) - just remember that the path to the downloaded maven
shouldn't contain spaces (you will have errors) - for example, path is: "c:\
Apache_Maven\apache-maven-3.0.4...".
➢ After downloading it, go in Eclipse -> Window -> Preferences -> Maven (from left menu
and expand it) -> Installations -> and add path to the downloaded maven.
➢ To create the project: New -> Other -> Maven -> Maven Project -> and search on filter
the archetype you would like to use (for example: use maven-archetype-webapp for web
application etc.). Click Next and put project details: Group Id, Artifact Id, Version etc.
➢ After creating the project, the most important file is [Link]. There add dependencies.
Another important thing, maven local repository will be created here: "c:\Users\
YOUR_USERNAME\m2."
➢ To perform maven, install/build/clean etc, right click on project and click "Run as" ->
Select option.

12
mOmkar Shiva Sai Raju

4.2 SERVER

Add Server

➢ Windows -> Show View -> Servers.


➢ Then in the servers view, right click and add new.
➢ It will show a pop up containing many server vendors.
➢ Under Apache select Tomcat v9.0 (Depending upon your downloaded server version).
➢ And in the run time configuration point it to the Tomcat folder downloaded.

CHAPTER – 5

SCREENSHOTS

1. The Index page, where we need to enter the Login and Password for
Authentication

13
mOmkar Shiva Sai Raju

2. The HOME page

3. Identity Creation

14
mOmkar Shiva Sai Raju

4:- Successfully Created

5:- Search by Display name And Email

15
mOmkar Shiva Sai Raju

6:- Search Results

16
mOmkar Shiva Sai Raju

6:- Modification:

7:- Updation

8:- Deletion:-

17
mOmkar Shiva Sai Raju

18

Common questions

Powered by AI

The modular design approach in the IAM project supports scalability and adaptability by isolating functionalities into distinct modules such as IAMCORE, which handles user activities, DAO service, and identity operations. Each module operates independently, enabling developers to scale or adapt specific functionalities without altering core system operations. For instance, enhancements in the DAO service can take place without impacting user registration processes handled by a separate module, facilitating seamless integration of future improvements .

Hibernate offers several advantages, such as improved productivity due to its high-level object-oriented API, which reduces the amount of Java code needed and eliminates the need for SQL. Its performance benefits include sophisticated caching and options like lazy and eager loading. Hibernate improves maintainability by reducing code volume and enhances portability by generating database-specific SQL, shielding developers from complex SQL writing. It addresses issues typical of traditional JDBC methods by facilitating the mapping between Java classes and database tables, thus resolving many persistence application development complications .

The IAM project enhances identity management by allowing users to authenticate, create, update, and delete identities. These functionalities are supported by the project's modules: authentication (for user login), Create Identity (for adding user information to the database), Search Identity (for retrieving user data), Update Identity (for modifying existing data), and Delete Identity (for removing user records). These modules ensure smooth, cost-effective, and independent operation .

The Spring framework enhances Java application development by enabling developers to create enterprise-class applications using Plain Old Java Objects (POJOs), which eliminates the need for an Enterprise JavaBeans (EJB) container product. It is modularly organized, allowing developers to use only the necessary packages and classes. Spring also capitalizes on existing technologies (such as ORM frameworks, JEE, and logging frameworks) rather than reinventing them. This makes it easier and more efficient to test applications by transferring environment-dependent code into the framework, enabling dependency injection for testing. Moreover, Spring's well-designed web MVC framework offers a robust alternative to other web frameworks. It provides a consistent transaction management interface, scalable from single database transactions to global ones .

Java's robust design contributes to its widespread use in enterprise applications due to its concurrent, class-based, and object-oriented characteristics, which promote scalable and manageable applications. Its platform independence, summarized in the 'write once, run anywhere' philosophy, allows compiled code to run on any platform with a Java Virtual Machine (JVM) without recompilation. This flexibility and portability make Java a preferred choice for client-server and web-based applications, increasing its appeal to enterprises .

Log4j's popularity as a logging utility in Java applications is linked to its ability to address issues with previous versions and other existing frameworks. Its plugin architecture enhances extensibility, and it provides solutions such as no backward compatibility problems due to an available adapter. Developed by the Apache Foundation, Log4j offers a reliable improvement over previous tools like java.util.logging and Logback .

The layered architecture in the IAM project segregates the application into presentation, business, and data access layers. This design allows for modification within one layer without affecting others, facilitating easier maintenance, updates, and scalability. It promotes separation of concerns, ensuring each layer attends to specific tasks, thereby enhancing manageability and reducing the complexity of changes .

Maven streamlines Java project management by simplifying the build process and providing a uniform build system. It allows for easy project information dissemination and jar sharing across multiple projects. Maven aims to help developers quickly comprehend the full scope of a project by offering quality project information and guidelines for best practice development. It is also designed for easy feature migration, thus easing the integration of new developments .

JUnit is crucial for ensuring reliability in the IAM project through its role in test-driven development. It allows developers to write and run repeated tests, thereby identifying bugs early in the development cycle. JUnit supports regression testing and helps ensure that changes—like adding new features or fixing bugs—do not disrupt existing functionalities. By automating tests, it guarantees that the IAM application operates smoothly and meets its intended requirements without loopholes .

The IAM project's practice of storing passwords without encryption poses significant security risks. Unencrypted passwords can be easily accessed if the database is compromised, leading to unauthorized access. This limitation highlights the need for encrypting sensitive data to protect user identities and ensure secure transactions within the system. Effective encryption methods could mitigate these risks, aligning the IAM project with robust security protocols .

You might also like