Wednesday, August 31, 2005


As all of you already know, on Web development (be it with PHP, or Java, or .NET or plain HTML) there are some files called Cascade Style Sheets, or CSS, which force all our Web pages to share a coherent and uniform visual style. They are text files one can specify global styles for our pages, so we can specify that all our tables are gonna have a 5 pixel wide yellow border, or the background of all of our pages is gonna be an specified image, etc. It has several undeniable advantages: besides giving a coherent look to all the pages of our application or Web site, it allows us to forget about the visual aspects of our pages and in order to change the appearance of our Web app we'll only have to edit a single text file form which all our pages will feed automatically. Try CSS Zen Garden so you can check by yourself the true power of style sheets.

Why the hell can't we have this for Windows Forms?

First of all we'd have to design a file (XML, for example) containing the design we want to apply to our forms, text boxes, dropdown lists, grids and so on. Of course, at first our XML based style file (XSS?) would only admit standard .NET controls, but I believe it could be easily extended to third-party controls.

Having those XSS files as a starting ground, the thing could work two ways.

First, as a Visual Studio add-in, we could have a button in the IDE with which we could select one of our premade XSS files and apply, on design time, the styles to all the forms and the controls of our application. Of course, if we later on add controls to the forms or forms to the application we should have to push that button again to make the new controls adhere to the norm. The controls would be saved and compiled with the chosen visual style already implemented on them.

Second, we could include a DLL made to read XSS files and change the appearance of our Windows application in runtime. If a user of our add-in wants the visual styles to be applied on his application at runtime, or wants the user to be able to change between several predefined visual styles (several premade XSS files), he'd only have to reference the DLL that allows him to make this changes.

First question: what do you think about it?
Second question: do you think there's already something like this avaliable?


What phony dog poo?
The more or less a month without writing anything here is not because a roughly equivalent holiday time span, lying down doing nohing on a beach somewhere without a keyboard. My wish.

IT's mainly because an inordinate amount of work and the lack of commentable news, or the lack of willingness to comment the news, I don't really know.

But there are a few things I've done worth commenting something, besides working my a$$ out: I (finally!) tried Visual Studio 2005 Beta 2, I'm trying to get my third star, I've written my first tech article (spanish), I've begin to read my four new books and I have finished none, and I've generally tried to get the most out of my time.

About Visual Studio 2005, after the very little time I've spent with it, I'm impressed. My first thinking about it was that if VS 2003 was a Ferrari, VS 2005 is an X-Wing.

It includes MS Build, or Microsoft's answer to NAnt, which we'll have to test something more to see if it can really leave unemployed the amazing NAnt's development group or if we'll have to stick to that tool for our automated building needs. Ditto to NUnit and unit testing, task already included to VS 2005. The IDE includes some of the refactoring capabilities brought by ReSharper, which leads me to wonder what ReSharper for 2005 will be able to do, and I'm already grinning. Partial clases are a blast: we'll be able to arrange much more elegantly our source code. If I tell you that Intellisense is simply better I'm making a big understatement. Tooltips showing you your variable values on runtime are light-years away from VS 2003. IDE toolbar and windows docking handles like a dream. Custom data viewers are simply amazing. The creation and handling of controls on Win Forms has been exponentially improved, so the form grid is not really that useful right now. And I haven't tested it for Web Forms yet (you know is not my favorite programming flavour); but only not needing Internet Information Server on the development machine anymore and having its own application server simplifies the IDE installation procedure big time, just for starters.

So when I come to work and I have to fire up VS 2003 I feel almost, almost like the time I had to use VB 6 after having used VS 2003. Obsolete. I'm dying for November.

[EDITED].- I forgot a VS 2005 detail I haven't liked so much. On all the previous versions of Visual Studio, when you wanted to align several controls, you clicked on them while having the CTRL key pressed down, and the you clicked on any of the alignment buttons on the Form tool bar. The order on which we selected controls was important: the last selected control was the leader, so every other selected control was aligned taking that one as a reference. Now, in VS 2005, the leader is the first selected control, which can create some confusion 'til we get used to this fact. There may be an option to make this behave as always, but I haven't investigated the matter further.

Thursday, August 04, 2005

I bought yesterday four books in Amazon, two on the english site and two more on the american mothersite. Such diversification does not respondo to any master plan of mine to save two pennies, it's simply because I followed a link from someone's blog (damn if I remember who) and from there I kept on clicking and ended up four books richer and almost $150 poorer. Amazon socres, no doubt, a 10 in usability: buying stuff there is too easy.

This are the books I'm awaiting:

I hope those books lift me above Mort's programming level.