0% found this document useful (0 votes)
5 views16 pages

Advance Java Programming

Advanced Java encompasses specialized areas of Java programming for web, enterprise, and database applications, utilizing powerful APIs and frameworks for scalable solutions. Java Enterprise Edition (Java EE) supports multi-tier architecture, facilitating the development of robust applications through various core components like Servlets, JSP, and EJB. The Java Development Kit (JDK) and Java Runtime Environment (JRE) are essential for building and running Java applications, providing necessary tools and libraries.

Uploaded by

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

Advance Java Programming

Advanced Java encompasses specialized areas of Java programming for web, enterprise, and database applications, utilizing powerful APIs and frameworks for scalable solutions. Java Enterprise Edition (Java EE) supports multi-tier architecture, facilitating the development of robust applications through various core components like Servlets, JSP, and EJB. The Java Development Kit (JDK) and Java Runtime Environment (JRE) are essential for building and running Java applications, providing necessary tools and libraries.

Uploaded by

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

Advance Java

Programming
Lecture 1
What is Advance Java
● Advanced Java refers to the specialized area of Java programming that deals with web, enterprise, and
database applications.
● It goes beyond the basics of Java (OOP, loops, arrays, etc.) and introduces powerful APIs, frameworks,
and tools that enable developers to build scalable, secure, and high-performance applications.
Java Enterprise Edition (Java EE)
● Java Enterprise Edition (Java EE) also known as Jakarta EE which used
for designing large java buildings and powerful application used by
organizations.
● It provides tools and features that help developers to create websites,
applications and backend system that can handle many users at the same
time.
● JEE include built in support for web development, database management
and security.
Architecture of Java Enterprise Edition(JEE)

Java EE follows multi-tier architecture which means the application is divided into different layers. This
makes it easier to manage, scale and update without affecting the whole system.
1. Client layer

● This is a frontend layer where users interact with the application.


● It can be a web browser, mobile app or desktop application.
● It uses technologies like HTML, CSS, JavaScript and JSP (Java Server Pages).

2. Web layer (Servlet layer)

● Web layer handles the users request and responses.


● Uses Servlets, JSP, JSF to process the data from users.
● Sends data to the business layer for processing.
3. Business layer (Logic layer)

● Business layer contains the core logic of an application.


● Uses EJB (Enterprises JavaBeans) to handle tasks like calculations, transactions and security.
● Processes data and communicate with the database layer.

4. Data layer

● Data layer stores and retrieves data from a database.


● Uses JPA (Java Persistence API) and JDBC for database management.
● Data layer ensures secure and efficient data storage.

5. Integration layer (Optional)

● It is used to connect the application with external systems, API's and services.
● It uses Java Messaging Services(JMS) and web services.
Core Components of JEE
1. Servlets
Servlets is a part of JEE framework. It is used for web development. Servlets handles process client request and
generate responses. They are used to extend features of web servers by receiving and responding to requests from
web clients.

2. JSP
JSP is known as JavaServer Pages, it allows embedding Java code inside HTML for dynamic web pages. It is easier to
maintain the JSP pages because it helps in distinguishing between designing and development. JSP provides some
added features such as Expression Language, Custom Tags, etc.

3. JSF
JSF stands for JavaServer Faces, it is a framework which is used for building web based user interfaces. It makes
web development easier by providing ready to made UI components like forms, buttons, and tables. It is used for
managing Beans to handle data and action efficiently.

4. EJB
EJB stands for Enterprise JavaBeans, It handles complex business logic, transactions and security. EJB helps the
developers to create secure , scalable and reusable business logic for large applications. It is mainly used in banking
e-commerce etc.
5. CDI
CDI is Contexts and Dependency Injection which is used for simplifying dependency management and
handles object lifecycle. It simplifies the dependency between different parts of an application. It makes java
applications more flexible, modular and easier to maintain.

