An Overview Of Microsoft's .NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist [email protected] 1 Presentation Overview • The .NET Compact Framework • The Mobile Internet Controls Runtime 2 Mobile .NET in a nutshell .NET Framework Mobile Internet Controls Runtime Mobile Web Browser 3 CAB File .NET Compact Framework Development Computer Requirements • Hardware • Pentium III @ 600 MHz • 150 MB Hard Disk Space • 800 x 600 @ 256 colors • 256 MB RAM • Software • Windows XP or 2000 • ActiveSync 3.5 4 Device Requirements • Operating System • Pocket PC • Pocket PC 2002 • Windows CE .NET • RAM Space • 2 MB 5 Architecture 6 Application Domains • Benefits of OS processes without the overhead • Fault isolation • Security • Performance • Partial support under the Compact Framework • Can create multiple application domains • No domain-neutral code area 7 Security • An open programming environment is assumed… • No role-based security • No zone-based security • No AllowPartiallyTrustedCallersAttribute • No declarative permission requests • pInvoke can execute whatever native code it likes • You can, however, verify code identity… • Assemblies can be given strong names before deployment • Assembly names can be verified at run time 8 Tools • C# is nearly identical • Visual Basic is different • /netcf switch required to target the Compact Framework syntax • /sdkpath switch required to point to… • 9 ‒ mscorlib.dll ‒ microsoft.visualbasic.dll Debugging is only possible from within the VB device project Application Types • Windows Applications • Class Libraries • Windows Control Libraries • Console Applications (Windows CE only) 10 Debugging • The Emulators • Run real Windows CE bits • Still x86 processors • Real Devices • USB or serial connections are OK • Ethernet or 802.11 are better • In either case… • No way to debug from managed into unmanaged • No edit and continue • No attaching to existing processes • Need a “Loopback Adapter” before VS.NET 2003 • Map a shared drive to move files 11 What you have, and what you don’t have… System.Web Services Description Discovery Protocols UI HtmlControls WebControls Caching Configuration SessionState System.WinForms Design System.Drawing Drawing2D Imaging System.Data ADO.NET Design ComponentModel Printing System.Xml SqlClient SqlServerCe XmlDocument Xslt/XPath Serialization Reader/Writers System Collections Security Text Globalization 12 IO Net Reflection Resources Configuration ServiceProcess Diagnostics Threading Runtime InteropServices Remoting Serialization Demo #1 A mobile Web Service client 13 Question & Answer 14 Windows CE Fundamentals • One of Microsoft’s three flavors of Windows for devices • Windows CE and CE.NET are for devices • Windows NT Embedded and XP Embedded for “serious” appliances • Really a smorgasbord of OS components • OEM’s choose their favorite bits • Platform Builder is the tool for doing the choosing • Microsoft sets standards or CE “flavors” – such as Pocket PC OS • Some components must be chosen under Platform Builder • Some hardware specifications must be met • OEM’s are free to add whatever else they like 15 Windows CE Popularity • Pocket PC is the Windows CE poster child • Already beaten Palm OS in terms of PDA revenues • iPaqs are, by far, the leading Pocket PCs • Twice the cost of a Palm device – but 10 times the functionality! • CE.NET is the champion of new computing • These devices will be first to ship Compact Framework (Beta 1) • Handheld PCs and Palm PCs were also Windows CE 16 Windows CE Web Development • Pocket Internet Explorer is the CE browser • First version was very limited, but you don’t see it much • Next version of Pocket PC’s had good functionality: • Some DHTML support • HTML 3.2 • Integrated with some custom Java implementations • ECMAScript • Newest version on Pocket PC 2002 is even better: • ActiveX downloading • Some ability to be hosted in other applications 17 i-Mode Fundamentals • Developed by NTT DoCoMo • Involved investing in more powerful phones • Marketed exclusively in Japan • Only now starting to show up in some US and Europe markets 18 i-Mode Popularity • Over 20 million subscribers in Japan since 1996 • Cultural differences help • Long commutes • Expensive dedicated Internet connections • One of the few wireless services to turn a good profit 19 i-Mode Web Development • Compact HTML • Medium-sized subset of HTML 3.2 • Specification is on-line… • • • • • • ‒ http://www.w3.org/TR/1998/NOTE-compactHTML-19980209/ All HTML is well-formed XML in this standard Only one font and one color (black) Frames and Tables Images All kinds of INPUT tags (including file uploads) Links and clickmaps • Have to put your content on the right network for access 20 WAP Fundamentals • Direct successor to the very first markup language for mobile • • • • 21 devices – HDML HDML was developed by Phone.com, which merged with Software.com to become OpenWave (www.openwave.com) HDML was a subset of HTML, but introduced the concept of “cards” WAP was created as HDML evolved and became an “open standard” (www.wapforum.org) WAP consists of many parts: • WDP – Transport Layer • WTLS – Security Layer • WTP – Transaction Layer • WSP – Session Layer • WAE – Application Layer WAP Popularity • At the end of 2000, WAP looked like the “next big thing” • Unfortunately: • WAP’s markup language (WML) is very restrictive • Using software on WAP devices has failed to appeal to US culture • WAP security is typically insufficient • By the end of 2001, people were commonly asking: “Is WAP crap?” 22 WAP Web Development • WML is the markup language sent from servers to WAP devices • 100% XML • A single WML page can contain multiple screens, known as “cards” • This dramatically reduces number of server hits and latency • Because XML describes data rather than presentation, WML • • 23 offers very little in the way of formatting Input buttons will be mapped the way that a given device deems appropriate under various circumstances WBMP is the only supported image format Fundamental controls • MobilePage • Form • Label • Textbox • Command 24 System Requirements • Windows NT 4, 2000, or XP • .NET Framework 25 Validators • CompareValidator • RangeValidator • RegularExpressionValidator • RequiredFieldValidator • CustomValidator 26 Special Controls • Calendar • Link • Phone Call • Ad Rotator • TextView 27 Lists • List • SelectionList • ObjectList 28 Error Handling • Error messages will be automatically formatted for mobile devices • Mobile device errors only show: • Exception raised • Method that raised the exception • MICR lies about the HTTP response code when it has to. • To use custom error pages with WAP, you must specify UseFullyQualifiedRedirectURL in web.config 29 Debugging • Same as any other ASP.NET application • No client-side breakpoints in VS.NET • In web.config, “debug” attribute of “compilation” node: • True for debugging • False for performance • Tracing: • Can be enabled • Won’t show up on mobile devices • Will show up when viewed separately with Internet Explorer 30 Summary • .NET provides two main technologies for mobile computing • The .NET Compact Framework • Provides a platform for code you can take with you • Has some very steep device resource requirements • Complete UI flexibility • The MICR • Adapts Web markup to differing device requirements • Requires a constant Internet connection • Limited UI richness 31 Demo #2 A Mobile Web Application 32
© Copyright 2026 Paperzz