Blogging by the MCS UK Solution Development Team

by Marc 11. April 2010 22:35

My buddy Carl Nolan mentioned that him and some of the Microsoft Consulting Services solution development team had kicked off a new blog recently to share some of their experiences and knowledge.

It has the catchy title: http://blogs.msdn.com/mcsuksoldev/

Now – I’ve worked with most of this lot in one form or another over the past few years. Typically, this has been via our 3-week “Proof of Concept” work in the Microsoft Technology Centre. I can tell you that – when you’re leading a high profile, 3-week engagement, with brand new technology that absolutely, positively has to be delivered on time, then Carl, Dom, Simon, Nick, Dave, Erwin, Duncan et al. are precisely the people you want carrying that load.

Which means they’re likely to have some interesting stuff to say such as:

If you’re a code junkie, then this will be worth keeping an eye on.

Tags:

Development

3 Screens and a Cloud Gaming

by Marc 8. March 2010 13:42

Spotted elsewhere, but Stevecla is where I first saw this great demonstration of a game running across a Win7 PC, A Windows Phone 7 Series device and an XBox. It’ll never catch on :)

Talking of phones (which we sort of were), worth a look at Charlie’s post on the Windows Phone Developer Blog, and his list of those contributing which bits. The full session list for Windows Phone development at  MIX has now been published too. Yum yum.

Tags:

Windows 7 | Development | MIX | XBox

.NET is… umm…

by Marc 1. February 2010 22:43

image

You know what .NET is don’t you? Sure you do. It’s the tool which… no, hang on… it’s the language that you… wait, wait, it’s the development platform for… hmm…

If you’re not already a .NET developer, then actually that question might be harder to answer than it seems. My buddies in the marketing wing (they’re the cuddly ones with crayons) have put together this site to help you understand .NET and the latest innovations in .NET 4, Visual Studio 2010, Windows 7, Azure and all that malarkey and help you to think about learning .NET or putting your existing skills to use.

Tags:

Development

Thoughts on Technical Debates from @Scottgu

by Marc 25. January 2010 13:07

Great way to start the week – reading this post from Scott on his (and I guess a lot of folks’) observations on technical debate – and a segue into some discussion on ASP.NET and ASP.NET MVC.

Quick excerpt:

I always find it somewhat ironic when I hear people complain about programming abstractions not being good.  Especially when these complaints are published via blogs – whose content is displayed using HTML, is styled with CSS, made interactive with JavaScript, transported over the wire using HTTP, and implemented on the server with apps written in higher-level languages, using object oriented garbage collected frameworks, running on top of either interpreted or JIT-compiled byte code runtimes, and which ultimately store the blog content and comments in relational databases ultimately accessed via SQL query strings.  All of this running within a VM on a hosted server – with the OS within the VM partitioning memory across kernel and user mode process boundaries, scheduling work using threads, raising device events using signals, and using an abstract storage API fo disk persistence.  It is worth keeping all of that in mind the next time you are reading a “ORM vs Stored Procedures” or “server controls – good/bad?” post.  The more interesting debates are about what the best abstractions are for a particular problem.

Tags:

Development

NerdDinner hosted on Windows Azure and SQL Azure

by Marc 2. November 2009 22:49

I recently got my hands on a Windows Azure and SQL Azure token to try out a little cloud goodness.

The challenge I set myself was to host an ASP.NET MVC application (including data) in the cloud. Hopefully just an hour or so of fiddling about, but as I hadn't really used Azure before, it would also be a bit of a learning experience.

3 steps seemed to be in order:
    1) Create an MVC Application
    2) Move the application data from SQL Server -> SQL Azure
    3) Move the application hosting to Azure

It turns out that everything I needed to do this is already published but I wanted to pull the threads together. As a result, I haven’t gone into particular detail below – you can find everything you need in the Azure Training Kit.

Step 1 - Create an MVC Application

OK, I couldn't be bothered with that to be honest, so instead I downloaded the reference NerdDinner application from CodePlex - relatively trivial and already working.

Got that, unzipped and then a quick F5 in VS2008 proved that all was well with the app.

Step 2 - Move the application data from SQL Server -> SQL Azure

This is where a little bit of work starts. In principle this is a straightforward migration - script the database and run the script elsewhere - in practice we need to configure SQL Azure, connect to it and also check that the script will run (there are differences between SQL Server and SQL Azure in terms of supported capability).

imageSo, assuming you've got a SQL Azure token, then you should activate the account and set-up a new database. I called mine NerdDinner. You also need to add firewall exceptions so that you can access the database from your dev machine.

I then generated the schemas and data from the original DB via VS.

In principle, you can then run this script into SQL Azure, but in practice, there are differences in the support for various bits of SQL Server functionality. Fortunately, there's a handy migration tool on CodePlex which can provide some validation.

Running the script into that tool confirmed it should be valid. So, then I used the SQL command line to run the script into the SQL Azure database. 

(At this point I should also set up specific user roles for that DB of course).

You can then grab the connection string to the database from the SQL Azure dashboard and change the connection string config file (Connectionstrings.config) in the NerdDinner project. An F5 later, and the original NerdDinner app is now using the SQL Azure database instead.

