Download Smart Client Features

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Relational model wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Microsoft Access wikipedia , lookup

Btrieve wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

SQL wikipedia , lookup

PL/SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Transcript
19 – 21 MARCH 2006 Riyadh, Saudi Arabia
Smart Client Development, How to make
applications go smarter with VS2005
Goksin Bakir
Yage Ltd,
Microsoft Regional Director, MEA
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
Smart Client
Heavy
footprint
Rich User
Experience
Tough
to deploy
“DLL
Hell”
Web services
and offline/online
support
High developer
productivity
Broad reach
Easy change
management
Responsive
UI
Device
adaptability
Network
dependency
Reduced
User
Experience
Easy to
deploy
Complex to
develop
Smart Client Features
Local resources
Direct display and peripheral access
Responsive graphics, printers, digital camera’s, etc.
Use of installed applications
Word, Excel, VSTO
Connected
Access to network resources
Web services, SQL Databases
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
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
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
What is “smart”
Local resources and user experience
Offline capable
Intelligent deployment and update
Multithreaded
Crash Proof
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 autogenerated code
Reduced need for “mapping” or “glue” code
Server explorer
Integrated data manipulation
ClickOnce Deployment
Server
ClickOnce application
deployment published on a
web or file server
application files
Client follows link to server
http://www.tempuri.org/my.application
Application deployed locally in user’s
profile directory & executed
Subsequent executions check for updates
& execute local install
Client
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
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
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
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
ToolStrips
Replaces MainMenu, ContextMenu, ToolBar and
StatusBar
HWNDless architecture
Same OM across all containers
System and professional renderers
ToolStripControlHost
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
Backgroundworker
BackgroundWorker
Simplify creating responsive applications
Easier to perform long running tasks without “freezing” the
UI
Simplify Thread use in Windows Forms applications
Diagram: BackgroundWorker
UI Thread
StartFindInFiles()
RunWorkerAsync()
ProgressChanged(){
Update UI
}
RunWorkerCompleted()
EndFindInFiles()
ReportProgress()
Automatically acquired
ThreadPool Thread
no UI updates allowed…
DoWork(){
If (!CancellationPending){
FindInFiles()
}
}
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)
Diagram: Login Dialog
Only occupy
necessary
space
Right aligned,
Grow/Shrink to
accommodate label
length
Equal %, preserve
minimum size, lower
right alignment
AutoScale
RightToLeft
Font Changes
DPI Changes
DEMO
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
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
Occasionally Connected Smart Client
Smart Client Application / UI
Canned
UI
Controls
Data Sync
Services
File Sync
Services
Message Queuing
Data Access API
Message Caching
Application
Updates
Files
Data Store
Microsoft Windows / Windows Mobile
Visual Studio
Network Resources
Background Tasks
Architecture
Weather
Services
Sales
Smart Client
Background
Tasks
Desktop
Sync
Services
Network Services
Order
Service
s
Data
Server
Sync
Service
s
Works Corp
TabletPC
PocketPC
Smart
Phone
App Logic
Weather
Caching
Order
Submission
Queue
App
Updates
Data Store
Promo
Videos
•Product Catalog
•My Customers
•Order Scratchpad
•My Inventory
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
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
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
Occasionally Connected Devices
Servers
Desktops
Laptops
Tablet PC’s
Windows CE
Pocket PC
Smart Phone
?
Win 32
Sweet
spot
Windows CE Device
Pocket PC
Smart Phone
SQL Mobile
Win 32
SQL Server
Express
Workgroup
Desktop
Laptop
Tablet PC
Single User Scenarios
Server
SQL
Multi
User
Server
Local Database Options
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 <1.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.Data.SqlServerCE.dll
File Size ~224k
How - To Sync
Technology
XML - DataSets
SQL Server Express
SQL Server Mobile
Roll your own
Merge
Remote
Replication
Data Access






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
RDA Sync Architecture
Local App
UI
DAL
Database
Engine
SQL Server
Mobile
RDA Sync
Engine
IIS
w / Sync ISAPI dll
Server
Data
Out
In
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 info
to UI thread
Community Resources
INETA MEA !
www.ineta.org
mea.ineta.org
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