WELCOME Abdennour : Software engineer

Sep 11, 2012

Application Architecture [tuto 1 J2EE]

1) Application Architecture  

    أ) THREE-tier architecture :

   ب)  MVC Architecture(Model-Vue-Control) :

   ج)[TP]Preparation of environment(Jdk,NetBeans,Eclipse, Application Server(Tomcat,..)) : 
What's J2EE :

Java Enterprise Edition or Java EE (formerly J2EE) is a technical specification for the Sun Java specifically designed for enterprise applications.

Jee technology allows us to use the Java language for programming Web.
(Java-> C-Sharp Equivalent J2EE -> ASP.NET)

_____   أ) THREE-tier architecture :

The architecture of the system is divided into three levels or layers:

 1/presentation layer (Desktop Presentation, Web Presentation , Mobile Presentation ..)

2/business logic layer ( here was not a framework, it is the realization of our logic design of  system )

3/data access layer( Acces aux données )

Concerning JEE technology, our 3-tier architecture is as below : 

Don't worried ,we'll see the details later إن شاء الله , but be aware that the above diagram is important because it is the Software Engineering

 architecture of JEE Application: 

Http Server :
   - Use (Apache) as Http Server . 
Application Server :
  - Use (Tomcat) As Application Server 

 Why 2 Servers and What's the difference between them?
  A)Http Server (Web Server): 
     -Web Servers send html pages or serve Respond to requests


==>Web servers generally return static content(Contenu statique). Return content from a file specified in the URL .

==>Dynamic content is provided by a program running : 

  > Program CGI: Common Gateway Interface / cgi-bin /
  > Servlet & JSP (This is our case: Case JEE)
  > ASP: For Microsoft  
 > ISAP: NSAPI(netscape,microsoft)


   B)Application Server :

  > it consists of two containers :
      1)Web Contanier(Conteneur Web et non pas Serveur Web)
       2)EjB Container

  ==>at this Step (JEE)Level 1 we will look at the web container.

the Web Container is specifically manages servlets and JSP

  (Servlet : Java Class extends javax.servlet.http.HttpServlet )
  (Jsp :file replace Html file , but if Html file is static , JSP file is dynamic   )

(Java EE server is the Application Server)
- Tomcat is an Application Server . 
 -GlassFish is an Application Server. 
   ب)  MVC Architecture(Model-Vue-Control) :

- We will use MVC Architecture in the presentation layer, إن شاء الله .
-MVC means Model-View-Control .
-The advantage of this framework is to clean code
-For our case( Simple JEE Application)  : 
     1)M: Model : (We will see)
     2)V: View : (JSP files)
     3)C: Control (Servlet)    

Preparation of environment (Jdk,NetBeans,Eclipse, Application Server(Tomcat,..)) : 
 -So, you Should install the Following Softwares
   1>JDK : http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html ('Accept License Agreement' )
  2>NetBeans or Eclipse:
          http://www.eclipse.org/downloads/ (Choose the first : Eclipse IDE for Java EE Developers,)
  3>Application Server :Download Tomcat . 

    َAfter downloading,Unzip the file : ,Watch this Video : 

Note : It's noto Tomcat but it's "Apache Tomcat". Indeed, Apache(Web Server) is included in "Apache Tomcat".
In Short , "Apache Tomcat" includes a Web Server(Apache) and an Application Server(Tomcat )   



(it's the Same thing if you use Windows ) 

1 comment: