Wednesday, February 25, 2009

Change of Scenery

After a whirlwind of planning and packing, I have finally found myself in London. Yes that's right, I'm here in the Northern Hemisphere, braving the cold English weather. Missing the warm NZ summer at the moment.

I'm quite thankful that I've just missed the snow but according to weather forecast, the outlook is snow next week. (Praying that the weather man got it wrong). Been keeping myself busy job hunting. I know this is probably the worst time to head over to the UK for my big OE, but anytime is a good time. Not going to let a little recession stop me from coming over.

So what's my initial thoughts of London? Hate the weather here (I mean who doesn't?) Love the city. Been visiting most of the museum here and exploring the city.

I think this little change of scenery will be good for me. I finally finding that I know have plenty of time, in between the job hunting and visiting the museum. So will probably catch up on ASP.NET MVC before it's expected 1.0 release. Its all good :)

Thursday, January 24, 2008

Creating Your Own Ajax ControlToolkit Extender Control

Great resources here:
I can across an interesting gotcha when creating my first ajax control extender (created a validator extender control, which "highlight" a target control if validation fails)


The javascript error only happens in IE. FF is quite forgiving.

Expected Identifier, string or number

When I clicked Yes to debug, it takes me to the below line of code in Visual Studio...

$create(KbWebToolkit.ValidatorHighlightBehavior, {"HighlightControlID":"",
"HighlightCssClass":"error_highlight","id":"NReq_HL"}

Debugging it further would return the javascript below:

Microsoft JScript runtime error: 'KbToolkit' is undefined

Fix:
Remove the last comma in the prototype definition.

Wednesday, July 11, 2007

vmware: I've seen the light.

I’ve just been running a 30 days evaluation copy of VMWare Workstation 6.0 and I got to say very I’m impress!

The number one wow feature has got to be the ability to take "snapshots" of your virtual machines, and reverting back to them. Check out the screen shot of the Snapshot Manager below




Another cool feature, is that you can “Clone” out from snapshot.

Say, I’ve been working hard out on my BizTalk vm and have lots of my personal development files on it.

Someone comes up to me and asked for a copy of the BizTalk vm , I don’t have to give them a “dirty copy” but I could clone out a clean copy base on an earlier snapshot I’ve taken.

Now that's way cool! :)

I’ll post little cool things as I find them. (But this feature is it for me)
Now, to convince my boss to get the full version...

Update:
If you are wanting to import your MS Virtual Server / VirtualPC images across there a nifty utility to do so, which can be found here.

Thursday, May 10, 2007

3 Easy Steps to ASP.NET Caching with SQL Cache Dependency

It has been a while since my last post. I have been mostly preoccupied at work, but have been fortunate enough to be assigned to some really interesting project here at the bank using the latest Microsoft technologies. One of my project even made it into the .NET 3.0 case study, unfortunately my name wasn’t mentioned. But that’s ok cause I had fun working on it ;)

Anyway the purpose of this post is to outline the steps I’ve taken in getting caching going using SQLCacheDependency with SQL Server 2005 for ASP.NET 2.0.

In this scenario, I have a lookup table that Iwould like to cache on the first call, but have that cache item invalidated if the any value in the underlying tables changes.


Update:
I'm assuming that SQL Broker is enabled against the underlying database. To enable SQL Broker, run the following

ALTER DATABASE Store SET ENABLE_BROKER;
GO

1) In your Global.asax, add a reference to System.Data.SqlClient.



2) Call SqlDependency.Start() method in the Application_Start() method (Global.asax), passing in the connection string.



protected void Application_Start(Object sender, EventArgs e)

{

...

string connectionString = WebConfigurationManager.ConnectionStrings["YOUR_DB"].ConnectionString;

SqlDependency.Start(connectionString);

}



3) In my data access code, I instantiate a new SqlCacheDependency object passing a reference to the SqlCommand object. This SqlCacheDependency object is then used in the Cache.Insert() call. (I’ve hightlighted the relevant lines of code below)

Dictionary<string, bool> switches = new Dictionary<string, bool>();

string connectionString = WebConfigurationManager.ConnectionStrings["YOUR_DB"].ConnectionString;

using (SqlConnection conn = new SqlConnection(connectionString))

