Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft ® ASP.NET: Designing and Developing a Line-of-Business Web Application.

Similar presentations


Presentation on theme: "Microsoft ® ASP.NET: Designing and Developing a Line-of-Business Web Application."— Presentation transcript:

1 Microsoft ® ASP.NET: Designing and Developing a Line-of-Business Web Application

2 ASP.NET: Designing and Developing a Line-of-Business Web Application Microsoft ® Corporation

3 What We Will Cover Definition of a line-of-business application Definition of a line-of-business application Time Tracker as example of line-of- business application Time Tracker as example of line-of- business application Design and technology choices Design and technology choices Development techniques Development techniques Intranet security design and implementation Intranet security design and implementation

4 Session Prerequisites Level 200 Ability to read C# code Ability to read C# code Working knowledge of ASP.NET Working knowledge of ASP.NET Familiarity with Microsoft ® Visual Studio ®.NET Familiarity with Microsoft ® Visual Studio ®.NET

5 So Why This Presentation? Provide overview of best practices for Provide overview of best practices for  Application architecture  Development Outline key features of ASP.NET and the.NET Framework Outline key features of ASP.NET and the.NET Framework Promote the ASP.NET Starter Kits at www.asp.net Promote the ASP.NET Starter Kits at www.asp.net

6 Demonstrations Demonstrating Time Tracker functionality Demonstrating Time Tracker functionality Examining Time Tracker code Examining Time Tracker code Configuring the Time Tracker application Configuring the Time Tracker application

7 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Mobile Mobile Globalization Globalization Security Security Deployment Deployment

8 Introduction The Time Tracker Line-of-Business Web Application What is a line-of-business application? What is a line-of-business application? Time Tracker allows users to track hours worked on a project Time Tracker allows users to track hours worked on a project Allows managers to monitor project status Allows managers to monitor project status  Per user  Per project Allows administrators to manage user accounts and projects Allows administrators to manage user accounts and projects

9 Introduction The Time Tracker Line-of-Business Web Application Illustrates best practices for intranet application development Illustrates best practices for intranet application development Serves as a template for other line-of-business applications Serves as a template for other line-of-business applications

10 Demonstration 1 Time Tracker Functionality Registering as a New User Creating New Users Creating a Project Creating Time Entries Generating Reports Logging on as a Less-Privileged User Time Tracker Starter Kit

11 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Mobile Mobile Globalization Globalization Security Security Deployment Deployment

12 Design Goals Decisions for an Intranet Application Emphasis on maintenance, not performance Emphasis on maintenance, not performance Can utilize company’s existing user information Can utilize company’s existing user information Clean separation between logical tiers Clean separation between logical tiers  Enables code reuse by other applications

13 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

14 Application Architecture Logical 3-tier Design

15 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

16 Data Layer Database Schema Requirements User enters time for project and category User enters time for project and category User role authorization User role authorization Time entries require user project membership Time entries require user project membership Project has one or more categories Project has one or more categories Projects can have one project manager Projects can have one project manager

17 Data Layer Database Schema

18 Data Layer Stored Procedures Provide separation between database and data access layer Provide separation between database and data access layer Performance benefits Performance benefits Added security Added security Can change with no effect to data layer Can change with no effect to data layer ListTimeEntries helps enforce role authorization ListTimeEntries helps enforce role authorization

19 Data Layer Data Access Uses Data Access Application Blocks (DAAB) Uses Data Access Application Blocks (DAAB) Time Tracker uses ExecuteDataSet method Time Tracker uses ExecuteDataSet method Reduces custom code from six or more lines to one or two Reduces custom code from six or more lines to one or two DataSet ds = SqlHelper.ExecuteDataSet( ConfigurationSettings.AppSettings[ ConfigurationSettings.AppSettings[ Web.Global.CfgKeyConnString], Web.Global.CfgKeyConnString], CommandType.StoredProcedure, CommandType.StoredProcedure, “ListAllProjects”); “ListAllProjects”);

20 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

21 Business Logic Layer Application-specific Code Implements how a company does business Implements how a company does business

22 Business Logic Layer Application-specific Code Distinct from UI and database-specific code Distinct from UI and database-specific code Enables code reuse Enables code reuse Functionality available to Web services Functionality available to Web services Implements security Implements security Classes wrap information from data access code Classes wrap information from data access code

23 Business Logic Layer TTUser Class Each name represents an instance of the TTUser class Each name represents an instance of the TTUser class

24 Business Logic Layer TTUser Class Public properties that contain user info Public properties that contain user info  UserID  Role string Methods interact with data access layer to: Methods interact with data access layer to:  Return lists of users  Return user information  Manage user information  Log users in

