Technology Towards Microsoft Headlines

Friday, August 29, 2008

OVERVIEW OF .NET FRAMEWORK 3.0 FEATURES

.NET FRAMEWORK 3.0

.NET Framework 3.0 comprises of four different foundations with complete support of .NET 2.0. These four foundations are as follows:

1. Windows Communication Foundation (WCF)
2. Windows Presentation Foundation (WPF)
3. Windows Workflow Foundation (WF)
4. Windows CardSpace (WCS)

This Framework supports Windows Vista, Windows XP and Windows 2003. WCF is introduction to overcome the problem of communication with application that are based on other different platforms. WCS also addresses the problem of digital identities and phishing and is introduced to overcome the problem of user-friendly interface that supports 2D and 3D graphics. It also overcomes the problem of process-oriented architecture. All these four foundations provide different technologies in a single framework. This helps the developer by increasing their productivity.

Architecture of .NET FRAMEWORK 3.0

As you know that Microsoft dose little change in an existing technology with additional capabilities. Following that same trend, they did not change the basic structure of .NET Framework 2.0; instead it added four new foundations to it.

Let’s now elaborate upon these foundations and discuss them in detail.

WINDOWS WORKFLOW FOUNDATION

Workflow means performing any task in order. Today, each application is based on workflow approach and involves some process to be executed. While creating an application, developers are still following the traditional approach that leads to create steps in the process implicit in the code. This traditional approach works fine, but requires a deep programming logic making the process difficult to change and execute.

One can use the workflow technology to implement the process in an effective manner and without deep programming logic. According to this technology, instead of defining the process logic in the code, one can divide the process in steps and define them explicitly. After having defined the same process logic, it can be executed by workflow engine. Workflow engine is an environment used for execution of processes and activities.

Workflow engine is not a new technology; it came into existence in early 2000. In the market, several workflow engines are available for windows and other platform. Today, all applications are based on workflow approach. So, defining different engines for different applications is a cumbersome task. To avoid this, Microsoft has decided to define a single common workflow engine for all windows-based applications. This is what Windows Workflow Foundation (WF) performs. WF provides a common workflow technology for all the windows-based applications, such as Microsoft Office 2007 and Windows Share Point Services.

Now question arises, how this Workflow technology meets the requirements of different workflow applications. This can be answered by understanding how the WF works. Basically, WF takes each activity as a class and that class comprises of any work which WF finds necessary. These classes can be used with different application workflows with little modifications.

WF also addresses the problem of making changes in the running workflow. There are two types of workflows- Sequential Workflow and State-machine workflow. WF includes support for both workflows.

Sequential workflow is the one that performs the execution of the activities in a chronological order. It contains classes, loops and control structures. This workflow is used by software-based process and is easy to understand and develop.

State-machine workflow is the one that executes activities at a particular time. This time is based on the event occurred and the state of the machine. The workflow is used when you are not aware of execution time. For example, you have created an application and somebody calls the cancel event, which is less predictable, and you are not aware of the exact execution time, but you are interacting with people at the same time.this interaction demands for state machine workflow.

Components of WF

By now you must be familiar with workflow, which is basically a group of activities. These activities are classes that can be created in code. WF provides components, such as Workflow designer, which is a GUI for developing workflows. You can create the workflow activities using Base Activity Library (BAL), which comes with WF. BAL provides some of the common activities, which help in creating custom activities easily and fast. Some of the common activities included in BAL are as follows:

1. IFElse- It is used for executing the multiple activities based on the conditions met.
2. While- It is used for executing the same activity multiple times till the time condition is true.
3. Sequence- It is used for executing activities on a particular time in a predefined order.
4. Parallel- It is used for executing two or more activity groups in parallel.
5. Code- It is used for executing a code snippet.
6. Listen-It is used for executing the activities based on the event received or occurred.
7. InvokeWebServices- It is used for invoking a Web service.
8. State- It is used in State-machine workflow for representing a state.
9. EventDriven- It is used to define a transition containing one or more activities at a time of particular event received.
10.Policy- It is used for executing the business rules which comes with WF.

WF also provides a runtime engine for executing the defined workflow. It also manages the execution of workflow. For running a runtime engine, WF provides runtime services.

WINDOWS COMMUNICATION FOUNDATION

