1 / 47

Architecting an Application Using the .NET Framework Peter Ty MCSD, MCDBA, MCP+SB, MCSE Developer Evangelist Microsoft H

Architecting an Application Using the .NET Framework Peter Ty MCSD, MCDBA, MCP+SB, MCSE Developer Evangelist Microsoft Hong Kong Ltd. peterty@microsoft.com. Agenda. .NET Framework Overview Architecting .NET Applications Visual Studio.NET Implementing Design Goals XML Web Services.

HarrisCezar
Télécharger la présentation

Architecting an Application Using the .NET Framework Peter Ty MCSD, MCDBA, MCP+SB, MCSE Developer Evangelist Microsoft H

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. Architecting an Application Using the .NET Framework Peter TyMCSD, MCDBA, MCP+SB, MCSE Developer EvangelistMicrosoft Hong Kong Ltd.peterty@microsoft.com

  2. Agenda • .NET Framework Overview • Architecting .NET Applications • Visual Studio.NET • Implementing Design Goals • XML Web Services

  3. .NET Framework OverviewWhat is the .NET Framework • New Runtime Environment – Common Language Runtime • Language Interoperability • Common Classes for all Languages • Common Types for all Languages • Runtime Controls Compilation to Machine Code • Assemblies • Application Domains

  4. VB C++ C# JScript … Visual Studio.NET Common Language Specification ASP.NET: Web Services and Web Forms WindowsForms ADO.NET: Data and XML Common Language Runtime Operating System .NET Framework OverviewWhat is the .NET Framework

  5. .NET Framework Overview.NET Framework Different Languages VB C# Compile Same IL MSIL MSIL

  6. .NET Framework Overview.NET Framework VB MSIL Deploy Execute Machine Code MSIL JIT Compile

  7. .NET Framework OverviewCommon Language Runtime • Data Access • File IO • Data Types • Collections • Directory Services • Graphics and Images • Messaging • Network • Cryptography • Threading • XML

  8. .NET Framework OverviewCommon Type System • Int32 = Int32 = Int32 = Int32 • String • DateTime • TimeSpan • Boolean • Byte • Char • Decimal • Double • Guid

  9. .NET Framework OverviewBenefits • Productivity • Unification • Fully Object Oriented • Cleaner design and implementation • Easier reuse • Deployment • OS independence • Platform independence • Performance

  10. Agenda • .NET Framework Overview • Architecting .NET Applications • Visual Studio.NET • Implementing Design Goals • XML Web Services

  11. Architecting .NET ApplicationsDesign Goals • Availability • Uptime at performance and reliability goals • Maintainability • Ease of modifications, enhancements, and defect correction. • Manageability • Monitoring and detection of problems. Ability to correct problems before other goals are affected • Performance • Transactions per second • Requests per second • Time to first/last character

  12. Architecting .NET ApplicationsDesign Goals • Reliability • Error handling and recovery • Scalability • Handle more load without re-architecting • Scale up – Increasing the performance of existing servers with memory or processors • Scale out – Add additional servers

  13. Architecting .NET ApplicationsDesign Goals • Security • Data Theft • Tampering • Denial of Service (DoS) • Spoofing or Impersonation

  14. Architecting .NET ApplicationsDesign Goals for Duwamish • Availability • 100% uptime while meeting the performance and reliability goals • Maintainability • Code should map naturally to design documentation • Code must be segmented so that it can be maintained by different groups • Manageability • Application configuration can be changed while the system is live • Application will store errors in the event log • Application can trace to a text file or event log

  15. Architecting .NET ApplicationsDesign Goals for Duwamish • Performance • Must meet or exceed performance test results of Duwamish 4.0

  16. Architecting .NET ApplicationsDesign Goals for Duwamish • Reliability • Trap and recover when possible • Provide a custom error page • Scalability • Must scale up and out. • Security • Require authentication to prevent URL spoofing

  17. Architecting .NET ApplicationsFunctional Requirements • Testable • Avoid Implementation Details • Good • Administrator must be able to create, read, update, and delete (CRUD) customer accounts. • Administrator must be able to configure the max outstanding balance for a customer • Administrator must be able to change the name of a customer • Bad • Site must be easy to use • Site must be written in VB.NET

  18. Architecting .NET ApplicationsFunctional Requirements for Duwamish • An Internet customer will be able to browse the Duwamish Books product catalog by category. • An Internet customer will be able to search for specific books in the following ways: • Search for books by Title • Search for books by Author • Search for books by ISBN • Search for books by Subject • Search for books by Natural Language Search • An Internet customer will be able to select one or more books and place them in a shopping cart for purchase. • …

  19. Architecting .NET ApplicationsUse Cases • Express the Requirements, as Activities, from the Perspective of the User

  20. Architecting .NET ApplicationsUse Cases • Actors • Roles within the application • Administrator • Customer • Order Entry Clerk • Human Resources • A given “real person” could be in more than one role • Use Cases • Things that actors can do • Purchase Product • Change Salary • Update Items in Stock

  21. Architecting .NET ApplicationsActivity Diagrams • Use Cases Say What the User Can Do • Activity Diagrams Show How the User Does it

  22. .NET Framework ArchitectureActivity Diagrams

  23. .NET Framework ArchitectureLogical Architecture • Requirements are Decomposed Into Large Objects • Responsibilities are Determined for Those Objects

  24. Agenda • .NET Framework Overview • Architecting .NET Applications • Visual Studio.NET • Implementing Design Goals • XML Web Services

  25. Visual Studio.NETIntegration • Integrates All Development Languages • VB • C++ • C# • JScript

  26. Visual Studio.NETIntegration • Integrates All Project Types • Windows Application • Class Library • Windows Control Library • Web Application • Web Service • Web Control Library • Console Application • Windows Service

  27. Visual Studio.NETSolutions • Multi-Project Solutions • Multi-Language Solutions • Project Dependencies • Build Configurations

  28. Visual Studio.NETServer Explorer • Event Logs • Loaded Modules • Message Queues • Performance Counters • Processes • Services • Databases • Web Services

  29. Visual Studio.NETFeatures • Windows Installer Deployment • Robust Debugging • Macros

  30. Agenda • .NET Framework Overview • Architecting .NET Applications • Visual Studio.NET • Implementing Design Goals • XML Web Services

  31. Implementing Design GoalsImplementing Design Goals • Availability Goal • 100% Uptime • Implementation Choices • Web Farm • ASP.NET Availability Enhancements • Session State Stored Externally in Session Server • Automatic Problem Detection and Web Server Restart Without Interruption of Service • Replace DLLs Used By Site, Without Interruption of Service

  32. Implementing Design GoalsImplementing Design Goals • Maintainability Design Goal • Code should map naturally to design documentation • Code must be segmented so that it can be maintained by different groups. • Implementation Choices • Use Cases implemented directly in Business Façade component • Code segmented into 6 Visual Studio projects that can be modified together, or independently

  33. Implementing Design GoalsImplementing Design Goals • Manageability Design Goals • Change site configuration without a restart • Trace and log to the event log, or a file • Implementation Choices • Store configuration info in Web.config • Trace and log to the event log using the CLR EventLog class • Trace to a text file using the CLR FileInfo and StreamWriter classes • ASP.NET provides performance counters for each web application • Requests and response statistics • Cache statistics • Error statistics • Transaction statistics

  34. Implementing Design GoalsImplementing Design Goals • Performance Design Goal • Match or exceed performance of Duwamish 4.0 • Implementation Choices • ASP.NET compiles pages into executables • Utilize ASP.NET page output caching • Full Web Farm support through external session state, and stateless classes

  35. Implementing Design GoalsImplementing Design Goals • Reliability Design Goal • Handle errors gracefully • Never display a raw error message to the user • Implementation Choice • Exception based error handling • ASP.NET custom error page support

  36. Implementing Design GoalsImplementing Design Goals • Scalability Design Goal • Must scale up and out • Implementation Choices • Scale up through ASP.NET Web Garden support • Scale out through external session state. • Access components locally or through .NET remoting.

  37. Implementing Design GoalsImplementing Design Goals • Security Design Goal • Require authentication to prevent URL spoofing • Implementation Choices • Utilize ASP.NET built-in form authentication

  38. Agenda • .NET Framework Overview • Architecting .NET Applications • Visual Studio.NET • Implementing Design Goals • XML Web Services

  39. XML Web ServicesThe Internet Today • Designed for Human Beings • Browser Based • Most Data is Aesthetic

  40. XML Web ServicesBusiness Needs Today • Electronic Application Integration • Business to Business Communication • Business to Business Commerce • Platform Independent • Language Independent • Standards Based • Inexpensive

  41. XML Web ServicesExisting Infrastructure • The Physical Internet (ISPs, Routers, Highspeed Connectivity) • HTTP/HTTPS • XML

  42. XML Web ServicesImplementation Business Rules Web Browser HTML Data Access Database

  43. XML Web ServicesImplementation Business Rules Web Browser Data Access XML Application Database

  44. Session Summary • .NET Makes It Easier to Design a Good Solution • Object Oriented • Native Support for Many Design Goals • Native Support for Web Services • Visual Studio Makes it Easier to Implement a Good Solution • Multi-Project Solutions • Multi-Language Solutions • Excellent Debugging • Productivity Enhancements

  45. For More Information… • MSDN Web Site at • msdn.microsoft.com • Duwamish Online Site at • www.duwamishonline.com

  46. Become A Microsoft Certified Solution Developer • What Is MCSD? • Premium certification for professionals who design and develop custom business solutions • How Do I Get MCSD Status? • It 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? • For more information about certification requirements, exams, and training options, visit www.microsoft.com/mcp

More Related