Building State of the art presentation tiers Nauzad Kapadia

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Preface Demo A Quick Thank You How Did We Do It?
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Amalga UIS Modules Medical Imaging Research Foundation Quality Measures Other HealthVault Partner Applications Microsoft Partner Solutions.
Interactivity Navigating a data model Working with large quantities of data Entry Editing and adding data User feedback and validation Presentation.
Co- location Mass Market Managed Hosting ISV Hosting.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
 Alexander Malek Lead Program Manager SharePoint Microsoft Corporation BB47.
Announcing Demo Announcing.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
Windows Azure Connect Name Title Microsoft Corporation.
NEXT: Overview – Sharing skills & code.
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Building Social Games for Windows 8 with Windows Azure Name Title Microsoft Corporation.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
Ian Ellison-Taylor General Manager Microsoft Corporation PC27.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
public class Foo { Bar _bar; public Foo() { this._bar = new Bar(); } public class Foo { IBar _bar; public Foo(IBar barDependency) {

IoCompleteRequest (Irp);... p = NULL; …f(p);
SkyDrive Pro Chris Gideon Architect Microsoft 9/16/2018
Возможности Excel 2010, о которых следует знать
Title of Presentation 11/22/2018 3:34 PM
Title of Presentation 12/2/2018 3:48 PM
Working across the .NET Continuum
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows 8 Security Internals
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Building State of the art presentation tiers Nauzad Kapadia

Key Objectives Importance of the presentation tier and overview of technologies available Guidelines for designing presentation tiers Discuss the issues commonly faced in presentation tiers Present solutions and workarounds

Importance of the presentation tier

ASP.Net Silverlight Flash Windows Presentation Foundation Windows Forms Flex HTML 5 User Experience Silverlight OOB XBAP

General guidelines Separate the UI from the logic that drives the UI Do not design complex and overloaded UIs Do not ever block the UI thread Test the presentation tier

The MVVM Pattern View Contains the User Interface The Face of the application View Model Drives the View Provides all the data required by the view, in the format that it requires Model Provides the business logic for the PT Acts like a gateway between the PT and the middle -tier

Testability Problem –What is the easiest way to test my presentation tiers Solution –Use the MVVM pattern

Separation of concerns and reuse Problem –Want to free the UI from the logic that drives it –Re-use of presentation tiers in different environments with minimal effort Solution –Use the MVVM pattern.

DEMO Application design using the MVVM pattern

Caching - guidelines Carefully choose the right data for caching Chose the appropriate location for the cache Design a cache refresh and updation strategy

Caching Problems –How do I synchronize my cache across multiple servers across a farm –How do I cache data on the client in a non- obstructive manner Solutions –Use Velocity® for web-farm level cachine –Use the IsolatedStorage area on the client- side

DEMO Using the Isolated Storage Area

Validation guidelines Design a non-intrusive, but fool-proof validation strategy Display error messages prominently Do not perform excessive validations

Validation Problem –How do I provide some generic rules which can be re-used in multiple places –How do I centralize all my validation logic for a single entity –How do I control when the validation rules are fired Solutions –Use Validation Rules for generic validations –Use IDataErrorInfo for centralizing validation logic –Use ErrorProvider pattern for more control

DEMO IDataErrorInfo and ErrorProviders

Exception Management guidelines Design a centralized exception management strategy Log Exceptions Display appropriate and generic error messages Do not use exceptions to control program flow Do not re-throw the same exception

// BAD WAY //... search for Product if ( dr.Read() ==0 ) // no record found, ask to create{ //this is an example of throwing an unnecessary exception because //nothing has gone wrong and it is a perfectly acceptable situation throw( new Exception(“Product Not found")); } // GOOD WAY //... search for Product if ( dr.Read() ==0 ){ // no record found, ask to create return false; }

Navigation guidelines Allow navigation within your application to happen in a easy consistent manner Consider access rules and security trimming while implementing navigation Navigation elements should reflect the state of the application.

Navigation Problem –How do I keep my UI controls and navigation elements in sync with the current state of my application Solution –Use the Controller Pattern –Use the Commanding Pattern

DEMO The Commanding Pattern

Localization guidelines Build localization support right in the beginning Design the UI keeping in mind that string sizes may vary significantly for the same content in different languages

Localization Problem –How do I localize my UI in multiple languages –How do I facilitate the addition of “language packs” to my application Solutions –Use.resx files

DEMO Localizing applications

Composite application guidelines Decide how modules will fit into the overall application Decide how to discover modules Decide on a DI container Determine the communication strategy between modules

Composite Applications Problem –How do I build a modular application –How do I discover modules at runtime –How do I enable loosely coupled communication between modules Solutions –Use PRISM –Use a Dependency Injection framework like MEF or Unity

DEMO DI using MEF

UI Responsiveness guidelines Do not block the UI thread ever Show the progress of a long running operation Consider giving the user the chance to cancel a long running operation Reduce the start-up time of modules Pre-initialize commonly-used modules and views

UI Responsiveness Problem –How do I ensure that my UI is not blocked during a long running operation –How do I allow the user the cancel a long-running operation –How do I improve the responsive-ness of my UI Solution –Use background threads for long running operations –Use Task Parallel Library or ThreadPools –Use Caching

Resources Software Application Developers Infrastructure Professionals

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.