Today, most of the applications need to communicate with other applications. But communication requires a reliable protocol which earlier was difficult to choose. Applications used to communicate using different protocols due to which some applications were unable to communicate with other applications, as the protocols used them would not mutually support each other. To avoid this problem , all the major application vendors decided to use a common protocol named SOAP. This protocol will be used by web services and it will help in creating interoperability between different technologies. With this a new architecture, named as service-oriented architecture (SOA), came into existence.

In .NET 2.0, there exists multiple technologies used for communication. Some of these technologies are enterprise services, .NET remoting, and ASP.NET web services. But sometimes, these multiple technologies confuse the developer and create dilemma while selecting the technologies. To overcome this dilemma, Microsoft decided to introduce a single foundation for application communication and support the interoperability between different technologies. This new single foundation is named as Windows Communication Foundation (WCF). WCF provides a common method for communication with support for SOA. Now the developer can use the WCF, instead of multiple technologies used earlier.

WCF supports multiple protocols, such as SOAP and binary. WCF also provides interoperable communication, which is compulsory for communicating between different technologies such as J2EE and .NET. WCF uses the SOA and resolves the issue, which arises at the time of application communication.


In WCF there are four phases, which are as follows:
1. Contracts.
2. Service Runtime.
3. Messaging.
4. Activation and Hosting Services.

Contracts:
Contracts phase gives you information about different features of the message system. Message system is the one, which involves sending, and receiving the messages from one end to another. In contracts, there are four components, which are as follows:

1. Data Contract- It is used for describing message parameters. These parameters are XML-based and used for creating a message that will be formed or used by the service. This allows any system to process the message.

2. Message Contract- It is used for defining specific part of the message using SOAP. This allows the message to be communicated in interoperable communication.

3. Service Contract- It is used to indicate the signatures which are distributed as an interface.

4. Policy and Binding- It is used to specify the transport media, such as HTTP or TCP. It also includes some of the security requirements, which are must for communication.


Service Runtime:
Service Runtime phase gives information about the different behaviours that takes place at the runtime. Some of the behaviours are as follows:

1. Throttling Behaviour- It is used to control the number of messages processed.
2. Metadata Behaviour- It is used to check the processing of metadata for its availability to the external clients.
3. Instance Behaviour- It is used to specify the number of instances, which will be available to the client.
4. Transaction Behaviour- It is used to change the state of the transaction if a failure occurs.
5. Concurrency Behaviour- It is used to control the parallel functions, which are running at the time of client and service communication.

Messaging:

Messaging phase gives information about the different channels, which are required at the time of processing a message. These channels help in message processing. This phase deals with the message content that need to be communicated. It uses transport and protocol channels for communicating the message body. Transport channel is used for reading and writing message. In addition, sometimes there is a need to convert the message to an XML format and that too is performed by the transport channels. Protocol channel includes the protocols, which are used for processing a message. Some of the protocols are WS-Security and WS-Reliability.


Note: WS-Security is a protocol used for securing the message at the messaging phase. WS-Reliability is a protocol which gives assurance of message delivery.


Activation and Hosting Services:

This is the final phase of the WCF where the service is formed. Here any service can be hosted using the IIS or Windows Activation Service. Service can also be manually deployed in an executable form.


Windows Card space

In this modern world, people access the resources on Internet by digital identities, which are represented as username. But username is not the single element. It is combined with password for accessing resources. People have different user names for different websites on the Internet. For example, for email, website, or online banks, a user will have different user names. Now the user needs to remember each of these user names, which is a cumbersome task. Also, some times, phishers attract the reader of the email to access a particular website, which looks like the original website, for example, the email may contain the name of a website of a trading company say a bank, with which the user does online trading or transaction. When the reader access that website, the phisher will steal the reader identity information and use the same at the original website.

To avoid this problems, Microsoft has introduced the Windows Card Space (WCS). WCS helps in managing the digital identities. The mail purpose of the WCS is to convert each identity into unique information cards. These cards contain information about the user, which will be used for accessing the resources on the Internet.

However, WCS only works with those websites, which accepts the CardSpace logins. When a user tries to access the resources on the website which accepts the CardSpace, the user is presented with a CardSpace selection screen. The user can select the required card and access the resources on the website. You can create a card using the window card space utility that comes with .NET 3.0.

