Table of Contents

AppCoiner

Build Mobile Apps With Zero Coding

Get Instant Access

Preface_1

Chapter 1: CRMLive.NET: An Overview_9

Tomorrow Inc. 10

The mobile sales force application 10

The mobile dashboard application 11

The mobile support case application 12

Data flow in CRMLive.NET 12

Deciding on the type of mobile application 13

Thin clients 13

Thick clients 14

Smart clients 14

Messaging 15

A brief summary 15

Defining the mobile sales force application 16

Capturing lead, opportunity, and customer information 17

Mobile screen design 18

Creating reusable controls 19

Maintaining global lists 19

Data retrieval and manipulation on the mobile device 20

Data transfer between multiple mobile devices 20

Task management 20

Full-text search functionality 21

Integrating with Windows Mobile and the hardware 22

Detect incoming phone calls and SMS 23

Integrating with the Windows Mobile Calendar and Contacts book 23

Data exchange using Bluetooth and IrDA 24

Capturing handwritten input 24

Data synchronization 25

Dual database support 25

Application maintenance and upgrades 25

Defining the mobile dashboard application 25

Using stateless web services as a data source 26

Rendering the dashboard 27

Road show revenue 27

Total monthly sales 28

Sales for last three months 28

Defining the mobile support case application 28

Building a messaging backbone with MSMQ 29

Summary 30

Chapter 2: Building the Data Tier_31

Designing the data tier 31

SQL Server CE 3.5 versus Oracle Lite 10g 32

Connecting the Windows Mobile emulator to ActiveSync 33

Setting up SQL Server Compact 3.5 35

Installing SQL Server CE on the development machine 35

Installing SQL Server CE on the Pocket PC device. 36

Setting up Oracle Lite 10g 37

Installing Oracle Lite 10g on the development machine 37

Installing Oracle Lite 10g on the Pocket PC device 38

Building the data tier 38

Building the CRMLiveFramework project 39

Defining the IDataLibPlugin interface 40

Building the Plugin Manager UI 43

An overview 44

Implementing the PluginCollection class 46

Implementing the PluginManager class 46

Creating the SalesForceApp project 50

Building the ConfigurePlugin form 50

Building the PluginsSetup form 54

Testing what you've built so far 58

Building the database plugins 59

Implementing the SQL Server CE Plugin 60

Storing DDL in the resource file 60

Building the plugin class 63

Connecting to SQL Server CE 64

Programmatically creating the SQL Server CE database 65

Testing what you've done so far 67

Browsing the SQL Server CE database with Query Analyzer 68

Retrieving data from SQL Server CE 70

Data manipulation in SQL Server CE 71

Dealing with GUID values in SQL Server CE 74

Implementing the Oracle Lite plugin 75

Storing DDL in the resource file 75

Building the plugin class 77

Connecting to Oracle Lite 77

Programmatically creating the Oracle Lite database 78

Browsing the Oracle Lite database with Msql 80

Retrieving data from Oracle Lite 81

Data manipulation in Oracle Lite 81

Dealing with GUID values in Oracle Lite 84

Summary 85

Chapter 3: Building the Mobile Sales Force Module_87

A brief walkthrough of what you will be building 88

Building a form navigation class 94

Building the main menu 96

Using Main() as the startup object 98

Creating the business objects to encapsulate your DataSets 100

Validating data in your business objects 108

Building the AccountViewer form 109

Data binding .NET controls to your business objects 111

Launching the AccountViewer form 111

Testing the AccountViewer form 114

Building the Tasks list 114

Populating the Tasks Datagrid control 115

Building the TaskDetailViewer form 116

Launching the TaskDetailViewer form 119

Testing the tasks list 120

Handling file attachments 120

Building a file manager class 121

Building the FileUpload user control 123

Building the FileDetailViewer form 126

Testing file upload functionality 128

Custom formatting and display in list controls 129

Building a collection sorter using the IComparer interface 130

Custom formatting and display in the list control 131

Using the History list control 135

Testing the History list control 136

Building the ProductList control 136

Using XML DOM to store and retrieve product selection 139

Using the ProductList control 141

Testing the ProductList control 142

Building a paged listing of accounts 142

Paging in SQL Server CE 143

Paging in Oracle Lite 146

Building a paging user control 147

Creating a context menu for the paging user control 150

Launching the accounts listing page 151

Testing the accounts listing page 152

Summary 152

Chapter 4: Building Search Functionality_155

A brief walk-through of parameterized search 156

Building the parameterized search feature 157

Creating the parameterized search query in SQL Server CE 160

Creating the parameterized search query in Oracle Lite 163

Encapsulating the retrieved Dataset using business objects 164

Building the parameterized search forms 165

Building the search form 165

Building the search results listing form 168

Trying out your code 168

A brief walk-through of full-text search 169

Building the full-text search feature 171

Creating the Keyword Extractor classes 172

A sample keyword extractor—the HTML Keyword Extractor 173

Indexing the file 174

Creating the full-text search query for SQL Server CE 175

Creating the full-text search query for Oracle Lite 182

Encapsulating the retrieved dataset using business objects 185

Creating the full-text search forms 185

Trying out the full-text search 190

Improving the full-text search engine 190

Summary 191

Chapter 5: Building Integrated Services_193

Sending SMS and e-mail from your application 193

Sending SMS and e-mail directly through code 194

Delegating to the default Windows Mobile Compose UI 196

Intercepting incoming SMS 196

Intercepting an SMS message 197

Placing phone calls from your application 198

Detecting incoming phone calls 199

Populating the History tab in the sales force application 200

