Posts

Showing posts from April, 2009

ASP.NET MVC User Controls on Master Pages

Image
NOTE: I was originally going to post the investigation into the User Control/Master Page problem AND the User Controls code in one post. However, I thought it would possibly be a bit confusing so will post separately. This explains why the lab code is called “mvc-versionedfiles”. I am real new to MVC. Up to this point I have found it to be quite pleasurable , I really liked the separation of concerns, the conventions and the testability. Something was bound to cause a bump in the road, and I finally hit it. The Problem I spoke to a couple of guys ( @JeremySkinner and @robinem ) at WebDD09 about this problem. What I was trying to accomplish was appending the file version of my CSS/Javascript files automatically to the LINK/SCRIPT elements in the HTML within the ASP.NET Master Page . For example: 1: < link rel ="Stylesheet" type ="text/css" href ="site.css?1.00" > Why Bother? The reason is this, many browsers are very

Tech Day #3 – Inversion of Control (IoC) Containers

For my third tech day I had a bit of an internal fight over whether or not I should get started with WPF, or take a look at IoC containers. As you can tell from the title, I went with IoC containers since I thought the knowledge would be more useful to me at this point. What is an Inversion of Control (IoC) Container? The first obvious question. Before we answer this through we should talk about some base concepts that are important to IoC. We’ll come back to this in a minute.. What are the Basic Concepts Behind IoC? The Hollywood Principle I first heard about this in Head First Design Patterns (I also strongly recommend grabbing the poster ). In short this basically says “don’t call us, we’ll call you” – lower-level classes that perform specialised tasks lose their control, instead being called by higher-level classes. These higher-level classes provide the “hooks” for the lower-level classes to “slot in”. Lower-level classes don’t get to call the big-shot higher-level clas

Tech Day #2 – jQuery

Image
So, it seems to have come around quickly, but I have arrived at the 2nd day of my reduced hours at work! This time around, I wanted to look at jQuery . I am really looking to specialise and get deeper in to web development, part of this is building on my knowledge of user experience . I am a huge fan of writing software for the user – not the client , TBH, I’m not even a fan, rather a zealot. Sure, we build software on behalf of a client, but the one who gets the pleasure (or pain) of working with the software is the user. Always put yourself in their shoes. Why jQuery? Part of creating a better user experience is to provide a better interface. It should be responsive, aesthetically pleasing and “just work”. Javascript has become a big part of this in the web world. Since the code executes on the client side (rather than the server ) there is no round-trip to the server, no page reload – it’s pretty seamless to the user. jQuery has [pretty rapidly] become the weapon of c