Web Application Execution Process

1. web applications have 3 layers
                  i. users side i.e basic browser
                  ii. dynamic content generation tool like java,ASP,PHP
                 iii. Actual data stored i.e database
These called as Presentation, Application and Storage Layers

The user's side with the browser is also referred as the client/thin client and web applications are also referred as web widgets.
Web Application: Application program that is stored on a remote server and delivered over the Internet through  a browser interface.
It allows the user to submit and retrieve data to/from a database over the internet through the browsers.
we can access web applications without installing and downloading any software.
Types of Web Applications:tow types
i. Presentation  oriented: Generates the dynamic web pages containing various mark-up language (HTML, XML, and so on) in response to the request.
ii.Service-Oriented: implements the fine-grained web service. These are often invoked by presentation-oriented applications.

WEB APPLICATION STRUCTURE:

Application Name (Sample Application)
  --SRC/JAVA(contains all the Java files)
     -----domain name in reverse ex : www.googl.com then it should like
           com.google.www should be the package name
            inside [if it is MVC ]
             ------action[All action classes]
             ------Service[Service methods which used to define service methods or to make calls to                               DAO's ]
             ----- DAO[Data Access object]used to connect data source
             ------Exception[used to define user defined Exceptions]
             ------DTO [Data Transfer Object]
            ------ Servlet[servlet classes required for the application]
            ------ util[constants files, or other utility classes used for Application]

---SRC/TEST
          --package structure is same as above except all the file names precede with Test.

-----WEB APP
       ----css[contains .css files]
      ---  images[all.jpg,.png etc]
      ---  js [all java script files]
      --- JSP [all JSP pages]
      --META-INF
     ---WEB-INF
          --lib[all jars]
          --tlds[all .tld files]
         ---web.xml[deployment descriptor]
        ---struts-config.xml
       ----tiles-defs.xml
Folder Structure of J2EE Projects:




 Generally Split Deployment used in Development stage and war deployment used for production release.
Deployment Descriptor:
1.Used to control many facets of Web Application.Using web.xml we can do
    i. Assign Custom URL's for invoking servlets
   ii.initializing parameters to the entire application or specific servlets
  iii.control session time outs
  iv.declaring filters
  v.declaring security roles--to restrict access to resources
web.xml Deployment Descriptor Elements:
1.<display-name>: An optional element specifies the Web Application display name, a short name that can be displayed by GUI tools(ex when you look at the list of deployed applications with the manager tool , the name and description set in your deployment descriptor's are displayed)
2.<description>: An optional.Describes about the web application
3.<icon>:Specifies the location within the web application for a small and large image used to represent the Web Application in GUI tool
4.distributable:
5.Security-role:description:optional(description of the role)
                     role-name :Required(


WEB SERVER Vs APPLICATION SERVER:

web server provides environment to run web application.provides support only for web related technologies.

Application server provides environment to run J2EE applications and provides support for all technologies.

web server can provide support for servlets, JSPs, HTML pages ...etc
Application server can provide support for servlets, JSPs, HTML pages ...etc  + EJB, JMS ...etc
inside every application server inbuilt web server will be there to provide support for web related technologies.
if you are not satisfied with inbuilt web server then you can install web server separately.

Web server is designed to server HTTP content. App server can also serve HTTP content but is not limited to just HTTP . It can be provided other protocol support such as RMI/RPC.

Web server is mostly designed to serve static content though most web servers has plugins to support scripting languages like perl, PHP, ASP, JSP etc. though which these servers can generate dynamic HTTP content.
Most of the application servers have Web Server as integral part of them, that means App Server can do whatever Web Server is capable of. Additionally App Server have components and features to support Application level services such as Connection Pooling, Object Pooling, Transaction Support, Messaging services etc
As web servers are well suited for static content and app servers for dynamic content, most of the production environments have web server acting as reverse proxy to app server. That means while servicing a page request, static contents (such as images/Static HTML) are served by web server that interprets the request. Using some kind of filtering technique (mostly extension of requested resource) web server identifies dynamic content request and transparently forwards to app server.
Example of such configuration is Apache Tomcat HTTP Server and Oracle (formerly BEA) WebLogic Server. Apache Tomcat HTTP Server is Web Server and Oracle WebLogic is Application Server.
In some cases the servers are tightly integrated such as IIS and .NET Runtime. IIS is web server. When equipped with .NET runtime environment, IIS is capable of providing application services.


WEB APPLICATION Vs ENTERPRISE APPLICATION:

A web application can be build by only web related technologies. like servlet, jsp, html, css etc
Enterprise application can be build by any technology from J2EE technologies like EJB,JMS etc
Ex: on-line shopping application we can develop by web related technologies. so it is a web application
if we want to build banking related project compulsory we should go for Enterprise application.



Comments

Popular posts from this blog

Database Definition and DBMS