Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Mobile CoDe.NET: Microsoft Mobility 101 : Page 8

Does Microsoft have a real development solution for handheld devices or will other vendors continue to grab the spotlight? Here in the first installment of Mobile CoDe.NET, we'll describe the OS choices and software development tools and we'll lay out the yellow brick road that you can follow to start building your own mobile solutions.


advertisement
Running the Application
You are now ready to test and run your first SDE application. But what if you do not own a Pocket PC device? How are you supposed to test the application you just created? Luckily, Microsoft provides a powerful device emulator with the SDE and it allows you to fully test your mobile applications as you would on a real Windows CE.NET or Pocket PC device. Note that this is a real emulator—not a simulator—based on Connectix Virtual PC technology running a real operating system image of Windows CE .NET or Pocket PC 2002 on an x86 processor. I'll discuss the emulator and its various capabilities in a future article. The power of the Smart Device Extensions and the Emulator quickly become apparent at runtime during a debugging session. The Remote Debugging feature allows you to debug your mobile application just like any other Visual Studio .NET project type by hitting breakpoints and stepping through code in the VS.NET IDE while your application executes within the emulator or an actual device connected via ActiveSync. To put this functionality to the test, set a breakpoint on the first line of code you entered in the Click event of the Go! button. Then press F5 to compile, deploy, and run the application.

There are over 25 standard Windows Forms controls available today with the Smart Device Extensions.
Once Visual Studio .NET compiles and builds the application, you are asked if you want to deploy to a Pocket PC device or to the Pocket PC 2002 Emulator. Select the latter option and the Pocket PC 2002 Emulator will appear. A connection is first established to the emulator and then files are copied to it. Since this is your first time running the emulator, the whole .NET Compact Framework CAB file is also copied and installed on the virtual device. Once all the steps are successfully completed, a remote debugging session is established and the application appears in the emulator.
The power of the Smart Device Extensions and the Emulator quickly become apparent at runtime during a debugging session.
You can now give your newly created application a test run. Enter some text in the textbox and select the Go! button. When you do so, execution will be interrupted and the breakpoint you set will be hit. Behold the power of remote debugging, allowing you to step through your code and watch objects and variables in the VS.NET Debugger when the code is in fact running on a separate device, virtual or not. Finish stepping through the code or hit F5 to resume. The label then displays the text you entered, along with the version of the .NET Compact Framework CLR and the full name and version of Windows CE running in the emulator (see Figure 5).



Nickolas LandryNickolas Landry is the Chief Software Architect of Montreal-based dotBlox which specializes in mobile business solutions based on Microsoft .NET technologies. With more than 11 years of professional experience—starting with Visual Basic 1.0—and a career almost entirely dedicated to Microsoft technologies, his current fields of specialty include .NET mobility, BizTalk, component-based development, Web services and Microsoft CRM. Known for his dynamic and engaging style, Nickolas is also a trainer on .NET technologies, XML Web services development, and the mobility field, and is a frequent speaker at major software development conferences worldwide. Visit www.ActiveNick.net, or email Nick at mobilecode@activenick.net.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Thanks for your registration, follow us on our social networks to keep up-to-date