Download presentation
Presentation is loading. Please wait.
1
Mark Harr mark@harr.us
2
Multi-Tier Development in.Net
3
Traditional “basic” 2 – tier Lots of DB connections Lots of Duplicated code Cons Multi-Tier Development in.Net - History
4
Moved some common code (usually database access) to common tier Sometimes implemented as moderately complex stored procedures (more business logic than just CRUD) Better performance Multiple apps shared code processes Pros Still limited usually ActiveX EXE Server, single threaded No security Cons Multi-Tier Development in.Net - History
5
3 –tier using Transaction Server (MTS, Tuxedo) Authentication Authorization Object Pooling, Multiple processes as needed (ActiveX DLL) Features Multi-Tier Development in.Net - History
6
Much better performance Scalability Security Pros COM Registration Windows / ASP only Cons Multi-Tier Development in.Net - History
7
“Windows DNA” Components can be distributed Performance Geographic (either branch office or network, even local) Functional Multiple Components within each tier Multi-Tier Development in.Net - History
8
Implementing Enterprise Architectures Extremely scalable, vertical and horizontal Flexible Pros Still COM based, registration issues Windows / ASP only Cons Multi-Tier Development in.Net - History
9
Tiers Presentation Services Tier Business Services Tier Data Services Tier Database Multi-Tier Development in.Net
11
User applicationCode only to handle display and functions for userVery basic validation (numeric, valid date, etc)Windows forms, Web app, Excel, whatever. Multi-Tier Development in.Net – Design
12
Most of business related logic and validation Calculate shipping costs, sales tax Save order, send to warehouse, send to acctg, upd cust sales totals Integrate data, data sourcesWork to serve Presentation Tier more efficiently Returns either single value, or dataset Application Authentication for user, but run under own account.2 options for classes By major “nouns”, By PT forms Multi-Tier Development in.Net – Design
13
Only programs with data accessAuthentication for Business Service Tier account only Users not allowed Returns datasetClasses by major “nouns” Multi-Tier Development in.Net – Design
14
Use Stored Procedures, or not. App database only allow this program to update data Users not allowed Multi-Tier Development in.Net – Design
15
Class Library or Web Service Multi-Tier Development in.Net
16
Software Fortresses Multi-Tier Development in.Net
17
Presentation Tier runs as interactive userBusSvc authenticates user, but runs under own account Data Tier allows only BusSvc account, runs under same account or own account Database access from Data Tier account only If needed, setup Windows users as dbDataReader only Multi-Tier Development in.Net
18
Fetch (ID): gets one row. If ID not valid or -1, return new row. FetchList (parms): gets narrow list of rows matching parms Update (dataset): Use same function for add or update; let Data Tier figure out which Common functions Delete (ID) Find (parms): if needed for searching, more flexible parms Others as needed Multi-Tier Development in.Net
19
Do not bubble exceptions through tiers Raise exception or return error, but do not nest errors Throw ApplicationException, ArgumentException Log errors to event log Consider Email Errors Multi-Tier Development in.Net
20
Lays out tiers; including setting comm protocols Defines classes, methods, parameters Checks in design Architect version: Cannot change public interface of tiers Can build and add private classes, methods Codes and unit tests class methods Developer version: Tester version Deploys completed components by drag and drop on server models. Architect version: Multi-Tier Development in.Net
21
Doing Objects in Visual Basic 4.0, Deborah Kurata COM and DCOM; The Microsoft Vision for Distributed Objects, by Roger Sessions Software Fortresses; Modeling Enterprise Architectures, by Roger Sessions Roger Session newsletter, ObjectWatch http://www.objectwatch.com Multi-Tier Development in.Net
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.