{

SqlCommand cmd =

new SqlCommand("SELECT SwitchName, SwitchValue from dbo.ExternalSystemSwitch", conn);

SqlCacheDependency dependency = new SqlCacheDependency(cmd);

conn.Open();

using (SqlDataReader reader = cmd.ExecuteReader())

{

while (reader.Read())

{

switches.Add(reader.GetString(0), reader.GetBoolean(1));

}

}

Cache myCache = HttpContext.Current.Cache;

myCache.Insert("ExternalSystemSwitch", switches, dependency);

if (conn.State == ConnectionState.Open)

conn.Close();

}

Note: There is a whole bunch of rules to how you should write your select query, but the two important ones are

  1. Do NOT use Select *, instead use individual fields
  2. Must use fully qualified table names, eg. dbo.Customer

The complete list of rules can be found on MSDN here.



Update:
I'm assuming that SQL Broker is enabled in the underlying database. If not, you can run the following to enable it.

ALTER DATABASE Store SET ENABLE_BROKER;
GO

Tuesday, November 07, 2006

.NET Framework 3.0 RELEASED!!

I was trawling the msdn blogs this morning, and very pleased to see that .Net3.0 has RTM'd!!

Congratulations to everyone involved!! (WCF, WPF, WF, CardSpace)

The relevant links are as
(P/S: There's an uninstall tool for previous version of the .NET3.0)
Now, I need to get this on added on as part of the ADS script for our servers here ;)

Monday, August 14, 2006

Strong Naming Enterprise Library 2.0

Mike Wo put up an excellant entry here.

Thursday, May 25, 2006

Create Virtual Directory for your WCF Service

Create Virtual Directory for your WCF Service using Script by: Guy Burstein
Read it here.


Great tip for me :)

WinFX Beta2 (RC0) -- Get it while its still hot !!

How to install WinFX Runtime Components:
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605077.aspx

Breaking Changes between Feb CTP and Vista Beta2
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605194.aspx

Detailed WCF API changes between FEB CTP and Vista beta 2(RC0)
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605256.aspx

Go-Live License for WinFX Runtime Components V3.0 Beta 2
http://blogs.msdn.com/madhuponduru/archive/2006/05/23/605322.aspx

WCF: Intellisence Support for Configuration Files

Juval Lowy posted an updated version of the WCF configuration schema here.

To enable intellisence support when modifying the WCF config files (Feb06 CTP), download the schema and replaces the exisitng schema in
"C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas"

Tuesday, January 24, 2006

Sparkle is Out!!! well the Jan CTP ;)

That's right folks. The Jan CTP of the Expression Interactive Designer (ie. Sparkle) is available now.

For those who didn't make it to PDC'05, here's same links to Channel9 videos about EID.

The cools stuff about EID:
Avalon has an incredible animation engine, and with this tool that power is released. With the EID, the animation engine becomes more readily accessible and you can see the possiblities of this platform. Great timeline support available. No more editting angle brackets for me :)

Download it here.
Microsoft Expression Interactive Designer January 2006 Community Technology Preview (CTP)
Note: Requires the WinFX Runtime Jan CTP

Updates!!
Check out this cool Free Cell demo created using Sparkle. Posted by Unni

Monday, January 16, 2006

Geoff Snowman's BizTalk Web Resources

Geoff Snowman has put together a list of BizTalk Web Resources here.

Wednesday, December 21, 2005

Microsoft CRM 3.0 Resources

Just collating together some useful links

VPC image which contains Microsoft Dynamics CRM 3.0 environment for development, testing and demos. The image includes:

  • Microsoft Windows Server 2003 + Active Directory + Windows SharePoint Services

  • Microsoft SQL Server 2005 + SQL Server 2005 Reporting Services

  • Microsoft Exchange Server 2003

  • Microsoft Office Professional 2003

  • Microsoft Visual Studio 2005 Professional

  • Microsoft CRM 3.0 + Microsoft CRM 3.0 Desktop Client for Outlook + Adventure Works Cycle Demo Data


This is quite a large image file (>10GB), which has been compressed and split into six separate downloads, and can be found here:


Also found two Flash Demos on Microsoft CRM 3.0 as well.


