DEVBUZZ Homepage .NET Compact Framework - Making the Switch!
 
Web www.devbuzz.com
  HOME PAGE
  All Articles
  Advertise
  Consulting

 Development
  Discuss - Forums
  Still in the box?
  .Compact Framework
  Code Snippets
  SQL Server CE
  Database
  MS Resources
 Stores
  Developer Controls
  Pocket PC Hardware
  Pocket PC Software
  Pocket PC Books
  .NET CF Books
  Book Reviews
  SPB SW Discounts
  RESCO SW Discounts
 DEVBUZZ Info
  About Us
  Help
  Join our email list
  Links & Ratings
  Press & Comments
  Pocket PC version
  Software Reviews
  Hardware Reviews
 Authors
  Authors
  Article Guide
  Competitions
 Resources
  Developers
  Register
  Login

  SPB Discounts!
 Columnists
  Rick Winscot
 Past Blast
  Personal Media Ctr
  Gizmobility
  eVB Legacy
  Old news
  Hosted Software
  Wireless
  Newsletters
  Carl Davis
  Upton Au

 Pocket PC Registry
  Join the registry
  View current list
 Current Poll
Are you converting to .NET Compact Framework?
Yes, it has changed my life!
No, I'm sticking with eVB
.NET CF what's that`?

Current results
3431 votes so far
 Recent Forum Threads [goto forums]

Get Computername
read... (67 hits)


Great aid to development productivity
read... (82 hits)


ThreadingTimer sample code
read... (143 hits)


Multithreading with .NET CF
read... (194 hits)


Moving from eMbedded Visual Basic to Visual Basic .NET
read... (166 hits)


.NET Compact Framework 2.0 Service Pack 2
read... (226 hits)


Transfer Data from SQL Server 2000 to SQL Server Compact Edition
read... (298 hits)


This protocol version is not supported
read... (236 hits)


Converting Lowercase to uppercase wont work
read... (203 hits)


Direct access to MS SQL Server 2000
read... (374 hits)


Creating SDF file in Desktop
read... (513 hits)


Winsock in CF.NET
read... (316 hits)


Using Pocket Outlook to submit HTML page form with MAILTO action
read... (420 hits)


Missing file "System.Data.PocketPC.asmmeta.dll"
read... (268 hits)


HP iPAQ hw6915 Serial Port Issue
read... (309 hits)


Info on the recent forum changes
read... (341 hits)


SqlServer tools from Redgate
read... (383 hits)


Arrow keys and Hardware navigation button
read... (393 hits)


O2 XDA lls pin sync cable to comport
read... (322 hits)


Creating dynamic folders on Pocket PC OS
read... (299 hits)

Custom Windows Mobile software development.
LBS Challenge 2007
LBS Challenge Eight previous NAVTEQ Global LBS Challenge® participants have received venture capital funding and nine past LBS Challenge winners have launched commercial applications on major wireless carriers. Register your non-commercial LBS application in the 2007 NAVTEQ Global LBS Challenge in one of three regions: Americas, Europe-Middle East-Africa (EMEA) or Asia-Pacific(APAC). You could win a share of $2 million in prizes. This could be your year.
Dream. Develop. Win.

Development | .NET Compact Framework

.NET Compact Framework - Making the Switch!
Written by Derek Mitchell  [author's bio]  [read 48465 times]
Edited by Derek

Discuss this article   .NET Compact Framework   

Page 1  Page 2  Page 3 

I've been working with the beta version of the .NET Compact Framework (.NET cf) for a while now and I thought it was high time to try and distill some of those experiences, hopefully making the experience of switching from eVB to .NET a little bit easier. The latest poll on DEVBUZZ indicates that a large number of you are converting so here goes - hopefully we can avoid mentioning polymorphism more than once (catch done!). I'm also writing this for the traditional VB developer wanting to get into .NET cf. Having never been a hard core C programmer of any obvious talent myself, this article is definitely skewed towards the above audience. As a VB programmer I have unpleasant memories of methodologies attempting to encapsulate object orientated (OO) using an architecture patently unsuited to it. Thankfully the arrival of .NET CF has changed all that!

.NET Compact Framework who?

The .NET Compact Framework (.NET CF) is a subset of the full version of the .NET Framework - the MS suite of development tools and services - the next generation of Windows development if you will. The .NET CF subset of functionality targets the Pocket PC specification and as such the goal is that it only implements that functionality best suited to a device with limited CPU power, memory and bandwidth connectivity. If you have been doing any VB.NET programming for the desktop you will notice some omissions in .NET CF - just remember the goal here is to get the memory footprint of the .NET CF to a reasonable size. Currently it is around 2 MB and the final footprint will hopefully be around 1.5 MB - perfectly reasonable for devices with 32-64 MB of memory. The most notable omissions are the Treeview and grid controls - but never fear that will be remedied in time. To see the differences between the full API and the Compact Framework there is an invaluable help file on GOTDOTNET here.

Getting Started

To start with the .NET CF you will need a copy of Visual Studio .NET and the Smart Device Extensions. The Smart Device Extensions "extends" VS.NET so that you can develop against .NET CF target platforms. Currently since the .NET CF is in beta you can only get the Smart Device Extensions via an MSDN subscription or by applying here (this may be closed by the time you read this). Interestingly the .NET CF runtimes for the devices are available here. So hurry out buy a new Pocket PC 2002, install ActiveSync, download the Pocket PC 2002 SDK (cable modem friendly users only), install VS.NET, the Smart Device Extensions and you will be well on your way to being a legend in your own lunch hour!

A word about namespaces

.NET is all about namespaces. To fully understand the .NET you need to know that the most fundamental structure in a .NET application is the .NET Assembly. One of the issues with the old COM model is that the COM component information was stored in both the registry as well as a type library file (usually distributed with the component). The new .NET executable embraces a simpler and more elegant solution by storing the metadata ("data about data") of the physical executable within the actual executable itself. This new approach has imposed a new structure on the way that the Windows executables are now packaged, the Assembly. This is what is meant by .NET evangelists when they say that .NET applications are self-describing. It is important to note thought that this does not imply that an Assembly is one physical file - DLL's and EXE's still exist they are just no longer the definitive elements of a Windows application. So where do namespaces fit in, this is as clear as mud you say? Well, and this is where the beauty of .NET starts to reveal itself, the .NET runtime classes defines a set of data, methods and functionality that you develop against for user interface, data and messaging operations - "your programming". These .NET classes are organized in to a structure of "namespaces" - hierarchical and nested groupings of common functionality. As the developer your most significant challenge is now not so much a case of "can it be done?" and more a situation of which namespace shows me how to do it. Perhaps I'm getting carried away here but at least that is the way it feels. There are over currently over 3500 namespaces in about 100 .NET classes so make a shortcut to your .NET help file.

A practical example of using a namespace - want to access the VB constants? Import the Microsoft.VisualBasic.ControlChars namespace then simply type in ControlChars in VS.NET and let Intellisense do the rest. You will be able to access all the constants such as ControlChars.Tab and ControlChars.NewLine etc.

Now let's move on to some helpful tips...

Next Page 

Back to .NET Compact Framework | [Article Index]

 

Back to the top of the page.
Chris De Herrera's Windows CE Website Windows CE News & Information Source
Copyright ©2000-2007 by DEVBUZZ.COM, Inc., NJ. USA.MSDEVELOP