Sunday, 21 December 2014

Introduction to WPF with PRISM


What is Prism



Prism provides guidance designed to help you more easily design and build rich, flexible, and easily maintained Windows Presentation Foundation (WPF) desktop applications, Silverlight Rich Internet Applications (RIAs), and Windows Phone 7 applications. Using design patterns that embody important architectural design principles, such as separation of concerns and loose coupling, Prism helps you to design and build applications using loosely coupled components that can evolve independently but which can be easily and seamlessly integrated into the overall application. These types of applications are known as composite applications.

The guidance is designed to help architects and developers achieve the following objectives:
  • Create an application from modules that can be built, assembled and, optionally, deployed by independent teams using WPF or Silverlight.
  • Minimize cross-team dependencies and allow teams to specialize in different areas, such as user interface (UI) design, business logic implementation, and infrastructure code development.
  • Use an architecture that promotes re-usability across independent teams.
  • Increase the quality of applications by abstracting common services that are available to all the teams.
  • Incrementally integrate new capabilities. 
  

Basic of Prism Framework

PRISM is a framework for developing composite application. It helps to develop a complex application breaking it down into smaller and manageable pieces. Is specific for WPF, Silverlight and windows Phone 7. 
This framework is based on design patterns that promotes loose coupling and separation of concerns.  
 In this article I'll show a  brief introduction to the essential parts or components used in every PRISM application.



 Why to use it ?

  • Reuse: you can use the modules in more than 2 application, and use it in WPF and Silverlight. (cross-platform).
  • Extensibility 
  • Flexibility
  • Supports Team Development: designers working on the UI, different teams working on different modules.  
  • Quality of code: is increased because it allows to test services and components
 



 In the next article i will show use how to use prism programmatically in WPF


Happy Programming!!
Don’t forget to leave your feedback and comments below!
If you have any query mail me to Sujeet.bhujbal@gmail.com     
Regards
Sujeet Bhujbal
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


 

Monday, 24 November 2014

.NET 2015

Visual Studio 2015

Hi Friends,

Microsoft released the preview version of next version of Visual Studio named “Visual Studio 2015”, along with “.NET 4.6 Preview”. It came up with lots of new features and tools for the developers including the open source community. Along with it, they also released the .NET 4.6 Preview. Though the newest version of the .NET Framework is 4.6, but in Preview the version number still appears in some places as 4.5.3. It will be updated to 4.6 before the final version ship




·         Download Visual Studio 2015 Preview

You can download Visual Studio 2015 Preview from VisualStudio.com! So what are you waiting for? It will install side by side with Visual Studio 2013, but if you have Visual Studio 14 CTP installed you will have to uninstall that first. Please find below link for download beta version

·         .NET Goes Open Source

Microsoft announced today that they are open sourcing .NET Core and if that is not enough, they are also targeting Linux and Mac! This is big news for the open source community and for the future of development on .NET. We certainly have an interesting time ahead! You can read the full announcement on the MSDN Blog.

Visual Studio 2015 Preview and .NET 2015 Preview.

 Previously developed under the name Visual Studio 14, the next version of Visual Studio will be called Visual Studio 2015. Microsoft has provided preview versions of Visual Studio 2015 and .NET 2015 if you want to get started early. This release includes the "Roslyn" .NET compiler platform, new language features in C#, improved debugging and profiling, and code analysis tools. But here's the big deal: It also supports "C#, C++ and HTML/JavaScript development 

There are quite a few new features in these release and we have posted a high level look at them below.

  •     Ability to create ASP.NET 5 websites that can run on multiple platforms, including Windows, Linux and Mac.
  •     Integrated support for building apps that run across devices with integration of Visual Studio Tools for Apache Cordova and our new Visual C++ tools for cross-platform library development.
  •     Connected Services experience enabling easier integration of services into apps including Office 365, SalesForce and Azure Platform Services.
  •     Smart Unit Testing (formerly PEX): Unit Testing technology from Microsoft Research integrated into Visual Studio 2015.
  •     New coding productivity capabilities, enabled by the new .NET compiler platform 



Happy Programming!!

Don’t forget to leave your feedback and comments below!

If you have any query mail me to Sujeet.bhujbal@gmail.com     

Regards
Sujeet Bhujbal
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


Tuesday, 16 September 2014

Use of the Tuple class in .NET 4.0

Use of the Tuple class in .NET 4.0

Hi Friends,

In this article i will introduce Tuple class and its usage in C#

The Tuple class, which was introduced in .NET 4.0, is handy for passing short-lived objects consisting of multiple related values.
·          
·          
1.What is the Tuple class used for?
The Tuple class is used for short-lived objects consisting of multiple values:
var myTuple = new Tuple<string, int>("Ten", 10);

2.Passing multiple values in a single object
Commonly when you want to pass an object consisting of several values you’d use something like a custom struct or class, or perhaps a generic KeyValuePair object (if you want to pass an object with exactly two data members).
A tuple can contain any number of properties (each generic type parameter results in a read-only property in your tuple object). Each property is automatically namedItem1Item2Item3 etc:
// Group related data
var myName =
new Tuple<string, string, int>("Sujeet "Bhujbal", "SujeetBhujbal".Length);

// Output name info
Console.WriteLine(
   
string.Format(
       
"My full name is {0} {1} which consists of {2} characters, whitespace excluded.",
        myName.Item1,
        myName.Item2,
        myName.Item3));

Tuples are read-only
Tuples are immutable, their properties do not have any setters, so once a tuple is initialized its values cannot be modified:

A tuple is a class, not a struct
This might not seem that important, but it’s still noteworthy that each tuple is in fact aclass, meaning it will have to be garbage-collected. This in contrast to customstructs, or objects such as generic KeyValuePair objects which are created asstructs by the compiler. Of course, the KeyValuePair comparison is only relevant if your tuple consists of exactly two properties.
Fixed Size      
 The size is set at the time of its creation. If it was created with three items, you cannot add new items.
Of heterogeneous objects
           Each item has a specific and independent of the type of the other item.
Disadvantages
As Tuples don’t have an explicit semantic meaning, your code becomes unreadable.


Happy Programming!!

Don’t forget to leave your feedback and comments below!

If you have any query mail me to Sujeet.bhujbal@gmail.com     

Regards
Sujeet Bhujbal
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------