domenica 16 dicembre 2007

How to write a standalone program (part 3)?

When I was deciding which library to use for developing my application, I was in doubt between GTK and WinForm. Back then, the WinForm was not so good, so I tried to use the GTK# for both the Win32 and Linux platforms. I had a lot of problems because I had to put a widget in a specific position and I needed to make a lot of experimentation to understand how to layout the GTK widgets. In the next project I did, the WinForm API became more stable, so I decided to use it. Again, I found a lot of problems but the program is now finished. The difference between the two class libraries? Personally, I prefer GTK# because is very powerful and flexible. Unfortunaly, on the Windows platform the look is not so good as on the Linux platform, and the need to include the GTK library for Windows increases the space requirements and the startup time on the CD-ROM media. Using WinForm, the application requires less disk space, but under Linux the interface looks alien.

giovedì 6 dicembre 2007

How to write a standalone program (part 2)?

Hi, now you can look on some screenshot taken from linux and windows system.

The first sequence of image is taken from Linux system.







This other sequence of images is taken from Windows System



How to write a standalone program?

Several years ago I write some program to be run on Windows machine. This programs need to be run from CD so no installation program can be used. At this time the mail solution are two: use Visual Basic or Director. I am mainly like to have the full control of my program so prefer to use Visual Basic. Several month ago e new customer ask to me to realize a CD to put in a book. Now, which development tool use this time? In fact in the last year I'm developing web application using mainly PHP and JSP on linux platform. Again, which development tool I can use to do this? So I give a look about the old Visual Basic plaftorm. Ok the old Visual Basic is dead, and it evolve to VB.NET while Director I never use before so why use it now? So give a look to VB.NET. Ok, seems to be very interesting and powerful .... but there is a LITTLE problem ...... to run the program the virtual machine need to be installed on machine and this is not a good thing for this type of application .... So, no solution? No, of course. From several month I start to look inside MONO, an open source reimplementation of .NET Virtual Machine. In this environment I can create a standalone program using mkbundle utility shipped with mono. Using this solution you have a program that can be run where mono runtime is supported (almost everywhere) and can be transformed on a standalone program for the target that you need. In my case only windows. This utility generate a C program that include all the library needed to start the mono runtime without need to install on the computer. I listen you, and to get the data used by the application? In the past you can store you data inside the program as resource or use a MDB file. Obviously this solution is not portable so I make some test using sqlite to manage the data. This solution is high portable because sqlite is available everywhere. But, it works? Sure, after I post some snapshot taken from Windows and Linux.