This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
ObjectivesObjectives Define termsDefine terms Explain three components of client/server systems: Explain three components of client/server systems:
presentation, processing, and storagepresentation, processing, and storage Distinguish between two-tier and three-tier architecturesDistinguish between two-tier and three-tier architectures Describe how to connect to databases in 2-tier systems Describe how to connect to databases in 2-tier systems
using VB.NET and Javausing VB.NET and Java Describe key components and information flow in Web Describe key components and information flow in Web
applicationsapplications Describe how to connect to databases in 3-tier applications Describe how to connect to databases in 3-tier applications
using JSP, PHP, and ASP .NETusing JSP, PHP, and ASP .NET Explain the purpose of XMLExplain the purpose of XML See how XQuery can be used to query XML documentsSee how XQuery can be used to query XML documents Explain how XML fosters Web services and SOAsExplain how XML fosters Web services and SOAs
Placing portions of the application Placing portions of the application code in different locations (client vs. code in different locations (client vs. server) after it is writtenserver) after it is written
Two-Tier Database Server Two-Tier Database Server ArchitecturesArchitectures
Client workstation is responsible for Client workstation is responsible for Presentation logicPresentation logic Data processing logicData processing logic Business rules logicBusiness rules logic
Server performs all data storage, Server performs all data storage, access, and processing access, and processing Typically called a Typically called a database serverdatabase server
Characteristics of Two-Tier Characteristics of Two-Tier Client/Server SystemsClient/Server Systems
Departmental in scope (few users)Departmental in scope (few users) Not mission-criticalNot mission-critical Low transaction volumesLow transaction volumes Common programming languages: Common programming languages:
Java, VB .NET, C#Java, VB .NET, C# Interface database via middleware, Interface database via middleware,
Middleware and APIsMiddleware and APIs Middleware – software that allows an Middleware – software that allows an
application to interoperate with other application to interoperate with other software without requiring user to understand software without requiring user to understand and code low-level operationsand code low-level operations
Application Program Interface (API) – routines Application Program Interface (API) – routines that an application uses to direct the that an application uses to direct the performance of procedures by the computer’s performance of procedures by the computer’s operating systemoperating system
Common database APIs – ODBC, ADO .NET, Common database APIs – ODBC, ADO .NET, JDBCJDBC
An application where the client (PC) An application where the client (PC) accessing the application primarily accessing the application primarily provides the user interfaces and some provides the user interfaces and some application processing, usually with no application processing, usually with no or limited local data storage.or limited local data storage.
Most commonly, the thin client Most commonly, the thin client application is a Web browser and the 3-application is a Web browser and the 3-tier architecture involves a Web tier architecture involves a Web application.application.
Web Application Web Application ComponentsComponents Database server – hosts the DBMSDatabase server – hosts the DBMS
e.g. Oracle, SQL Server, Informix, MS Access, MySqle.g. Oracle, SQL Server, Informix, MS Access, MySql Web server – receive and respond to browser Web server – receive and respond to browser
requests using HTTP protocolrequests using HTTP protocol e.g. Apache, Internet Information Services (IIS)e.g. Apache, Internet Information Services (IIS)
Application server – software building blocks for Application server – software building blocks for creating dynamic web sitescreating dynamic web sites e.g. MS ASP .NET framework, Java EE, ColdFusion, PHPe.g. MS ASP .NET framework, Java EE, ColdFusion, PHP
Web browser – client program that sends web Web browser – client program that sends web requests and receives web pagesrequests and receives web pages e.g. Internet Explorer, Firefox, Safari, Google Chromee.g. Internet Explorer, Firefox, Safari, Google Chrome
Languages for Creating Web Languages for Creating Web PagesPages
Hypertext Markup Language (HTML)Hypertext Markup Language (HTML) Markup language specifically for Web pagesMarkup language specifically for Web pages
Standard Generalized Markup Language (SGML)Standard Generalized Markup Language (SGML) Markup language standardMarkup language standard
Extensible Markup Language (XML)Extensible Markup Language (XML) Markup language allowing customized tagsMarkup language allowing customized tags
XHTMLXHTML XML-compliant extension of HTMLXML-compliant extension of HTML
JavaScript/VBScriptJavaScript/VBScript Scripting languages that enable interactivity in HTML documentsScripting languages that enable interactivity in HTML documents
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS) Control appearance of Web elements in an HML documentControl appearance of Web elements in an HML document
XSL and XSLTXSL and XSLT XMS style sheet and transformation to HTMLXMS style sheet and transformation to HTML
Processing in 3-Tier Processing in 3-Tier ApplicationsApplications
Static page requests Static page requests .htm or .html requests are handled by the Web .htm or .html requests are handled by the Web
server only server only Dynamic page requestsDynamic page requests
.jsp, .aspx, and .php requests are routed to the .jsp, .aspx, and .php requests are routed to the application serverapplication server
Server-side processing by JSP servlet, ASP .NET Server-side processing by JSP servlet, ASP .NET application, ColdFusion, or PHPapplication, ColdFusion, or PHP
Database access via JDBC, ADO .NET, or other Database access via JDBC, ADO .NET, or other database middlewaredatabase middleware
Considerations in 3-Tier Considerations in 3-Tier ApplicationsApplications
Stored proceduresStored procedures Code logic embedded in DBMSCode logic embedded in DBMS Improve performance, but proprietaryImprove performance, but proprietary
TransactionsTransactions Involve many database updatesInvolve many database updates Either all must succeed, or none should occurEither all must succeed, or none should occur
Database connectionsDatabase connections Maintaining an open connection is resource-intensiveMaintaining an open connection is resource-intensive Use of connection poolingUse of connection pooling
Benefits of Three-Tier Benefits of Three-Tier ArchitecturesArchitectures
ScalabilityScalability Technological flexibilityTechnological flexibility Long-term cost reductionLong-term cost reduction Better match of systems to business Better match of systems to business
Extensible Markup Language Extensible Markup Language (XML)(XML)
A text-based markup language (like HTML)A text-based markup language (like HTML) Uses elements, tags, attributesUses elements, tags, attributes Includes document type declarations (DTDs), Includes document type declarations (DTDs),
XML schemas, comments, and entity referencesXML schemas, comments, and entity references Revolutionizes the way data are exchanged Revolutionizes the way data are exchanged
over the Internetover the Internet Document Structure Declarations (DSD), Document Structure Declarations (DSD),
XML Schema (XSD) and Relax NG replacing XML Schema (XSD) and Relax NG replacing DTDs for validating XML document structureDTDs for validating XML document structure
XSD – language for defining XML databases, XSD – language for defining XML databases, recommended by the W3Crecommended by the W3C
Storing XML DocumentsStoring XML Documents Storing as files introduces the same file Storing as files introduces the same file
processing problems stated in Ch 1processing problems stated in Ch 1 Four common options:Four common options:
Store XML data in a relational database by Store XML data in a relational database by shredding the XML documentshredding the XML document
Store an entire XML document in a large field Store an entire XML document in a large field (BLOB or CLOB)(BLOB or CLOB)
Store the XML document using special XML columnsStore the XML document using special XML columns Store the XML document using a native XML Store the XML document using a native XML
Retrieving XML DocumentsRetrieving XML Documents XPath – One of a set of XML technologies XPath – One of a set of XML technologies
supporting XQuery development, locating supporting XQuery development, locating data in XML documentsdata in XML documents
XQuery – An XML transformation language XQuery – An XML transformation language that allows applications to query both that allows applications to query both relational databases and XML datarelational databases and XML data
Displaying XML DataDisplaying XML Data Extensible Stylesheet Language Extensible Stylesheet Language
Transformation (XSLT) – A language used to Transformation (XSLT) – A language used to transform complex XML documents and also transform complex XML documents and also used to create HTML pages from XML used to create HTML pages from XML documentsdocuments
XSLT can translate a single XML document XSLT can translate a single XML document into both standard HTML and WAP/WML for into both standard HTML and WAP/WML for cell phones without the necessity for two cell phones without the necessity for two different pagesdifferent pages
XML and Web ServicesXML and Web Services Web Services Web Services – a set of emerging XML-based standards – a set of emerging XML-based standards
that define protocols for automatic communication between that define protocols for automatic communication between software programs over the Web software programs over the Web
Universal Description, Discovery, and Integration Universal Description, Discovery, and Integration (UDDI(UDDI) – standard for creating and distributing Web services) – standard for creating and distributing Web services
Web Services Description Language (WSDL) Web Services Description Language (WSDL) – XML-– XML-based grammar for describing a Web Service and specifying based grammar for describing a Web Service and specifying its public interfaceits public interface
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP) – XML-based – XML-based communication protocol for sending messages between communication protocol for sending messages between applications over the Internetapplications over the Internet
Service Oriented Architecture Service Oriented Architecture (SOA)(SOA)
A collection of services that communicate A collection of services that communicate with each other in some manner, usually by with each other in some manner, usually by passing data or coordinating a business passing data or coordinating a business activityactivity
A new paradigm for IT application A new paradigm for IT application development, based mostly on Web servicesdevelopment, based mostly on Web services
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic,
mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.