.NET vs .NET CF Development


.NET vs .NET CF Development

Development of desktop and mobile .NET applications is nowadays more-or-less the same. Microsoft Visual Studio and .NET can be used to develop for both platforms. Even though the .NET Compact Framework is a subset of large .NET Framework, it allows developing mobile applications in a same way as the desktop ones. In addition, developer can use well known programming languages, such as C# or Visual Basic.

At the first sight, the mobile applications development can be considered equal to the desktop development. But it is not.

Mobile Devices Specifics

The majority of developers use the patterns of desktop development when designing their first mobile app. In addition, there is quite many developers that use the same source code. They usually try to adapt it to .NET Compact Framework. This method is wrong and causes serious issues because of the specifics of mobile devices when compared to desktops.

I try to cover 4 most significant specifics from developer's point of view.
  1. Small display. Currently, the most common is a 2-3 inch touch-sensitive screen with 240x320 resolution. When compared to desktop monitor - the difference is enormous. That is one of the facts every mobile app developer should take into consideration. Imagine you are about to start developing a form that includes a list of customers. Next to each customer, there must be their company name, address and phone number. That is very easy in desktop environment. Using a simple DataGrid is essential because all details are easily displayed and visible in a single row.

    image1.png

    The situation with mobile device is completely different. If the DataGrid is used, the screen is able to display company name and part of the address only.

    image2.png

    In order to see the phone number, a horizontal scrollbar must be used. The users now have to scroll to the right until they reach phone number column. They face yet another problem: it is not clear enough which phone number is assigned to which company.

    image3.png

    It is obvious that such form design is completely unemployable. Therefore, the developer must use diametrically different form design.

    In general, for this type of form, the use of the DataGrid is absolutely inappropriate. The ideal component shall allow more variable placement of the details within a row. In our situation, we use a component Resco AdvancedList. It is part of the suite of components named Resco MobileForms Toolkit.

    image4.png

    The screenshot above shows that the row width is much wider than in a grid. Moreover, the address is placed right under the customer's name and it is displayed in less expressive color. Thus, it is not disturbing. After the user clicks the row, it is expanded and more information can be displayed, such as phone number, email address etc. Furthermore, a tap to the phone number calls an action dialing the customer.

    image5.png
  2. Small memory. The memory of current mobile devices is still smaller than of the desktops. Another thing to consider is the absence of hard drives. Imagine there are over 10.000 customers to be loaded to the list. If you use for instance the class DataSet, all details would copy from data source to RAM memory and might even cause a system crash. It is always valuable to keep in mind that our app is already running in the memory and there might be even more other processes running at the same time.
  3. Slow processor. To load 10.000 records takes just a moment on the desktop while it can take about 30 seconds on the mobile device. That it is absolutely unacceptable from the user's point of view. Based on this premise, each and every form needs to be designed in a way; it can be displayed immediately with no regard to the amount of data it loads from the data source. The Resco AdvancedList, has a smart feature called Delayed Load. It loads only the visible records while the other ones are loaded when needed, e.g. when user scrolls down a list. All the developer needs to do to capitalize on such feature, is just setting a single property in Visual Studio. The rest of the job is done by the AdvancedList.
  4. Last but not least, the developers should always pay the attention to the situation in which the mobile device is used. The emphasis is put on mobility - people use their devices in motion, often when performing other activities simultaneously. Therefore, a good mobile application should be designed to be easily operated by a finger. The other hand can be used for other activities, such as holding a product when scanning its bar code, or just a simple carrying of a briefcase, or a few sheets of paper. Mind, that it is one of the reasons iPhone is so successful.

    image6.jpg

    Our form shall be therefore operable by a finger as well. When using the AdvancedList component, all the developer needs to capitalize on this feature is setting a single property called TouchScrolling in the Visual Studio designer. It ensures that the list can be scrolled by finger slides instead of moving the scrollbar.

Putting it all together

Despite mobile applications development is performed in the same environment as desktop development, it is essential to keep in mind the fact that mobile devices are different from desktops and have many specifics. Otherwise, the mobile app can be unattractive, slow, and difficult to operate, which makes it difficult to sale.

About Resco MobileForms Toolkit

Resco MobileForms Toolkit is one of the richest and most comprehensive sets of Microsoft Visual Studio controls and libraries designed for developers of software solutions for mobile devices. In its portfolio there are controls and libraries that tackle most problems developers encounter in the mobile environment. Flexible keyboard, professional list control, powerful grid control, charting control, and scheduling control - to mention only the most frequently used ones.

For more information about Resco MobileForms Toolkit, visit http://www.resco.net/developer/mobileformstoolkit/default.aspx.


Similar Articles