Reza Alirezaei - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Reza Alirezaei

Description:

Exposes a number of Helper' properties. NOT a generic data access layer control. Pre- /Post- level event handlers. Sproc - A great way to go! Wraps your schema ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 18
Provided by: chr1120
Category:
Tags: alirezaei | reza

less

Transcript and Presenter's Notes

Title: Reza Alirezaei


1
How to build 3-tier applications in MOSS 2007
Reza Alirezaei Eidenai Innovations reza_at_devhorizo
n.com http//blogs.devhorizon.com/reza
2
Session Prerequisites
  • Experience with
  • WSS and/or MOSS
  • Web Part Development
  • Some exposures to Data Access Programming
  • Experience with biz and data-driven Apps
  • Level 300

3
Agenda
  • Summary of multi-tier design
  • Typed DataSets
  • ObjectDataSource
  • SPROC
  • Demo

4
  • For most business applications the heart of the
    design revolves around the data and business
    tiers. There is no one design fits all , only
    trade-offs

5
Multi-Tier Design
  • Business applications with gt 1 tier
  • Standard Design contains
  • Presentation
  • Business
  • Data access
  • Data store
  • Logical Design VS Physical Design

6
To layer or not to layer?
  • Separation, Separation and Separation
  • Increases Team Productivity
  • Mix language development,
  • Parallel Dev
  • Reusability
  • Across multiple front-ends
  • DAL as a execution engine

7
Interactions between BLL and DAL
  • 1) BLL as pure interface
  • Delegation of most of the work to DAL
  • DAL is tied to the business (Reusability ?)
  • Northwind.SharePoint.DAL spDataSource
  • .
  • public void update (Product p)
  • // DAL must be aware of Product
    object
  • spDataSource.UpdateProduct(p)

8
  • 2) DAL as an execution engine
  • BLL responsible for some data storage
  • Low-level interface
  • BLL is tied to database schema ( watch out !)
  • Northwind.SharePoint.DAL spDataSource
  • .
  • public void update (Product p)
  • string sqlCommand
  • sqlCommand .. // properly format SQL
    statement
  • spDataSource.Execute(sqlCommand)

9
Typed DataSet
  • Very capable generic data container
  • Vender Generic / Schema Specific
  • Built-in functionalities like filtering, search,
    sort
  • Extending DataSet using .Net 2.0s new partial
    class concept (Demo)

10
  • Intellisense in VS IDE
  • No string literals - No Implicit assumption
  • Automatic Database validation pick up
  • Type safe wrapper NorthwindTDS.Products0.Name
    42 ? Compiler Error
  • Automatically generated from DB schema

11
ObjectDataSource
  • Supports a three-tier architecture
  • Uses reflection
  • Exposes a number of Helper properties
  • NOT a generic data access layer control
  • Pre- /Post- level event handlers

12
Sproc - A great way to go!
  • Wraps your schema
  • Layer of decoupling schema from your application
  • Additional access control (Security)
  • Force transactional executions
  • Encapsulates complex SQL/performance boost

13
Instrumentation
  • System.Diagnostics.Trace
  • Redirecting the trace output
  • Old-School way VS dynamic approach
  • A lot of work
  • Other instrumentation facilities

14
Topics not covered today!
  • 1) Physical Design and Trade-offs
  • 2) Security (Broad subject)
  • Think about STRIDE
  • Authentication, Authorization
  • how and where to implement Security

15
  • 3) Validation
  • Field Level validation _at_ database
  • PL first level validation
  • e.g. Credit Card must not contain letters
  • BLL Additional validation
  • e.g. Is Credit Card valid ?
  • 4)Optimistic Concurrency

16
(No Transcript)
17
  • Your feedback is important
Write a Comment
User Comments (0)
About PowerShow.com