Introduction To Web Architecture 1
Session Plan Topic Estimated Duration Distributed computing 20 min Overview of Sun Microsoft Architecture 15 min Overview of Microsoft Architecture 15 min Summary 15 min 2 2
Overview of Sun And Microsoft Architecture Some More basic terms What is distributed computing? To appreciate various models used by web applications Comparison among various models used by web applications Overview of basic Sun Architectures Example Architecture document Using Sun Technologies Overview of basic Microsoft Architectures Example Architecture document Using Microsoft Technologies 3 This session covers the meaning of required Terms like CGI, distributed computing and B2B/B2C. It also covers various models of web applications and the Sun and Microsoft models in detail. 3
Common Gateway Interface, Alternatives to CGI CGI (Common Gateway Interface) Various languages that can be used to write CGI Programs Disadvantages of CGI Various alternatives to CGI Client Side Scripts 4 CGI is short form of Common Gateway Interface. In CGI, the programs are designed to accept from the web client and return data from web server according to the CGI specification. The program could be written in any programming language. Ex: C, Perl, Java, or Visual Basic. CGI programs were one of the most common traditional way to interact with users of web applications. CGI is a server-side technology because the CGI programs execute on the Web server. Problems with CGI 1) each time a request is made for CGI program,, a new process is started 2) For busy Web sites, this can slow down the server noticeably / might result in crashing. Better solutions are given by technologies like Java servlets or ASP.NET. Client Side Scripts Another way to provide dynamic feedback (html-response) for Web users is to add the scripts on the web-user's machine rather than the Web server. These script-programs can be VB Scripts, Java scripts, or ActiveX controls. All these technologies are known collectively as client-side scripts. Having understood the basic terminologies, we will study various suites of solutions/standards for the distributed computing in this chapter. 4
Distributed Computing in Web Applications Web applications are naturally distributed. Examples of distributed web applications are: B2C Ex: www.amazon.com B2B Ex: www.ec21.com Need of Distributed Computing 5 In Distributed Computing different processes/components of single application can be placed on different computers connected to a network. For example, a web site consists of an User Interface on one computer, Business Logic component on a another computer, and database logic on one more computer. Each of the three computers could have different operating system. By nature, web applications are distributed across tiers like the Client (Having Web browser), the Server (The machine having web server/application server installed ) and the Database Server. The following examples indicate the various types web applications I. B2C is the short form for business-to-consumer: This application handles the range of services/information from a business to a consumer II. B2B is the short form for business-to-business: This application handles the range of services, information from one business to another All these web applications use the distributed computing Models to fulfill the given requirements. 5
Models used by Distributed Applications The models specify how the objects should be written in order to make themselves accessible to outside world They Generally backed by standards like J2EE,.NET etc 6 The requirements of distributed computing generates the requirement for the set of standards that specify how objects communicate with one another over network. There are currently various such standards like CORBA and.net and J2EE Because web applications are distributed in nature, they use one of these standards to make sure that the components of a web application can interact with each other without any issues of interoperability. Each of these standards specify different types of components for Presentation tier, Business tier and for database tier In this chapter the two famous computing models (J2EE,.NET) are covered. 6
J2EE Standard The Java TM 2, Enterprise Edition defines the standard for developing multi-tier, enterprise applications. Components of J2EE are I. Application II. III. IV. Applet JDBC Java beans 7 I. Standalone application is a program or group of programs designed for end users. They can be directly called from the operating system and that s are called as stand alone. II. Applet is the presentation tier component suggested by the J2EE standard. Applet is a program designed to be executed from within another application. Unlike an application, applets cannot be executed directly from the operating system. Though applets are usually called from within the browser (web-client), a well-designed applet can be invoked from many different applications. III JDBC is short form for Java Database Connectivity, a Java API that enables Java programs to execute SQL statements. This allows Java programs to interact with any SQL-compliant database. Since nearly all relational database management systems (DBMSs) support SQL, and because Java itself runs on most platforms, JDBC makes it possible to write a single database application that can run on different platforms and interact with different DBMSs. IV. Java Beans: A specification developed by Sun Microsystems that defines how Java objects interact. An object that conforms to this specification is called a JavaBean 7
J2EE Standard (Contd ) V. RMI VI. Servlets VII. JSP VIII. Enterprise Java Beans IX. JNDI 8 V. RMI is a short form for Remote Method Invocation, a set of protocols developed by Sun's JavaSoft division that enables Java objects to communicate remotely with other Java objects. RMI is a relatively simple protocol mainly designed for interaction of Java objects VI. Servlet is a small program that runs on a server. The term usually refers to a Java Program that can accept the request from an HTML client and send the response to the client in HTML format. Once started this program stays in memory and can fulfill multiple requests with the help of server that is hosting this program VII. JSP is short form for Java Server Page. It is a server-side technology. Java Server Pages are an extension to the Java servlet technology that was developed by Sun. JSPs have dynamic scripting capability that works in tandem with HTML code, separating the page logic from the static elements VIII. Enterprise JavaBeans (EJB) is a Java API developed by Sun Microsystems that defines a component architecture for multi-tier client/server systems. EJB systems allow developers to focus on the actual business architecture of the model, rather than worry about endless amounts of programming and coding needed to connect all the working parts. This task is left to EJB server vendors. Developers just design (or purchase) the needed EJB components and arrange them on the server. Because EJB systems are written in Java, they are platform independent. Being object oriented, they can be implemented into existed systems with little or no recompiling and configuring. IX. JNDI is a short form of Java Naming and Directory Interface. Any Java application that needs to access information about users, machines, networks, and services should use JNDI. JNDI helps in export objects or access objects exported by other applications and services. Examples of objects include printers, calendars, and networked file systems. 8
Example of Real Life Architecture document Sun Tech Web Tier Application Tier Database Tier Mediator Servlet EJB Business Objects Data Access Objects Browser Table JSPs Stored Procedures Application Server Database 9 This is a typical J2EE Application indicates that the browser is acting as a client and sends the request over HTTP protocol through HTML pages. The Servlet (called as Mediator Servlet) accepts all requests and does the work of the router to route this request to the respective Business components like EJBs. EJB accept this request and perform the business logic. During this processing access to the database is typically required but the way to access database can vary depending upon various parameters like complexity of data access etc. The Data Access Objects (DAO) can be used to access the data by making connection and talking to the database servers. The data is represented in the forms of Business Objects. Finally the mediator Servlets takes help of the JSP Components to convey the output to the client. 9
.NET Standard Microsoft.NET standard. Components of.net are I..NET Framework II..NET languages III..NET Servers IV. ASP.NET 10 Microsoft.NET is a set of Microsoft software technologies for connecting your world of information, people, systems, and devices. It enables an unprecedented level of software integration through the use of XML Web services: small, discrete, buildingblock applications that connect to each other as well as to other, larger applications via the Internet. I..Net Framework A programming infrastructure (set of base classes and runtime environment support) created by Microsoft for building, deploying, and running applications and services that use.net technologies. II..NET languages : in.net, you have lots of choices about what language to use. There are many.net compliant languages like Visual C#, Visual Basic.NET, Visual C++.NET, Jscript.NET etc. III..NET Servers The following servers fall in the.net Server family BizTalk Server 2000 : Is a workflow engine. It manages the flow of an application. For example, if a material is ordered by the customer then various departments need to informed about it, a minimum set of approvals needs to be verified and then the processing can be triggered. This flow can be managed through work flow engines. Exchange 2000 Server : Is messaging and collaboration software usually used by teams to send the email messages. It includes security management and built-in Simple Mail Protocol support. It also contains a compact (scaled down) version of workflow engine as well. SQL Server 2000: Is a scalable, high-performance database management system designed specifically for distributed client-server computing. SharePoint Portal Server: Is used to create intranet and internet sites easily. 10
.NET (Contd ) V. Windows Forms VI. Web Forms VII. ADO.NET etc 11 IV. ASP. NET : Active Server Pages.NET, ASP.NET, (formerly referred to as ASP+) is a unified Web development platform that enables developers to accept the request typically from an HTML page and provide the response in HTML format. ASP.NET provides a new programming model and infrastructure that enables a powerful class of applications. V. Windows Forms: is a presentation tier component given by MS.Net. It is used to create GUI applications in.net. It can also run from within the browser if the client machines has the.net framework installed. VI. Web Forms: The terms ASP.NET page and Web Forms page are synonymous and are used interchangeably in the documentation VII: ADO.NET stands for ActiveX Data Objects.Net which is a programming interface given by.net to access data in a database 11
Example of Real Life Architecture document Microsoft Tech Windows 2000 Advanced Server with IIS 5.0 and.net framework Presentation Layer (ASP.NET) Client Browser Business Layer (C# Classes ) HTTP Database Layer (C# Classes ) ADO.NET SQL Server 2000 Database 12 This is a typical.net Application indicates that the browser is acting as a client and sends the request over HTTP protocol through HTML pages. The IIS Server installed on Windows 2003 Operating System accepts this requests and the ASP.NET components receives the same from the IIS Server. The ASP. NET page typically takes help of a C# class to perform the business operation and ADO.NET to perform the Database access. The answer is then sent back to the client by the ASP.NET component. 12
Summary Basic Terms Distributed Computing Various models of Distributed Computing The standards like J2EE and.net Example of typical Sun and Microsoft architecture 13 We covered the meaning of various terms like CGI, distributed computing and B2B/B2C etc. Out of the various models of distributed computing, we discussed the J2EE and the.net model from Sun and Microsoft respectively. We covered few examples of Sun and Microsoft architecture. 13
Thank You! 14 14