Book Image

.NET Compact Framework 3.5 Data Driven Applications

By : Edmund Tan
Book Image

.NET Compact Framework 3.5 Data Driven Applications

By: Edmund Tan

Overview of this book

<p>The new .NET CF 3.5 framework provides enterprise application developers with a whole arsenal of possibilities at their disposal, but without proper guidance on developing performance-critical enterprise applications, it is easy to make the wrong design and technology decisions.<br /><br />This book guides you to build each part of a robust enterprise application by illustrating the .NET CF 3.5 framework with the help of real-world business applications. It will not only help you to master basic .NET CF skills, but also outlines the best methods, techniques, and tools available to create high-impact and performance-critical data-driven enterprise mobile applications. It provides a solid set of guidelines to aid .NET CF developers to understand how best to apply the features of the .NET CF 3.5 framework.<br /><br />The bulk of the book illustrates the basic concepts of .NET Compact 3.5 Framework programming by walking the reader through 3 different kinds of mobile applications:</p> <ul> <li>A thick-client mobile sales-force application</li> <li>A thin-client mobile dashboard and reporting application</li> <li>A customer support case management application</li> </ul> <p><br />Both the SQL Server Lite and Oracle Lite mobile databases are covered in detail, from data access to data synchronization. The book explains how device features such as Bluetooth, SMS, telephony, Infrared, and Windows Contacts can be accessed via .NET CF in a real-world example, namely the mobile sales-force application. It also explains.NET CF's GDI+ features that can be used to create rich charts and reports. You learn to synchronize the mobile application with remote datasources and communicate via web services and WCF services. The book outlines performance optimization and memory management techniques on the mobile platform. It also outlines the tools and techniques available for testing, performance-tuning, deploying and debugging .NET CF enterprise applications (including Power Toys for .NET Compact Framework 3.5 from Microsoft).</p>
Table of Contents (18 chapters)
.NET Compact Framework 3.5 Data-Driven Applications
Credits
About the Author
About the Reviewer
Preface

Retrieving culture information


The .NET Compact Framework platform intrinsically handles all date, time, numbers, and string formatting whenever the mobile user changes the current culture of the device. However, there might be cases when your code needs to know the current culture of the device. For example, currency conversion is something the platform does not do for you automatically. You might wish to find out what the default currency of the mobile device is set to and use that to automatically calculate and display its equivalent value in US dollars.

The following code snippet allows you to retrieve the current culture of the mobile device. Using the CultureInfo object, you can query a rich set of information about the language, date/time format, numerical format, and currency of the mobile device.

using System.Globalization;
.
.
.
CultureInfo _culture = CultureInfo.CurrentCulture;

string _summary;
_summary = "Culture: " + _culture.EnglishName + "\r\n";
_summary += "Date: " ...