Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need.

Similar presentations


Presentation on theme: "Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need."— Presentation transcript:

1 Lecture 2 Web application architecture

2 Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need to select the most appropriate software from the available range.

3 Web pages Static Web pages Lecture 2 URL is decoded and page requested Page is returned

4 Dynamic Web page consistent look and feel on each page of a large site data is derived from a database depends on real time pages depend on user choice business transactions e.g. e-commerce…

5 3-tier architecture A Presentation layer using Browser technology A Middleware layer using a web application server platform + application programs A Data layer using a relational database or other data store technology

6 Presentation layer the retrieval of a file from a remote server accept the returned MIME file render (i.e. create a 2-d image ) the HTML plug-ins client-side scripts interaction between client-side scripts and the web page user input via a variety of controls

7 Data layer maintain data persistently, with backup and recovery insert, update and delete data define and modify the data structures (e.g. tables) themselves ( the Database Schema) interaction with the database using standard languages e.g SQL handle transactions to support concurrent access to the database via locking et optimise access by compilation of queries, indexing, replication of tables etc.

8 Middleware Layer accepting requests from the Presentation layer interpreting the requests – session support requesting the appropriate data from the data layer computing derived data creating the HTML for the page providing run-time support for: – thousands of concurrent users –compilation to machine code –multi-threading [ allow multiple processes to run concurrently] –caching [holding results in a temporary store to reduce re- calculation

9 Web Application Platforms Server side includes - files with a.shtml extensionServer side includes Cgi using Perl or other scripting language PHP like SSI, a scripting language which is embedded in an HTML page.PHP Microsoft’s ASP (Active Server Pages ) J2EE –JSP for page scripting –Java + class library –Multiple runtime vendors Tomcat, BEA.NET is the latest technology from MS..NET –range languages (VB.NET, C#,, C++, Cobol... ) –compiled to a common intermediate code (MSIL) –Extensive class library –ASP.NET scripting page scripting

10 Platform Comparision Enterprise solutions J2EE versus.NET –Simple words such as “better” or “faster” are best used by simpletons. Life, especially when it involves critical enterprise applications, is more complicated. PHP versus.NET –Language wars

11 Comparison criteria Other considerations, such as the perception of the vendor as an “enterprise company”, conformance to standards, strength of the ecosystem around the product, the degree to which the product is a de facto standard amongst its class, stability of the product or technology, ease of use, IDE integration and other tool support, total cost of ownership (TCO), portability and lock-in (or lack thereof), scalability and many other such factors often outweigh Performance among our customers.

12 Other layered architectures ANSI/SPARC Database model –The external or user level, characterised by Views –The Conceptual level, comprising the full corporate data model at a logical level –The Physical level, where data is stored in files

13 Channels between Layers ISO 7-layer communications model File standards (MIME) HTTP ….. Electrical signals Presentation <> Middleware –HTTP (The protocol which supports GET and POST messages) carrying a limited number of types of content (MIME types) Middleware <> Data stores –SQL

14 Review Questions Place the following terms in the 3-tier architecture: –JavaScript, SSI, J2EE, MySQL, Oracle, CSS, PHP, ASP.NET, Flash, Java Applets, JSP, Dreamweaver, Visual.NET Consider the PHP busdisplay.php script – what problems when 10,000 users?

15 Bus departures from Frenchay Frenchay Buses busdisplay.php 1

16 \n"); } $query= "select * from bustime where dtime > current_time() order by dtime limit 10"; if(!($dbresult = mysql_db_query($db,$query,$dblink))) { print(" query failed \n"); print(mysql_error(). " \n"); } 2

17 print(" "); print(" Route Time "); while($departure=mysql_fetch_object($dbresult)) { print(" "); print(" $departure->route "); print(" $departure->dtime "); print(" \n"); } print(" "); // close the database mysql_close($dblink); ?> 3


Download ppt "Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need."

Similar presentations


Ads by Google