My TechEd 2013 U.S. breakout-session demos

Cesar De la Torre

Related to the session I delivered at TechEd 2013 North America, I’m using a sample application we created called “MY CONFERENCES”.

This is the session at TechEd U.S. (New Orleans): https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DEV-B204#fbid=L6pa5lhw3Vn 

This sample application is really the v2.0 or evolution of the “MY EVENTS” sample application we created a few months ago, but we added the following changes:

– 1. Completely new ASP.NET MVC SINGLE-PAGE-APPLICATION (instead of a plain MVC app like we had in 1.0):

In this SPA (Single Page Application) we’re using the Durandal JavaScript framework for navigation/map-router, also the Knockout library for MVVM approach in JavaScript, and RequireJS for incremental download of JavaScript, etc.

– 2. New sub-system or bounded-context (ORDERING BC) showing different patterns common in DDD (Domain-Driven Design), like Aggregates, no-anemic-domain-model with Domain-Entities which own domain rules code, Repository pattern, Application Layer and Application Service pattern, etc.

– 3. Asynchronous Integration between the different Bounded-Contexts (BCs) using a custom Event-Bus (in-memory bus) or switching to different implementations (Windows Azure Service Bus or custom named-pipes event-bus) by simply changing the implementation registration in the IoC container (using UNITY)

– 4. LightSwitch HTML5 application for a pure CRUD and Data-Driven Bounded-Context (subsystem) example. Also integrating its “conferences changes” through the Event-Bus.

– 5. Windows Phone 8 client app in .NET/XAML, as an additional client to the current clients we have: Windows 8 Store app in .NET/XAMLWindows 8 Store app in WinJS/HTML5, and WPF client.

As you’ll guess, we changed the name of the sample application (originally MY EVENTS) because we’re using now “integration events” following an Event-Driven approach, therefore, as a business term now it is better to use the word “CONFERENCE”, so there’s no mistake about it when reading the code.. 😉

SPA application (Smooth navigation, with clear transition/effects between views, etc.):

image

 

LightSwitch CRUD/Data-Driven application:

image

 

Instructions to make it work:

Install the following pre-requisites.

Visual Studio 2012 with UPDATE 2 – (Premium or Ultimate as we’re using Fakes, Professional could be used but you’ll need to simplify the code):

http://www.microsoft.com/en-us/download/details.aspx?id=38188

SQL Server Express

http://msdn.microsoft.com/en-us/evalcenter/hh230763.aspx 

Windows Azure SDK : Required for the Service Bus. Even when you might use/test the simpler in-memory event-bus rather than the Windows Azure Service Bus, you just need to install this SDK so everything compiles.

http://www.windowsazure.com/en-us/downloads/?sdk=net

Bing Maps for Windows Store SDK

http://visualstudiogallery.msdn.microsoft.com/bb764f67-6b2c-4e14-b2d3-17477ae1eaca 

 

Generate the Bounded-Contexts Databases just by running the Web-SPA application. Underneath, it will use EF to create the 2 required databases. Yo ujust need to have a SQL Server Express instance running in your system (like .\SQLEXPRESS) and run Visual Studio with a Windows account with the required rights in your SQL Server instance.

Below you can see the project you need to run in order to generate the databases. It will take a few minutes the first time.

image 

After that, you’ll be able to run the Windows Store apps, WPF Desktop app, etc., as well.

OPTIONAL STEP (NOT REQUIRED):

If you want to use Windows Azure SERVICE BUS as the implementation for the Event-Bus instead of the simple custom in-memory event-bus (for the integration events between different Bounded-Contexts), you must provide the required info of your SERVICE BUS in Windows Azure, within the Web.config of the MyConferences.SPA.Web project:

image

The Facebook App ID should be changed if you want to use a different FaceBook App definition, although that is not required to make the app work. The Facebook authentication is not related to the Event-Bus, neither.

Then, about the Azure Service bus, you also need to specify to the UNITY container that the implementation for the interface IEventBus will be the Azure SB instead of the custom-in-memory bus:

image

 

DOWNLOAD:

An finally, here’s where you can download it:

http://sdrv.ms/13DjESg 

 

IMPORTANT: Current version of this sample application is “BETA”. We’re still refactoring quite a few points and I’ll be publishing the final version of this example in MSDN Samples, just right after TechEd Europe (late June). If you have feedback, send it to me so we can take it into account while refactoring. 🙂

0 comments

Discussion is closed.

Feedback usabilla icon