19 21 MARCH 2006 Riyadh, Saudi Arabia - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

19 21 MARCH 2006 Riyadh, Saudi Arabia

Description:

19 21 MARCH 2006 Riyadh, Saudi Arabia. Smart Client Development, How to make ... Custom painting, formatting, column types. BackgroundWorker ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 41
Provided by: downloadM
Category:
Tags: march | arabia | riyadh | saudi

less

Transcript and Presenter's Notes

Title: 19 21 MARCH 2006 Riyadh, Saudi Arabia


1
19 21 MARCH 2006 Riyadh, Saudi Arabia
2
Smart Client Development, How to make
applications go smarter with VS2005
  • Goksin Bakir
  • Yage Ltd,
  • Microsoft Regional Director, MEA

3
Agenda
  • Smart Clients
  • Tools
  • ToolStrips
  • Custom renderers, colors, items
  • DataGridView
  • Custom painting, formatting, column types
  • BackgroundWorker
  • Cancellation, progress updates, responsive UI
  • TableLayoutPanel
  • Dynamic layout, content
  • Scenarios

4
Smart Client
5
Smart Client Features
  • Local resources
  • Direct display and peripheral access
  • Responsive graphics, printers, digital cameras,
    etc.
  • Use of installed applications
  • Word, Excel, VSTO
  • Connected
  • Access to network resources
  • Web services, SQL Databases

6
Smart Client Features
  • Offline capable
  • Cache online data
  • Update when connected
  • Datasets in smart documents
  • Intelligent deployment and update
  • Easy non-administrator deployment
  • Automatic updates
  • Smart document deployment
  • Rich / easy developer experience

7
Smart Client Technologies
  • Visual Studio 2005
  • Rich visual designer support
  • Integrated ClickOnce testing and deployment
  • Visual Studio Tools for Office
  • .NET Framework 2.0
  • Windows Forms 2.0
  • ClickOnce deployment

8
Visual Studio 2005
  • Project templates
  • Get up and going quickly
  • Common application types
  • Designers
  • Simplifies development of UI and layout
  • Rich User Control development
  • Rich support for Custom Controls

9
What is smart
  • Local resources and user experience
  • Offline capable
  • Intelligent deployment and update
  • Multithreaded
  • Crash Proof

10
(No Transcript)
11
Visual Studio 2005
  • Data
  • New data-bound controls
  • Schema-based typed-data set designer
  • Support for iterative maintenance of generated
    data-code
  • Partial types for maintainable customizations of
    auto-generated code
  • Reduced need for mapping or glue code
  • Server explorer
  • Integrated data manipulation

12
(No Transcript)
13
ClickOnce Deployment
  • ClickOnce application deployment published on a
    web or file server

Server
application files
  • Client follows link to serverhttp//www.tempuri.o
    rg/my.application
  • Application deployed locally in users profile
    directory executed
  • Subsequent executions check for updates execute
    local install

Client
14
ClickOnce
  • Smart Client deployment technology
  • Provides web-deployment simplicity
  • End User
  • Provide web-deployment flexibility
  • Publisher
  • Other parallels to web-applications
  • Applications are isolated per-user
  • Can be executed with limited local permissions
  • Locally executed, rich features

15
ClickOnce Features
  • Follow a link to install an application
  • Automatic w/minimal or no decision points
  • web-style deployment
  • Automatic update of application
  • Security isolation and optional restricted
    permissions
  • Non-administrative installs

16
ClickOnce VS 2005
  • Project Settings ? Publish tab
  • Set deployment location
  • Configure data files for deployment
  • Other settings version, online-only or
    online-offline, CD installations and other
    details
  • Project Settings ? Security tab
  • Calculating permissions required by your
    application to function
  • Also add permissions using SecurityException at
    runtime
  • Setting permissions in the manifest required to
    run
  • Partial trust and full trust supported

17
Application Updates
  • Auto-update deployment options
  • Before application launch, or
  • Update check occurs after app-launch
  • Scheduled update checks
  • Weekly, monthly, etc.
  • Project Settings ? Publish tab
  • Settings for update checking

18
ToolStrips
  • Replaces MainMenu, ContextMenu, ToolBar and
    StatusBar
  • HWNDless architecture
  • Same OM across all containers
  • System and professional renderers
  • ToolStripControlHost

19
Datagridview
  • Replaces DataGrid
  • Extensible and Flexible
  • Bound, Unbound, Virtual, Mixed
  • Eleventy billion PMEs
  • Text, Image, Button, Link cells/columns
  • Cell-based, not Column-based
  • Cell styles (Font, Color, Formatting)
  • Cell-level events
  • Mouse, Formatting, Validate, Error, others...
  • Custom Column Types
  • High performance
  • Display, scrolling, updates

20
Backgroundworker
  • BackgroundWorker
  • Simplify creating responsive applications
  • Easier to perform long running tasks without
    freezing the UI
  • Simplify Thread use in Windows Forms applications

21
Diagram BackgroundWorker
Automatically acquired ThreadPool Threadno UI
updates allowed
UI Thread
StartFindInFiles()
DoWork() If (!CancellationPending)
FindInFiles()
RunWorkerAsync()
ReportProgress()
ProgressChanged() Update UI
RunWorkerCompleted()
EndFindInFiles()
22
Tablelayoutpanel
  • Layout Controls
  • TableLayoutPanel
  • Similar to HTML Table control
  • Address localization scenarios
  • Facilitate creation of resizable UI
  • Support data-driven UI (e.g., labels from a DB)

