English

FAQ: What are the differences between .NET and .NET Compact Framework that affect Mobile ADF developers?

Question

What are the differences between .NET and .NET Compact Framework that affect Mobile ADF developers?

Answer

While Mobile ADF controls for .NET and .NET Compact Framework (.NETCF) offer the same functionality, the two frameworks differ in their capabilities. The .NETCF functionality is focused on mobile devices and does not offer many features in the Desktop framework. Microsoft offers good comparisons of the frameworks on their MSDN Web site; below is a highlight of the most important differences:
- 28 of the 35 Desktop controls are supported in the .NET Compact Framework. Controls present in the .NETCF are enhanced for the size and performance requirements of the framework.
- Not all .NET properties, methods, and events are supported in the Compact Framework controls.
- The .NETCF supports the same Win32 API Access mechanism as the .NET Framework but has a simplified data marshalling layer.
- Accessing COM objects by way of COM Interop is not possible.
- OLE DB Wrapper is not supported in .NET Compact Framework.
- Datagrids do not have a built-in editing support present in the .NET Framework. The .NET Compact Framework can only bind Datagrids to a single table object. The .NET Compact Framework only displays rows from a single table, and these are not able to be expanded as in the .NET Framework.
- Serialization - Due to performance considerations, .NET Compact Framework does not support binary serialization using BinaryFormatter, or SOAP serialization using SoapFormatter. There is, however, support for serialization to transmit object data using SOAP in XML Web Services.
- Web services - Although .NET Compact Framework applications can consume Web services, they cannot provide them due to the lack of a Web server.
- XML support - Scaled-down XML support is available. .NET Compact Framework applications have full support for reading and writing XML using the reader and writer classes, but they do not have support for XSLT or XPATH, as these are resource consumptive.
- Threads - .NET Compact Framework does not support priorities as in the .NET Framework.
- Web Services – Only client implementation is supported in the .NET Compact Framework.
- Win32 Calls - .NET Compact Framework does not support calls from Win32. Make calls from Compact Framework into Win32. Communication between Win32 and Compact Framework is done by MessageWindows class.

The controls included with the .NET Compact Framework 2.0 include:
Button: Simple command button.
CheckBox: Common checkbox.
ComboBox: Dropdown list of items.
ContextMenu: Implements a context sensitive menu.
DataGrid: Grid that can be bound to a data source.
DateTimePicker: Customizable control for displaying and allowing users to enter date and time information.
DocumentList: Displays and manages files in Excel Mobile and Word Mobile.
DomainUpDown: List of items that can be navigated via a scroll bar.
HScrollBar: Horizontal scroll bar.
ImageList: Container that stores images.
InputPanel: Controls the Soft Input Panel, or SIP.
Label: Simple control for displaying text.
LinkLabel: Label control that is capable of displaying one or more hyperlinks.
ListBox: Provides a list of items.
ListView: Provides four views of data (large icon, small icon, list and details).
MainMenu: Implements a menu on a form.
MonthCalendar: A customizable calendar control.
Notification: Pocket PC's notification feature that allows applications to send the user a notification without changing the context of the user's current activity.
NumericUpDown: Numeric input field that includes a scroll bar.
OpenFileDialog: Provides access to the native open file dialog.
Panel: Container used to hold other controls.
PictureBox: Displays images.
ProgressBar: Visual indicator of a task's progress.
RadioButton: Common radio button.
SaveFileDialog: Provides access to the native save file dialog box.
Splitter: A bar that provides resizing capability to docked controls.
StatusBar: Simple panel for displaying text.
TabControl: Provides a tab interface for an application.
TextBox: Standard text input field.
Timer: Basic timer component.
ToolBar: Implements a toolbar on a form.
TrackBar: Slider interface used with numeric data.
TreeView: Presents data in a hierarchical format.
VScrollBar: Vertical scroll bar.
WebBrowser: Encapsulates the device Web browser.