1 / 11

CIS 451: N-Tier Applications

CIS 451: N-Tier Applications. Dr. Ralph D. Westfall January, 2009. 2-Tier and 3-Tier Applications. 2-tier application is also known as a client-server or "fat client" architecture user interface and business logic at top data access logic in lower (2 nd tier)

jonahd
Download Presentation

CIS 451: N-Tier Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 451: N-Tier Applications Dr. Ralph D. Westfall January, 2009

  2. 2-Tier and 3-Tier Applications • 2-tier application is also known as a client-server or "fat client" architecture • user interface and business logic at top • data access logic in lower (2nd tier) • harder to migrate to different front end e.g., Windows form to web interface • diagrams

  3. 3-Tier Applications • also known as n-tier applications • user interface at top • data access at bottom • business logic in between • easier to migrate and maintain e.g., switch to a different user interface or data source

  4. 3-Tier: Start with Design • identify what each of the (typically three) tiers will do (example) • user interface tier: interacts with the user, and also with the business tier • data tier: gets (or sets) specific source data (from files, databases, etc.) to send to business rules tier • business rules tier: does complicated processing and communicates with other 2 tiers

  5. User Interface (Presentation) Tier • contains user interface components • communicates with users: e.g., Labels, MessageBoxes • receives user inputs: TextBoxes, Buttons • often displays outputs via TextBoxes, Labels, etc.

  6. Data Tier • gets data, [possibly pre-formats it,] and sends it up to the business rules tier • via SQL calls, stored procedures, etc. • data may come from a • database: SQL Server .mdf file, Access .mdb file, etc. • XML file • text or binary file, etc.

  7. Business Rules Tier • manipulates data from the data tier (other than formatting or simple filtering) such as by • validating input data • calculating totals, averages, ratios, etc. • performing complex filtering, assigning to categories (e.g., bad credit risk), etc.

  8. Visual Studio and Web Tiers • creates Default.aspx page for new projects • holds user interface components: Buttons, Labels, TextBoxes, ListBoxes, etc. coded in HTML and ASP • also creates a second tier • Default.aspx.vb "code behind" file contains processing logic: data validation and event handlers for page loading, button clicks, etc.

  9. Business Tiers for Other Pages • Previous versions of Visual Studio used to default to single-tier pages added after Default.aspx • could check Place code in a separate file when using File>New File to add page • ASP and HTML UI code went into the .aspx file itself rather than into an .aspx.vb code behind file

  10. Data Tier • in ASP.NET the data tier consists of the items shown in the Server Explorer (some of which come from the Data section of the Toolbox) • DataConnections • SQLDataSource, AccessDataSource • Tables, Stored Procedures, etc.

  11. Summary • 3-tier applications are recommended • easier to maintain, update, migrate, etc. • top tier works with user • bottom tier handles data from data source • middle tier handles complex processing

More Related