NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices

Thursday, October 21, 2010

NAVmobile HowTo: Consuming Business Objects

I had recently several requests on writing a little bit more about the NAVmobile customization approach from a dev point of view. So I decided to make a short how-to serie in order to illustrate some of the concepts. Most of it can be found in the documentation, but I hope that I will clarify some of the missing points.

NAVmobile provides the mobile developers with mobile object relational mapping API. It can be used by the developers to consume data stored on the device or data stored on remote storage.
The ORM implementation found in NAVmobile is very useful when dealing with standart CRUD operations over local and remote data in terms of business objects. It has certain limiations mainly because of the resource-related limitations found on the mobile devices these days.
It is not intended to provide complete replacement of the standart ADO .NET implementation found in .NET Compct Framework. However, it gives clean and quick way to deal with the CRUD operations and the various logical and tehcnical challenges related to the synchronization of the data. Each CURD operation through the NAVmobile ORM API performs certain behind-the-scene operations over the locally stored data, which allows later the synchronization engine to properly propagate the changes to the remote side ( the ERP ).
The developer can easily go down to the pure SQL level and deal directly with the mobile storage to perform even advanced data operations.

Local Business Objects
NAVmobile provides framework for bi-directrional data synchronization between the device and virtually any remote data storage ( ussually ERPs like Microsoft Dynamics NAV or Microsoft Dynamics AX ). The existnce of local mobile storage allows the application to be used in occatioanlly connected environments where the data is stored on the device and then synchronized when a connection exists. The developer only needs to declare the business objects and then the NAVmobile framework is taking care of the initial mobile storage provisioning, synchronization and other low level technical tasks.
The business objects must be declared in the NAVmobile business object descriptor file (described in the documentation ) and then a correpsonding .NET Compact Framework class must be created.
Let's pretend we have the following business object declaration:

public class Customer:BusinessObjectBase
public string No;
public string Title;
public double CreditBalance;
public double CreditLimit;
If we need to fetch all customers with positive credit blance , we can use the following code:
IList customers = BusinessObjectBase.FetchAll("CreditBalance>0");
foreach(Customer customer in customers)
Creating new customer object is easy as:

Customer customer = new Customer();
customer.Title="My first customer";
and then fetching only one customer by primary key can be done like this:
Customer customer = BusinessObjectBase.Fetch("567");
Updating a customer:
customer.Title="This is not my first customer";

...and then deleting it:

Using this approach the developer can quicky perform CRUD operations over the business objects stored on the mobile device.

Each CRUD operation over the business objects is propagated later through the sync engine to the remote storage ( the ERP ) during the device synchronization session.

Remote Business Objects
Remote business objects can be consumed by using the NAVmobile LiveLinkEngine, which serves as an on-line connection media between the mobile device and the remote storge ( ERP, Microsoft SQL Server , etc. ). This functionality requires the existance of TCP/IP connection between the device and the NAVmobile Services.

Assuming we need to use the same Customer business object from a remote storage , we can use the following code in order to fetch all ther customers:
IList customers = LiveDataLinkService.FetchAll("CreditBalance>0");
foreach(Customer customer in customers)
The FetchAll method will causes the NAVmobile framework to perform invocation of the NAVmobile Services LiveDataLink Web Service in order to fetch the data from the remote sotrage. The data will be dehydrated into the Customer business object collection and ready for local processing.

Addin a new remote customer is easy too:

Customer customer = new Customer();
customer.Title="My first customer";
The Add method will send the customer business object to the server where it will be stored.
We can use similiar approach to fetch one customer:

Customer customer = LiveDataLinkService.Fetch("567");

and then to change and update it:
customer.Title="here somes a new name";

Deleting the customer is also easy:


The ORM module can be used also in the NAVmobile templating engine to quickly build mobile reports diplsayed and printed on the device. Local and remote data can be mixed together in a single report. More on this subject later.


NAVmobile/AXmobile web site

Tuesday, October 19, 2010

Windows Embedded Handheld

Windows Phone 7 turned out to be a pain for the companies, which already invested a lot in mobile solutions based on Windows Mobile especially those positioned in the B2B market. Windows Phone 7 provides appealing UI and great potential for the end user. However it turned out that it is not suitable to target some very important scenarios required when dealing with B2B solutions.

I just found that Microsoft announced new mobile operating system called Windows Embedded Handheld , which is intended to fill the gap between the personal operating system and the requirements found in some of the specific industrial

.... The first such investment will be a new operating system called Windows Embedded Handheld, which will be targeted specifically at the enterprise handheld device market. This new operating system is based on Windows Mobile 6.5 and will use same the familiar development tools (Visual Studio 2008) and SDK as Windows Mobile 6.5 to provide compatibility with the hardware, software and applications used in the enterprise. By building on the Windows Mobile 6.5 platform, Windows Embedded Handheld devices will provide compatibility with existing and future line-of-business (LOB) applications written for Windows Mobile 6.x.

Windows Embedded Handheld will also meet enterprise requirements around integrating with existing IT infrastructure like Microsoft Exchange and SharePoint as well as incorporate the device management and security functionality necessary for enterprise devices. Support for multiple ARM processor types, a wide range of input methods, and several screen sizes and resolutions will make Windows Embedded Handheld a flexible solution to power the wide range of enterprise handheld devices used today.

New features in Windows Embedded Handheld will include Office Mobile 2010 and a support lifecycle to meet the needs of enterprise customers. OEMs will have access to the Windows Embedded Handheld bits by the end of 2010 to start building new solutions.


Tuesday, March 16, 2010

Developing for Windows Phone 7 Series


If you want to take a look at the new development approach behind Windows Phone 7 Series go to web site and download the Microsoft Visual Studio 2010  Express for Windows Phone. This is a free development environment for the latest mobile platform from Microsoft. It is till in CTP status.

The environment allows you to develop applications targeted to Windows Phone 7 Series only. It provides the following :

        • Tools to develop mobile applications based on Silverlight For Windows Phone (out-of-web-browser)
          • XAML based UI
          • Expression Blend  may be used to design UI
          • Support for mutli-touch input, microphone,accelerometer is available through API
          • Location services on the phone and in the cloud through Windows Azure
          • Isolated data storage on the device
          • Media support: discovery, enumeration and playback
          • Cloud services integration: Notifications,Location,Identity, Feeds Social and Maps,Azure through REST and SOAP
          • Debug in the emulator and in physical device
          • Apps publishing through Marketplace in the form of .xap files
        • Tools to develop mobile applications based on XNA Game Studio 4.0
          • Development of loop-based games (2D and 3D) supporting Windows Phone 7 Series and Xbox 360


The environment contains Windows Phone 7 Series Emulator ,which allows you to start playing with the bit right now. We are waiting for real devices later this year.
Compatibility for legacy ( .NET Compact framework 3.5) apps is not supported – at least on a binary level.
The MIX 2010 is still in progress, so wait for more details around the developer story.

The post is short, but I’ve just started playing with the CTP bits so stay tuned for more info.

Tuesday, March 09, 2010

System.Web.Mvc.HtmlHelper<object> does not contain a definition for ActionLink


I spent some time playing with ASP.NET MVC 2 RC . Everything was smooth and nice until I tried to upload my simple app on a “production” server.

The app its self was a basic test app without any valuable functionality , but I wanted to test the deployment process of such an app.

So I copied the  files on the machine and made some configuration changes on the web server. I opened my web browser, hit the app and KA-BOOOOM …… I got the yellow screen of pain:



NOTES: my server has .NET 3.5 SP1 installed and System.Web.MVC.dll 2.0 registered in GAC.

All my trials to find a solution from someone else failed. I’ve checked if  I have all the needed namespaces in the <pages>/<namespaces> tag. I’ve checked if my app is configured to work

I’ve checked if I have the right assemblies deployed on the machine. Still no success!


Fortunately, I had a luck and found the problem my self by exploring the Web.config file. I found that I had by mistake replaced a symbol in the CompilerVersion string



So I replaced the “?” symbol with “p” and the yellow screen disappeared.

Thursday, February 18, 2010

Motorola Mobility Event in Sofia

I was at the Motorola Mobility Event in Sofia. The event was supported by Microsoft and Zebra. The goal of the event was to present the Motorola mobility solutions in front of the local image Microsoft Partners.
Motorola presented their mobility portfolio targeted to business users. Zebra also presented their products. There were other companies presenting their products and services related to the mobility like RRC.

