Posts

Showing posts from 2011

My 70-511 Study Guide

  Greetings.  The leaves are falling here in London and there’s a bit of a chill in the air, but occasionally there’s also a ray of sunshine! Speaking of rays of sunshine, I recently experienced the shaft of light from heaven which accompanies the joy of passing the 70-511 Microsoft Certification exam   :-/.  The joy (and relief) mostly occurred when it was over and I passed! Full disclosure here, I failed it the first time, just by a few points, then passed it the second time (also by a few points).  Some people find these exams easy, but in all honesty, I’m not one of those people.  I found it to be a pretty difficult test, mainly because it’s just an immense amount of material you have to memorize. Another annoying thing I find about this particular exam is that it’s a test both about WPF (Windows Presentation Foundation, which I think is a cool and modern technology, and similar to the Silverlight work I’ve been doing in the last year or two, or integrating Silverlight

Close SharePoint Modal Dialog from within Silverlight

This took me a fair bit of searching to figure out, and there’s probably a number of better (or at least different) ways of doing this, but this seems to work for me, it’s just a few lines of code, it’s non-invasive, and you don’t have to tweak the page hosting your Silverlight object.  So… imagine you’ve got a Silverlight application running inside of a SharePoint modal dialog.  You want to allow the user to click a button in Silverlight (say, a “Save” button after saving some data to some web service using WCF), to dismiss the modal dialog. This is simply a combination of two techniques, shown here and here .  You’d put this code in the code-behind of your user control, e.g. MainPage.xaml.cs.  Using MVVM you could bind an ICommand to your button, or if you’re not using MVVM, you could just put this in the Click event of a button in the code behind. public void CloseWindow() { var Script = HtmlPage .Document.CreateElement( "script" ); Script.SetAttribute(

Thanks Razorfish!

Tuesday April 19th, 2011 will be my last day at Razorfish London.  After a couple weeks of holiday in the States, in early May I’ll be starting a new job as a Senior Consultant at Hitachi Consulting located near London Bridge. I learned a great deal while I was at Razorfish and got a chance to work with some incredibly talented creative people and front-end developers.  Some amazing changes in the world of mobile, cloud computing and various other areas will be sweeping the planet in the coming years, and as one of the world’s premier media agencies, Razorfish will be at the forefront of these changes.  With respect to my own work at Razorfish London, I learned a lot about SharePoint, web services, LINQ, jQuery, and particularly MVC 2 (and a bit of MVC 3); test-driven development; as well as a good bit of Silverlight and Microsoft Surface dev work. So I just wanted to write a quick blog post to say thanks to my managers and colleagues.  I’ll miss you guys, but it was time for a

Code, Quality, and NDepend

Image
I got the idea of Quality with a capital “Q” ingrained upon me years ago when I read the philosophical novel Zen and the Art of Motorcycle Maintenance .  The main thing I took away from the book is that whatever human endeavor you are engaged in, you should let your actions be governed by a desire to do things well, with a constant and abiding interest in achieving the highest possible Quality.  Naturally this idea can (and should) be applied to the complex world of software development, particularly with respect to the question of Code Quality.  It’s not always easy to live this way.  Whatever point we happen to be at in our lives or upon our career path, our knowledge only goes so far.  And sometimes we take shortcuts; it’s often tempting to take the easy (or lazy) way out, thinking we don’t have time to do things well or to do them right. However, in this day and age, .Net developers are fortunate to have a plethora of 3rd party tools available to us to help us easily examine an

PowerShell 2.0 for Windows Server 2008 R2

Image
This post is simply a brief moan about a particular instance of poor documentation on Microsoft’s web sites, and an attempt to fill that gap. I’ve been reading the Pragmatic Programmer which advocates learning new languages on a regular basis, and also learning your computer’s shell language instead of just relying on the GUI.  I’ve dabbled in a bit of PowerShell and I have a sense of how powerful it is for manipulating SharePoint, SQL Server, the Windows OS, and anything else you might like to manipulate with script, but haven’t made the time to really learn it, so I thought that would be a great way to apply those recommendations.  So I thought I’d get onto by Windows Server 2008 R2 development VM and download the latest version of PowerShell (2.0).  That’s why I thought I’d write this quick post.  If you followed the above thought process, you might experience the same confusion I did as a PowerShell newbie. You might run across pages like this one (which I found useless, no

Using XML Serialization to render front-end web pages from a custom CMS built in MVC2

Image
This post is about a technique I developed on a recent project which may be of interest.  This project seemed naturally to call for SharePoint 2010 as it had a CMS component, but it needed to be hosted in the Windows Azure cloud.  As of this writing, (although some seem to have tried with an Azure VM role ) it generally doesn’t seem to be possible to host SharePoint in Windows Azure; I guess it’s because the kind of “wrapper” that they have you put around an Azure application (the “role entry point”) so they can manage it in the cloud, and the stateless nature of Windows Azure apps, doesn’t really lend itself to SharePoint’s architecture.  So I decided to do the project using ASP.NET’s MVC2 Framework and building a custom CMS, in which I used XML serialization to enable a simple publishing capability to provide users with “preview” and “live” versions of web pages.  I needed to ramp up quickly, and as I’ve generally been impressed with the quality of Apress technical books in the

Request.Browser.IsMobileDevice

It's known that the .Net framework's "Request.Browser.IsMobileDevice" is not entirely reliable in all cases as evidenced by the fact that our MVC2 site wasn't correctly detecting Android as a mobile, and as evidenced by some hits you can see in this search: http://www.bing.com/search?q=request.browser.ismobiledevice&src=IE-SearchBox&FORM=IE8SRC If we really want reliable mobile detection we need to incorporate the WURFL database (a giant XML file of every mobile device - see http://wurfl.sourceforge.net/ ) and from what I’ve seen, the preferred implementation of this for .Net appears to be “51degrees.mobi” … http://51degrees.codeplex.com/ On the MVC2 project I’ve been working on recently, I was using 51degrees.mobi in development; it seemed very effective, and you can do incredibly granular detection with it, but was a bit heavyweight for my particular project, the requirements of which were (in the case of mobile detection) simply to detect wheth

Server error in “AUTHENTICATE” application…

Image
I couldn’t help but be amused… I received an email from the Microsoft Certification Program telling me I needed to log into their site just to keep my ID active.  So I clicked the link in the email that said “Log into the MCP Member Site”…   On the login page I entered my Windows Live ID, and got a YSOD (Yellow Screen of Death)! Tsk tsk! Happens to the best of ‘em…