stax76
14th June 2004, 12:09
I don't know if Microsoft did release a guideline how design a program for our beloved ;) windows platform, at least I don't know of one, probably they did. In the Longhorn SDK which is already online there are guidelines for everything, how to write code, how to design programs etc. which is a very good idea, many things will be new like the new presentation layer, for programmers that don't use managed code everything will be new in fact. Many programmers however have taken a closer look on the programs created by Microsoft and other popular products to learn how they are designed and how they integrate. The reason I'm writing this is because this forum is mainly about discussing software, I'm using many programs discussed here and often I'm a little bit disappointed how poor they integrate. I thought if I index popular features maybe some programmers might be interested to pick up one or the other feature or some users can express what they really miss in there favourite programs. Additionally I'm gonna index my personal favours, I have a lot experience with Windows and many of the popular applications and I'm trying to use them as efficient as possible
installers:
experienced users don't need them necessary, they have however no real disadvantages if done properly and many people appreciate them a lot, again if done properly. 90% of all programs are distributed with installer and 90% of the people that have a choice between both a version with and without installer choose for various reasons I don't want to explore here further. Currently the most popular ways to build a installer is to use Inno Setup or Microsoft's installer. Microsoft's installer feels a little bit slow and is maybe a little bit over complicated, the support in recent Visual Studio versions is however good. The best way to build installers currently is to use Inno Setup, many programmers migrate currently from NSIS, the reasons are obvious. It is fast as well, has a wizard to build a script with the default features, it uses Pascal Script for advanced tasks instead of a proprietary script format like NSIS. There is a tool called ISTool which can be considered as IDE for Inno Setup and like Inno Setup as a very professional application. Good practices when dealing with installers are:
not to involve too many install steps, most people want to get over it as fast as possible
to ensure everything gets deinstalled properly
to force previous setups to be deinstalled if no side by side setup is possible to not polute the system with obsolet files and to prevent compatibility bugs
to ask how to deal with settings of previous setups when uninstalling (keep or delete)
uninstall shortcut in startmenu, the deinstall dialog of windows don't support the keyboard properly because of a derived control that override the keyboard default behaviour and therefor is extremely clumsy to navigate as it's cluttered with endless many programs often
installers should warn about missing components like ActiveX on old systems, .NET etc.
let people specify in the program where to save the settings, otherwise people are forced to find the location manually, they are forced to backup and restore the settings manually when doing a fresh windows setup otherwise all settings are gone which occasionally can become a pain in the ass. In general the windows platform is very poor in this regard. Here is a tip how to deal with programs that still use the registry, make a simple batch file to backup the settings
the filename of the setup executable should include the program name and the version
regedit /e "TV Movie ClickFinder.reg" "HKEY_LOCAL_MACHINE\SOFTWARE\EWE"
regedit /e "EAC.reg" "HKEY_CURRENT_USER\Software\AWSoftware\EAC"
it creates reg files in the same directory as the batch file. The reg keys usually can be found under HKEY_CURRENT_USER\Software or under HKEY_LOCAL_MACHINE\SOFTWARE, in regedit the path can be copied to the clipboard using the context menu
the shell:
many people are unaware of the features the shell offers and how to use then because they come without a click here to start hint. It's a shame because the shell offers a lot comfort and many shortcuts
drag and drop should be enabled to open files. It should support multible files in the proper order if the task allows it
the open with menu of the explorer contex menu should display the proper program name, irc the product name is used for this. Same as the Send To menu, if the commandline interface is implemented properly files can be opened including multible files
context menu entries via registry key or menu handlers should be disabled by default if possible or people should at least be asked if they should be enabled with a note how they can be disabled later. It should be easy to disable them, too many programs polute the system awfully.
there should be ways to automate the program if the program is part of chain with several processes involved so people can customize their shell, write batch files or scripts or can even write applications to automate the program. The most important thing here is a command line interface. Windows programmers usually have problems to implement this properly same as windows users have problems to use it because they prefer I gui for everything. It's certainly not a easy task to implement a CLI properly, most CLI's I've seen so far use either a unconventional syntax, are fragile, restricted and not too rarely all together. There are likely libraries or articles, personally I would rather build one myself though. Switches should use a backslash, the switches should be usable in a arbitrary order, filenames need to be supported with both, with and without quotes because they can contain blanks which the shell uses to split the arguments, multible arguments like multible file paths should be seperated with a blank only, file paths shouldn't require a switch, it should be instead possible to append them so full shell support comes for free. There should be a help switch that lists all possible parameters. Switch names should be easy to understand. The program should use the file extension to detect a distinction to apply a different process if necessary. There should be good defaults to omit passing arguments. It shouldn't be sensitive about missing or to much blanks or capitalization/case.
Examples:
/?
c:\test.txt
c:\test1.txt c:\test2.txt
"c:\beware of blanks.txt"
"c:\beware of blanks 1.txt" "c:\beware of blanks 2.txt"
/FlagA /fLAGb /Flagc is better than /flags a b c which would be a problem anyway when paths are appended because the path would then be interpreted as flag argument
furthermore automation (COM/OLE) should be supported, in .NET this is fun, if I'm not mistaken by default everything is exposed to COM in .NET. I don't know if it's hard with C++ and ATL or Delphi, I'm likely to read up on it because I want to build a new wrapper for dvbcore
nag forms should be disabled when the program is automated. Configuration files passed to the CLI should be avoided unless scripts or as alternative method
does the programs in my signature take care of all this things? More or less, I'm working on it :).
I'm likely to update this post as time goes by.
installers:
experienced users don't need them necessary, they have however no real disadvantages if done properly and many people appreciate them a lot, again if done properly. 90% of all programs are distributed with installer and 90% of the people that have a choice between both a version with and without installer choose for various reasons I don't want to explore here further. Currently the most popular ways to build a installer is to use Inno Setup or Microsoft's installer. Microsoft's installer feels a little bit slow and is maybe a little bit over complicated, the support in recent Visual Studio versions is however good. The best way to build installers currently is to use Inno Setup, many programmers migrate currently from NSIS, the reasons are obvious. It is fast as well, has a wizard to build a script with the default features, it uses Pascal Script for advanced tasks instead of a proprietary script format like NSIS. There is a tool called ISTool which can be considered as IDE for Inno Setup and like Inno Setup as a very professional application. Good practices when dealing with installers are:
not to involve too many install steps, most people want to get over it as fast as possible
to ensure everything gets deinstalled properly
to force previous setups to be deinstalled if no side by side setup is possible to not polute the system with obsolet files and to prevent compatibility bugs
to ask how to deal with settings of previous setups when uninstalling (keep or delete)
uninstall shortcut in startmenu, the deinstall dialog of windows don't support the keyboard properly because of a derived control that override the keyboard default behaviour and therefor is extremely clumsy to navigate as it's cluttered with endless many programs often
installers should warn about missing components like ActiveX on old systems, .NET etc.
let people specify in the program where to save the settings, otherwise people are forced to find the location manually, they are forced to backup and restore the settings manually when doing a fresh windows setup otherwise all settings are gone which occasionally can become a pain in the ass. In general the windows platform is very poor in this regard. Here is a tip how to deal with programs that still use the registry, make a simple batch file to backup the settings
the filename of the setup executable should include the program name and the version
regedit /e "TV Movie ClickFinder.reg" "HKEY_LOCAL_MACHINE\SOFTWARE\EWE"
regedit /e "EAC.reg" "HKEY_CURRENT_USER\Software\AWSoftware\EAC"
it creates reg files in the same directory as the batch file. The reg keys usually can be found under HKEY_CURRENT_USER\Software or under HKEY_LOCAL_MACHINE\SOFTWARE, in regedit the path can be copied to the clipboard using the context menu
the shell:
many people are unaware of the features the shell offers and how to use then because they come without a click here to start hint. It's a shame because the shell offers a lot comfort and many shortcuts
drag and drop should be enabled to open files. It should support multible files in the proper order if the task allows it
the open with menu of the explorer contex menu should display the proper program name, irc the product name is used for this. Same as the Send To menu, if the commandline interface is implemented properly files can be opened including multible files
context menu entries via registry key or menu handlers should be disabled by default if possible or people should at least be asked if they should be enabled with a note how they can be disabled later. It should be easy to disable them, too many programs polute the system awfully.
there should be ways to automate the program if the program is part of chain with several processes involved so people can customize their shell, write batch files or scripts or can even write applications to automate the program. The most important thing here is a command line interface. Windows programmers usually have problems to implement this properly same as windows users have problems to use it because they prefer I gui for everything. It's certainly not a easy task to implement a CLI properly, most CLI's I've seen so far use either a unconventional syntax, are fragile, restricted and not too rarely all together. There are likely libraries or articles, personally I would rather build one myself though. Switches should use a backslash, the switches should be usable in a arbitrary order, filenames need to be supported with both, with and without quotes because they can contain blanks which the shell uses to split the arguments, multible arguments like multible file paths should be seperated with a blank only, file paths shouldn't require a switch, it should be instead possible to append them so full shell support comes for free. There should be a help switch that lists all possible parameters. Switch names should be easy to understand. The program should use the file extension to detect a distinction to apply a different process if necessary. There should be good defaults to omit passing arguments. It shouldn't be sensitive about missing or to much blanks or capitalization/case.
Examples:
/?
c:\test.txt
c:\test1.txt c:\test2.txt
"c:\beware of blanks.txt"
"c:\beware of blanks 1.txt" "c:\beware of blanks 2.txt"
/FlagA /fLAGb /Flagc is better than /flags a b c which would be a problem anyway when paths are appended because the path would then be interpreted as flag argument
furthermore automation (COM/OLE) should be supported, in .NET this is fun, if I'm not mistaken by default everything is exposed to COM in .NET. I don't know if it's hard with C++ and ATL or Delphi, I'm likely to read up on it because I want to build a new wrapper for dvbcore
nag forms should be disabled when the program is automated. Configuration files passed to the CLI should be avoided unless scripts or as alternative method
does the programs in my signature take care of all this things? More or less, I'm working on it :).
I'm likely to update this post as time goes by.