Saturday, September 6, 2008

INTRODUCTION TO THE WPF Section2

INTRODUCTION TO THE WPF Section2

XAML

What is XAML?

XAML-the extensible Application markup language- is an xml based language for creating trees of .net objects.

XAML is a new descriptive programming language developed by Microsoft to write user interfaces for next generation managed applications.

WPF Inline Code using XAML.



The XAML Revolution

The key to realizing frictionless developer/designer collaboration in
WPF applications is XAML. However, XAML alone does not engender this new collaboration; it is the underlying WPF platform, manifested through XAML, which allows for the efficiencies to be realized. As such, it is critically important to understand how XAML works, how WPF is manifested in XAML, and some of the architecture of the system as a whole.

Why Use a Markup Language?
There are several markup languages for expressing user interfaces
today: HTML, XUL, SVG, WordML, and more. These languages, especially HTML, are the evidence of the success of using markup for displaying user interfaces. XML-based markup languages are well-suited to represent hierarchies and parent/child/sibling relationships that appear in a user interface. What Differentiates XAML from Other Markup Languages? What Differentiates XAML from Other Markup Languages? XAML too is at once human readable and machine readable, allowing one to easily toggle between a tool and a text editor, a benefit that should not be underestimated. XAML not only provides much of the functionality of existing markup languages but adds new features and capabilities not available in other technologies. XAML excels in three key areas:
1)Expressivity,
2)Comprehensiveness
3)Extensibility.

Expressivity
XAML's expressivity is broad and deep; it begins with all of the controls (buttons, list boxes, etc.), layout features (panels, grids, etc.) and text features (fonts, formatting, etc.) one might expect. XAML can represent more than controls, text and layout. It also has an entire syntax for representing lower-level vector graphics for describing shapes, paths, gradients, and more. The lower-level representations have a similar syntax to existing vector-based languages, providing easy migration from other vector-based languages. This expressivity goes beyond the representation of 2-D vector graphics to the arena of 3-D. XAML natively can represent 3-D scenes including cameras, lighting, matrix transforms.

Comprehensiveness
XAML can represent far more than just visuals. It is here that XAML brings to life the underlying power
of WPF. The most significant areas where XAML exposes power to enhance the designer/developer collaboration are styles, triggers, control templates, data templates, data binding, and animation.

Extensibility.

Technically, XAML is not a language itself but a .NET serialization and initialization language. Therefore, XAML can represent more than the features in the WPF platform; it can represent any custom controls, new animations, etc., as well as any .NET object graph. In a way, one might conceive of XAML as code represented as XML6. Separation of Concerns Between the Designer and Developer A byproduct of XAML's expressivity and comprehensiveness is true separation of user interface and business logic. Developers can work with XAML files created by designers with no loss of fidelity and no corruption of those artifacts; at the same time designers are given the power to create user interfaces, behaviors, animations, and even wire basic bindings between UI and data.


Roles and Workflow








In the "old way," designers created mock-ups of the software, requiring developers to re-implement that v
ision, an inherently "lossy" process. In the “new way," XAML is the Collaboration between designers and developers.

No comments: