430 likes | 692 Views
Introduction to Mobile Application Development with Microsoft Embedded Visual Tools. Robert Turner Application Development Consultant Microsoft UK. Agenda. Introduction to Windows CE Embedded Visual Tools 3.0 SDK’s Embedded Visual C++ Language features and technologies available
E N D
Introduction to Mobile Application Development with Microsoft Embedded Visual Tools • Robert Turner • Application Development Consultant • Microsoft UK
Agenda • Introduction to Windows CE • Embedded Visual Tools 3.0 • SDK’s • Embedded Visual C++ • Language features and technologies available • SDK features • Embedded Visual VB • Language features and technologies available • How to use eVB
What is Windows CE? • What does it have in common with Windows 2000/XP? • 32 bit Operating System • Win32 API etc. • Subset • Virtual Memory • What is different about it? • Componentized • Leave out the bits you don’t need • Allows you to cut down memory footprint • Processor independent • Supports ~11 processor families • Real time
What is Windows CE? • Target Applications • Embedded systems • Consumer platforms • Pocket PC • Handheld PC • Smartphone
What are Embedded Visual Tools ? • Standalone development tools for Windows CE • No longer an add in to Visual Studio • eVB and eVC are separate IDE’s • Separate but can co-exist with VS6, VS.Net and service packs • No support for Win32 desktop environment • Benefits • Greatly simplified setup • UI tailored to embedded platform • Lower cost – no longer need desktop VC or VB installed • Disadvantages • Keeping a common Desktop/Embedded codebase is now non-trivial
Demo • eVB and eVC environments
What are the Embedded Visual Tools ? • Platform Manager • Manages connection to device • Select devices • Setup connection transport and startup server • ActiveSync transport is simplest • Test connection
Tools LandscapeChoosing the correct tool Platform Builder eVB eVC SDE / CF LOB Apps UI Apps Device Drivers
Software Development Kits • The SDK allows the application programmer to target a specific device • Microsoft provides SDKs for P/PC, H/PC, Smartphone etc. • OEM creates an SDK to support your custom CE-based device with Platform Builder’s Export SDK feature
SDK’s • Contain: • Header files, libraries and samples • eVC and eVB extensions (as appropriate) • Target device configuration • Emulator • Wizards • Online help • Allow new platforms to be supported
eVC • Language • C++ subset of desktop Visual C++ 6 • Compiled, processor specific • Optimised code • C++ Templates • Multiple Inheritance • EXE, DLL, LIB targets • With and without UI
eVC • IDE • Intellisense parsing per platform (API) • Enhanced remote debugging - Ethernet • Remote Tools • PDB and browse database supported for debugging and development • Better doc support (SDK dependent) • Support for new platforms (with SDK) • Pocket PC 2002 • Smartphone 2002
eVC 3 Supported Platforms • HPC Pro (2.0) & Palm Sized PC (2.11) • Birch SP2 (2.12) • Embedded Device Development • OEM SDK’s from Platform Builder • Cedar (3.0) • Pocket PC, HPC 2000, Pocket PC 2002, Smartphone 2002 • A word about eVC 4.0
Desktop Device C++, H and lib modules ActiveSync Platform Manager Platform Manager (CEMGRC.EXE) eVC Compiler CEMON ?.exe ?.dll ?.exe ?.dll Controls and Com Objects Coredll.dll Shared/ 3rd party Libs CE
UI stuff –what’s available • Windows • Normal Win32 WM_PAINT messages etc. • Dialogs • Standard (button, list, combo etc) • Progress, Slider, TreeView, Tab, ListView • DateTime, Calendar • Custom
UI stuff (cont) • Pocket PC • GameX /GAPI • Notifications • Today Add-in • WC_SIPPREF CONTROL "",-1,WC_SIPPREF, NOT WS_VISIBLE,-10,-10,5,5 • SHInitExtraControls – CAPEDIT class • Graphical Menu Editor • MFC • Document View architecture • Message routing
What is supported • Unicode everywhere • MessageBoxW etc • COM (inproc only on Pocket PC) • Early and late binding • ATL, MFC or Win32 • Win32 structured exception handling
What is supported(cont) • Memory Mapped Files • Window subclassing • Winsock • IRDA • CryptoAPI • TAPI • ExTapi, Phone, SMS, WAP, SIM (Smartphone / Pocket PC Phone) • Printing (not on Pocket PC 2002)
What is not supported • C++ Exceptions • RTTI • STL • RPC • Security • Overlapped IO • Inplace activation • Edit and Continue
MFC – Pocket PC • Wizards • PocketPC App (Dialog, SDI and SDI + DocList) • OCX • DLL • New Classes CCe… • CCeCommandBar,CCeDocList…, CCeDB…, CCeSocket • Not Supported • Common Dialogs (Font, PageSetup) • Common Controls (Animate, CheckListBox,HotKey, ToolTip, DragListBox) • DAO • FTP, Gopher, some Html and Http • MDI, OLE, RichEdit • Other classes are modified for CE
MFC – Pocket PC • For • Fast way to build document based apps • Good utility class support • Same as desktop • CString, CArray, CMap • Simplifies • screen control • Access to sub systems • Against • High overhead in memory footprint • Requires distribution of MFC runtime
ATL – Pocket PC • Designed for inproc COM classes • Limited (but powerful) port of the desktop • Wizards: • ATL Com object • MFC Support available • New Object Wizard: • Simple, IE, Registrar, Full and Lite control • Full and lite Composite control • Property Page, Dialog • Limited helper classes • No implementation of STL to help out • Free threading only (No apartment)
ATL – Pocket PC • Not supported: • CBindStatusCallback • CSnapInItemImpl • CSnapInPropertyPageImpl • IObjectSafetyImpl • IServiceProviderInfo • Modified: • CWindow heavily modified • CComModule, CComApartment, CComClassFactorySingleton
Pocket PC 2002 SDK • CPU’s • ARM and Emulation • Emulation • High fidelity emulator using NK.BIN image • Documents • Pocket PC 2002 centric API’s/Not Generic CE Docs • Detailed MFC info for Pocket PC 2002 UI • Much More Sample Code
Remote Tools • Remote Spy++ • Remote Registry Editor • Remote Process View • Remote Heap Walker • Remote File View • Remote Zoomin
About eVB Language • eVB language is a subset of that used by the desktop version of Visual Basic • Small, lightweight and interpreted • Based on VBScript • eVB combines the robust power of Visual Basic with the compact portability and ease of use characteristic of VBScript
Desktop Device Form and bas modules ActiveSync Platform Manager Platform Manager (CEMGRC.EXE) eVB Compiler ?.vb ?.vb PVBLOAD PVBHost2 PVBForm2 Controls and Com Objects vbscript CE
Intrinsic controls • Standard Set • Picture, Edit, Label, Button • Line, Group, Check, Radio • Combo, Listbox, Scroll, Timer
Intrinsic controls • Extended Set • List View, Common Dialog • Comm, FileSystem • Grid, Image, Image List • Menu Bar, Picture Box • Tab Strip, Tree View, WinSock
Intrinsic controls • File and FileSystem • No native VB access to CE file system • Hidden controls provide access • MenuBar • No visual menu editor • Hidden control provides access • ADOCE for all DB access
Similarities to Desktop • Functions and Subs • Bas, and Form modules • Debug environment • Immediate window • Watch Window • Call stack • If … then … else, While … wend, Select case, Do loop, for … next, repeat until • Arrays, redim • API calls via Declare • On Error [Resume Next|goto 0]
Language omissions • VB Script derivative • No Classes • No Objects • Late bind COM only • No Type def’s • On Error …
Environment omissions • PCode only – no EXE or DLL targets • No compiler • No runtime editing • Project Icons • Form Unload
Build a sample • Simple sample (use Treeview sample) • File Size – 3k • Memory footprint ~1.1MB
eVB How To • Keep projects small • <10k lines per project • Use ShellExecute to extend • Great for proof of concept • Use for screen design • VB used as Glue • Build complex code in C++ • Use COM or DLL calls to business logic • Be aware of its limitations • Don’t port Desktop
Top Design Thoughts • Pocket PC platform is great to develop for! • Less CAN be more… • Know your key scenarios and design only for those • Read is different from edit • Minimize the difficulty of input • Single tap, single tap, single tap • Use Tap and Hold • Don’t make the SIP dance • Integrate your app with Pocket PC, don’t stand out
Summary • Embedded Visual Tools provides a very powerful and flexible toolset for targeting Mobile Devices • No learning curve to use eMbedded Visual Tools • VB, VC++, Win32, MFC, ATL, COM etc… • Microsoft Mobile platforms provide a powerful programming environment