Now the user needs to remember the only card instead of multiple user names and passwords. Technically speaking, all the identities created on a card need some provider for converting an identity into card. For this conversion some organisations provide their own identity provides to create a card based on same. Even WCS comes with its own self-issue identity providers which are accepted by websites for validating the user using the card. These cards avoids the use of passwords. Due to this identity through a card, phishers are unable to steal the password. Despite everything, if phishers succeeded attracting the reader, they will steal some personal information. To avoid this, a new certificate is introduced known as high-assurance certificate. This certificate differentiates the original and phisher-based websites.

WCS is based on the identity metasystem. This system allows to you use different digital identities across different platforms. There are two types of cards available, which are as follows:

1. Personal Cards- These cards are based on self-issued identity providers.
2. Managed Cards- These cards are based on identity providers provided by vendors other than Microsoft.


Windows Presentation Foundation

User interface is an important aspect of any web or windows application. Traditionally user interface are menu based but still have to face challenges related to displays of videos, 2D and 3D animation. Sometimes user interface also needs to provide a functionality that allows working with different kinds of documents, such as MicrosoftWord or PDF files. To address this problem, developers need to use different technologies for creating a single user interface which addresses all the above the challenges. Using different technologies is a cumbersome task for a developer.

Now comes Microsoft to resolve this issue. To overcome this issue, Microsoft decided to introduce a single common foundation which is known as Windows Presentation Foundation (WPF). WPF provides supports for 2D and 3D graphics, videos, and support for different document types in a single foundation.

WPF works on Extensible Application Mark up Language (XAML). This language is used by designers for creating a user interface. Even Microsoft comes with expression studio that uses XAML for developing User Interface for any web- or windows-based applications. The architecture of WPF contains parts like Windows Presentation Framework, Presentation Core, CLR, MilCore, are User 32/GDI, DirectX and Kernel run-time/Hardware Adaptation Layer. This architecture is mainly represented through the managed code. The CLR is used to handle tasks, such as memory management and error handling. CLR increases the productivity and makes the application robust. Presentation Framework, Presentation Core, and MilCore are the important parts of the WPF architecture. Both Presentation Framework and Presentation Core are developed using managed code. On the other hand MilCore is developed using the unmanaged code. This is done so that milcore can communicate with DirectX easily. As DirectX is based on unmanaged code, the question arises, how does the unmanaged and managed code communicate with each other. This is done using the following class hierarchy:

1. System.Threading.Dispatcherobject- It is used for managing the threats and concurrency.
2. System.Windows.Dependencyobject- It is used for providing properties to a user object, such as buttons.
3. System.Windows.Media.Visual- It is used for drawing the tree of the visual objects. These objects contain drawing instructions for managing the data. This class is the main entry point for communication between managed and unmanaged code.
4. System.Windows.UIElement- This class is used for defining the layouts and events for the user interface.
5. System.Windows.FrameworkElement- It is used for providing policies and customisation facility at the user-end. This is also enter point for animation.
6. System.Windows.Controls.Control- It is used for managing the controls used on the user interface.

WTF provides the following user interface functionalities other than the basic functions:

1. Documents- WPF provides support for XPS and flow documents. XPS are supported by XAML FixedDocument tag. It also uses the FlowDocument tag for displaying the Flow Documents. XPS documents are the documents which are based on XML paper specification used by Windows Vista. The flow documents are those, which are used for optimizing the content according to the runtime variables, such as windows size and device resolution.

2. Graphics- WPF provides support for 2D and 3D graphics. It provides brushes, shapes and pens for drawing 2D graphics. It also provides XAML-based elements for drawing 3D graphics, which require lighting and camera positions. WPF don’t rely on GDI+ for 3D graphics.

3. Images- WPF uses the XAML’s image tag for providing support for different types of image formats, such as jpeg, gif, png and others. It uses Windows Imaging Component to provide software that displays and stores images.

4. Media- WPF uses the MediaElement tag of XAML for displaying video and audio formats. These formats include WMV, AVI and MPEG file types. You can use this tag with other XAML tags for displaying 3D cubes, etc.

5. Animation- WPF provides support for animation. You can use this support for creating storyboards, including timeline animations.

6. Data Binding- WPF provides support for data binding which is automatically performed in any WPF application. It also provides sorting and filtering of data.

No comments:

Page copy protected against web site content infringement by Copyscape

Subscribe To Get Updates Directly To Your E-Mail

Enter your email address:

Delivered by FeedBurner