Creating the data tier functions to insert historical records 201

Encapsulating SMS functionality 204

Encapsulating phone functionality 206 Intercepting incoming SMS messages and phone calls in the background 208

Handling outgoing SMS messages and phone calls 212

Testing your code 215

Synchronizing with Windows Mobile Contacts 216

Synchronizing with Windows Mobile Tasks 219

Sharing an account between two devices 220

Sharing an account between two devices using Infrared (IrDA) 222

Sharing an account between two devices using Bluetooth 227

Capturing handwritten input using the Smart Device Framework 230

Summary 235

Chapter 6: Data Synchronization_237

Overview of the different data synchronization methods available for Microsoft SQL Server CE 238

SQL Remote Data Access (SQLRDA) 238

Merge replication 238

Microsoft Synchronization Services 239 Overview of the different data synchronization methods available for Oracle Lite 240

Oracle Mobile Server 240 A quick comparison between the various

Synchronization frameworks 241

Using Microsoft Synchronization Services 242

Setting up Microsoft SQL Server and Microsoft Synchronization Services 242

Creating the CRMLive server tables 243

Creating the WCF service 243

Configuring the WCF service library 246

Setting filters for the Sync 248

Configuring the client project 250

Writing the sync code 253

Conflict resolution 255

Using Oracle Mobile Server 256

Installing Oracle Database Enterprise 11g and Oracle Mobile Server 257

Creating an Oracle Mobile repository 258

Creating the CRMLive server tables 260

Creating a new publication using the Mobile Database Workbench 262

Creating a new mobile project 262

Adding publication items to your project 264

Adding sequence items to your project 268

Adding a publication to your project 270

Publishing the mobile application to the mobile server 273

Setting up application users using the WebToGo portal 275

Registering the mobile device with the mobile server 279

Synchronizing with the mobile server 280

Synchronizing files with the server 281

Creating network-aware synchronization modules 283

Summary 284

Chapter 7: Optimizing for Performance_285

Measuring performance 286

Measuring .NET CF code performance 286

Capturing application performance statistics 289

Optimizing database performance 292

Data caching 293

Using database indexes to boost search performance 295

Other database optimization tips 297

Optimizing data transfer performance 297

Managing better code 300

Managing better strings 301

Managing better Winforms 302

Using BeginUpdate and EndUpdate 302

Using SuspendLayout and ResumeLayout 302

Load and cache forms in the background 303

Managing better XML 303

Using XMLTextReader and XMLTextWriter 303

XML serialization and deserialization thesis 304

Managing better files 304

The .NET Compact Framework garbage collector 304

Summary 306

Chapter 8: Securing the Application_307

Encrypting the database 307

Encrypting the SQL Server CE database 308

Encrypting the Oracle Lite database 309

Authenticating the sales force application 309

Performing one-way encryption using SHA256 310

Writing the code for authentication 312

Loading the login form 317

Encrypting data for inter-device transmission using AES 319

Summary 322

Chapter 9: Globalization_323

Supporting double-byte languages 323

Supporting Japanese character input in Windows Mobile 324

Supporting Unicode at the application level 324

Designing culture-sensitive forms 326

Retrieving culture information 330

Summary 331

Chapter 10: Building the Dashboard_333

An overview of the dashboard 333

Creating the web service 334

Creating the dashboard smart client 338

Connecting to the web service 338

Creating the line chart 341

Creating the round gauge 350

Creating the bar chart 356

Summary 363

Chapter 11: Building the Support Case System_365

Introduction to MSMQ and the support case system 366

Setting up MSMQ on your mobile device 369

Writing your first MSMQ application 371

Setting up MSMQ on your server 377 Creating a queue on the server manually using the computer management panel 378

Sending a message from the server to a remote mobile device 379

Sending data to a remote queue 379

Creating the server-side application 380

Creating the client-side application 385

Sending a message from the mobile device to the server 389

Writing the client-side code 389

Writing the server-side code 390

Summary 392

Chapter 12: Testing and Debugging_393

Overview of Power Toys for .NET CF 3.5 394

Installing Power Toys for .NET CF 3.5 394

Using the Remote Performance Monitor and GC Heap Viewer tool 395

Memory leaks and their causes 395

A sample application with memory leak 396 Using the Remote Performance Monitor tool to view application statistics in real time 398

Using PerfMon to graphically view runtime performance statistics 400

Using the GC Heap Viewer tool to detect memory leaks 403

Resolving the memory leak 404

Using the CLR Profiler tool 405

A sample application with bad performance 406

Launching the application with the CLR Profiler tool 409

Inspecting the Histogram view 410

Inspecting the Allocation Graph 411

Inspecting the Time Line view 412

Inspecting the Call Tree view 415

Using the App Configuration tool 417

Using the ServiceModel Metadata tool 419

Using the Remote Logging Configuration tool 421

Using the Network Log Viewer tool 423

Summary 424

Chapter 13: Packaging and Deployment_425

Deploying your solution as a CAB file 426

Adding the SalesForce application files to your CAB project 427

Configuring other miscellaneous settings 430

Deploying your solution as an MSI file 432

Creating an INI file 433

Creating the custom action DLL 433

Creating the MSI installer project 438

Creating an automated update service 442

Creating the server-side web service 442

Creating the client-side updater tool 445

Summary 454

Index 455

Was this article helpful?

0 0
Living With Android

Living With Android

Get All The Support And Guidance You Need To Finally Be A Success At Using Android. This Book Is One Of The Most Valuable Resources In The World When It Comes To Playing With the Hottest Android Tablet.

Get My Free Ebook


Post a comment