Advanced Java Session 1 (Concept of Web Application Basics And Advantages of Spring)
Web application Structure
-Applications
can run on multiple machine at same time are called web application.
-Web
application contains Client server architecture.
-Client
(browser) (google chrome, firefox)
-Server
(apache tomcat, glassfish, websphere, weblogic)
-After
creating web application, you upload that application to server (means keeping
project folder in web app folder of tomcat software folder).
-Start
server from ide.
-Goto browser and hit the application url, then your application will run on browser.
HTTP Protocol Basics
-This is request response protocol, widely used.
Protocol :
Protocol means, a system of rules that allows two or
more hosts for communications.
Stateless protocol:
When web client send
the request to web server, then the web server, process the request and send
the response to the web client, and after this connection is closed, this is
called http transaction, then again at next request sent by webclient to
webserver, the webserver doesn’t remember anything about the previous request,
sent by webclient.
Connectionless
protocol:
After making the
request the client disconnect from the server, then when response is ready, the
server reestablish the connection and again deliver response to web client.
Web application topic
-Web application is such type of software, which can
be accessed from browser.
-Web server is a network application, it listen on
some port.
-Web server can contain more than one web application.
-Browser is called web client(user agent).
-For the communication between web application and
web server, there are some protocols like http, ftp, websocket.
Advantages of Spring
1.Light Weight: Spring is a lightweight framework because of its POJO
implementation. It does not force the programmer to inherit any class and
implement any interface. With the help of Spring, we can enable powerful,
scalable applications using POJOs (Plain Old Java Object).
2.Flexible: It
provides flexible libraries trusted by developers all over the world. The
developer can choose either XML or Java-based annotations for configuration
options. The IoC and DI features provide the foundation for a wide-ranging set
of features and functionality. It makes the job simpler.
3.Loose Coupling: Spring applications are loosely coupled because of
dependency injection. It handles injecting dependent components without a
component knowing where they came from.
4. Powerful Abstraction: It provides a powerful abstraction to JEE specifications
such as JMS, JDBC, JPA, and JTA.
5.Declarative Support: It provides declarative support for caching, validation,
transaction, and formatting.
6.Configuration : It provides a consistent way of configuring everything.
7.Lifecycle: Responsible
for managing all your application components through lifecycle: init(),
destroy().
8.Dependency Injection: The use of dependency injection makes the easy development
of JavaEE.
9.Easier Testing: The use of dependency injection makes the
testing easy. The spring framework does not require a server while the EJB and
Struts application requires a server.
10.Fast: The team of Spring engineers deeply cares about the
performance. Its fast startup, fast shutdown, and optimized execution maintain
performance make it fast. Even, we can start a new Spring project in seconds by
using Spring Initializr.
11. Secure: It monitors third-party dependencies closely. The regular
update is issued that make our data and application secure. We can make our
application secure by using the Spring Security framework. It provides
industry-standard security schemes and delivers a trustworthy solution that is
secure by default.
10.Supportive: The Spring community provides support and resources to get
you to the next level.
11.Productive: It is more productive because the spring
application can integrate with other Spring-based applications. For example, we
can combine the Spring Boot application with Spring Cloud.

Comments
Post a Comment