Monday, February 26, 2007

Acquired Taste of Vista

Definition: acquired taste

Something one learns to like rather than appreciates immediately.

This weekend I finally got some time to make the step and upgrade to Vista. There's been a lot of talk about what it does better and what it does not. Nevertheless I am getting the impression that the media and some colleagues are concentrating a bit too much on the negatives. Well there are issues primarily with drivers and unsupported hardware, but for fairly new machines the new operating system actually brings a wealth of benefits. One to mention ... the new driver model utilizes far better the new multimedia hardware and multi core systems.

The first step was to run the compatibility assessment. The Vista Upgrade Advisor checks the hardware and points out issues that prevent the installation from completing. In my case I had to uninstall only an older version of Norton Antivirus. Other than that I've got couple of warnings about unsupported software, but most of them turns out work fine. So once this was done I moved forward with the upgrade.

In stark contrast to previous versions of Windows, which were some sort of marketing slideshow, the Vista upgrade has a very clean interface and I like that. Set the type of upgrade and the time zone and leave the PC for an hour or two to do its job. That's exactly what I did. Left the PC and got back to my game with my son. Sometime later I was greeted by the new face of Windows.

The "Aero" interface, the eye candy everybody is talking about, strikes immediately with its rich visual effects and smoother look. Definitely more than eye candy. Each window runs in its own memory segment and the overlapping screen refreshes of the past are gone. I realize not all flavors of Vista are shipped with Aero, but maybe not all users will appreciate the dynamic visual effects any way. In only a few clicks I started noticing UI improvements, which I know will make my workday easier. The Welcome Center gives some good overview of new and old features and its interface is organized in different levels of dept. This makes learning gradual and paced to your needs. The sidebar nicely fits the widescreen of most new laptops and makes use of the width of the screen. A rich library of gadgets already exists and there are numerous samples on how to create one for developers of all skill levels.

Needless to say security has many improvements, soo many that your head spins. The most interesting for me are Windows Defender and User Account Control (UAC). Windows defender will stop or disable suspicious programs that are trying to run at startup and classify the software, so that you can decide what to allow running and what not. Finally something that tells the user in a simple way what programs run at start up on your PC and applying an algorithm to determine if this is appropriate.

UAC is by far the most controversial measure of all. It is really reassuring that something in your PC is watching for actions that require access to core system resources. For most users this should be a rare occurrence and probably a good thing. But the way I see it, most important of all is that UAC will not allow machines installed with default settings sitting somewhere on the Net to be hijacked. This only will drastically improve the security of Internet as a whole.

Nevertheless for developers UAC is a bit of a pain. True, we have to live with it to make sure our apps run properly for the target audience, but MAN that's a lot of additional clicks and keystrokes. My wrists and hands are already giving me signals of pain when I overdo it and UAC is not going to make it easy for them either. An advertisement of a major competitor characterized UAC as a secret agent that puts to question each and every action th PC makes and with all honesty they hit the nail on the head. After several decades of AI actively being part of science and computing it seems very drastic that Microsoft decided that only humans can determine whether one action is dangerous for your PC or not. This is a pretty strong message and it might work, but would it?

My guess is that we are going to see the evolution of UAC very soon. People just don't like the hassle. They would much rather purchase software that claims to do the job of UAC than "carefully read each message" and click OK. Many will simply disable UAC. In other words if Microsoft doesn't come up with a solution that at least allows the user to save her answers on per program level (i.e. educate UAC), the industry will catch up fast and let the people enjoy their AERO interface. Altogether UAC is a huge leap in the right direction and there is no turning back.

Other major improvements come in the area of backup and recovery. I installed Vista and immediately created a full PC backup to an USB drive. Amazingly the format of the image is VHD. Great, now you can actually crank up an old backup in a VM and retrieve files. It would be best if you can right click on the VHD file and mount the virtual drive to the host PC. In addition the recovery console in Vista actually can help you (how many times did you use the one in XP anyway) and you can fully restore from a backup. I didn't try this yet, but the prospect of finally having reliable full backup embedded in the OS is great.

Other features that momentarily caught my attention are the Start menu, the Services tab in Task Manager, the navigation in Explorer and Add/remove programs shortcut in My Computer, which by the way is called Computer.

The start menu is not cascaded anymore and using the search it is incredibly easy to find not only documents but execute programs as well. The services tab in Task Manager needless to say is very convenient for developers and the likes to easily access the service list and start/stop them or jump to the underplaying process. I loved the add/remove shortcut on the toolbar of Computer that opens the applet with one click. No more drilling in control panel.

The cherry on top of my cake is one little gadget I really will use a lot for documentation and blogging - the "Snipping Tool". Finally it is easy to take snapshots from any part of the screen (not only program windows using the ancient PrtScr). There are probably tons of low cost tools out there that do the same, but having this tool within the OS is very helpful.

Now don't ask me why I started writing about taste and wound up ranting about Vista. One thing we humans take always with resistance is change. The bigger the change the bigger the resistance. The stronger the taste the more time you need to enjoy and appreciate it. Vista concentrates the collective wisdom of thousands of people about the way personal computing should work in the future. It is possible that not every decision they made was right on target, but even if they got closer than their previous attempt (and believe me they did) that's called progress.

Install Vista, give it some time to acquire the taste of it, and focus on the future...


Thursday, February 22, 2007

SCDNUG February Event

Yesterday I presented Windows SharePoint Service 3 for Developers to the Space Coast .Net user group. The PowerPoint file is available at SCDNUG web site. We talked about some of the most important improvements in WSS 3. The agenda was:

  • SharePoint products and acronyms
  • The tree faces of SharePoint
  • SharePoint & ASP.NET
  • Improved deployment tools
  • SharePoint Administration
  • Summary

Thanks to the usual suspects in SCDNUG and the couple of new people that came.


Friday, February 16, 2007

Configuring the breadcrumb for pages in _layout and how to deploy the map using features

While working on custom pages located in the _layouts folder, I noticed that the breadcrumb was missing. I found this great post which explains not only how to update the site map, but also suggest a method of merging the site map with custom site maps.


Monday, February 12, 2007

South Florida Code Camp (continued)

As I previously said the SharePoint track at the South Florida Code Camp had a full day of sessions. All of them very interesting and presented by some of the best regional SharePoint MVPs. Here is a list of all other sessions:

The organization of the event was flawless and for a FREE event the value was incredible. Now that this Code Camp is over I am looking forward to the next one in Orlando.


Saturday, February 10, 2007

South Florida Code Camp

What a great event! The SharePoint track at the South Florida Code Camp was really packed with interesting presentations. I was presenting my session "Understanding Windows SharePoint Services Framework", which shows how to create a WSS solution from scratch. (Unfortunately VSeWSS was not ready for this event and was not presented).

One big "thank you" goes to all that attended the session! Your feedback is very important for me.

You can download the session materials from here, all materials are posted on the Code Camp website here:


Wednesday, February 07, 2007

I'll wait until SP1 comes out...

Couple of days ago I received an E-mail from the IT department. The subject was Microsoft Vista and Office 2007. In the E-mail he takes a position that became quite popular lately: Don't bother installing newly released software because we are not going to support it until SP1 comes out. The usual IT concerns about things not working as expected and being so different that actually nobody can use them and so on... This is not the first time I see IT departments taking such position and in many occasions this is a good rule of thumb to let "the other guys" figure it out first. Big corporations have a large number of installed base and run complex applications so this may be the way to go. On the other side of the spectrum the small guys are often too fragile to make big investment in a technology before it becomes mainstream, so this approach might be OK for them too.

Nevertheless I cannot justify such position when it comes from a mid size stable software company, which on top of this claims to be innovation leader and Gold Microsoft Partner. It just does not fit.

One other principle of software development I recall is dogfooding. This is when you use internally the software you create and sell to improve further your development. In the same line of thought this principle is applicable for third party software you integrate with. Naturally Microsoft Vista and Office 2007 fall in that category, since we already develop software running on these platforms.

So my question is: If a software company wants to be on the fast track of innovation, does it wait until SP1 of Product-My-Platform comes out, or starts its evaluation and use as the RTM (or even BETA) release become available?


Monday, February 05, 2007

SafeControl Registration in WSS Solutions

While getting ready for the South Florida CodeCamp session on WSS Solution Framework, I've noticed an interesting feature of the deployment mechanism related to the registration of SafeControls. Prior to this little discovery I was using Lutz Roeder's .NET Reflector to obtain the full assembly name including version and public token. It turns out that in the WSS Solution Framework we only need to specify the name of the assembly. The framework will automatically detect that the assembly is strongly signed and fill in the Assembly attribute of the SafeControl element with the strong name of the assembly in the web.config entry. For example, if we specify in manifest.xml:

<Assembly DeploymentTarget="WebApplication" Location="myassembly.dll">
<SafeControl Namespace="mynamespace" TypeName="*" Safe="True" />

In the web.config file it'll be resolved to:

<SafeControl Assembly="myassembly, Version=, Culture=neutral, PublicKeyToken=b62731c11ae57915" Namespace="mynamespace" TypeName="*" Safe="True" />

This saves some time updating the solution manifest.xml file.


Friday, February 02, 2007

Configuring URLMembershipCondition for individual assemblies and the $AppDirUrl$/bin/ path for WSS solution.

In a previous post I described how to configure CAS within WSS solution. At the time I used a membership condition based on the key blob. This works fine for signed assemblies and allows us to create one permission set for a group of assemblies. In our deployment however we decided to remove the assembly signatures, since this interferes with other projects. Trying to find out what other conditions we can define I used the name of the assembly only, so that the CAS section in the manifest.xml file looked like this:


<Assembly Name="myassembly.dll"/>
<PermissionSet class="NamedPermissionSet" Name="MyPermissions" version="1">


This works and in the custom configuration file it translates to:


<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="solution.wsp-1c4cffbe-f1ed-428e-afde-c82d59516da7-1">
<IMembershipCondition version="1" Name="myassembly" class="UrlMembershipCondition" Url="$AppDirUrl$/bin/myassembly.dll" />


This is great, but there is still a lot of typing to create and maintain permission set for each assembly. I wish there was an option to define UrlMembershipCondition for group of assemblies in the $AppDirUrl$/bin/* path. So I created the permission set for the assembly "*" and the result was this membership condition:


<IMembershipCondition version="1" Name="*" class="UrlMembershipCondition" Url="$AppDirUrl$/bin/*.dll" />


Looks like it will work fine? Unfortunately the config file parser complains about the *.dll part of the URL attribute, so no luck here either.

I guess, I am going back to defining individual permission sets for each assembly.