Скачать презентацию Developing Smart Client Applications Henrik Lykke Nielsen Software Скачать презентацию Developing Smart Client Applications Henrik Lykke Nielsen Software

f8e0a00baa45e21acdf83296ad5c3757.ppt

  • Количество слайдов: 31

Developing Smart Client Applications. Henrik Lykke Nielsen Software arkitekt, Captator Microsoft Regional Director for Developing Smart Client Applications. Henrik Lykke Nielsen Software arkitekt, Captator Microsoft Regional Director for Denmark lykk[email protected] dk www. captator. dk/captator. aspx? blog=dothenrik

Today's Agenda Best practices for building well-designed, secure, data-driven, smart client applications Session 1: Today's Agenda Best practices for building well-designed, secure, data-driven, smart client applications Session 1: Designing and building smart clients Patterns and practices for smart clients, Issue. Vision Session 2: Securing smart client applications Tips for secure data, CAS, encryption, and more Session 3: The ins and outs of secure data access Best practices for smart client data, offline data Session 4: Deploying and maintaining smart clients Tips for deploying and easily updating apps

Session Agenda Smart clients: a new breed of Windows app See it in action: Session Agenda Smart clients: a new breed of Windows app See it in action: Issue. Vision Drill-down: Design choices for desktop clients Smart clients in summary

Teknologi udvikling Muligheder og egenskaber Shift happens XML web services Enterprise integration Næste generation Teknologi udvikling Muligheder og egenskaber Shift happens XML web services Enterprise integration Næste generation af klienter Client-server RAD Komponenter PC GUI LAN PC CUI Web Applikations server Mainframe “Dum” terminal Tid “Smart-clients” er den næste naturlige udvikling

New Breed of Windows App Enables “occasionally connected” work Leverages the best of Windows New Breed of Windows App Enables “occasionally connected” work Leverages the best of Windows Superb usability for simple and complex tasks Power and performance of the local PC Pixel-precise layout, consistent for every user And solves common problem of Windows apps Easy deployment and maintenance Permissions not only based on user identity

Smart Client Defined 1. 2. 3. Windows user interface Server-based application data Local resources Smart Client Defined 1. 2. 3. Windows user interface Server-based application data Local resources Yes, but what we’re Wait! That’s there’s more! doing today! Additional Smart Client Attributes Solve common Windows application problems: data, security, and deployment 4. 5. 6. Disconnected data Sophisticated security Easy to deploy and maintain

What a Smart Client Isn’t User interface is not the browser Not a new What a Smart Client Isn’t User interface is not the browser Not a new application architecture N-tier architectures still apply Client/server is still an option

Smart Client or Not? Hotmail Automatic Updates? Yes Rich Windows Experience? No Seamless Offline Smart Client or Not? Hotmail Automatic Updates? Yes Rich Windows Experience? No Seamless Offline Support? No Better Connected? Yes Smart Client? No Notepad No Debatable Yes No No Outlook XP No Yes Sort of Yes No Outlook 2003 No Yes Yes Close. . . Microsoft Money Issue. Vision Yes Yes Yes

Eksempel fra Captator E-handelsportal SQL ERP system IIS Data, applikation og komponenter Filer til Eksempel fra Captator E-handelsportal SQL ERP system IIS Data, applikation og komponenter Filer til data integration PC Slutkunde med web-browser Shop-administrator MSDE database

Introducing Issue. Vision Scenario: Helpdesk Issue Tracking Features: Great usability Shift seamlessly to working Introducing Issue. Vision Scenario: Helpdesk Issue Tracking Features: Great usability Shift seamlessly to working offline Shows best practices UI Patterns Occasionally connected data Security Deployment Access to full source code

Issue. Vision: Smart Client In Action Issue. Vision: Smart Client In Action

Issue. Vision Review Leverages the best of Windows Attractive desktop client, great usability Move Issue. Vision Review Leverages the best of Windows Attractive desktop client, great usability Move seamlessly between online and offline Secure access to server data Secure access to local resources Cost-effective to install and maintain Solves common problems of Windows apps Automatic updates No DLL Hell

Drill Down: Design Choices for Desktop Clients Design Patterns Coordinating multiple views of the Drill Down: Design Choices for Desktop Clients Design Patterns Coordinating multiple views of the same data Coordinating command state Custom Controls Windows XP Themes

