Wednesday, June 2, 2004
Four Lines of Code Goes Four Platforms
Posted by Andy Sjostrom in "DEVELOPER" @ 11:30 AM
My Mobile List for Palm, Nokia Series 60 and Sony Ericsson P800/P900
Follow these steps to make “My Mobile List” a true cross platform application!
1. Create a new project in Visual Studio .NET 2003.
2. Choose to target the Palm platform.
Figure 7: Choose Palm OS (160x160).
The new project and new form is created, again with the right size relative the chosen target platform.
3. Copy the controls from the Pocket PC project and paste them into the new Palm project. Since the Pocket PC and Palm platforms are different in resolution you will have to move the controls around a bit to make it all fit.
Figure 8: Designing the Palm user interface.
4. Copy and paste the code behind the controls.
5. Start the application!
Figure 9: My Mobile List in the Palm emulator.
Let’s move on and see how “My Mobile List” looks in Nokia Series 60 and Sony Ericsson P800/P900. The process of making these versions is identical to how the Palm version was made. Just follow the same steps but choose Nokia Series 60 and Sony Ericsson P800/P900 instead.
Figure 10: My Mobile List in the Nokia Series 60 emulator.
Figure 11: My Mobile List in the Sony Ericsson P800/P900 emulator.
Four lines of code makes one application run on four different platforms! I realize that the application isn’t the prettiest or feature rich and that I have cut some corners in regards to design guidelines which vary from platform to platform. But I do hope that this brief tutorial inspires you to dust off your programming skills and get busy writing some cool mobile applications. Good luck!