Portable Class Library in .NET

At times you must have came across a situation when you want to share class library (DLLs) across different target platform.  For instance , I faced a situation where I wanted to create a class library and share business logic with WCF service as well as Silverlight application. This means that we want our class library to target different version of framework such as Silverlight. Same is the case with Windows Phone.

Previously, if you have made any class library project containing something that you would like to share across your Silverlight app or WP app or Xbox or web app, Visual Studio would not allow you to add reference of class library project (DLL) in another project targeting other version of .NET framework. The workaround involve rework/duplication resulting in creating multiple projects.

Visual Studio 11 (Beta) has introduced a new project template “Portable Class library” which allows you to create a portable DLL that can be ported with different version of framework 😉

Portable Class Library Template

If you look at the project properties (Alt+Enter), you have option to “Change” or “Select” target frameworks.

Change Target Frameworks

The concept behind the scene is very simple for the reason why it was restricted previously and why it is allowed via this template. Previously, a class library targeting .NET Framework (server) does include references such as System.Data, System.ServiceModel which obviously are not supported in Silverlight runtime or on Windows Phone etc. And as you can anticipate what this new template does is that it restricts you to common references (such as System.dll, System.Core.dll, System.ServiceModel.dll), which can be referred to all versions of .NET framework.

You can also get this template in VS 2010 SP1 and its available via Visual Studio extensions.

Portable Library in VS 2010

In short, Visual Studio 11 has new project template that allows you to create a portable library that can be referred across different target platforms of .NET framework.

There is a recommended article “Create a Continuous Client Using Portable Class Libraries” in MSDN magazine explaining the use of Portable library.

Feel free to share your similar experience and usage of Portable class library in comments form below.

Imagine Cup Tips and Evaluation Experience

Imagine Cup LogoLast week I was invited by Microsoft Pakistan team to be part of panel for the evaluation of entries for Microsoft Imagine Cup (Regional/Pakistan). As always, it’s good to have interaction with academia and students.
The Microsoft Imagine Cup is the world’s premier student technology competition. We invite all eligible students to use their imagination and passion to create a technology solution that addresses the Imagine Cup 2012 theme: Imagine a world where technology helps solve the toughest problems
In this blog post, I am going to share some of the tips and things to consider for participants of Microsoft Imagine Cup, especially from Pakistan. I am not a winner from past, back then I really didn’t know anything about Imagine Cup and wish I was that good as well, However from my professional experience along with recent observation as evaluator of Imagine cup projects, I would like to help you WIN!
While this post is focused for Imagine Cup, most of the tips are applicable to other software competitions as well. 

Global Competition and Themes

Realize the fact that you are competing on international level with some of the most passionate students around the globe. In 2011, Around 358,000 students from 183 countries/regions registered for Imagine Cup and more than 400 students from 70 countries participated in the Worldwide Finals. Your idea and solution must be solid enough to compete at that level.
“Imagine a world where technology helps solve the toughest problems” – Imagine Cup 2012 theme
The theme of competition is to guide you what they are expecting from you and you can either solve local (to your community/country/region) problems or you can choose to solve global issues such as targeting one of the eight United Nations Millennium Development Goals. At the end, it’s all about looking problems in new ways and leveraging technology capabilities to provide simple and practical solutions to answer them.

Evaluation Criteria in Every Step

Familiarize yourself with the imagine cup evaluation criteria, which they must have told you. It is important in a sense that you will be evaluated on these criteria, so while working on your idea or design or solution or presentation, make sure you consider these criteria and address them.
Criteria Weighting
Problem Definition 10%
Solution Design & Innovation 35%
Technical Architecture & User Experience 30%
Business Viability 15%
Presentation 10%
Note that ideas and innovation is more important here rather than just technology. Utilization and integration of what can be achieved through platforms, tools and technology available today is key to success here.

Know your Customers and Competitors

In every real life projects, we typically start projects by interacting with customers or actual users to get understanding of their problems and discuss possible solution with them. Most of the successful projects are those who have meet and know their user/association which ultimately gives benefit to the team as their problem and solutions are mature and more practical.
Plus it’s always important to analyze what already exists in market and your competitors. It is important to get answers of following questions:
  • Who are my customers?
    • Connect with concern people!
    • Understand their problems
  • Competitors?
    • What are other application addressing similar problems?
    • What feature set they are providing?
    • Cost/Benefit analysis?
    • Is there any problem due to which customers are not happy with the existing product?
  • What your solutions will provide?
    • Some of the gaps which you would like to cater in your product?
    • Practical roll out of your solution
Once you implemented part of the solution, connect with your customer and get their feedback, see what they think about the project and how this will solve their problem.

Present to WIN

The way you present your work really matters A LOT. Half of the time there are students who have done good work but are not able to pitch it the way it should be. You will get really short amount of time (15-20 minutes) so PLAN IT WELL and demonstrate areas that are significant and important. I have seen students highlighting less relevant item, for example, contact us form on your application is something which no one be interested in until or unless it’s your problem area main area.
Evaluators are mostly interested in YOUR CONTRIBUTION. For example, if you are using speech recognition SDK, panel would be interested in knowing how you have utilized the SDK or perhaps how you have utilized already built-in features to address real world problem or have creating something above that APIs.
Consider following points for your presentation:
  • Engage Audience
    • Creating attractive presentation by demonstrating crux of your project
    • Create few sample scenarios of your projects to be demonstrated
    • Try to create some WOW factor in your demo
    • Too much verbose in your presentation slides will lose the interest of audience
    • Try to address evaluation criteria indirectly in your presentations
    • Videos are good for providing background but make sure they are short and concise
  • Brand
    • Branding starts from naming your project
    • Create a logo for your project or perhaps a good idea will be to wear shirts containing logos and theme/design
    • Consistent styling across application with relevant theme and user experience
    • Presentation template and styling matters
  • Be prepared
    • It’s always good to visit early and get familiarize with the environment
    • Connect with projector/display and make sure your content is viewable
    • Practice demos!
    • Do a rehearsal with whole team
  • Q & A
    • Your team must be prepared to answer possible questions from panel
    • Divide areas among yourself and reply a well formed answer
    • It’s always better to rephrasing question to clear up understanding and at the same time give yourself time to think on answer 

Future plan

Your future plan must focus more on business viability or commercialization or roll out with any relative association. Talk about if you have been connected with actual users or associations or NGOs that will eventually help you in actual roll out of your solution.
There are funds associated with top entries that are business viable, even if they are not winning solutions.

Connect with Local Mentors

From start to end, try to get connected with local mentors, Microsoft team, industry experts, MVPs. Request for their help on periodic basis and create a continuous feedback channel, may be once in a month or whatever sounds good to both sides.

Start Early (For Prospective Participants)

It is always recommended to start as early as possible. If you are currently enrolled in University program and are about to enroll for final year project, it’s good to align your project with global competitions and bring cup home!
To get started, visit www.imaginecup.com. Connect with local Microsoft team and/or refer to your local country/region Competition Rules for instructions on how to submit your entry. For students in Pakistan, visit www.imaginecup.com/PK/SD.aspx for rules and guidelines for software design competition.
Finally, don’t forget to check out Imagine Cup history to know about previous inspirational winners.
Good Luck!