Monday, August 06, 2012

Need a refresher on what Portable Class Library Projects are? (For your co-workers of course, since YOU know about them already... right?)

Kishore – Software Architect, Washington DC - What is Portable Class Library project in Visual Studio 2012– .NET 4.5

I recently installed Visual Studio 2012 Ultimate edition on Windows 8 RC and noticed Portable Class Library project in the New Project Dialog, which immediately made me to research on what PCL is about. Following is my findings about PCL from the web.

The need for portable .NET Framework code

Developers have seen a diversification of computing platforms over the last few years – PCs, phones, cloud, Xbox, and tablets. It often makes sense to target more than one of these platforms from your app. For example, most client apps and games that are built today call into a server component to retrieve and save data (for example, a set of high scores, a list of friends, a grocery list, or a new expense report). .NET developers often create rich object models that describe that data, and expect to code to that object model on both the client and the server. Wouldn’t it be even better if you could write, compile, and test that common code just once? That’s exactly what portable class libraries enable you to do.

...

Some of the key point to using PCL are as follows:

Write once, use everywhere : Portable Class Library is a new project in Visual Studio from Microsoft that enables you to create C# and Visual Basic libraries that run on a variety of .NET-based platforms without recompilation.

Simplify code sharing : No more complicated build scripts or #defines, and stop copying and pasting code for different platforms; portable libraries enable you to easily share code between apps that target different platforms.

Share between platforms : Create a Portable Library project and reference it from any .NET Framework, Silverlight, Windows Phone or XNA project as shown in Fig 1.

image

...

image

image..."

You guys have already heard about Portable Class Library Projects I'm sure, but maybe you need some help selling them to you management team or co-workers? Don't repeat the searching, researching, and link hunting, just refer them to Kishore's post. That should be enough to get them started at least and wet their appetite.

 

Related Past Post XRef:
GoTo Portable Class Libraries - Now's the time to start using them as your default Class Project template?
Update 4.0.3 for Microsoft .NET Framework 4 Roundup
Write (.Net library) once, use everywhere (in .Net world)? The Portable Library Tools CTP Released. (Think “Reusing/Sharing the same Project between SilverLight, XNA, Windows Phone, etc” or “DRY .Net Project Style” )

No comments: