Architectures Classic Client/Server Architecture Classic Web Architecture N-tier (multi-tier) Architecture FEN 2014-05-021Databaser og Modellering.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Filling the gap between users and objects: a multichannel interactive environment Davide Carboni, Gavino Paddeu, Stefano Sanna, Andrea Piras {dcarboni,
Objectives In this session, you will learn to:
Technical Architectures
DT211/3 Internet Application Development JSP: Processing User input.
What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.
Database Connectivity Rose-Hulman Institute of Technology Curt Clifton.
Multiple Tiers in Action
Apache Tomcat Server Typical html Request/Response cycle
C# Programming: From Problem Analysis to Program Design1 Working with Databases C# Programming: From Problem Analysis to Program Design 3 rd Edition 14.
Object-Oriented Analysis and Design
ASP.NET Programming with C# and SQL Server First Edition
Based on slides by David Schuff. Review: N-Tier Architectures  A “tier” is a software layer that serves as a component of a larger solution  Here’s.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Web Integration to an Appx Backend Server. Unix web servers + CGI Win2K web servers + ASP Win2K web servers + ODBC Processing requests Generating HTML.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
1 Web Servers (IIS and Apache) Outline 9.1 Introduction 9.2 HTTP Request Types 9.3 System Architecture 9.4 Client-Side Scripting versus Server-Side Scripting.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
The Design Discipline.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, October 18, 2012 Session 7: PHP.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Server-side Scripting Powering the webs favourite services.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
FEN Data connection DataReader DataSet Bonus info: Concurrency and Database Transactions Embedded SQL.
M1G Introduction to Database Development 6. Building Applications.
Session 08: Architecture Controllers or Managers Graphical User Interface (GUI) FEN AK - IT Softwarekonstruktion.
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Spatial Note LCA assignment Chris Fitzner Thinh Luu Dung Nguyen.
Triggers and Stored Procedures in DB 1. Objectives Learn what triggers and stored procedures are Learn the benefits of using them Learn how DB2 implements.
An application architecture specifies the technologies to be used to implement one or more (and possibly all) information systems in terms of DATA, PROCESS,
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Sample Application Multi Layered Architecture (n-tier): –Graphical User Interface (GUI): Forms, components, controls The Visual Designer in Visual Studio.
3-Tier Web Application Architecture. Simple Log-in public String button1_action() { // TODO: Process the button click action. Return value is a navigation.
Database Architectures Database System Architectures Considerations – Data storage: Where do the data and DBMS reside? – Processing: Where.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
ADO.NET connections1 Connecting to SQL Server and Oracle.
INLS 623– S TORED P ROCEDURES Instructor: Jason Carter.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Implementing The Middle Tier These slides.
Application Development
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Microsoft SharePoint Server 2007 Technical Overview Romeo Pruno nonaka.eu.
The business logic engine for Microsoft IIS Speaker T.M. Arnett.
Basics of JDBC Session 14.
The basics of knowing the difference CLIENT VS. SERVER.
Architecture Multi Layered Architecture (n-tier): Application: Model Controllers Database Access Graphical User Interface (GUI): Forms, components, controls.
Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce.
Statistics Monitor of SPMSII -High level and detailed design Warrior Team Pu Su Heng Tan Kening Zhang.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
JDBC.
Stuff to memorise… "A method tells an object to perform an action. A property allows us to read or change the settings of the object."
Generating XML Data from a Database Eugenia Fernandez IUPUI.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
CS 562 Advanced Java and Internet Application Computer Warehouse Web Application By Team Alpha :-  Puja Mehta (102163)  Mona Nagpure (102147)
Accessing Databases using Ado.net
INLS 623– Stored Procedures
Tiers vs. Layers.
Presentation transcript:

Architectures Classic Client/Server Architecture Classic Web Architecture N-tier (multi-tier) Architecture FEN Databaser og Modellering

FEN Databaser og Modellering2 Classic Client/Server Architecture Client: User interface (presentation) (and maybe some business logic). Application: Business logic and calls to the database server. Database server: For instance some SQL-based DBMS. DB Database Server Application Server Dedicated Client

FEN Databaser og Modellering3 Classic Web Architecture Web server: Accesses the database server and generates HTML response to the client. Browser: Presentation (and maybe some business logic in form of scripts embedded in the HTML) Web Server Browser Client Internet DB Database Server Application Server Dedicated Client Client: User interface (presentation) (and maybe some business logic). Application: Business logic and calls to the database server. Database server: For instance some SQL-based DBMS.

FEN Databaser og Modellering4 Problems with the Classic Web Architecture Web Server Browser Client Internet DB Database Server Application Server Dedicated Client Much business logic (code) is duplicated in the web server. No re-use. Difficult maintenance. And what if we want to add a new client (a smart phone, for instance)?

FEN Databaser og Modellering5 N-tier (multi-tier) Architecture Web Server Browser Client Internet Dedicated Client Database access layer: All code to access database is here. Makes it possible to change data store. Web server accesses application layer – not the database directly. Easier maintenance: No business logic in the web server (or other clients). Application server: All (almost) business logic is re- used. New client may be added without code duplication. DB Database Server Application Server Database Access Layer Backend New Dedicated Client Mobile Client Client accessing web services

Sample Application - Architecture Architecture: – The Controller is responsible for communication with the database connection classes (DBLayer). – The DBLayer encapsulates the code for accessing the database and stores and builds objects. – The DBLayer takes the role of containers. View Code FEN Databaser og Modellering6 SQL Server

Architecture – in Visual Studio One Solution – 5 projects, each project having its own namespace. Architecture: – Model: (old Banking4). The controller is put in its own project: Controller. – Banking5 is the old GUI. – The DBLayer has classes for accessing the database and storing and building objects. – BankingWithFullMonty is the main project with the new start-up form FEN Databaser og Modellering7

DBLayer We use a SQL Server Database. The Class AccessDbSQLClient is responsible for opening and closing the connection and for creating a Command object that can be passed to the SQL Server. The class CustomerDBSQLClient is responsible for retrieving and storing Customer objects in the database. FEN Databaser og Modellering8

The Controller Old implementation using lists is changed Instead we use calls to the database. FEN Databaser og Modellering9 //public void AddCustomer(Customer c) //{ // customers.Add(c); //} public void AddCustomer(Customer c) { CustomerDBSQLClient.CreateCustomer(c.CustNo, c.Name); } //public List Customers //{ // get { return customers; } //} public List Customers { get { return CustomerDBSQLClient.GetCustomers(); } }

The Controller Complex search loops are replaced by calls to the database. FEN Databaser og Modellering10 //public Customer GetCustomer(int no) //{ // //if customer not found, null is returned // Customer c = null; // int i = 0; // bool found = false; // while (!found && i < customers.Count) // { // c = customers[i]; // if (c.CustNo == no) // found = true; // else // i++; // } // return c; //} public Customer GetCustomer(int no) { return CustomerDBSQLClient.FindCustomerByNo(no); }

class CustomerDBSQLClient FEN Databaser og Modellering11 public static Customer FindCustomerByNo(int custNo) { string sql * from Customer where custNo = " +custNo; dbCmd = AccessDbSQLClient.GetDbCommand(sql); IDataReader dbReader; dbReader = dbCmd.ExecuteReader(); Customer c; if (dbReader.Read()) c = new Customer(Convert.ToInt32(dbReader["custNo"].ToString()), dbReader["name"].ToString()); else c = null; dbReader.Close(); AccessDbSQLClient.Close(); return c; } The SQL Statement is build Command object with this SQL statement is build The command is sent to the SQL Server and executed The result is returned in a reader object – The Customer object is build from the reader DB Connection is closed Eventually the Customer object is returned.