120 likes | 255 Views
Modern Software Technologies. Java ™ , J2EE ™ , JSP ™ , JDBC ™ by Radoslav Tr. Ivanov - 12835. Java ™ language J2SE ™ & J2EE ™ Business Systems J2EE ™ Platform. J2EE ™ components: JSP ™ Servlets ™ JDBC ™ & EJB™ Web Servers for J2EE ™ Resources. Contents.
E N D
Modern Software Technologies Java™, J2EE™, JSP™, JDBC™ by Radoslav Tr. Ivanov - 12835
Java™ language J2SE™ & J2EE™ Business Systems J2EE™ Platform J2EE™ components: JSP™ Servlets™ JDBC™ & EJB™ Web Servers for J2EE™ Resources Contents
The Java™ language”... write once, run anywhere …” • History –1991 “Oak”- microprocessors ; • Necessityof platform independence ; • Advantages – suitable for WEB • OOP-multi-platform, secure, simple and clear; • inheritance, polymorphism, classification • no need for garbage-collecting, • near to “C++” ; • Disadvantages – slow ;
A Java Program: From Birth to Execution • Coding -Human-readable Java code is produced by the programmer • Building - A Java Development Tool "build"s the Java program into byte-code, which is saved as a ".class" file. • Loading - Via the web or command line, the class file is sent to the Java Virtual Machine (VM) with an attached digital signature. The Java VM is simply an interpreter. • Bytecode Verification -The Java VM verifies the digital signature. • Isolation - When downloaded remotely, the Java VM isolates the Java program in a restricted part of memory. The Java program is not allowed to access local Hard drives and System resources. • Internal Integrity - Verification checks are made to insure that the loaded Java program is well formed. Data types are verified along with other syntax structure • Execution - Program execution begins
Java™, J2EE™, JSP™, JDBC™ • J2SE™ & J2EE ™ • Business Systems • Client Server (DB) 2-tier ; • Client Application Sever Server (DB) 3 tier ; • N-tier ;
The Middle Tier • Business logic • Presentation logic
J2EE Platform • J2EE components: • Servlets™, JSP™, EJB™, JDBC™ etc. • Java Servlets. • Common with CGI ; • Life cycle of Servlets -init(), service(), destroy() ; • Advantages – good for Business logic; • Disadvantages – It’s not suitable for web design;
Java Server Pages ™ • Advantages over ASP™, PHP™, Servlets • Life cycle – converted to Servlet; • Tags • <%-- “JSP comments”--%> • “<%! “Declarations” %>” ; • “<% “Code” %>” - Scriptlets; • “<%= ‘dynamic expression’ %>” - Expressions; Example: <HTML>Current time: <%=new java.util.Date()%”> </HTML>
Java Server Pages ™ • Possible creating of new “<tags>” • MyTags.tld – file of tags Example: <%@ taglib=“path to MyTags.tld”%> • Suitable for locale independence
EJB™ & JDBC™ • Java Data Base Connectivity (API) -(driver) – implemented classes and methods for managing Data Base ( Informix, MySQL, Oracle etc.) • EJB™ – Enterprise Java Beans™ Example – shopping card
Web Servers for J2EE™ • Orion –http://www.orionserver.com • Jakarta TomCat ™http://jakarta.apache.org/ • Apache™ – http://apache.org/
Resources • http://java.sun.com • http://java.sun.com/docs • http://www.javaworld.com • http://www.sun.com • http://java.sun.com/j2ee • http://java.sun.com/j2ee/tutorial • http://developer.java.sun.com/ • http://www.javacoffeebreak.com/tutorials/