6. JAAS
JAAS is known as Java Authentication and Authorization Service, is a java security framework which is used
to authenticate users and control access in applications. It helps in ensuring that only authorized users can
access certain parts of the system. It verifies the users identity using username, password and other methods.

7. JDBC
JDBC stands for Java Database Connectivity, a java API that allows applications to connect the Databases,
send queries and retrieve data. It helps java programs interact with database like MySQL, Oracle, SQL Server.
It fetches and process data from the database.

8. Managed Beans
Managed Beans is a simple Java class that is automatically created and managed by the Java EE container. It is
mainly used in JSF and CDI to handle business logic and user interactions on web applications. It holds user
input and processes actions.
9. Bean Validation

Bean Validation is used to validate user input and data in java applications. It ensures
that data follows specific rules. it checks if input values meets the required condition.
Bean validation uses simple notations like @NotNull, @Size and @Pattern.

10. Application Client

An Application Client in Java EE is a standalone Java Program that runs on a user's


computer and connects to Java EE server to use enterprise services like EJB , JPA, JMS. It
runs separately from the web applications. It can retrieve or send data to the main
applications.
JDK in Java
● Java Development Kit (JDK) is a cross-platform software development kit that provides
tools and libraries needed to build Java-based applications .
● It works together with the JVM (Java Virtual Machine) and JRE (Java Runtime
Environment) as part of the core Java setup.
● The JDK includes everything required for Java development — compilers, debuggers, and
other essential tools.
● If you only want to run Java programs, installing JRE is enough.
● But if you want to develop Java applications, you’ll need the JDK, which includes the JRE
and additional development tools.
JDK = JRE + Development Tools
● JDK is a complete development kit for Java, it includes
● Standard Edition (Java SE),
● Java Enterprise Edition (Java EE),
● Micro Edition (Java ME),

The JDK has a private Java Virtual Machine (JVM) and a few other resources necessary
for the development of a Java Application.
JDK contains:
● Java Runtime Environment (JRE),
● An interpreter/loader (Java),
● A compiler (javac),
● An archiver (jar) and many more
JRE in Java
Java Runtime Environment (JRE) is an open-access software distribution that includes a Java class library,
specific tools, and a separate JVM. In Java, it’s one of the main components of the Java Development Kit
(JDK).

● It provides the environment required to run Java programs.


● Java source code is first compiled into Java bytecode.
● To run this bytecode on any platform, you need the JRE.
● The JRE handles tasks such as loading classes, checking memory access, and accessing system
resources.
● It acts as a software layer on top of the operating system to make Java programs
platform-independent.
Components of Java JRE
The Java Runtime Environment (JRE) provides everything needed to run Java applications.
It mainly includes:

1. JVM (Java Virtual Machine)

● The core engine that executes Java bytecode.


● Handles memory management, garbage collection, security, etc.

2. Java Class Libraries (API Libraries)

● A huge collection of pre-written classes and packages.


● They provide ready-made functionalities so developers don’t reinvent the wheel.
Integration Libraries in JRE: These libraries help Java interact with external systems
or distributed applications.
a) JDBC – Java Database Connectivity d) RMI – Remote Method Invocation

● Lets Java programs connect to databases. ● Allows Java programs to call methods on remote Java
● Used for executing SQL queries, updates, and objects (distributed computing in pure Java).
retrieving results.
e) RMI-IIOP – RMI over Internet Inter-Orb
Protocol
b) JNDI – Java Naming and Directory Interface
● A combination of RMI and CORBA.
● Provides naming and directory services. ● Enables remote method calls between Java and
● Used to look up resources like databases, EJBs, non-Java systems.
message queues, etc.
f) Scripting
c) IDL – Interface Definition Language ● Supports scripting languages (like JavaScript using
(CORBA-based) Nashorn or Rhino).
● Allows embedding scripts inside Java applications.
● Allows Java to communicate with applications written
in other languages (C++, Python etc.) via CORBA

You might also like