23
Diagram Login Dialog
Only occupy necessary space
Right aligned, Grow/Shrink to accommodate label
length
  • AutoScale
  • RightToLeft
  • Font Changes
  • DPI Changes

Equal , preserve minimum size, lower right
alignment
24
DEMO
25
What Is Occasionally Connected
  • Empowering users to leverage their computer,
    applications, data and files regardless of
    network availability
  • Application proactively retrieves necessary data
    necessary to work offline
  • As the network comes available, the application
    will automatically sync their work and log
    conflicts for the user to resolve
  • Network operations occur in the background so the
    user can stay focused on their task
  • Example Outlook 2003

26
Resources Needed Offline
  • Data
  • A subset of the data from the server(s)
  • Heterogeneous Sync (SQL Server, Oracle, DB2, )
  • Files
  • Not all data exists within the database
  • Media files, Office Files,
  • Application Messaging (Web Services, WCF, )
  • Ability to queue outbound messages
  • Ability to async process inbound messages
  • Read Only Informational/Reference Data Services
  • Ability to pre-fetch data from existing services

27
Occasionally Connected Smart Client
Smart Client Application / UI
Background Tasks
Canned UI Controls
Data Sync Services
File Sync Services
Data Access API
Network Resources
Message Queuing
Message Caching
Data Store
Files
Application Updates
28
Architecture
Weather Services
Works Corp
Sales Smart Client
Background Tasks
Desktop TabletPC
PocketPC
Smart Phone
Sync Services
Sync Services
App Logic
Data Server
Weather Caching
Data Store
Network Services
Order Services
Order Submission Queue
PromoVideos
  • Product Catalog
  • My Customers
  • Order Scratchpad
  • My Inventory

App Updates
29
Which Local Data Store?
  • Microsoft Database Technologies
  • SQL Server 2005
  • SQL Server Express Edition
  • SQL Server Mobile Edition
  • Jet (Access)
  • Microsoft Visual FoxPro (.dbf)
  • Excel
  • XML
  • WinFS
  • Something new

30
SQL Server Express
  • Great improvements over MSDE
  • Simple install from web or local MSI
  • ClickOnce will BootStrap SSE if not installed
  • Connect w/File Path Connection String
  • User Instance feature for File Path Connecitons
  • Great for VS Development

31
Deploying SSE For Occasionally Connected
Scenarios
  • Base Install of SSE
  • ClickOnce Bootstrapper
  • Requires Admin Rights
  • Replication w/SSE
  • Replication not supported w/User Instances
  • Enable SQL Server Authentication
  • Add DBO Privileged Account
  • Script creation of database
  • Verify / Create / Attach database at startup
  • Deploy SQL Server Replication .Dlls

32
Occasionally Connected Devices
  • Servers
  • Desktops
  • Laptops
  • Tablet PCs
  • Windows CE
  • Pocket PC
  • Smart Phone

?
Sweet spot
Win 32
33
Local Database Options
Server
SQLServer
Workgroup
Desktop
SQL ServerExpress
Laptop
Tablet PC
Win 32
Windows CE Device
SQL Mobile
SQL Mobile
Pocket PC
Smart Phone
34
Deploying SQL Server Mobile
  • SQL Server Mobile Engine
  • Add runtime dlls to project (sqlce.dll)
    C\Program Files\Microsoft Visual Studio
    8\Common7\IDE
  • File size lt1.4mb
  • Set files to Copy to Output Directory Copy if
    newer
  • ADO for SQL Server Mobile
  • Add reference to Microsoft SQL Mobile
  • Located in C\Program Files\Microsoft Visual
    Studio 8\ _ Common7\IDE\PublicAssemblies\System.Da
    ta.SqlServerCE.dll
  • File Size 224k

35
How - To Sync
  • Roll your own
  • Ultimate in flexibility
  • Highest cost to develop and maintain
  • Merge Replication
  • Most power, broadest features for different data
    partitions, spans all devices
  • Need DBO/DBA privileges, must own server
  • Remote Data Access (RDA)
  • Easy entry point for well partitioned data, no
    config to database
  • Limited to SQL Server Mobile

36
RDA Sync Architecture
Local App
UI
IIS w / Sync ISAPI dll
Server Data
DAL
RDA Sync Engine
In
Out
Database Engine
SQL Server Mobile
37
BackgroundTasks / Steps
  • Runs on a background thread of the application
  • Executes collection of steps
  • Start / Stop similar to Windows Services
  • Executes in a loop based on a Timer
  • Can be triggered by Network Resources
  • Marshals progress / completed infoto UI thread

38
(No Transcript)
39
Community Resources
  • INETA MEA !
  • www.ineta.org
  • mea.ineta.org

40
Smart Client Summary
  • Rich features easier than ever to implement
  • Windows Forms 2.0 new controls
  • Windows Forms 2.0 improved data integration
  • Installation and update easier than ever
  • ClickOnce web-style simplicity
  • ClickOnce web-style security
  • SmartClient rich feature-set
  • Customers access existing and new application
    features easily
  • Customers access your application with or without
    network connectivity
Write a Comment
User Comments (0)
About PowerShow.com