From a desktop application developer point of view, is there any difference between developing for windows XP and developing for windows Vista?
views:
1201answers:
4Do not ever assume your user has access to certain key areas of the disc (i.e. program files, windows directory etc). Instead the default user account will only be able to write to a small section of their application data. Also, they won't be able to write to global areas of the registry - only the current user section.
You can of course elevate their privileges, but that in itself is a task.
Generally programming for Vista is the same as XP, it's just the new account restrictions you have to be wary of.
Have a look at this page with regards to making your application "UAC aware"
http://www.codeproject.com/KB/vista-security/MakingAppsUACAware.aspx
There can be, but that's a conscious choice you make as the developer. You can use new Vista stuff, like UAC and CommandLinks and Aero and so forth. But you don't have to (even UAC can be programmed around -- just don't do anything that needs admin privileges). If you choose to ignore all of the Vista stuff, then there's absolutely no difference between the two.
If you do want to include that stuff in your app, it makes a difference. But I'd say not a huge one. And if you abstract away the differences (for example, write your own function that shows a TaskDialog for Vista, but which dumbs down the input you give it into a MesssageBox on XP), then you'll only be writing against your own code, and the differences will seem like almost nothing.
Also, a lot of Vista's new stuff (for example, UAC or Aero) is stuff that you worry about once, when you create the first piece of functionality that uses it, get it working, and then never think about again while you're developing the app.
User Interface
Looking at the Windows Vista User Experience Guidelines you can see that they have changed many UI elements, which you should be aware of. Some major things to take note of:
- Larger icons
- New font (Which affects some custom UI constistency)
- New dialog box features (task dialogs)
- Altered common dialogs (like File Open, Save As, etc.)
- Dialog text style and tone, and look and feel
- New Aero Wizards
- Redesigned toolbars
- Better notification UI
- New recommended method of including a search control
- Glass
64-bit
Vista has a 64-bit edition, and although XP did too, your users are more likely to use Vista 64 than XP 64. Now you have to deal with:
- Registry virtualization
- Registry redirection (Wow6432Node)
- Registry reflection
- Digital signatures for kernel modules
- MSI installers have new properties to deal with
UAC
User Account Control vastly affects the default permissions that your application has when interacting with the OS.
- How UAC works and affects your application (also see the requirements doc)
- Installers have to deal with UAC
New APIs
There are new APIs which are targeted at either new methods of application construction or allowing new functionality:
- Cryptography API: Next Generation (CNG)
- Extensible Application Markup Language (XAML)
- Windows Communication Foundation (WCF)
- Windows Workflow Foundation (WF)
- And many more smaller ones
Installers
Because installations can only use common runtimes they install after a transaction has completed, custom actions will fail if your custom action dll requires the Visual C++ runtimes above the VS 2005 CRT (non-SP1).
By far the most painful part of moving an application from XP to Vista (from my point of view) is dealing with the numerous services and IPv6 stuff that uses ports which were previously free, and dealing with the Wireless Provisioning -> Native WiFi transition.
The UAC stuff is basically a moot point; there is very little the application developer needs to do.