WinFX - Learning the future.

The next generation Windows, a programmers view.

  • Playing with Gel Buttons

    Filed under: ,

    I was very pleased to get hold of the November CTP. At last I can play with Avalon without having to go without all the home comforts of my Windows XP installation.

    The first experiment I tried was creating the popular Gel style buttons with event triggers and animations. I found it quite pleasant to edit the Xaml samples using Notepad2 which has syntax highlighing for XML among its other useful features.

    I started with the SDK sample "Property Triggers with Multiple Conditions" and went on extending it from there.

    The sample contains a flowpanel with a style definition for Button. The style is made of a Rectangle with rounded corners, an Elipse and a ContentPresenter for displaying the button text. There is a property trigger set up on the IsFocused property that changes to button colour to a light blue and a combined property trigger on IsFocused and IsMouseOver that changes the elipse to Yellow.

    The flowpanel contains four buttons labeled One to Four

    I'm not terribly artistic, and have not really played with vector graphics much before so I used as a guide this article by Frank Hileman on creating Gel buttons in VG.Net and applied it to Xaml.

    I decided to keep the embedded ellipse as it makes a nice effect when the button is selected. To start with I changed the main button colour to Blue and then added a second rectangle to the Button style. The second rectangle has rounded corners to match the main button but is slightly smaller and has its position offset from the top left of the button. I set the Fill property of the second rectangle to a vertical gradient fading from Light Blue at the top to Transparent at the bottom.

    <Rectangle def:StyleID="HighLight" Height="20" Width="116" Grid.Left="2" Grid.Top="0.5"  RadiusX="15" RadiusY="15" > 


    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">


              <GradientStop Offset="0" Color="LightBlue" />

              <GradientStop Color="Transparent" Offset="1"/>







  • WinFS and System Maintenance

    Filed under: , ,

    My post today  on

    I hope Microsoft also does some serious long term testing of Longhorn.
    I'd hate to think that everyones WinFS could grind to a halt after adding 6 months worth of data and no one could predict because they were in such a hurry to release it that it was never tested for 6 months at a time.

    A lot of people I know still do six monthly or annual reinstallations of Windows XP just to clear out the garbage that tends to accumulate. With WinFS, the more
    information you put into it the better it can serve you, which doesn't tie in well with wiping everything twice a year.

    If WinFS is supposed to be able to store everything about anything you do in your life then it needs to be something that people can truely rely on longterm.
    That means the system must take better care of itself to maintain its performance and integrity. Prefetch, system scheduled defragment, disk cleanup wizard etc are
    all steps in the right direction and XP suffers less from slowdowns than previous versions but it still needs more work.

    My XP Pro system was installed on 12th March 2003, the "c:\windows\" folder is currently 3Gb in size, a fresh install is of XP is about 1.2Gb. If all the files I have
    created\downloaded this year are in c:\documents and settings\<username> and all my application installed files are in c:\program files\ where has the extra 1.8Gb
    come from over the last year? How much of it do I really need? What is safe to delete?
    Will it just keep growing forever?  It seems to be full of temporary files, crash dumps, windows update roll-backs, etc. Yet running the disk cleanup wizard does not remove
    any of it, the best it can do is compress the files I have not accessed in a long time.

    Backing up and restoring WinFS will be a lot more complicated than just backing up my user profile or data files. Will I need to be a MCDBA to know how to look after my machine?
    The WinFS sync may be useful here, if I can sync the data to another PC, reinstall Longhorn on this one and sync it back. But not everyone has a more than one PC available to them, or their other PC may not have enough room to store both WinFS stores at once.

    Will I be able to install Blackcomb over Longhorn, keep all my WinFS data intact and not lose out on any system performance because I havn't done a clean install?

    At the same time we all need hard discs that are warrentied to last over a year and
    consumer backup solutions that can deal with hundreds of gigabytes of data at a time on a medium more reliable durable than a CDR or DVDR.

    I'd also like to see cheap, quiet, low power and reliable consumer level  Network Attached Storage solutions that work with SMB shares and eventually WinFS sync to do automatic backups and file versioning. But at the moment it doesn't seem like anyone is interested in developing them.  I don't want to have to get server 2003 and a storage area network.

    At the moment my computer locks up whenever I try to enter standby or hibernate, a problem I have yet to find a solution for. Looks like I'm about due a reinstall here,
    will I be in the same situation a year on with Longhorn?

  • Longhorn- The missing pieces

    Filed under: , , ,
    Apologies for not posting in a long time. I guess you'd all though this was another blogging casualty.
    But I'm back.

    I'm still working mainly with VB6 but I'm taking every oppotunity to cram .Net from books articles and videos online. I really like the way that WinFX will create a level playing field for developers.

    1. All the functionality of the platform from whatever language and style you find suites you best.

    2. Self-describing APIs, with .Net metadata I get automatic intellisense on any Microsoft or third party assembly. No more header files or type libraries required.

    3. Compiler and build engine included in the platform. Walk up to someones machine, open notepad and start coding away. Produce simple graphical apps in minutes, no complicated build environment needed.

    So to the post. Its a long-un.

    McAfee Virusscan 7 - A Model Longhorn App?

    The avalon articles talk about a new model of task based pageable apps. Looks like one company has got there already.

    It even looks like a Longhorn app. Forward, Back, Home and Help buttons, a task pane, simplified startup page.

    Now I have to wonder, is this really better? I guess its easy to use for a beginner, but can all programs be reduced to a set of predefined tasks? As soon as you want to change settings your back at the good old tabbed page dialog.

    Traditional Windows rich clients such as database front ends have MDI forms, data grids and drag and drop, You really interact with your data, view it in multiple formats, make discisions based on large amounts of information, use undo etc.

    Are we really reducing the user experiance to little more than a Wizard?

    Cool bits of Longhorn that are going unnoticed.

    App Compatibility - or Security, Security Security

    We all know the problem. We don't want to have to log in as a member of the Administrators goup for our day to day work, but somehow those few apps won't work any other way. They write to the HKEY_LOCAL_MACHINE registry or to \Program Files\ or \Windows\System32\ areas that a Limited account does not have permission to modify.

    We can make sure we fix this in new apps, use \Documents and Settings\\Application Data\ etc. You won't get the "Designed for Windows XP" logo unless you can run under a Limited user account. But what about all those apps written in the 9x era. There was no security model in place at the time. No seperation of user and system settings and data which has always been so prevelent in the Unix world.

    I've noticed that on the Compatibility tab of program properties in the PDC build there is a new setting that has something like "Allow this program to be run by non Administrators", something like that anyway, its been a while since I booted Longhorn. I don't know exactly what this setting does but it set me thinking. Can you virtualise the system registry and files on a per user basis?

    A program reads from HKLM, then tries to write some setting back. Instead of failing the system could redirect the API, make it store that value in an XML file stored in the users profile in a location specific to the programs path and file name. eg. \Documents and Settings\\AppCompat\ Whenever a program is launched the system checks for the XML file, in much the same way as it already searches for a Manifest. If it reads from a registry key that it has previously written to it gets the value from the file instead. The program goes on thinking it can sucessfully read and write to the HKLM registry while the system state is preserved for the other users. In a similar way calls to edit restricted files can be redirected to alter files stored in the users own profile.

    Is this possible to implement? Would it work?

    Media player metadata promotion - Wheres all my other stuff?

    ITunes is great, sure on Windows its a memory hog, is not very compatible with the media buttons on my keyboard and since I live in the UK I can't use the online store but still theres some cool stuff in there.

    I have a desktop PC and a Tablet. The desktop has a big hard disk and all my music file stored. Sometimes I want to listen to them via WiFi on the Tablet. I also have some music stored on the Tablet itself.

    The All-Microsoft solution Share the music folder on the desktop, load the files into the Windows media library on the Tablet, choose "All Music" and shuffle, listen away. Works fine until you walk away from the access point. Now I want to play just the local content, but how do I filter just that part of the library? When 90% of the tracks cannot be found using shuffle and skipping back and forth gets boring pretty quick.

    Apple solution. Load content into Itunes library, share over network with rendevous. From the Tablet I can just open Itunes and if I am in range it can see the shared files, if not then they are not in the library. It loads all the metadata as soon as I connect to the Itunes share so I can have complete access to search for tracks without having to add them to the local library. I press play and it streams the files over the network for me.

    The same thing happens if I connect an Ipod. The metadata database from the player is uploaded to Itunes and I can start searching and playing tracks.

    So where am I going with this? Well with Longhorn and WinFS I will be able to share metadata libraries between computers, not just music files but every other file as well. Looking at some Winhec2003 material it shows something called "Media Transfer Protocol" a new API for portable media player manufacturers to include which will allow the meta data information for all the files on the device to be instantly added to your local WinFS database as soon as you plug it in. With present players offering disks up to 40Gb and future ones likely to be larger this will be a great feature. It would also be pretty useful for any old external hard disk used as a backup device.

    Longhorn Portable Media Players

    Power Management or "To reboot or not to reboot, that is the question"

    I thought this was interesting from the PDC .Net Show

    From the .Net Show Episode 38 Transcript

    ROBERT HESS: What about you, Robb? What would you like to see Longhorn do to solve some of the problems your company has or just maybe some cool, consumer kind of issues too?

    ROBB MCLARTY: From a user perspective, I'd like to see faster and fewer reboots. I used to work in the telecom space; I actually used to design for voice switches which were very old machines but they worked like a charm. If one ever went down it would come up, another side would switch in immediately. And so I think that if I can say anything to Microsoft is, look towards other places in the technology realm such as telecom where they have had a higher bar for reliability and perhaps performance, and look to them for a lead. Because as a user it kills me to wait sometimes a minute to get my PC to boot up. That's not the case all the time, but I think that that would really improve the experience if it would just come up a lot faster. It's a simple thing but I think it's valuable.

    ROBERT HESS: The problem is there's so much stuff that's going on during boot up, whether it's reconnecting to the network or verifying your authentication or stuff like that. It's almost mind boggling that it takes as short a time as it does, but still it's frustrating when you turn your machine on and it just takes so long to happen. I know that that's a big problem that a lot of people.

    ERICA WIECHERS: Just be able to flick a switch.

    ROBERT HESS: Yeah. Yeah. So I think we're almost out of time now but I'd like to kinda get some quick feedback ...

    Heh, moving swiftly on...

    So I guess Longhorn isn't going to boot from cold super fast. I mean one of the benifits of having loads of memory available is you can store loads of data there instead of loading it from disk every time and improve system performance at run time. Accessing data from disk is orders of magnitude slower than memory, if memory is cheap and available to use you use it. A Longhorn era PC will likely have 1-2Gb or memory factory installed.

    So you cache the font glyphs, the WinFS metadata etc, loads of rich images and textures for the shell. But all that data has to be read from the disk at some point, sure you get better run time performance but you pay a penalty at boot time.

    A lot of work has already been done to improve boot speed, theres all the prefetching stuff in Windows XP that puts the files required for startup together on the fastest part of the hard disk. but still with more data to load, more code to run through it all takes a while, and Longhorn will likely be even slower.

    But who needs to reboot anyway? With the new power management options you should be able to put the PC into a sleep state that preserves the contents of memory while using minimal power and making minimal noise. Longhorn specifies ACPI state S3 as the default sleep state. PCs can wake from this state in mere seconds.

    My Tablets power management works really well. I only ever use standby and hibernate unless I am forced to reboot by software request. . I even installed the "Uptime" utility to measure how often I reboot and it is regularly over 3 weeks at a time.

    After a struggle I also manage to get this working on my desktop and I love it - when it works. I come up to the computer, press the power button, hear a loud beep and then my desktop reappears just as I left it some days before.

    However sometimes when I wake it, all I get is coloured squares all over the screen, and at the moment I can't even put the machine into standby without it locking up. I have a fairly old Abit KT7A motherboard so it probably doesn't have a fully complient BIOS, but I really hope that proper S3 support is something that is really tested by hardware, software and driver developers so that it "Just Works" out of the box.

    Some user education will be required. People are used to religiously shutting down their machines every day and restarting from cold every morning. People still do it with laptops that have perfectly working power management built in. Perhaps you should change the UI to emphasise sleep state over power off. It might also be a good idea to build in a backup power supply so that the computer can safely hibernate should someone unplug the cable.

    So long as there aren't endless patches to apply that still require reboots, and the OS is stable enough to run for extended periods without performance deteriorating, restarting from cold ought to become a thing of the past.

    Sorry about the formatting. I might come back and clean this up some more. Just wanted to get something out there.

  • My First Post

    Filed under:

    Hi Everyone. I never had a blog before, so forgive me if I do it all wrong. I guess first I should introduce myself. My name is Edward, I'm 21 and I'm a developer at a small software company in the UK. I'm also attending a University course on Software Engineering. I'm actually still working mostly in VB6, we have lots of old code so the transition to .Net will not be very straight forward. I've also worked with Delphi and I'm learning C++ and Java at the moment, as well as reading lots of books on .Net, OOP and destributed application architecture.

     I've spent the last week reading the WinFX SDK, all the PDC Slides, and WinFX Newsgroups, and I'm beginning to get an idea of what its all about. It's gonna take a while to think of all the potential applications. The Animation and DataBinding features seem really great. WinFS will be cool and I'm looking forward to the Infoagent, collaboration and notification things as well.

    I don't have the bits yet so I can't try it out but it really is a completely new way of going about things. Its clearly going to be as big a change as the move from 3.1 to 95, if not even bigger.

     I'm looking forward to being along for the ride.