• Complain

James Buddy. - Pro XAML with C#: Application Development Strategies

Here you can read online James Buddy. - Pro XAML with C#: Application Development Strategies full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Berkeley;CA Apress Imprint, year: 2015, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

James Buddy. Pro XAML with C#: Application Development Strategies
  • Book:
    Pro XAML with C#: Application Development Strategies
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2015
  • City:
    Berkeley;CA Apress Imprint
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Pro XAML with C#: Application Development Strategies: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Pro XAML with C#: Application Development Strategies" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Chapter 6: Advanced Unit Testing and Test-Driven Development; Test Fixtures Are Classes Too; Use Inheritance to Avoid Duplicate Code; Unit Testing Classes That Have Dependencies; Dealing with Dependencies; Repository Pattern; Stubs; Mock Objects; Using the Moq Framework; Using the Mock Class to Set Up Your Dependencies; Create an Instance of the Mock Class; Set Up the Behavior of the Mock Dependency Object; A Complete Example; Design by Testing: Test-Driven Development; ; Step 1: All Unit Tests Should Fail on the First Test Run.;Pro XAML with C#: Application Development Strategies is your guide to real-world development practices on Microsofts XAML-based platforms, with examples in WPF, Windows 8.1, and Windows Phone 8.1. Learn how to properly plan and architect an application on one or more of these platforms for a robust, scalable solution. In Part I, authors Buddy James and Lori Lalonde introduce you to XAML and reveal proven techniques for developing successful line-of-business applications. Youll also find out about some of the conflicting needs and interests that you might encounter as an enterprise XAML developer. Part II begins to lay the groundwork to help you properly architect your application, providing you with a deeper understanding of domain-driven design and the Model-View-ViewModel design pattern. You will also learn about proper exception handling and logging techniques, and how to cover your code with unit tests to reduce bugs and validate your design. Part III explores implementation and deployment details for each of Microsofts XAML UIs, along with advice on deploying and maintaining your application across different devices using version control repositori es and continuous integration. Pro XAML with C#: Application Development Strategies is for intermediate to experienced developers looking to improve their professional practice. Readers should have experience working with C# and at least one XAML-based technology (WPF, Silverlight, Windows Store, or Windows Phone).;At a Glance; Contents; About the Authors; About the Technical Reviewer; Acknowledgments; Introduction; Part I: Getting Started ; Chapter 1: What Is XAML?; A Brief History of Windows User Interface Design; Extensible Application Markup Language; Separation of User Interface Concerns; Declarative vs. Imperative Programming; To Code-Behind or Not to Code-Behind?; The MVVM Design Pattern; Basic MVVM Implementation in WPF; Summary; Chapter 2: Software Craftsmanship; Software as an Art and a Science; SOLID Object-Oriented Design ; To Unit Test or Not to Unit Test?

James Buddy.: author's other books


Who wrote Pro XAML with C#: Application Development Strategies? Find out the surname, the name of the author of the book and a list of all author's works by series.

Pro XAML with C#: Application Development Strategies — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Pro XAML with C#: Application Development Strategies" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Part I
Getting Started
Buddy James and Lori Lalonde 2015
Buddy James and Lori Lalonde Pro XAML with C# 10.1007/978-1-4302-6775-1_1
1. What Is XAML?
Buddy James 1 and Lori Lalonde 1
(1)
TN, US
This chapter is a crash course in Extensible Application Markup Language (XAML). If you are experienced in writing applications using XAML-based technologies, feel free to skim the chapter and pick the parts that interest you. If you dont have experience writing XAML-based applications, then this chapter is a prerequisite for the rest of the book.
A Brief History of Windows User Interface Design
Before XAML was introduced to the development community, Windows desktop applications were mainly created using the WinForms technology. The WinForms design paradigm is similar to Visual Basic 6style graphical user interfaces (GUIs) of old. You work within a what-you-see-is-what-you-get (WYSIWYG) interface that allows you to drag controls from a toolbox and drop them on the window.
Visual Studio serialized the user interface in the designer as C# code that contained object declarations for all user interface controls along with property values and other details required to represent the user interface. This meant that if you were working in an environment where the team was made up of designers and developers, collaboration between the two groups was difficult. If a designer wanted to apply a common theme to a user interface, they would often create bitmap mock-ups and divide the mock-ups into smaller bitmaps to be used for each control on the form. These bitmaps would then need to be applied to each control as some property, such as the background. This process was tedious and inefficient. Bitmap-based designs dont scale well, and resizing the controls on a form caused the associated bitmaps to resize, which would often result in degraded image quality. Enter XAML.
Extensible Application Markup Language
XAML (pronounced zammle) is based on Extensible Markup Language (XML) and is for designing user interface layouts. XAML is known as a declarative language . It is almost always used in conjunction with another type of programming language known as an i mperative language , such as C#, VB.NET, C++, and so forth.
XAML-based technologies covered in this book include the following:
  • Windows Presentation Foundation (WPF) : XAML + C# + WPF assemblies
  • Windows 8.1/Windows Store development : XAML + C# + Windows Store assemblies
  • Windows Phone 8.1 : XAML + C# + Windows Phone assemblies