Design Patterns Promote consistency and maintainability Value increases with for app complexity Microsoft Patterns Design Patterns Promote consistency and maintainability Value increases with for app complexity Microsoft Patterns and Practices site: http: //www. microsoft. com/resources/practices/ Issue. Vision desktop client patterns Observer Pattern Coordinates multiple views of the same data Command Pattern Coordinates menu items and toolbar buttons that perform the same function

Coordinate Views of Data Observer pattern Easier to keep a consistent and maintainable view Coordinate Views of Data Observer pattern Easier to keep a consistent and maintainable view of the data Half as many connections between actions, views Views are independent and unaware of each other Data Action View view & Action view Messages about the data Action Data notifies observers via events when the state of the data changes Action

Implementing an Observer 1. Assign the subject to the observers (Main. Form_Load) b m_subject Implementing an Observer 1. Assign the subject to the observers (Main. Form_Load) b m_subject = new Issue. Subject() pane. Left. Subject = m_subject c a d 2. Observers bind and save changes to Subject. Data. Set 3. When data changes, subject raises Data. Changed event Issue. Subject 4. Observers handle subject events to rebind data, if they care Handles m_subject. Data. Changed ‘ rebind

Observer Pattern Observer Pattern

Coordinate Command State Related menu and toolbar widgets are not automatically handled together Command Coordinate Command State Related menu and toolbar widgets are not automatically handled together Command Pattern Command objects unify the state and action for related UI widgets Example: “Save” action Menu item Toolbar button Context menu

Implementing a Command 1. Create a Command for each action in Main. Form_Load() action Implementing a Command 1. Create a Command for each action in Main. Form_Load() action = New Command. Action(Address. Of Work. Offline_Action) offline. Command = New Command(action) 2. Wire menu items and toolbar buttons to the Command using Commander objects Menu. Item. Commander. Connect(menu. Work. Offline, offline. Command ) Tool. Bar. Button. Commander. Connect(tlb. Offline, offline. Command ) 3. Control button and menu item state through the Command ' Disable all UI widgets connected to this command offline. Command. Is. Enabled = False

Command Pattern Command Pattern

Custom Controls Encapsulate a set of user interactions Or, present information in a new Custom Controls Encapsulate a set of user interactions Or, present information in a new way Try before you buy Visual Basic. NET Resource Kit Lots of other downloads … Create your own reusable control Issue. Vision’s Custom Controls Expandable. List Chart Pane

Issue. List Control Issue. List Control

Tips For Custom Controls Application-specific controls Reusable controls Bind to a generic data type Tips For Custom Controls Application-specific controls Reusable controls Bind to a generic data type where possible Put generic behavior in a base class, and application-specific behavior in a derived class Leverage VS. NET designer support. NET framework property types use built-in designer support Public Property Active. Gradient. Low. Color() As Color Add designer attributes to public members Description("Low color of the active gradient. "), _ Category("Appearance"), _ Default. Value(Get. Type(Color), "255, 165, 78")> _ Public Property Active. Gradient. Low. Color() As Color

Windows XP Themes Give your app a fresh look Gives your client UI flat-look Windows XP Themes Give your app a fresh look Gives your client UI flat-look input controls and rounded buttons Works on Windows XP only Application. Enable. Visual. Styles() Set Flat. Style property to Flat. Style. System on controls Call prior to creating forms or controls In main form’s construction

Enable. Visual. Styles() Enable. Visual. Styles()

Best Practices: Desktop Client Make your UI fit the data Find the best way Best Practices: Desktop Client Make your UI fit the data Find the best way for users navigate to and visualize your data Use design patterns to improve consistency and maintainability Use custom controls for great usability Improves consistency and code reuse too Add a fresh look with Windows XP themes

Smart Clients in Summary Smart clients—a new breed of Windows app Awesome usability of Smart Clients in Summary Smart clients—a new breed of Windows app Awesome usability of Windows, easy maintenance Extends the Windows client to new solutions: “Occasionally connected” offline data Deploy from Web Auto-updates Many more best practices and demos coming up! Data Access in Smart Clients Securing Smart Clients Deploying and Maintaining Smart Clients

Resources Patterns and Practices www. microsoft. com/resources/practices Visual Basic. NET Resource Kit msdn. microsoft. Resources Patterns and Practices www. microsoft. com/resources/practices Visual Basic. NET Resource Kit msdn. microsoft. com/vbasic/vbrkit Windows Forms Programming www. windowsforms. net Visual Basic. NET Language Essentials msdn. microsoft. com/vbasic/using/understanding Shows and webcasts msdn. microsoft. com/showsandwebcasts Nyheder, artikler, information, … www. captator. dk

© 2003 -2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes © 2003 -2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.