25 Business Logic Layer Custom Collections Derive from ArrayList Derive from ArrayList Require less memory than DataSet and others Require less memory than DataSet and others Provide cleaner separation between data and presentation layers Provide cleaner separation between data and presentation layers Each collection a class-specific object (UsersCollection maps to TTUser ) Each collection a class-specific object (UsersCollection maps to TTUser )

26 Business Logic Layer Other Features Static methods Static methods  Belong to the type itself  Object needn’t be instantiated ProjectGrid.DataSource = Project.GetProjects(); ProjectGrid.DataSource = Project.GetProjects(); Retrieving user info Retrieving user info  Configure to Microsoft ® Active Directory ® or Windows ® NT ® SAM need to retrieve user info from account source  DirectoryHelper class  Retrieves user first and last name from account source  Easily extendable

27 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

28 Presentation Layer Introduction Provides user interface Provides user interface Communicates directly with business logic Communicates directly with business logic Separate from data access and business layers Separate from data access and business layers  Can develop multiple UIs that use code from other layers

29 Presentation Layer User Controls Banner and all tabs are user controls Banner and all tabs are user controls

30 Presentation Layer DataGrid with Inline Editing Define EditItemTemplate Column Define EditItemTemplate Column Fill column with another ASP.NET server control Fill column with another ASP.NET server control  

31 Agenda Introduction Introduction Design Goals Design Goals Application Architecture Application Architecture Data Layer Data Layer Business Logic Layer Business Logic Layer Presentation Layer Presentation Layer Report Creation Report Creation GDI+ Chart Creation GDI+ Chart Creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

32 Report Creation Project Report Created per selected project Created per selected project Grouped by project, category, consultant Grouped by project, category, consultant Created with nested DataList controls Created with nested DataList controls Data source assigned at run time Data source assigned at run time  DataSource=‘ ’

33 Report Creation Resource Report Compiles time entry lists Compiles time entry lists Can contain one or more consultants Can contain one or more consultants Created with a DataGrid nested in a DataList control Created with a DataGrid nested in a DataList control

34 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

35 GDI+ Chart Creation Chart Page Separate page needed to render chart Separate page needed to render chart Uses query strings to pass graph data Uses query strings to pass graph data Returns Portable Network Graphics (PNG) format Returns Portable Network Graphics (PNG) format

36 GDI+ Chart Creation Chart Classes ChartItem—a single data point ChartItem—a single data point ChartItemsCollection—collection of data points ChartItemsCollection—collection of data points Chart—abstract class Chart—abstract class  Defines Draw() method that must be overridden  Limits data points for derived graphs BarGraph—performs calculations for graph generation BarGraph—performs calculations for graph generation

37 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

38 Security Authentication Forms authentication on install Forms authentication on install Easily modified to Microsoft ® Windows ® authentication Easily modified to Microsoft ® Windows ® authentication  Active Directory  NT Security Authorization Manager (SAM) Make changes in Web.config Make changes in Web.config

39 Security Authorization and Techniques Roles-based Roles-based  Consultant  Project Manager  Administrator Roles define: Roles define:  page access  Tasks user allowed to perform User input cleaned User input cleaned

40 Demos Demonstration 2 Code Walkthrough Review the Data Access Layer Review the TTUser Class Review the UsersCollection Class Review the TTSecurity Class Review CustomPrincipal and Global.asax.cs Review the Chart class Review TimeEntry.aspx.cs and associated files Review Banner.ascx.cs class

41 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

42 Mobile Time Tracker Device Support Users can view, add or update entries Users can view, add or update entries

43 Agenda Introduction Introduction Design Goals Design Goals Application Architecture Application Architecture Data Layer Data Layer Business Logic Layer Business Logic Layer Presentation Layer Presentation Layer Report Creation Report Creation GDI+ Chart Creation GDI+ Chart Creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

44 Globalization Using the CultureInfo Class Culture settings changed per user’s browser settings Culture settings changed per user’s browser settings Application_BeginRequest method in Global.asax performs check Application_BeginRequest method in Global.asax performs check if (Request.UserLanguages != null) Thread.CurrentThread.CurrentCulture Thread.CurrentThread.CurrentCulture CultureInfo.CreateSpecificCulture( CultureInfo.CreateSpecificCulture( Request.UserLanguages[0]); Request.UserLanguages[0]);else Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentCulture = new CultureInfo(“en-us”); new CultureInfo(“en-us”); Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; Thread.CurrentThread.CurrentCulture;

45 Agenda Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

46 Deployment Web Farm Considerations Encrypted cookie’s key must be same Encrypted cookie’s key must be same Set machineKey in each Web.config file to same value Set machineKey in each Web.config file to same value For pages that require session state For pages that require session state  Set load-balancing affinity, or  Session state must be stored in a state server or Microsoft ® SQL Server™

47 Demos Demonstration 3 Configuring the Time Tracker Application Review the Web.Config File Change the User’s Default Role Change Forms Authentication to Windows NT SAM Authentication

48 Session Summary Introduction Introduction Design goals Design goals Application architecture Application architecture Data layer Data layer Business logic layer Business logic layer Presentation layer Presentation layer Report creation Report creation GDI+ chart creation GDI+ chart creation Security Security Mobile Mobile Globalization Globalization Deployment Deployment

49 For More Information… MSDN Web site at MSDN Web site at  msdn.microsoft.com Official ASP.NET Web site at Official ASP.NET Web site at  www.asp.net

50 Training and Events MSDN Webcasts, MSDN Online Seminars, Tech·Ed, PDC, Developer Days MSDN Essential Resources for Developers Subscription Services Online Information Membership Programs Print Publications Library, OS, Professional, Enterprise, Universal Delivered via CD-ROM, DVD, Web MSDN Online, MSDN Flash, How-to Resources, Download Center MSDN User Groups MSDN Magazine MSDN News

51 How-to Resources Simple, Step-by-Step Procedures Embedded development How-to resources Embedded development How-to resources General How-to resources General How-to resources Integration How-to resources Integration How-to resources JScript ®.NET How-to resources JScript ®.NET How-to resources Microsoft.NET development How-to resources Microsoft.NET development How-to resources Office development resources Office development resources Security How-to resources Security How-to resources Microsoft Visual Basic.NET How-to resources Microsoft Visual Basic.NET How-to resources Microsoft Visual C# ®.NET How-to resources Microsoft Visual C# ®.NET How-to resources Microsoft Visual Studio.NET How-to resources Microsoft Visual Studio.NET How-to resources Web development How-to resources (ASP, IIS, XML) Web development How-to resources (ASP, IIS, XML) Web services How-to resources Web services How-to resources Windows development How-to resources Windows development How-to resourceshttp://msdn.microsoft.com/howto

52 MSDN Webcasts Interactive, Live Online Events Interactive, synchronous, live online events Interactive, synchronous, live online events Discuss the hottest topics from Microsoft Discuss the hottest topics from Microsoft Open and free for the general public Open and free for the general public Take place every Tuesday Take place every Tuesdayhttp://www.microsoft.com/usa/webcasts

53 MSDN Subscriptions The Way to Get Visual Studio.NET Visual Studio.NET MSDN Subscriptions NEW Professional Tools to build applications and XML Web services for Windows and the WebTools to build applications and XML Web services for Windows and the Web MSDN Professional $1199 new $899 renewal/upgrade MSDN Enterprise $2199 new $1599 renewal/upgrade MSDN Universal $2799 new $2299 renewal/upgrade Enterprise Developer Enterprise lifecycle toolsEnterprise lifecycle tools Team development supportTeam development support Windows Server 2003 and SQL Server™Windows Server 2003 and SQL Server™ Enterprise Architect Software and data modelingSoftware and data modeling Enterprise templatesEnterprise templates Architectural guidanceArchitectural guidance

54 Where Can I Get MSDN? Visit MSDN Online at msdn.microsoft.com Visit MSDN Online at msdn.microsoft.com Register for the MSDN Flash e-mail newsletter at msdn.microsoft.com/flash Register for the MSDN Flash e-mail newsletter at msdn.microsoft.com/flash Become an MSDN CD subscriber at msdn.microsoft.com/subscriptions Become an MSDN CD subscriber at msdn.microsoft.com/subscriptions MSDN online seminars msdn.microsoft.com/training/seminars MSDN online seminars msdn.microsoft.com/training/seminars Attend more MSDN events Attend more MSDN events

55 Microsoft Press ® Essential Resources for Developers Microsoft Visual Studio.NET is here! This is your chance to start building the next big thing. Develop your.NET skills, increase your productivity with.NET books from Microsoft Press www.microsoft.com/mspress

56 Become a Microsoft Certified Solution Developer What is MCSD? What is MCSD?  Premium certification for professionals who design and develop custom business solutions How do I attain MCSD certification? How do I attain MCSD certification?  Certification requires passing four exams to prove competency with Microsoft solution architecture, desktop applications, distributed application development, and development tools Where do I get more information? Where do I get more information?  For more information about certification requirements, exams, and training options, visit www.microsoft.com/mcp

57 Training Training Resources for Developers Course Title: Course Title:  Course Number:  Availability:  Detailed Syllabus: www.microsoft.com/traincert Course Title: Course Title:  Course Number:  Availability:  Detailed Syllabus: www.microsoft.com/traincert To locate a training provider for this course, please access www.microsoft.com/traincert Microsoft Certified Technical Education Centers are Microsoft’s premier partners for training services

58 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Microsoft, MSDN, Visual Studio, Windows, Visual Basic, Active Directory, Microsoft Press, JScript, and Visual C# are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.


Download ppt "Microsoft ® ASP.NET: Designing and Developing a Line-of-Business Web Application."

Similar presentations


Ads by Google