The content of the event was interesting and the Motorola and Zebra presenters were well prepared. The event sessions were mostly in English. There was only one in Bulgarian and that was mine. I presented a success story regarding a mobility solution were I was involved based on Motorola hardware and NAVmobile

There were not many people at the event, but the food and drinks were plenty.

This event was the best one regarding the mobility in our region. Motorola presented their business vision about the local mobility market and shared great ideas about the ways to target new business niches. There were good options for business networking with the guys around.


Motorola Mobility Web Site
NAVmobile web site
Zebra web site

Tuesday, February 16, 2010

Windows Phone Series 7 Announced


Microsoft finally announced the latest personal mobile OS – Windows Phone Series 7 at the Mobile Wolrd Congress in Barcleona

It has new UI metaphor, Facebook and Xbox Live integration, contextual search,  Zune alike features and more. Checkout the video for features overview from the Program Manager Joe Belfiore




It is still early to talk about the features in depth and especially for the development experience.

More info about the development approach will be announced at MIX10



Following a video about the features ( User point of view )


Here comes a video about the partners supporting the new mobile platform:

There is still lack of details about the features and the developer story.


Some rumors ( non-verified ) via More Windows Mobile 7 rumors...grab some salt!

    · WP7 supports both Sliverlight (out of browser) and XNA
    · Silverlight apps developed using Expression Blend 3.x and VS2010
    · MS will release a mobile version of VS / Expression which will be free, and VS2010 / Expression Pro will have a free add-on
    · No .NET CF support, only Silverlight
    · Isolated storage which is accessible using LINQ
    · No multi-tasking (applications will pause when in the background, however they will support notifications using the MS Push Notifications environment)
    · No .NET CF backwards compatibility, however a proportion of the data and business logic in .NET CF could be ported
    · No MS manufactured device, however much tighter control of manufacturing process, so as an example each device has a 3D processing chipset, and MS provide all of the device drivers. So no platform builder. This enables OTA updates and simplified model for ODM’s
    · Marketplace will support buy and try before you buy, as well as an API
    · ODM / OEM will not be able to modify the “Start” screen, so no more HTC Sense / TouchFlo etc.
    · Browsing experience is currently faster / better than iPhone 3G, and they are aiming towards 3GS.
    · Browser is based upon desktop IE7 codebase, but with some IE8 functionality
    · No in browser Flash or Silverlight
    · Integration with XBOX Live, and ability to purchase games
    · Use of Zune software for music, videos, photos sync
    · Supports app installation through service based delivery i.e. marketplace, so no side-loading




Windows Phone Series
Windows Phone 7 Series faces off against its Windows Mobile past
Editorial: Engadget on Windows Phone 7 Series
More Windows Mobile 7 rumors...grab some salt!

Monday, February 08, 2010

Cross platform mobile development


The mobile device market is quite fragment these days. We have the mighty iPhone , Andorid , Blackberry,Simbian, Maemo, Brew ,Windows Mobile powered devices and so on.
Publishing software compatible with all these mobile platform is quite a challenge. What is the current situation , regarding the mobile cross-platform development?

The Market

I will not make an exhaustive market analysis here, but will share some thoughts. The mobile device market is changing rapidly during the last few years. One reason is the entrance of the new major players – iPhone and Andorid.  They forced the old players like Nokia, Sony Erricson , RIM, Microsoft and everybody else to hurry up and catch the train. Apple gave us the new fresh air, which the mobile business needed for years. The old dinosaurs chasing low-risk profits forgot about the main engine of the current technological business – the innovation!
Apple was the one to make them remember that innovation (both technological and business) is not a dirty word and actually may increase profits. Yes the innovation and risk go hand in hand, but that’s way : ideas, passion, commitment and risk.

No more drama! I’m back on the topic….

The following chart provides information about the preferences of the users to some of the current mobile platforms: image

the chart is copied from PDASNEWS.COM

The chart is to gave the overall tendency. And the tendency is we do not have a major player and it is still important to target multiple mobile platforms with a single code base.  I must say that the figures here are showing the end-user preferences. The preferences of the business user are quite different, because besides the fancy UI and the improved user experience there are may other factor considered by the businesses like robustness, security, development experience, management, integration to existing infrastructure and others.

