Windows 8, Windows Phone 8, some PCL and your social world = Social Media Dashboard Sample
- Posted: May 22, 2013 at 6:00 AM
- 5,256 Views
- 1 Comment
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Speaking of building Windows 8 app's, here's the template of the week. Imagine you
The Social Media Dashboard sample (for Windows 8 and Windows Phone 8) consumes various social feeds and displays them in your app. It is driven from a JSON configuration file so it is very easy to adapt this sample to your needs and have this as a starting point for your application. This sample also illustrates a number of key concepts such as Search, Share, dynamic UI, animations, sharing code between Windows 8 and Windows Phone.
Building the Sample
Make sure you have the basics installed. That includes:
Download the sample and double-click on the solution. The solution consists of three projects:
- SocialMediaDashboard.PCL, which is the Portable Class Library that contains code that is used in both the Windows 8 and Windows Phone 8 projects. To learn more about Portable Class Libraries, click here.
- SocialMediaDashboard.W8, which contains the code for the Windows 8 version of the app.
- SocialMediaDashboard.WP, which contains the code for the Windows Phone 8 version of the app.
There are dependencies on a number of external libraries, these are:
- Microsoft.Bcl.Async, which gives you access to async and await keywords in a Portable Class Library.
- NuGet: Install-Package Microsoft.Bcl.Async –Pre
- NewtonSoft.JSON, which is the standard library for parsing JSON objects.
- NuGet: Install-Package Newtonsoft.Json
- HtmlAgilityPack, for parsing and changing HTML documents.
- NuGet: Install-Package HtmlAgilityPack
- Microsoft Player Framework, which is a framework for displaying video. No NuGet package exists, the code can be found here. A .VSIX file as included in the Project as well, for convenience.
Now, set your startup project to either Windows 8 or Windows Phone and press F5 to run the app. The sample app gives you information about Windows Phone development. I’m guessing you might be interested in something else, in that case you can look up The Config.json in the Assets folder. This is the definition of the content for this app. Play around with it. A later post will detail the format of this configuration file.
This application demonstrates how to build a complete, configuration-driven application both for Windows 8 and Windows Phone 8. It illustrates many key concepts as Share, Search, Live Tiles, extended splash screen, showing video in a MediaElement and so forth.
When you get the source, make sure you read Dependences section above (as being, me I didn't and fixed up the references manually... sigh, must remember to RTFP, Read The Fine Post...
Anyway, here's some snaps of it running on my system;
Here's a snap of the Solution. As you can see the common work is handled by the PCL (Portable Class Library) and the platform specific work done in the platform projects.
What's nice is that you can take this sample and easily configure it for your social world. Just edit the config.json files in the platform projects and go...
So how easy is this to tweak to make it yours?
Hacking the config.json file for about 3 minutes, I created a simple Coding4Fun app...
How cool is that!