Visual Studio 2012 Launch "My Events" sample modern application source
Containing with the Visual Studio 2012 Launch theme, in the keynotes (which you can see on-demand here), you saw a number of demo's of the "My Events" application.
Think it was kind of cool and something you'd like to look see the source for?
The main goal of this sample modern application is to provide a sample app where you can see most of the new technologies related to Visual Studio 2012, in a practical way.
Sample application context and scenarios
This sample application shows most of the new technologies you can use with Visual Studio 2012 in order to build Modern Apps.
The context is about an events/conferences management system called “My Events”.
It is composed by:
- Central Web API Services:
- Global Web-App (ASP.NET MVC4):
- Organizers WPF App (WPF):
- Organizers Windows 8 Store App (XAML/C#):
- Attendees Windows 8 Store App (HTML5/WinJS):
This global system and the related client apps are highlighting the following points:
- Consumer end-user point of view with the latest UX technologies capabilities, typical of Modern-Apps.
- Enterprise and LOB (Line of Business) point of view, when using a desktop application.
- Cloud friendly. You can deploy very easily all the server assets (Web Api Services and Web app) into the Windows Azure cloud.
- Extensible and open to more complex scenarios. Even though our scenario’s main goal is to ‘keep it simple’, we wanted to be able to leave it open for future extensions and complexity that is usually required when implementing a real production application.
- Multiple technical approaches. We wanted to illustrate how multiple technical approaches can co-exist within the same solution (Web, mainstream-app, CRUD, etc.)
- Easily deployable. The RI is easily deployable so that you can install it and experiment with it.
The selected technologies and frameworks used are the following:
- ASP.NET Web-API Services
- Entity Framework 5 (Code First)
- SQL Server LocalDB
- Web App
- ASP.NET MVC 4
- Windows 8 Store Apps
- Windows 8 Store App using HTML5/WinJS
- Windows 8 Store Apps using XAML/C#
- Desktop App
- WPF (Windows Presentation Foundation) App
While this show's off allot...
What this sample application is NOT about
This is not a production application and it is not intended as a guidance for complex scenarios/applications, as it mostly covers CRUD and Data-Driven scenarios, only. If you need guidance for complex scenarios, we recommend to check guidance material from the Microsoft Patterns & Practices group like the ‘CQRS Journey guidance’, which shows a reference application with a related functional domain & scope (Events/Conferences platform) but from a different point of view based on design-patterns and best architectural practices for complex scenarios, covering approaches like CQRS (Command & Query Responsibility Segregation) & DDD (Domain Driven Design).
Ready to build it now?
Building the Sample
Check that you have the dependencies, open the solution and run it. The database will be generated for you using LocalDB and Entity Framework Initializers.
If when running the web client for the first time, you get a runtime error here;
...that it can't find a file in the FakeImages folder, what I did was just copy the folder into the path it thought to find the images. Easier than tweaking code.
So I coping the FakeImages folder from
...\MY EVENTS - Sample Modern Application with Visual Studio 2012\FakeImages
Then the app ran fine. Once run the first time, you can delete that extra copy if you want, it's only need the first time the app runs, when its building its data store.
Also note: When creating an Event, also make sure to add at least one Session to it. Otherwise the event won't show up in the in a few of the Clients (This had me wondering if something was busted. I could see the event in the Web and Desktop apps, but in none of the Windows Store apps... Adding a Session fixed that. Doh!)
Here's a snap of the Solution;
And some snaps of it running on my system.
Here's the Web app;
The WPF Desktop app;
As a Windows Store app;
Therefore and as previously mentioned, our main objective is to highlight and show most of the new capabilities and technical possibilities offered by Visual Studio 2012 and all its related technologies in order to build Modern Apps.
There's a bunch here to look in this source. From using a Solution wide version assembly file, to Portable Library projects, Windows Store apps, Facebook Integration, Twitter, Maps, MVC4, ASP.Net Web API, Json.Net, MVVM, unit testing the web backend and much, much more.