Today was my first day presenting at RDN. It also marked my second and third user group presentations ever.

I can quite safely say that I am one of the least presented members of the Readify team, which is the main reason I took up the challenge of presenting at this level.

The Depth session was presented by Damian Edwards on CSS with ASP.NET using Visual Studio 2008. It was a really good session that gave me a great insight into CSS and hopefully will stop me from ever using tables again... :-)

My presentation was on SQL Server Integration Services, specifically in SQL Server 2008. The slide deck was not that intense and basically addressed the questions "What is SSIS?" and "What's different in SSIS 2005 and 2008?" It will be available soon on the RDN Downloads site.

In the meantime, I thought I'd put up a few links to the resources I used in preparing for this presentation.

As I mentioned tonight, I find the MSDN library help quite useless when it comes to developing SSIS packages. The SSIS Books Online site does have a couple of good intro and how-to topics.

For my demos, I used the November CTP of SQL 2008, which is available as a VHD from MSDN. This is a time-bombed installation of Windows Server 2003 with the SQL Server 2008 CTP pre-installed and set up with all the important features enabled, such as Reporting Services, Integration Services, etc.

For the "What's new..." I referred to MattM's blog. Specifically the excellent What's New in SQL Server 2008 Part One and Part Two summary posts. These link to a few other good write-ups as well.

Then there's CodePlex. The AdventureWorksDB and AdventureWorksBI sample database installations, along with the SQLServerSamplesIS SSIS samples are excellent resources.

For those new to SSIS and still living in the DTS world, all I can say is "what are you waiting for?!" :-)

For a little while now I've noticed my back pain has been getting worse and I think it's a result of leaning in close to my laptop to try get on eye level with it. So I bought one of these Alto Cordless gadgets on the weekend for my desk at work.

My overall opinion: it's swish, but I'm returning it.

Why, you may ask...? Especially after this photo:

Alto Cordless

Well it may look all funky and swish, and the USB ports may be really handy, but it just doesn't work. The first time I hooked it all up it did some wacky things. It would accept some key strokes, but not others. Then it would stick on a key. Then it would just stop working all together. It took me over an hour before I gave up pressing the connect button to pull out a USB keyboard. I at least wanted to use the stand...

Not long after I gave up, I discovered that the keyboard was magically working so I thought I'd keep it. Today, on my second day, I've decided that the dream is over. I went through the same pain this morning trying to reconnect the keyboard even though I left it plugged into the power overnight. When I gave up again and tried to plug in a USB keyboard, it didn't work. After punching a few keys I punched some keys on the wireless keyboard and it worked perfectly. Coincidence...? I think not.

Anyway, I think Logitech need to do some work to get this thing functioning and update their support site to say more than "this should just work with Vista".

Returning the set tomorrow to replace it with a $10 USB hub and a $20 stand.

I received this email from Boost Juice Bars today. Unfortunately, they're cutting off the 10% discount for Vibe members. Very sad news...

 

Logo-No-Oval - small.gif

Dear Very Important Boost Enthusiasts,

Over the last few years we have been fortunate enough to give our VIBE club members a 10% discount on our range of juices and smoothies.

Unfortunately due to the drought in Australia, the cost of making you the freshest juices and smoothies has gone up substantially, especially in the last 12 months; so much so that we have had to make a tough decision... either put our prices up, or keep them at the existing price and remove the 10% discount for VIBE members. We have chosen to remove the 10% VIBE discount, effective 1st February 2008. You can, however, still enjoy the benefits of the Boost loyalty stamp card (buy 10 and get the 11th free)

Our VIBE club remains with great monthly specials and exclusive offers to members, such as the VIBE Challenge and your free Birthday Boost. Should the drought break and the cost of our ingredients come back down, we will review the 10% discount again.

Thanks again for your loyalty to Boost, and for any feedback you would like to make regarding this please feel free to email me at [email removed].

Janine Allis

Founder

Technorati Tags:

For those of you who've heard/read my name and wondered about its origins, Wikipedia has a little entry on it - Doukas - Wikipedia, the free encyclopedia. Here are a couple of extracts...

"Doukas or Ducas is the name of a Byzantine family allegedly descended from a cousin of the Roman Emperor Constantine I who had migrated to Constantinople in the 4th century. The family or families using this surname supplied several rulers to the Byzantine Empire...