The ability to target multiple mobile platforms is dependent on the organization skillset and the corresponding platforms development tools. The following table contains a brief comparison between some of the major players in terms of development tools and technologies:


the table contains information from the following source

The table is focused over the official ( standard ) tools provided. Some of the platforms provide support for additional development tools /technologies not mentioned here.

It is obvious, that the native development tools may not be used for cross-platform development.  The Native APIs toolsets are very different.  The Adobe Flash and Java are not supported by iPhone. The Andorid’s Dalvik VM is not aligned with the Java ME standard, so in general, the Java ME development is not an option. There are third party Java VMs for Android like the MicroEmulator.

The actual decision about the dev tools is mainly business driven. It is important for the organization to identify the platforms, which will provide the best business outcome for specific project. So, if you target the iPhone market only  - go and place Objective-C on top of your skillset. If you target Symbian and BlackBerry – go with Java ME.

Aside note:  The development limitations are sometimes not just a technological limitation, but a limitation created on purpose driven by the vendor’s marketing war to lock the developers on their platforms. I think Google and Apple are the champs here!

The HTML/Javascript approach

A very discussed approach lately is the HTML/Javascript development – a.k.a. Web/Internet/Ajax development. The table shows that each of the platforms provide HTML/Javascript support. It is very important to note that the actual support for javascript and HTML may differ between the platforms  but it is still an option.
There is criticism about the approach mainly related to the following:

  • Connected model
    In general the HTML/Javascript apps requires connection with the application(web) server.  The limitation is coming  from the limited access to the underlying platform resources and the lack of persistence for example.
  • Sandboxing
    The Javascript code is running in a sandbox and in general (some platforms provide proprietary Javascript extensions) there is no programmatic access to the file system, relational databases, device hardware (gps, Bluetooth, serial comms, accelerometers and others), graphic libraries, …

However, there are number of technologies/products determined to give a solution for the sandbox problem by providing a native-to-javascript bridge to the underlying platform resources.



Following products/technologies providing mobile cross-platform development features:

Open-source (MIT license) project providing device-native container for HTML/javascript applications. The  device-native container serves as a javascript-to-native bridge providing access to location services, accelerometer, SqLite access, file system and more. It is supported on iPhone, Andorid, BlackBerry, Symbian,Palm , Windows Mobile(experimentally) and Maemo
(experimentally) . The project provides a native container app(the javascript-to-native bridge) for each supported platform. However the web app (html,javascript) remains the same for each platform.
Primary skillset:  HTML, Javascript



Open-source (Apache License 2.0) project supporting iPhone and Andorid. There are plans for BlackBerry support , but not a fact yet. No official plans for Windows Mobile support.
The project is in a beta status and is currently free of charge. The production version will be paid, however there will be free entry version and it will remain open-source.The commercial license price is not announced yet.  
Primary skillset:  HTML, Javascript

Titanium translates your hard won web skills into native applications that perform and look just like they were written in Objective-C [iPhone] or Java [Android]. With over 300 APIs, a thriving developer community6, and the support you need, you can build applications that are more social, local, media rich, interactive, and extensible.



Rhodes is an open source(GPL) framework to rapidly build native apps for all major smartphone operating systems (iPhone, Windows Mobile, RIM, Symbian and Android). Write your code once and immediately build apps for every major smartphone. These are true native device applications which work with synchronized local data and take advantage of device capabilities such as GPS, PIM contacts and camera.
They are actually providing dual licensing model – GPL and commercial.
  • Primary skillset:  Rubby, HTML,Javascript

    MoSync is a dual license open-source(GPL) framework.
    MoSync applications are written in ANSI C/C++ using our bundled Eclipse-based IDE running on Microsoft Windows. From a single code base, MoSync can build the hundreds of device-specific application variants. MoSync relies on specialized function libraries that enable it to port your application to many different mobile devices. Since the MoSync libraries are by necessity not always exactly the same as the standard C/C++ libraries, you will need to tweek you code to get it working in MoSync. However, you only have to fix your code once to be able to run it on all compatible MoSync-supported mobile phones, generating huge savings in time and cost.
    It provides support for Android,Java ME ,Symbian S60 ,Windows Mobile ,Moblin.
    Commercial license will be provided as well, but the price is not announced yet. 
  • Primary skillset:  C/C++