Updates!!
Top 30 New Features in Microsoft CRM (PPT): link

Monday, December 19, 2005

WinFX December CTP is available for download

This just in.
The Dec CTP of WinFX is out and available for download now

Follow Aaron Stebner's blog here on what order you should install the bits. Lots like its going to be a fun-filled Christmas this year for me (trying out all the lastest bits-n-bobs)

Sunday, November 06, 2005

.NET 2.0: Back to Basics [Generics]

Glad it's the weekend and the wife has been kind enough to let me spent the Sunday afternoon in front of the computer. Downloaded the Visual Studio 2005 RTM and SQL Server 2005 RTM last weekend but only managed to get a chance today to have a go at it. Migrated all my Beta2 projects and all of them to be complied fine without a problem.

Saw a few FAQ's on Generics by Juval Lowy. Definately worth a quick read thorough.

  1. Fundamentals

  2. .NET Framework

  3. Tool Support

  4. Best Practices

Thursday, October 27, 2005

Visual Studio 2005 and SQL Server 2005 RTM

Well everyone at MS is blogging about it. I thought I might as well jump on the bandwagon too ;)

Yeap, that's right. VS2005 and SQL Server 2005 is now available for the masses (well only if you are a MSDN subscriber). And for those who are wondering what's a RTM, well it means "Release to Manufacturing" (that the version they send to the CD/DVD duplicators). So it looks like its green lights for the big launch on the Nov 7th.
The redistributables packages are also available to the general public for downloads.

BTW, Dan Fernandez mentioned here of a tool to help with the un-installation of all pre-RTM versions from your machine. (Automatic uninstall tool).

A couple of notes about the uninstaller tool (again from Dan's blog)


  • Do not use this tool if you have installed SQL Server 2005 Workgroup Edition or higher (SQL Server 2005 Express is okay). Why? Because we don't do ref counting on who is using the Framework and you can get into a situation where the uninstall tool will remove a pre-RTM version of the .NET Framework 2.0, but SQL Server 2005 Workgroup+ will still be installed on the machine. Because Workgroup edition uses managed code, you've now "hosed" your SQL 2005 Workgroup edition uninstall. Check the product readme for step-by-step instructions

  • Do not click "Cancel" when the Automatic uninstall tool is running. Depending on when you click Cancel, it can "hose" your machine uninstall


Tuesday, October 25, 2005

PDC05 Sessions Online

Yes, that's right!!
Michael Swanson just announced it on his blog.

All the sessions from PDC05 is available for your viewing pleasure. So for those of you missed the conference or were there but missed some of the sessions, you can now view them here.

And for all those who have loads of bandwidth to spare, you can download the whole session for your offline viewing pleasure. Now I can catch up on all the sessions that I've missed.

Tags:

Windows Presentation Foundation Hands-On-Labs

Check out the HOL for the WPF. Its a great way to come to grips with the new features of WPF. I have already completed "PRSHOL08: Creating Rich 2D and 3D Content with Windows Presentation Foundation" and "PRSHOL03: Creating Custom Controls with Windows Presentation Foundation" and found the labs an invaluable way to get up to speed on things.

Why not have a go and try some of the labs out? (BTW, is you missed PDC'05, these labs are exactly the same ones they had at the conference.)

Windows Presentation Foundation Hands-On-Labs

Tags:

Everyone's a rifleman.

Another very insightful blog for the day. Steve Teixeira draws parallels from the Marine Corps and successful software organisations.

One pattern I've observed over the years is that high performance software development organizations have an "everyone's a developer" philosophy  In these organizations, the ranks of company leaders and decision makers include people that understand what it means to be a developer.  And I'm not talking about a CTO-token-techie type. I'm talking significant representation within company leadership of those in tunes with what it means to be a developer.

Which leads to the question of the day: "What's the lowest common denominator in your company, from which all actions and decisions are made with it in mind?"

Most often or not, software organisations are managed by people who by choice or skills are unable to be "riflemen". The result of which is quite rightly described by Steve below
And, speaking anecdotally, I know some of the most frustrating times my career were spent in organizations led by individuals or groups that I believed were unwilling or unable to be riflemen, which severely compromised their ability to lead.


Definitely worth a read and a think about.
For the full article: Everyone's a rifleman