Total Pageviews

Disclaimer

This is a personal web page. The views expressed on this blog are mine and do not necessarily reflect the views of my current employer.

I am currently employed by Morgan Stanley.

February 28, 2008

Vote Or Not?

I voted in the 2008 Webware 100 Awards

I have just voted for Firefox, Google Reader and PicLens. Even though I have used Internet Explorer 7, I am forced because without my Windows is incomplete (thanks, Microsoft). So what will you vote for?

February 25, 2008

DockPanel Suite Tip #4: Mix Different Versions

It is quite funny that SharpDevelop 3 uses an old version of DPS (version 2.1). This really helps me locate what changes DPS 2.2 introduces, and at last I find out how to merge these two versions to please myself.
In this post I said that the tab background colour is darker and from source code I know why and how to make it lighter. Merge a line of 2.1 source code into 2.2 source code and everything goes fine.
There are other changes, but I feel in most cases 2.2 is better. So I would continue using 2.2.
Now I am hoping that someone can design an Office 2007 style DPS so I can use it with Krypton Toolkit.

(Updated: Now I become a maintainer of DockPanel Suite. The latest DPS can be found at https://github.com/dockpanelsuite/dockpanelsuite.)

GrapeVine Voice: User Interface Update 2

plusmanager

Now I am going to tell you Plus Manager is finally meeting my original goal.

I had been waiting for a tri-state tree view control for so long until I met this article in 2006. However, BDS 2006 was targeting .NET 1.1 so this control cannot be used.

The design of this control is so wonderful that it looks natural and beautiful. Thanks Uwe for creating Zeta C# Library which contains this useful control.

Now you can see that I use both Office 2007 renderer and Tango icons here.

BTW, I modify the original source code in order to make the tree view Vista-aware.

Clear Visual Studio 2005 Vault Error State

I was just checking in a lot of files to Vault. I thought it was dead so I killed Visual Studio 2005 in Task Manager. OK, from then on it complains that some files are exclusively checked out by a user so I cannot check them in until he checks in. And the serious problem comes, that user is me. Oh, who will save me???

I believe it is a Vault bug but because I am still using the 3.5 old version, so I cannot hope this bug fixed today or in the future (SourceGear is selling 4.1 right now). Therefor I am forced to find out how to resolve it myself.

In fact, today is my lucky day that when I launch the Vault Client, a workaround is so obvious. I UNDO all checkouts but LEAVE my working files there. Then I launch Visual Studio 2005 again, and suddenly see everything is fine. Why not buy some lottery tickets tonight?

I have to confess that I never knew checking in hundreds of files would take such a long time. But I am sure next time I won't kill Visual Studio.Embarrassed

February 22, 2008

GrapeVine Voice: User Interface Update

expertmanager

Did you read this post? You might think I use Krypton Toolkit, but in fact I didn't because Krypton Toolkit is not open source.

This article is quite important in this case. It seems Phil did not place an EULA there to restrict us, so I think why not make use of the wonderful code?

That's it! The screen shot above is the latest Expert Manager UI. Do you like it?

An issue that always bothers me is that I cannot find icons that I can use freely. Luckily I met Tango this week and WOW there are a lot of beautiful icons. That's why for the first time you see icons on the tool strip above.

I wish the 6.0 Update 1 bring you a better experience later this year.

February 21, 2008

DockPanel Suite Tip #3: Make Your Apps More Visual Studio

I know Visual Studio is not an adjective, but I find it much easier to understand. Default DockPanel Suite is not all that you need to clone Visual Studio. There are two elements missing, the tool strips and the middle mouse click action. Because I talked about the tool strips here, this post focuses on the latter.
You must find out that Document instances in DockPanel cannot be closed as easily as in Visual Studio. For example, in Visual Studio it is rather convenient to middle click on the document title to close it. And that's why there is no Close button beside the title like CodeGear RAD Studio 2007 (though RAD Studio IDE supports middle click too). However, DockPanel Suite does not make thing this easy.
But you can add this action yourself because the source code is open. According to this forum thread, a simple middle click action can be achieved by adding a few code. You can see both see_sharp's original code and my modification there. In fact, the fix is so simple that at first I was surprised to see it is not included in the DockPanel Suite.
Even you have the correct tool strips and middle click action, there is still a few issues. The most significant one is that if you dock a few panels in one pane, then you will see active panel's tab is not highlighted correctly as the colour is slightly darker than Visual Studio's tabs.Nerd
(Updated: See tip 4 where I found a fix for the last colour issue.)
(Updated: Now I become a maintainer of DockPanel Suite. The latest DPS can be found at https://github.com/dockpanelsuite/dockpanelsuite.)

February 18, 2008

Office 2007 Style

When I wrote the last post, I did not pay attention to the author of this article. Yes, dear Phil creates a complete free suite of .NET components named Krypton Toolkit. So what is Krypton Toolkit?
Let me start with Microsoft Office 2007. In a few old posts I told about the so called Ribbon or Fluent UI. In fact, Microsoft only uses Fluent UI in Word, Excel, and PowerPoint. Although Visio 2007 is part of Office, it remains the menu and bar style.
So in all Office 2007 has two styles. For my project at home, Fluent is not a suitable choice. So right now I think I can choose the other.
And Krypton Toolkit is just for my case. With it is quite easy to move a normal application to this style. The steps are,
  1. Install Krypton Toolkit.
  2. In VS, drag a KryptonManager onto your main form.
  3. Set the KrytonManager properties right.
  4. Rebuild your project and see the effect.
lite
You can further extend the style by doing the following,
  • Set your StatusStrip RenderMode from System to ManagerRenderMode.
  • Open the form source code, change the base class from Form to KryptonForm.
full
Why a KryptonManager can do so much? I guess it overrides ToolStripManager so as to render the strips that beautiful.
Please notice that Krypton is even free for commercial projects so why not give it a try?
BTW, the only issue you might notice is that such kind of free components are not suitable to open source projects, such as Code Beautifier Collection. I strongly recommend you use open source code in open source projects.
You do not need to get a Fluent license from Microsoft if you use Krypton Toolkit. That license only affects Krypton Ribbon users. This is my understanding, and you can consult Krypton's vendor on licensing questions.

Tool Strips vs. Fluent/Ribbon UI

Ribbon UI is cool. If you have tried Office 2007, InstallAware 7, or NDepend, you know why it is cool. Although there are negative comments, I really find Ribbon UI a good way to organize so many commands in a rational manner (don't know why Microsoft decides to call it Fluent UI at last).

It is easy to see Ribbon not always a correct option (and probably that is why Microsoft makes Ribbon UI licensing this complex - Ribbon is not a silver bullet.) For example, my project at office has only about twenty menu items at all. If I move it to Ribbon, there would be a lot of empty space in the panels which is very ugly. Although I got a license for r.a.d. Ribbonbar after registering Visual Studio 2005, I would not use it until the time is right.

In my case, menu and bar style is enough. Therefore, I have been working on tool strips heavily lately.

At first I was going to implement something similar to Visual Studio 2005/2008 but I couldn't understand why Microsoft does not make it default,

ToolStripProfessionalRenderer renderer = new ToolStripProfessionalRenderer();
renderer.ColorTable.UseSystemColors = true;
ToolStripManager.Renderer = renderer;

If Mike did not publish this in a post, I might never know it.


Suddenly I came across another wonderful renderer on CodeProject and its enhancement, I soon gave up the VS style. Yes, I guess you would love the Office 2007 renderer too. Because it highlights items in such a natural and obvious way, I couldn't resist using it anywhere suitable.


The only issue right now is that I don't know whether Microsoft claims any restriction on the Office 2007 renderer alike controls because it seems that Fluent Visual Appearance is part of the Fluent UI License. OMG, it is so hard to make my project look fabulousCrying.


I have sent a mail to the Microsoft guys. Wish they could clarify the thing for me soon.


(Update: Phil, the creator of Krypton Toolkit kindly reminded me that only Krypton Ribbon users are affected by Microsoft Fluent UI License. So now I have started to use Krypton Toolkit instead of this renderer.)

February 16, 2008

DockPanel Suite Tip #2: Conflicts with Crad Action List

I love Crad Action List control. And in every form I create I use this control to provide menu items and tool strip items.
However, once I place an ActionList item in a DockContent, this content cannot be closed without an exception. So I know DockContent is not the same as Form.
In several Update event handlers I try to change Action's Enabled property, then items on the ToolStrip can be controlled easily. However if the content is disposed, those Update events still raise. Exceptions occur because changing Action.Enabled triggers updating those disposed controls inside the content.
But why in Form I never meet this issue? I think this might be an ActionList bug because it shouldn't work once its container is disposed. It can also be a DockPanel Suite issue because it may dispose DockContent in another way.
But all I know is that a workaround is easy. If I check whether the content is disposed in the Update event handlers, the exceptions would go. And they go now!

(Updated: Now I become a maintainer of DockPanel Suite. The latest DPS can be found at https://github.com/dockpanelsuite/dockpanelsuite.)

DockPanel Suite Tip #1: DockPanel with ToolStripContainer

If you want to use both items together, please make sure that ToolStripContainer fills the Form and in turn DockPanel fills the its ContentPanel.
However, you must notice that DockPanel can only work with some of DocumentStyle then because MDI styles are impossible now.
BTW, Even though it is possible to persist DockPanel state, I do not find a way to persist ToolStripContainer state when I place five ToolStrip items in it. So I have to fix those items.
(Updated: Now I become a maintainer of DockPanel Suite. The latest DPS can be found at https://github.com/dockpanelsuite/dockpanelsuite.)

GrapeVine Voice: Broken Changes

I have changed a lot of interfaces in 6.0 Final in order to eliminate FxCop warnings. If you intent to make use of LeXDK 6.0, please take care of the changes from 5.0. I did not maintain a list because according to the solution structure you can easily find out my changes. If you need help, you are welcome to leave a comment here.

February 15, 2008

SUN Enters Virtualization Field At Last

When Microsoft acquired Virtual PC in 2003, Virtual PC was not as good as VMware. VMware has been the leader in this field for years. But after so many years, Microsoft finally succeeds to release a clone of VMware flagship product ESX Server as part of the new operating system product Windows Server 2008. In this way stand alone Virtual PC console vanishes, but we all know Microsoft does have good use of the Virtual PC technology this time and leverage it to the extreme.

There are other competitors too. SUN, IBM and Oracle joins the field by investing on XenSource. And at last SUN enters the war directly by acquiring Innotek, who invents Virtual Box. Because of SUN's attitude towards open source community, I believe it would soon invest more money on Virtual Box and makes it better than ever.

What would happen to Virtual Box in the next few months? Can't wait.

February 14, 2008

GrapeVine Voice: Checked Menu Items

In David's legacy project SharpBuilderTools there is no such kind of checked menu items so I thought it was impossible. Then I started to wonder how the RemObjects guys creates checked menu items in their BDS expert named Everwood.

On Tuesday I suddenly found out how so I added a few new functions in LeXDK. You can see I created a new menu item like this,

RegisterAction(CreateCheckedMenu(MenuItemLocation.Child,
MenuProject,
MenuAutoActivateProject,
0,
"Auto Activate Project",
(bool)PropertyRegistry.Get("AutoActivateProject", true),
new EventHandler(DoAutoActivateProject)
));



The sixth argument of CreateCheckedMenu is named as isChecked. And this is the initial check state.



Because there is no CheckOnClick property on IOTAMenuItem, the event handler must change the check state correctly like this,




private void DoAutoActivateProject(object sender, EventArgs e)
{
bool state = (bool)PropertyRegistry.Get("AutoActivateProject", true);
bool newState = !state;
OtaUtils.SetMenuItemCheckState(MenuAutoActivateProject, newState);
PropertyRegistry.Set("AutoActivateProject", newState);
}



The new functions will be available soon in a later version of LeXDK/CBC.



Why checked menu item is a must? Even though it is a pseudo standard to place all preferences in a global dialogue, in that way in order to change a simple setting like a boolean flag a long sequence of clicks is required. Therefore, sometimes simple settings should be provided as checked menu items so modification of them is straight forward.



Stay tuned.

February 11, 2008

CodeSmith Free Tip

It is said that CodeSmith is a must for .NET developers. However, even though I have been doing C# for years, I do not use it that frequently. So I prefer the free 2.6 version.

But time goes by so quickly that you may find it fails to launch on Windows Vista. Why it complains that

co

while Vista pre-installs .NET 2.0 and 3.0? I guess .NET beginners would find it miserable.

The answer is quite simple that its config file prevents you from using it on .NET 2.0/3.0,

cod

Therefore, here comes an easy workaround,

code

Adding a .NET 2.0 line is enough.

Firefox 3 Icons With Chinese Characters

Now I am looking at new icon sets for major operating systems that probably would ship with Firefox 3 Beta 3 and go to the Final. Oh, they are fabulous.

Something interesting is that the only characters in them are Chinese (no English characters there in the icons).

ch

The leftmost two icons are for Windows (XP and Vista) which contain the Chinese character for fox (狐) while the rightmost icon for Linux contains page (页).

February 10, 2008

GrapeVine Voice: Delphi Style Editor

This is a post in the 6.0 New Features series, to promote my open source project.

When I published 6.0 on CodeGear Code Central, I put "Customize Your Unique Style" in the title. That is because from this version on, Delphi developers can customize coding style in CBC.

pre

Click LeXtudio | Options | Preferences to launch this dialogue.

op

Then click Configure button. You can customize the coding style here.

jcf

If you were a JCF user before you would feel familiar because the dialogue is just the same.

The problem here is that you cannot preview the style immediately but I would try my best to find a solution later.

GrapeVine Voice: Post 6.0 Final Plan

CodeGear gave up C#Builder so I could no longer maintain Code Beautifier Collection in it. That was why I moved to SharpDevelop a few months ago. It is OK as now Delphi native becomes the only core again, and most developers are pleased to see this shift.

This shift impacts on GrapeVine in such an unexpected way that I suddenly find most of features are C# or .NET centric. What could GrapeVine bring to Delphi developers in a long term?

If you take a look at GrapeVine (6.0) and compare it with HardQuery (5.2 and 5.3), a key change is that most C# related items are either extended to support Delphi as well or simply removed (don't worry, I keep them so I may revive them if CodeGear revisits .NET in the future).

So in the next major release GrapeVine Update 1 (6.0.1), I am going to further extend features to support Delphi and VCL development. As usual, I won't clone GExperts or CnWizards features. I am just focusing on features that I know well and use frequently.

I am to do a few posts about GrapeVine new features to illustrate how to use them easily. Stay tuned.

February 08, 2008

SF.net Donate Button

This morning I suddenly came across the SF.net Donate button, and then I decided to use it as well. So now you can see two buttons on my blog.

donat

Notice that the SF.net Donate process requires an SF.net account.

February 07, 2008

Indirect Visit to My Blog Front Page

Because of the Great Wall I cannot visit my blog at home (fortunately from this month on I can do it at office as IP address there is acquired from a San Jose server. It seems that in that way the Great Wall fails). However, last month I found out a way to indirectly visit the front page somehow. Since I suddenly forgot the link I did not post that earlier. Crying

Today luckily I reproduced the page, and here is the tip.

blog

  1. Click the Layout link on Blogger Dashboard.
  2. Click the Preview button.

preview

Then your web browser will lead you to a place whose URL starts with http://www.blogger.com. But it is still your blog front page, isn't it?Hot

In this way I finally can take a look at it at home to see if my customizations lately look fine.

GrapeVine Voice: 6.0 Final is Out And Donation is Welcome

I have just released the GrapeVine Final as version 6.0.0.1014. After unsuccessful M11 and M12, I decide to skip M13. That is why the final release is the 14th build.

Major changes are,

  1. + Vista look and feel and task dialogue is used wherever suitable.
  2. + Vista UAC compliant.
  3. * Installation experience is improved.
  4. + Object Pascal code style editor is added.
  5. * All bugs reported to Google Code homepage are fixed.

This is new About dialogue,

abou

You may notice there is one more button. Yes, now you can donate to this project. Finally I set up a PayPal account for Code Beautifier Collection.

You can also donate via my blog by clicking the Donate button.

donate

From now on I can start to enjoy my holidays.Coffee-cup

Configure AVG Free for Linux

I love AVG Free, but because viruses and Trojans are serious in China I use a commercial product named KAV7 on Windows Vista.

However, for Ubuntu Linux, I am sure that AVG Free is a nice choice. The installation is simpler than the official manual. Simply right click the avg75fld-*.deb package, and choose Open with "GDebi Package Installer".

After installing, you will find AVG Free activated except the Update feature. Why it says "Update process failed. Reason: Sorry, you do not have permission to execute avgupdate."?

According to a thread or two on the AVG Free Forum, the normal user account such as lextm is not a member of a so called avg group.

Now all you have to do is simply launch a Terminal and type in

sudo usermod -a -G avg lextm



Then please log out or reboot in order to apply the change.



Now you can go on to configure other options of AVG Free for Linux on your Ubuntu at home.

Product Review: QC Plus 1.0

I have submitted bug reports to both Microsoft and Borland/CodeGear. The experiences are completely different.

However, using QC client distributed with RAD Studio is quite inconvenient because the user interface is really ugly (sorry Nick, it is not your fault). So I turned to QC Plus once but it failed me too.

Yesterday, I finally decided to have a try of latest QC Plus 1.0 release. Wow, it is now fabulous! Because Visual Studio docking style layout is used, now I can navigate easily to see information I like.

qcplus

Do you remember that I just updated Project E like this? Although Microsoft does not create a lot of great UI elements in its products like Vista, some UI elements it invents for Visual Studio .NET, Office are standard and rational. Therefore if you don't have the time and energy to design something really innovative, follow Microsoft's style is simply OK.

BTW, I met an issue with QC yesterday when I tried to fire a report for Windows Vista (I am on Windows Vista). This issue broke both QC Plus and CodeGear official client. So you must always specify the platform options to All Windows so as to work it around.

February 06, 2008

GrapeVine Voice: Items Won't Fix Now

Have to say the sound of fireworks outside the window is so loud. The whole nation is waiting for the coming of Chinese New Year. The PIG is leaving and the MOUSE is coming.

So after a half day working on 6.0 Final, I cleared several items from the list. Sorry that I hadn't listed the items in that post. And in this post I am going to list what items would be fixed in a later version such as 6.0.1 (GrapeVine Update 1).

Why? Some features would be re-implemented in the future in order to catch up with RAD Studio changes I did not take care of in the past. And some features require heavy improvement which may take even more time. Sorry for the convenience.

The "won't fix" list consists of,

  • Several dialogues have layout issues, such as Hexa Dump.
  • Clean Project Folder needs an update to go with RAD Studio.
  • File Aid does not fully support .NET 2.0 stuffs.
  • Designer Navigator does not fully support old Delphi for .NET WinForms projects (because CodeGear removes WinForms support, but ASP.NET support is there).

Stay tuned. 6.0 Final should be out in a few hours.

Notepad++ Update Issue on Windows Vista

Because auto update feature has been added to Code Beautifier Collection (http://code.google.com/p/lextudio) since 2006, I am able to compare other products with my small project to see if their auto update implementation is better or not.

Just one or months ago, auto update feature was added in Notepad++. However, compared to CBC N++'s update executable is launched every time N++ launches. This implementation is OK on Windows XP. But on Windows Vista, it is terrible.

N++ update executable requires elevation. This means even if no update is available I have to elevate it in order to use N++. Because my InDate implementation does not require elevation and do work well, I wonder why N++'s author implements an update executable like this.

(Update: I am using 4.8.2 now and this bug is fixed. Well done.)

RAD Studio OTA Issue Details

Now I'd like to introduce how I find this bug.

The Background and Steps

I'd like to modify AddMany (CodeCentral entry #25077) project without breaking the original source code. Thus I did the following,

  1. copy the project file AddMany.dproj to Lextm.AddMany.dproj.
  2. open the new project in Delphi for .NET.

addlefile

Then the issue came that IDE thought the output should be Lextm.AddMany.dll while the correct one is AddMany.dll because the real project file is still AddMany.dpr.

Also when I tried CBC's Delete Project Target, CBC said that target does not exist. Then I debugged inside and saw that IOTAProject.ProjectOptions.TargetName is wrong. The returned string is ***\Lextm.AddMany.dll while the expected is ***\AddMany.dll.

Luckily the workaround is described here so if you also meet this issue you can try my code.

(Update: This bug is logged as QC#57890. And it applies to both Delphi for Win32 and .NET DLL/BPL projects. Strangely it does not affect EXE projects.)

February 05, 2008

GrapeVine Voice: RAD Studio OTA Issue

I thought it was a CBC bug at first. However, after debugging I am sure it is another OTA bug.

Now all projects are MSBuild based. Therefore a Delphi project contains a .dproj wrapper and a real .dpr or dpk project file. The bug happens if these two files have different names. Then you cannot get a correctly string from IOTAProject.ProjectOptions.TargetName.

The workaround is also easy that I parse the .dproj file directly to locate the .dpr or .dpk file.  The code is,

public static string GetProjectTarget(IOTAProject project) {
if (project != null) {
String targetName = project.ProjectOptions.TargetName;
if (project.Personality == OTAIDEPersonalities.sDelphiDotNetPersonality
|| project.Personality == OTAIDEPersonalities.sDelphiDotNetPersonality)
{
string folder = Path.GetDirectoryName(targetName);
string file = Path.GetFileName(OtaUtils.GetDelphiProjectFileName(project.FileName));
return Path.ChangeExtension(Path.Combine(folder, file), Path.GetExtension(targetName));
}
return targetName;
}
return null;
}




public static string GetDelphiProjectFileName(string project)
{
string content = File.ReadAllText(project, Encoding.UTF8);
Match m = regex.Match(content);
Debug.Assert(m.Success);
string file = m.Groups["source_name"].Value;
return Path.Combine(Path.GetDirectoryName(project), file);
}




readonly static Regex regex = new Regex(
"<DelphiCompile\\s+Include=\"(?<source_name>.+)\">\\s*<MainSo" +
"urce>MainSource</MainSource>\\s*</DelphiCompile>",
RegexOptions.CultureInvariant
| RegexOptions.Compiled
);



I will fire a bug report to QC tomorrow. Oh, that would be Chinese New Year EveOpen-mouthed



(Update: This bug is logged as QC#57890. And it applies to both Delphi for Win32 and .NET DLL/BPL projects. Strangely it does not affect EXE projects.)

GrapeVine Voice: Bugs That Prevent 6.0 Final

There are still 14 items on the list which prevent 6.0 from running out of the door. Therefore I wish I could fix them all during the Chinese New Year holidays.

Stay tuned.

GrapeVine Voice: Firefox's Flaw or Windows'

I'd like to set Firefox as my default web browser. However, then strange things happens. I cannot open an HTML file by double clicking it in Windows Explorer without a warning.

warn

.NET has a similar issue. When you Process.Start() an HTML file, an exception is thrown. That's why in CBC I am forced to forward such calls to Internet Explorer directly.

But NetSpell library used in CBC does not work around this issue, so when you click the linked button in the following dialogue,

about

you must meet this exception dialogue,

exception

Please remember to click Continue. Otherwise your IDE may be closed unexpectedly.

Stay tuned.

GrapeVine Voice: Undo Beautifying in RAD Studio 2007

Today another change in RAD Studio is found during my test on CodeBeautifiers Plus. It seems that redo/undo mechanism is updated. Therefore now if you want to undo after Ctrl + W, you must press Ctrl + Z twice.

Also I received final reply from Anthony this morning. After tests, the result is perfect. Even though it is right now a internal build, I decide to release it in 6.0. You may consider it as a customized build of JCF 2.34.

Stay tuned.

LinkedIn and Facebook Profile

Marco Cantu' has done an interesting post about online communities.  It seems that as a C# developer I should join some professional network like LinkedIn. So now I add a button on this blog which links to my LinkedIn profile.

The profile is similar to my resume where I put all required information there. This is completely different from my Facebook profile which mainly focuses on my education.

February 03, 2008

Migration to DockPanel

I have been maintaining a Windows Forms application (Project E) for about 10 months since last April. The user interface was very complex because the original creator left so many lines of code inside event handlers.

Right now after countless rounds of refactorings, I successfully cut off most lines and move them into a low level layer. So I start to add unit tests to the low level layer in order to achieve automatic testing.

However, this is not what the marketing department wants. One message from our customers is that the user interface is not friendly enough compared to other Windows applications.

In order to avoid unpredictable consequences, I won't take the risks to publish a photo here to illustrate why that UI is bad. All I could tell is that every operation is done in a modal dialogue. So you always see a dialogue popping up and away.

That was the Win 9x way. Now on Windows XP and Windows Vista, Microsoft promotes more natural UI styles hard. Two examples are Visual Studio .NET and Office 2007.

After evaluation, I have to say Ribbon UI is much cooler but harder to achieve in a few weeks because there are so many rules to follow and all stable components are commercial. On the other hand, Visual Studio .NET style has been there for years so free components such as DockPanel Suite is stable enough. And our original design is only a few steps behind this approach.

In the last post I talked about my first day with DockPanel Suite. And unbelievably that today I was able to create a more complex demo with latest Project E source code checked out from our Vault. Because my first demo is based on an old version of Project E and I have written down steps I took carefully, I gained enough experience and found a few shortcuts.

The result is very promising so I may present it to my manager after the holidays.

February 02, 2008

Product Review: DockPanel Suite

Weifen Luo creates this free and open source DockPanel Suite. With it, it is possible to develop flexible user interface like Visual Studio .NET.
Today I finally got a chance to test this suite and found it nearly perfect. Even though there are still tens of bugs logged on SF.net, during my evaluation, I found no critical issues that prevents me.
However, lacking of samples makes me sad. I have been trying my best and wish soon I can make full use of the suite.
In this afternoon, I found out the following tips for starters,
  • Don't try to load configuration from file at startup. It will make you nervous most of the time.
  • Don't try to play too many features at first. The sample inside is in fact complicated than I imagine. So try one feature at a time.
  • Don't try to migrate your project using this suite too fast. I have to split the tasks into pieces and migrate step by step.
It is funny to see that tool window classes can be converted to Singletons. That pattern also enables interactions between panels easily. However, I did not try this approach yet so I am not sure if it is a good practice.
It seems that only well designed applications can enjoy this suite because panel interactions will become hell if your structure is bad.

(Updated: Now I become a maintainer of DockPanel Suite. The latest DPS can be found at https://github.com/dockpanelsuite/dockpanelsuite.)

Will Virtualization Save Your Soul?

Viruses can damage enterprise network. Even if they are not that harmful, one or two workstations may be damaged. Unluckily, my workstation broke down last week. Both Internet Explorer and Registry Editor are broken so I have to ask the IT guys for help. How I wish they could install a Windows Vista for me because UAC can filter out a lot of viruses and Trojans,  but according to the corporate rules, Windows XP is a still the only choice.

Actually, there were another three guys whose workstations were down so IT guys helped all of us reinstall Windows. And I am the only one who restores development environment in a flash. How I achieve that? I just download Virtual PC 2007 installer again, install it, and then launch my old VM from within it. Now my Visual Studio 2005 is back with all other tools. Virtualization really saves me from reinstalling those beasts again.

BTW, because I did not install MSDN Library for Visual Studio 2005 in VM, now I can install MSDN Library for Visual Studio 2008 instead. I continue to install it outside VM in order to limit VM size as well as make updating it easier.

Virtual PC 2007 is enough if you only build Windows VMs. If you need to build Linux VMs, VirtualBox or VMware Server 1.x is required because Virtual PC does not support Linux well. If you can afford commercial tools, VMware Workstation 6 is fabulous.

Even though Windows Server 2008 will be virtualization enabled, I wonder if it can avoid harmful viruses in the future.

February 01, 2008

Go Big or Go Home?

I joined BEAWorld 2007 Shanghai last December. Before that event, Oracle had already offered to buy BEA. And in January, BEA finally became an Oracle company. On the same day, SUN acquired MySQL. And today, Microsoft offers to buy Yahoo!.

I guess that was why Borland CEO said "Go big, or go home". However, we have seen Borland's continuous going down last year and wondered what would come in 2008.

GrapeVine Voice: JCF Author Responded

This morning I received a mail from Anthony, JCF's author. Because he is so busy, a final reply is going to reach me maybe next week. And if you know Chinese culture, next Wednesday is Chinese New Year Eve. How I wish I could publish 6.o Final by then but nothing is settled down.

Stay tuned. I will keep you update.