Doukas or Ducas (fl. 15th century), Byzantine historian, flourished under Constantine XI Dragases, the last emperor of the East, about 1450...

After the fall of Constantinople, he was employed in various diplomatic missions by Dorino and Domenico Gattilusio, princes of Lesbos, where he had taken refuge. He was successful in securing a semi-independence for Lesbos until 1462, when it was taken and annexed to the Ottoman Empire by Sultan Mehmed II of the Ottoman Dynasty...

The history of Doukas [...] is the most valuable source for the closing years of the Byzabtine empire. The account of the Fall of Constantinople is of special importance. Doukas was a strong supporter of the union of the Greek and Latin churches, and is very bitter against those who rejected even the idea of appealing to the West for assistance against the Ottomans."

Lesbos is a Greek island in the northeastern Aegean. My father was born in its capital Mytilene and I was named after his father Doukas Frazeskos.

Even in Greece, however, Ducas is still very uncommon as a first name. In fact, I had many heated arguments with Greek taxi drivers who insisted that I was telling them my surname when they were asking for my first.

Last week I posted about my PD experience, including work on the new ASP.NET MVC. In this post I mentioned that there is a bug in the MVC that doesn't allow you to access control on an MVC content page from the code-behind.

Well, today I found a post on Troy Goode's site (that I should have found a week ago... :-)) that shows you how to implement the MVC Template Fix to get around this bug by using the "Convert to Web Application" function in VS2008 or by fixing the template files included in the MVC. This fix basically involves adding a designer code file in the page templates and referencing it in the vtemplate file.

Apparently this will be fixed in the next release of the MVC, for those who can wait...

Ok, so I just posted less than an hour ago, but now I've found something worth talking about. :)

After working my way through Phil Haack's blog on TDD with DI using StructureMap, I found a few things that I thought may be helpful.

Firstly, don't try to use a LINQ to SQL data context as your concrete implementation of an interface. Apparently that doesn't work. :) I tried this and received a StructureMapException:

StructureMap Exception Code: 155 - An exception occurred while trying to create an InstanceFactory for PluginType MvcApplication.Models.IPostRepository,MvcApplication

The inner exception was:

StructureMap Exception Code: 200 - Could not find an InstanceMemento for the requested InstanceKey "LINQToSQL" of of PluginFamily MvcApplication.Models.IPostRepositor

Nasty... As soon as I swapped in a concrete implementation called PostRepository that simply called the methods I had created on top of the data context, everything worked.

Secondly, following the code for the StructureMapControllerFactory object will lead to a compile error because you need to specify a return type from the ObjectFactory.GetNamedInstance method. I used the generic version because I'm too lazy cast now days. That makes the code inside the try block:

return ObjectFactory.GetNamedInstance<IController>(controllerType.Name);

Lastly, if you want to use code instead of a configuration file for the StructureMap configuration, add the following to your Global.asax Application_Start event handler:

StructureMapConfiguration.UseDefaultStructureMapConfigFile = false;

StructureMapConfiguration.BuildInstancesOf<IPostRepository>()

    .TheDefaultIsConcreteType<InMemoryPostRepository>;

StructureMapConfiguration.BuildInstancesOf<IController>()

    .TheDefaultIsConcreteType<BlogController>;

So now I have a functional website that uses DI and is unit testable. Hope this helps someone else out there...

After a great start to the new year, I've taken the first three days back at work as PD days to catch up on a few things I've been missing out on. I've had to push my learning curve to the limit, but I've managed to cover off quite a few topics and summarise it all into one not-so-short post.

The gold resource for the week has been the new VS2008 Training Kit that includes a set of presentations, hands-on labs and demos. The presentations I've looked at haven't been much of a help to me at all, but the hands-on labs and demos have been key to me while learning about these technologies.

