views:

229

answers:

4

how do i create an app that is:

  • lightweight: i am guessing don't require .NET frameworks maybe?
  • portable: runs without installing and saves data in the app directory, so i can just move the folder or maybe even the exe?

this is just a personal experiment: i want to try create a simple todo list app that has the above attributes

i am thinking

  • C#/WPF (but requires .NET framework, i can explore client profile tho)
  • Appcelerator Titanium (i think this will be lightweight & good enough? i dunno if i can have a portable titanium app tho)
A: 

If you want to write it in C#, you either need the .NET framework or the Mono framework. Either way you need it. Thankfully .NET 2.0 is pretty ubiquitous.

By default, .NET uses xcopy deployment, so you can just copy the executable and any necessary DLLs around in a directory. It doesn't need to be "installed" unless you explicitly create external dependencies.

Scott Whitlock
A: 

@jiewmeng, here i leave a few keys to build an portable application

  1. If the application need save additional data like configuration files o data files , must be saved to the same folder of the exe application or an child folder of the application.

  2. The application should not read/write configuration data to the Windows registry or in the %Appdata% folder.

  3. avoid the use of external dependencies like ocx o dll files, that need to register in the system.

  4. try to use an language wich makes native applications without framerworks dependence a good recomendation is use Delphi.

  5. If you want to use .Net language, choose a version of .Net framework, that is in common use in most of the systems like the Microsoft .Net 2.0

RRUZ
+2  A: 

It is almost portable if the target machines have .NET Framework installed.

NDepend is such a product, which is built against .NET 2.0 and runs fine on Windows Vista, Windows 7, and other Windows if you manually install .NET 2.0 before.

Personally, it is not hard to write an application launcher in native languages such as C++/Delphi to detect whether the target machine has .NET. If .NET is not yet installed, this launcher can display a warning or help install the framework automatically. (Even some installers allow you to do this.)

Lex Li
A: 

Use Delphi, it's always portable and smaller

Maysam