O'Reilly logo

Professional Visual Basic® 2010 and .NET 4 by Kent Sharkey, Rob Windsor, Gastón C. Hillar, Jonathan Marbutt, Billy Hollis, Bill Sheldon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Declarative Programming with Visual Basic

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Declarative programming in VB

  • Using XAML to create a window

  • XAML syntax

  • Using XAML to declare a workflow

Declarative programming is the new buzzword for creating applications with .NET. It revolves around the concept that developers should define "what" is needed versus "how" to do it. The borders in many areas are a little unclear, however, and given that declarative programming is at the core of things like Windows Presentation Foundation (WPF), Silverlight, and Workflow Foundation (WF), it is worth discussing in some detail here.

This chapter focuses on using a more declarative way of defining applications. The idea is that you can use a declaration to describe, for example, an element in your user interface, and then compile or include that definition with either a desktop, the Web, or even a version for another operating system.

Visual Basic has some declarative elements, such as the Handles clause and portions of LINQ, but Microsoft introduced a new language format called XAML that specifically targets declarative application development. It is designed around a standard known as the Extensible Application Markup Language (XAML). This standard is pronounced "zamel" (rhymes with camel). It enables you to layer elements, and include elements such as colors and 3-D shapes.

With the introduction of XAML and the integration of XAML with Visual Basic for things like WPF, Silverlight, WF, and over time ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required