0% found this document useful (0 votes)
44 views6 pages

Dot Net - Chapter-12

Uploaded by

sanjaymakwana.it
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views6 pages

Dot Net - Chapter-12

Uploaded by

sanjaymakwana.it
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY (CE/IT DEPARTMENT)

Subject : Dot Net Technology (Department Elective)


Semester : 6th - Branch : CE - Subject Code : 2160711

Lecture notes
Chapter-12

Q-1 Introduction of WPF (Windows Presentation Foundation) and Features

- The Windows Presentation Foundation is Microsoft’s next generation UI framework to


create applications with a rich user experience. It is part of the .NET framework 3.0 and
higher.
- With WPF, you can create a wide range of both standalone and browser-hosted
applications. Some examples are Yahoo! Messenger, New York Times Reader etc.
- The core of WPF is a resolution-independent and vector-based rendering engine that is
built to take advantage of modern graphics hardware.

- WPF combines application UIs, 2D graphics, 3D graphics, documents and multimedia


into one single framework. Its vector based rendering engine uses hardware
acceleration of modern graphic cards. This makes the UI faster, scalable and resolution
independent.
- The following illustration gives you an overview of the main new features of WPF

[6th CE – DOT NET TECHNOLOGY] Page 1


ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY (CE/IT DEPARTMENT)

- WPF extends the core with a set of application-development features that include
Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and
3-D graphics, animation, styles, templates, documents, media, text, and typography.
- WPF is included in the Microsoft .NET Framework, so you can build applications that
incorporate other elements of the .NET Framework class library.

Features :
Standalone Applications
For standalone applications, you can use the Window class to create windows and
dialog boxes that are accessed from menu bars and tool bars.

Browser-Hosted Applications
For browser-hosted applications, known as XAML browser applications (XBAPs), you can
create pages and page functions that you can navigate between using hyperlinks

Code-Behind
The main behavior of an application is to implement the functionality that responds to
user interactions, including handling events (for example, clicking a menu, tool bar, or
button) and calling business logic and data access logic in response. In WPF, this
behavior is generally implemented in code that is associated with markup. This type of
code is known as code-behind.
Security
Because XBAPs are hosted in a browser, security is important. In particular, a partial-
trust security sandbox is used by XBAPs to enforce restrictions that are less than or
equal to the restrictions imposed on HTML-based applications.

Data Binding
Most applications are created to provide users with the means to view and edit data.
For WPF applications, the work of storing and accessing data is already provided for by
technologies such as Microsoft SQL Server and ADO.NET.After the data is accessed and
loaded into an application's managed objects, the hard work for WPF applications
begins.
Graphics
WPF introduces an extensive, scalable, and flexible set of graphics features that have
the following benefits:
- Resolution-independent and device-independent graphics.
- Improved precision.
- Advanced graphics and animation support.
- Hardware acceleration.

3-D Rendering

[6th CE – DOT NET TECHNOLOGY] Page 2


ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY (CE/IT DEPARTMENT)

WPF also includes 3-D rendering capabilities that integrate with 2-D graphics to allow
the creation of more exciting and interesting UIs.

Animation
WPF animation support lets you make controls grow, shake, spin, and fade, to create
interesting page transitions, and more. You can animate most WPF classes, even custom
classes.

Media
One way to convey rich content is through the use of audiovisual media. WPF provides
special support for images, video, and audio.

Images
Images are common to most applications, and WPF provides several ways to use them.

Video and Audio


The Media Element control is capable of playing both video and audio, and it is flexible
enough to be the basis for a custom media player.

Text and Typography


To facilitate high-quality text rendering, WPF offers the following features:
• OpenType font support.
• ClearType enhancements.
• High performance that takes advantage of hardware acceleration.
• Integration of text with media, graphics, and animation.
• International font support and fallback mechanisms.

Documents :
WPF has native support for working with three types of documents: flow documents,
fixed documents, and XMLPaper Specification (XPS) documents. WPF also provides the
services to create, view, manage, annotate, package,and print documents.

Packaging
The WPF System.IO.Packaging APIs allow your applications to organize data, content,
and resources into single, portable, easy-to-distribute, and easy-toaccess ZIP
documents. Digital signatures can be included to authenticate items that are contained
in a package and to verify that the signed item was not tampered with or modified. You
can also encrypt packages by using rights management in order to restrict access to
protected information.

Triggers

[6th CE – DOT NET TECHNOLOGY] Page 3


ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY (CE/IT DEPARTMENT)

Although the main purpose of XAML markup is to implement an application's


appearance, you can also use XAML to implement some aspects of an application's
behavior. One example is the use of triggers to change an application's appearance
based on user interactions.

Themes and Skins


WPF, however, does not integrate directly with Windows themes. Because the
appearance of WPF is defined by templates, WPF includes one template for each of the
well-known Windows themes, including Aero (Windows Vista), Classic (Microsoft
Windows 2000), Luna (Microsoft Windows XP), and Royale (Microsoft Windows XP
Media Center Edition 2005). These themes are packaged as resource dictionaries that
are resolved if resources are not found in an application.

Printing
The .NET Framework includes a printing subsystem that WPF augments with support for
enhanced print system control.

Q-2 Introduction of WCF (Windows Presentation Foundation) and Features:


Windows Communication Foundation (WCF) is a framework for building service-
oriented applications. Using WCF, you can send data as asynchronous messages from
one service endpoint to another. A service endpoint can be part of a continuously
available service hosted by IIS, or it can be a service hosted in an application. An
endpoint can be a client of a service that requests data from a service endpoint. The
messages can be as simple as a single character or word sent as XML, or as complex as a
stream of binary data. A few sample scenarios include:

 A secure service to process business transactions.


 A service that supplies current data to others, such as a traffic report or other
monitoring service.
 A chat service that allows two people to communicate or exchange data in real time.
 A dashboard application that polls one or more services for data and presents it in a
logical presentation.
 Exposing a workflow implemented using Windows Workflow Foundation as a WCF
service.
 A Silverlight application to poll a service for the latest data feeds.

- While creating such applications was possible prior to the existence of WCF, WCF makes
the development of endpoints easier than ever. In summary, WCF is designed to offer a
manageable approach to creating Web services and Web service clients.

Features of WCF

[6th CE – DOT NET TECHNOLOGY] Page 4


ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY (CE/IT DEPARTMENT)

 Service Orientation
Service-oriented architecture (SOA) is the reliance on Web services to send and receive
data. The services have the general advantage of being loosely-coupled instead of hard-
coded from one application to another. A loosely-coupled relationship implies that any
client created on any platform can connect to any service as long as the essential
contracts are met.

 Interoperability
WCF implements modern industry standards for Web service interoperability.

 Multiple Message Patterns


Messages are exchanged in one of several patterns. The most common pattern is the
request/reply pattern, where one endpoint requests data from a second endpoint. The
second endpoint replies. There are other patterns such as a one-way message in which a
single endpoint sends a message without any expectation of a reply. A more complex
pattern is the duplex exchange pattern where two endpoints establish a connection and
send data back and forth, similar to an instant messaging program.

 Service Metadata
WCF supports publishing service metadata using formats specified in industry standards
such as WSDL, XML Schema and WS-Policy. This metadata can be used to automatically
generate and configure clients for accessing WCF services. Metadata can be published
over HTTP and HTTPS or using the Web Service Metadata Exchange standard.

 Data Contracts
Because WCF is built using the .NET Framework, it also includes code-friendly methods
of supplying the contracts you want to enforce. One of the universal types of contracts
is the data contract. In essence, as you code your service using Visual C# or Visual Basic,
the easiest way to handle data is by creating classes that represent a data entity with
properties that belong to the data entity. WCF includes a comprehensive system for
working with data in this easy manner. Once you have created the classes that
represent data, your service automatically generates the metadata that allows clients to
comply with the data types you have designed.

 Security
Messages can be encrypted to protect privacy and you can require users to authenticate
themselves before being allowed to receive messages. Security can be implemented
using well-known standards such as SSL or WS-Secure Conversation.

 Multiple Transports and Encodings


Messages can be sent on any of several built-in transport protocols and encodings. The
most common protocol and encoding is to send text encoded SOAP messages using is
the Hyper Text Transfer Protocol (HTTP) for use on the World Wide Web. Alternatively,

[6th CE – DOT NET TECHNOLOGY] Page 5


ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY (CE/IT DEPARTMENT)

WCF allows you to send messages over TCP, named pipes, or MSMQ. These messages
can be encoded as text or using an optimized binary format. Binary data can be sent
efficiently using the MTOM standard. If none of the provided transports or encodings
suit your needs you can create your own custom transport or encoding.

 Reliable and Queued Messages


WCF supports reliable message exchange using reliable sessions implemented over WS-
Reliable Messaging and using MSMQ.

 Durable Messages
A durable message is one that is never lost due to a disruption in the communication.
The messages in a durable message pattern are always saved to a database. If a
disruption occurs, the database allows you to resume the message exchange when the
connection is restored. You can also create a durable message using the Windows
Workflow Foundation (WF).

 Transactions
WCF also supports transactions using one of three transaction models: WS-Atomic
Ttransactions, the APIs in the System.Transactions namespace, and Microsoft
Distributed Transaction Coordinator.

 AJAX and REST Support


REST is an example of an evolving Web 2.0 technology. WCF can be configured to
process "plain" XML data that is not wrapped in a SOAP envelope. WCF can also be
extended to support specific XML formats, such as ATOM (a popular RSS standard), and
even non-XML formats, such as JavaScript Object Notation (JSON).

 Extensibility
The WCF architecture has a number of extensibility points. If extra capability is required,
there are a number of entry points that allow you to customize the behavior of a
service.

[6th CE – DOT NET TECHNOLOGY] Page 6

You might also like