This step was surprisingly painless, though depending on the complexity of your database YMMV. Oh, NerdDinner uses Linq-to-SQL, but I also did the same thing with Entity Framework and it worked fine for a trivial example.

Step 3 - Move the application hosting to Azure

Now, it would be wonderful if we could just move the Membership provider databases (et al) to SQL Azure too but we can't as there are certain functions not supported. Fortunately - again - the Azure Training Kit provides some code to enable a Membership provider using Azure Table storage.

At this point then, we need to create the Azure solution (so you need to have installed the VS Tools). This involves:image

  • Creating a new 'Cloud Service' project - just use the ASP.NET Web Role. (There’s no default MVC option).
  • Deleting the default ASP.NET Web Role.
  • Adding the existing NerdDinner project to the solution.
  • Associating the NerdDinner project with the cloud service. (Right click Roles –> Associate With… and choose the NerdDinner MVC Project).

This is well documented in the Azure Training Kit.

Also covered in the kit is how to get the Membership provider working. Essentially, that involves:

imageAdding two projects that came with the Azure Toolkit to the solution.
Adding a reference to the membership provider from the NerdDinner MVC project.

Ensuring the storage service is running in the development fabric.
Amending the web.config file to take advantage of this provider.

Following this, hitting F5 will fire up the project inside the development fabric - using the new membership provider and still using SQL Azure for application data. There’ll be some messages about creating the storage tables as the solution builds and runs. (We could also remove the redundant membership connection string from ConnectionStrings.config in the MVC project).

So we’re done for tweaking config. At this point, we can move the application to Azure.

Again, presuming you have an account and it is activated, you're going to need a couple of things:


image Hosting for the application – I’ve set-up a host called NerdDinnerService.
Storage for the application – mine is called NerdDinnerStorage.
An affinity group for these 2 services so they can interact.

Now, you can publish the NerdDinnerService project, and then upload the package and config file to Azure. We're not done yet though, as we need to tweak the config on the production cloud. If you've followed the instructions on setting up the membership provider, you'll have a config file with the following entries (for use in the development fabric):

image

So these entries need to be changed for production. Instructions are a bit vague on this, but here's what you need to do:

  • First of all, the “AccountName” is whatever you said when you set-up the storage service. If you can't remember, it's the first part of the service URLs you can see in the Azure dashboard for the storage service that read http://<AccountName>.table.core.windows.net
  • Then you need the shared key - you can see that on the storage service page too.
  • Then you need the URL for the TableStorageEndpoint. You should use https://table.core.windows.net (note the HTTPS which is required if you're NOT allowing Insecure Remote Endpoints as above).

Finish updating the config, save, wait for the package to sort itself out, then run it up and away you go.

You can see my effort at http://mmw.cloudapp.net. DON'T ENTER ANY REAL DATA INTO THE DATABASE (LIKE USERNAMES AND PASSWORDS). I'll take it down in a few days.

I’d like to say “It works on my machine” but then it’s not supposed to. So “It works on my cloud” instead.

Tags:

Cloud | Development | Windows Azure

IE8 Accelerators and Tesco

by Marc 22. June 2009 22:28

Sometimes, everything you need to know about how to do something has been written, and sometimes there doesn’t need to be much of that.

So me, @markjo, @domgreen, @will_coleman and a couple of others – thanks Dan and Claire - went to Tesco to figure out why to do something: in the case, how useful is an IE8 accelerator to a business, and a consumer?

Big thanks to Nick at Tesco for helping us with this – including a cameo. Also, we got our hands on a Dell Adamo. Nice.

Tags:

Development | Microsoft Life

Mobots: Best Application at Microsoft EMEA Mobile Incubation Week

by Marc 11. June 2009 13:14

The telegraph took some time out of unearthing political expense scandals to highlight the Microsoft EMEA Mobile Incubation Week, where Mobots won “Best Application”.

image

I’m a big fan of building out these ‘domain specific language’ tools for creating mashups: Yahoo! Pipes, Popfly, xFruits and so on, and have wanted to build out a similar sort of thing combining WF and Silverlight (companies like K2 already do serious business process tools in a similar vein).

Here’s an example of simple building blocks – an event, a condition, and then some commands - creating some useful logic (well, useful if you get invited to parties…):

image

So, of course I love the Mobots concept – little bits of functionality for my phone. Depending on how much your fun runs your life for you (quite a bit for me) these could be really cool.

Tags:

Development

PHP on Windows

by Marc 11. June 2009 12:44

php|architect Volume #8 Issue 5 — May 2009If you’re thinking about PHP on Windows, then the May issue (OK, I’m a little behind) of php | architect is full of information on installation, configuration and optimization, SQL Server drivers and an introduction to Silverlight too.

Tags:

OSS | Development

Go get that Visual Studio 2010!

by Marc 19. May 2009 12:49

If you’re an MSDN subscriber, you can grab Beta 1 of VS2010 from here.

Tags:

Development

Glimmer – Interactive jQuery Designer

by Marc 29. April 2009 00:20

Cool – just saw that the availability of Glimmer has been announced. Glimmer is a WPF-based application designed to help with interactive scenarios for your web sites – think design-surface for jQuery. Probably handy in any case, but definitely handy for the JavaScript-challenged amongst us (like me).

image

Tags:

Development