Each of these technologies uses XAML in combination with another .NET programming language, such as C# or VB.NET, to create desktop, tablet, and mobile applications with stunning and unique user interfaces as well as elegant and intuitive user experience designs, which were nearly impossible to achieve prior to the introduction of XAML and WPF in .NET 3.0.
Since XAML is an XML-based declarative markup language, it adds a completely new paradigm to Windows-based user interface (UI) development. XAML is verbose and thus easily read by humans. This is helpful when you need to edit XAML by hand. Moreover, the XML basis of XAML makes it an easy language for which WYSIWYG editors can be created.
I know, I knowright now you are probably thinking, XML may be easy to read, but what about the performance of my application? XML is too verbose! This is true. XML can cause performance problems when parsing; however, the XAML parser will compile your XAML into a binary format called Binary Application Markup Language (BAML) that is used during the execution of your application. BAML drastically reduces the size of your XAML code, and this helps to eliminate the performance problems associated with traditional XML parsing. BAML is tokenized as well so that duplicate references throughout the BAML code can be replaced by much smaller tokens. This in turn makes BAML code even smaller and thus faster during application execution.
Separation of User Interface Concerns
One of the great things about this new user interface design paradigm is the synergy it provides between developers and designers. Unlike technologies of the past, XAML includes code-behind associations, although this is not a requirement. In contrast to WinForms, XAML does not require the designer to create a C# representation of the user interface. XAML is designed to be all that is needed to define the look and feel of your user interface. This aspect of XAML, along with important new features such as data binding, routed events, and attached properties, which well discuss throughout the book, allows XAML-based applications to take advantage of user interface design patterns that allow the complete separation of the user interface design (XAML) and presentation layer logic (C#).
This book will focus on the Model-View-ViewModel (MVVM) design pattern, which will be covered in depth in later chapters. There are other design patterns that you can use with XAML based user interfaces that allow you to separate your user interface design from the presentation layer logic, and you should definitely look into some of them. Table provides references to two other great design patterns that you should explore.
Table 1-1.
User Interface Design Pattern References
Design Pattern Name
Reference URL
Model-View-Controller (MVC)
https://msdn.microsoft.com/en-us/library/ff649643.aspx
Model-View-Presenter (MVP)
https://msdn.microsoft.com/en-us/magazine/cc188690.aspx
Declarative vs. Imperative Programming
In declarative programming, the source code is written in a way that expresses the desired outcome of the code with little or no emphasis on the actual implementation. This leaves the framework to deal with parsing the declarative source code and handling the heavy lifting required to instantiate objects and set properties on the these objects, which are defined in the XAML elements.
Imperative programming is the opposite of declarative programming. If declarative programming can be thought of as declaring what the desired outcome is, imperative programming can be viewed as writing lines of code that represent the instructions of how to achieve the desired outcome.
A great example of a declarative language and an imperative language working together is XAML and C#. Whether you are developing a smart client desktop application using WPF, a Windows Store app for use with tablets such as the Microsoft Surface Pro, or a mobile application using Windows Phone, any of these applications can be developed using a mixture of XAML and C#.
Note
When it comes to the imperative .NET languages, you are not limited to C#. Depending on the target platform, you can use C#, VB.NET, and even F#. A search of the Internet reveals that C# is generally the language of choice when using WPF, Windows Store apps, and Windows Phone 8, so thats the language well use for the code examples throughout this book.
Lets begin by looking at the declarative XAML markup used to define a WPF Window . Listing shows a basic WPF Window with a grid and a button control written declaratively in XAML.
Listing 1-1 . Declarative Source Code Written in XAML
xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation "
xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml "
Title="MainWindow" Height="350" Width="525">
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Pro XAML with C#: Application Development Strategies»

Look at similar books to Pro XAML with C#: Application Development Strategies. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Pro XAML with C#: Application Development Strategies»

Discussion, reviews of the book Pro XAML with C#: Application Development Strategies and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.