posted on Tuesday, January 27, 2004 8:37 PM
by
demiliani
Develop Symbian/Palm/PPC apps using VB.NET -- a mini review of AppForge Crossfire
AppForge Crossfire is a mobile development tool that enables VB.NET developers to write portable mobile applications on different handsets (not just PPC).
Crossfire is an integral part of the AppForge Enterprise Developer Suite (EDS) and integrates seamlessly into the Microsoft .NET IDE, enabling you to immediately write applications, using the Visual Basic .NET programming language that will run on over 90% of the world's handheld, mobile, and wireless devices including Palm OS, Pocket PC 2000/2002, Windows Mobile 2003, Nokia Series 60, and Symbian UI.
Crossfire applications are created using specialized mobile controls, libraries, and modules that are plugged directly into the .NET IDE.
Key Features:
- Seamless integration into Microsoft .NET
- Visual Basic .NET language support
- Debug application using .NET debugger
- Test application within the IDE (no emulator needed)
- Auto create Single-file Installation Package
- Visual Basic 6 support via AppForge MobileVB (included)
Michael Yuan has tested this tools and these are his opinions:
0. When you install AppForge Crossfire, it automatically integrates itself into your existing Visual Studio.NET installation.
1. Open a new project for VB.NET and Crossfire applications.

2. Select a target device. This is important since different devices have different screen resolutions. If you choose PocketPC here but decide to build a binary package for Symbian Series 60 phone later, the oversized widgets would look bad on the screen and some widgets might not work correctly. I am disappointed that I do not have an option to choose a device indepent "library" project type. I mean, if I have to code for each target UI, I should at least be able to reuse "business logic".

3. Use the visual designer to build your UI from the controls in the "AppForge" toolbox (except for the MainMenu, which is the only control that comes out of the WinForms toolbox). AppForge controls are just normal VS.NET controls that runs on Windows. But they can also be cross-compiled to run on AppForge's supported devices. The AppForge controls not only include UI widgets but also configurable logic controls such as network connectors and the camera controls. AppForge provides a variety of libraries for accessing device features not available in desktop VB.NET, including support for the native PIM, telephony features and bar code scanners.

4. Code for the application! Crossfire compiles your application to native directly (not IL code). Although there is no runtime Garbage Collection (GC) for Crossfire applications, a Reference Counting (RC) utility is automatically used against all Crossfire applications. So, you can just do the usually Dispose() and do not have to worry about memory management as a C++ developer does.
5. After you are done with the code, it is time for testing! Using VS.NET's build-in debugger, you can run the application as a windows application and debug it line by line. Since there is no device emulator here, the windows application only emulate the screen size and the relative positions of the widgets. In the following screen shot, we can see that the "input mode" on a Symbian phone is emulated in a different panel window; the location of the main menu is not emulated properly (on Symbian devices, the menu is at the lower left corner). The windows app also uses the PIM database in Outlook to emulate device PIM databases when it runs on Windows.

6. After we make sure the application functions properly, we can build a binary for the target platform. In this case, a Symbian SIS package for Nokia Series 60 phones. If you choose a target platform different from the device you specified when creating this project, the AppForge validator might give you warnings about overlapping widgets or other problems.

7. Device applications often require additional meta data for security and identification purposes. You can enter your Symbian application ID or Palm creator ID in the build process.

8. Now you have the sis/prc/exe files to deploy to the target device. But before you do so, you have to install the AppForge Booster to the device. It is a device OS extension that provides support for AppForge widgets and the memory management utility (a native library). The Booster can be bundled into the application itself. But for devices that run several AppForge applications, it is best to install shared Booster library to save space.

9. Now, just copy the application binary over to the device and see it run!
My final thoughts? Well Appforge is certainly a very interesting and very useful tool. It allows VB.NET developers to use their familar language and familar IDE to develop first class mobile smart client applications. But due to the different screens of target devices, you still need to write a separate application for each target device. So, the "cross platform" here mainly refers to "skill transfer" rather than the actual code reuse. I also wish it would support more realstic emulators on Windows. Now, let's compare it with competing technologies:
* Compared with J2ME: AppForge provides better integration with the underlying platform and richer controls. But it is not as portable as J2ME, especially in the smartphone arena. Also, the deployment of AppForge application is more complex than J2ME.
* Compared with the .NET CF: AppForge allows us to develop on more devices. But it does not support C# nor MS smartphones ... The .NET CF is also much better integrated with VS.NET (emulator support etc.) and has a much larger developer communities.