The first topic I was concerned with was the new features of C# 3.0 and .Net 3.5. I've heard and seen a lot about them, but I've never had a chance to sit down and get to know them. The What's New in C# 3.0 lab in the training kit covers these topics and gives an excellent introduction to how to use them. It takes about an hour to work through an introduces the following concepts:

  • automatically implemented properties - public int CustomerID { get; private set; }
  • object and collection initialisers - Customer c = new Customer { Name = "John", Location = "London" }
  • implicitly typed local variables and arrays - var complexList = new SortedDictionary<string, List<DateTime>>()
  • extension methods - public static List<T> Append(this List<T> a, List<T> b) { ... }
  • lambda expressions - customerList.FindAll( c => c.Location == "London");
  • expression trees - Expression<Func<int, int>> addOneExpression = n => n + 1;
  • anonymous types - var customer = new { Name = "John", Location = "London" };

Next up was AJAX. I've had some experience in the past with very very very early AJAX (i.e. XmlHttp... :-)) and know about how it all works, but I've never had the chance to put together a website that utilises it. Once again, the training kit labs came in very handy here. The Introduction to ASP.NET AJAX lab was a great introduction to implementing an the ScirptManager and UpdatePanel controls in an existing website to add AJAX functionality and introduced other concepts such as connecting to WCF services from JavaScript, using LINQ data sources and the AJAX Control Toolkit. The second lab on the topic was Building AJAX/JSON Services Using WCF, which showed the power of the combination of AJAX and JSON. However, I think it was a bit confusing in that it utilised the AJAX Control Toolkit too much. I would have liked to actually see some JSON strings flying around. :-)

I've also been concentrating some effort on the new ASP.NET 3.5 Extensions. If you haven't heard about it before, it's basically a collection of toolkits that new functionality being added to ASP.NET 3.5 and ADO.NET in 2008. These functions include:

  • ASP.NET MVC
  • ASP.NET Dynamic Data
  • New additions to ASP.NET AJAX
  • ADO.NET Entity Framework
  • ADO.NET Data Services
  • Silverlight Controls for ASP.NET

The download website has a few videos on it introducing all of these functions along with a link to the quickstarts that do a great job of diving deeper. I actually used ScottGu's blog more... :)

The area I've concentrated on is the MVC. I started by going through the a few posts ScottGu made a little while back (all in this post). These are an excellent starting point for someone wanting to get their hands dirty. However, there are a few small issues with some of the code that is probably due to it's pre-release nature (or Works on My Computer syndrome :-)). The major issue was that controls on an MVC content page are not accessible in the code-behind. You'll see this if you follow the sample in Scott's Part 1 blog post and try to render the Category list using a ListView control because when it comes time to set the list's data source there is no list in Intellisense. Also, the TestViewEngie class mentioned when developing tests for the controller using an IViewFactory is not available in the MVC framework. Phil Haack has blogged some excellent methods for TDD with DI and Testing Routes using Rhino Mocks and StructureMap.

One thing to watch out for in URL routing is that the routes are taken in the order they are created. For example, in Scott's walk through he mentions tweaking the routing rules to add the ability to route /Products/List/Beverages to pass the category to the List action in the Products controller. This would be done easily by adding the following route code to the Global.asax file's Application_Start event handler:

RouteTable.Routes.Add(new Route
{
    Url = "/Products/List/[category]"
    Defaults = new { controller = "Products", action = "List", category = (string)null },
    RouteHandler = typeof(MvcRouteHandler)
});

I added this under the "/[controller]/[action]/[id]" and whenever I went go to /Products/List/Beverages I would receive an error because the category parameter for the List action was null. Moving the route to the top of the method (i.e. so that it is the first added to the list) fixed this. This behaviour is mentioned in the quickstarts:

"The order in which Route objects appears in the Routes collection is significant. Route matching occurs from the first route to the last route in the collection. When a match occurs, no more routes are evaluated. Typically the default route will be the last route."

By the way, I really suggest watching the video on Dynamic Data available on the download website because it just rocks! It's very simple and very powerful. When you first run a project it builds all the controls and pages requires by the data model. It then allows you to easily extend your data model by using partial methods and add validation and rendering hints using attributes on partial classes. You can also go through and modify all the generated pages. Definitely one of the next stops on my PD roadmap... :-) Once again, Scott's got good blog post with a walk-through and some excellent links.

I'm going to finish off on a cool little download I found the other day. It's a two page poster of some of the most useful default key bindings (i.e. keyboard shortcuts) available in C# with Visual Studio 2008 available at the Microsoft Download Centre.