Best practices for windows applications? [closed]

Tag: windows Author: hataajay Date: 2009-09-21

I was wondering where one should place configuration files on Windows, as I heard Program Files was read-only on Vista. Come to think of it, I'm fairly behind the times on best practices so I'd appreciate any lists of them you have handy, such as...

  • Best practices for installers?
  • Best practices for user interfaces?
  • Where should one put one's DLLs? When to use the GAC and how to install something into it?
  • Things Programmers Ought to Know, but often don't (about Windows or .NET)
It seems to me this should probably be Community Wiki...
You're asking at least 6 different questions here, some of which already have rather good answers on SO. Consider splitting this up and posting multiple, specific questions: this will give both you and those answering space to properly develop. As it stands, I fear you'll end up with little beyond a pile of MSDN links..
That was sort of what I was hoping for... to mine other people's bookmarks for gems :)

Other Answer1

I think you are asking for the Certified for Windows Vista Logo or Windows 7 Software Logo requirements.

comments:

Yep, just get the spec there and follow it, it covers all such details.
It looks like this program emphasizes hardware and drivers...
@Qwertie: oops, you are right. I have updated the links to point to the software logos.

Other Answer2

Quick answers, just for fun:

Best practices for installers? Put the user-specific configuration in the user's profile directory (look up SpecialFolders, for instance) because that way roaming profiles work. Only the static DLLs and EXEs and stuff should go in the Program Files directory.

Best practices for user interfaces? Try to follow the principle of least astonishment. If you're a user looking at your piece of software for the first time, what will you try to do? How will you approach it? For instance, if there's stuff that looks a bit like Explorer, make it work like Explorer. If it looks a bit like Office, make it work like Office. Blend together the familiar and only add small bits of the unfamiliar when it makes sense.

Where should one put one's DLLs? When to use the GAC and how to install something into it? Put DLLs into the folder in Program Files. Only put something into the GAC if it's useful to multiple programs. And even then don't be too hasty about it. Try to make your app xcopy-deployable.

Things Programmers Ought to Know, but often don't (about Windows or .NET): Learn WPF. It makes programming fun again.

comments:

I actually used wrote my first WPF program recently, and though it has some really nice features, they tend to be extremely undiscoverable, so that learning WPF was the hardest thing I'd done since writing my first windows program with the plain C API. Of course, StackOverflow and a good book made it much easier!
Yeah, it's definitely a complete rethink. I think Petzold's book is the best for low-level understanding of things like dependency properties and binding; haven't decided which book I like best for the higher-level stuff. Josh Smith is a good guy to follow for nifty WPF stuff.

Other Answer3

Program Files has been "read only" since the first version of NT, it's only with Vista that dev's are actually trying to install/run things as non admin.