Professional Visual Basic 2012 and .NET 4.5 Programming - Bill Sheldon - E-Book

Professional Visual Basic 2012 and .NET 4.5 Programming E-Book

Bill Sheldon

0,0
38,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Explore Visual Basic 2012 and .NET 4.5 with this fully updated resource After a quick review of the of introductory topics of Visual Basic 2012 and .NET 4.5, this book moves quickly into advanced topics such as data access with ADO.NET, security, ASP.NET web programming with Visual Basic, Windows workflow, and threading. You'll explore the essential Visual Basic 2012 functions you need, including .NET features such as LINQ, WCF, and more. Plus, you'll examine exception handling and debugging, Visual Studio features, and deployment. * Puts the new Async keyword and Iterators to work * Explores new options and interfaces presented by Windows 8 development and WinRT * Continues strong coverage of core language elements and tools and creating componentized applications This updated version of Professional Visual Basic 2012 and .NET 4.5 retains its expert author team, including one of the best-known and respected Microsoft Visual Basic MVPs, Bill Sheldon, and Microsoft Regional Director "Software Legend" Billy Hollis.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 1417

Veröffentlichungsjahr: 2012

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Part I: Language Constructs and Environment

Chapter 1: Visual Studio 2012

Visual Studio 2012

Visual Basic Keywords and Syntax

Project ProVB_VS2012

Enhancing a Sample Application

Useful Features of Visual Studio 2012

Summary

Chapter 2: The Common Language Runtime

Framework Profiles and Platforms

Elements of a .NET Application

Cross-Language Integration

IL Disassembler

Memory Management

Namespaces

Creating Your Own Namespaces

The My Keyword

Extending the My Namespace

Summary

Chapter 3: Objects and Visual Basic

Object-Oriented Terminology

Working With Visual Basic Types

Commands: Conditional

Value Types (Structures)

Reference Types (Classes)

Parameter Passing

Working with Objects

Creating Classes

Object-Oriented Concepts

Summary

Chapter 4: Custom Objects

Inheritance

Multiple Interfaces

Abstraction

Encapsulation

Polymorphism

Summary

Chapter 5: Advanced Language Constructs

Preparing the Sample Application

Lambda Expressions

Using Lambda Expressions

Async and Await

Iterators

Summary

Chapter 6: Exception Handling and Debugging

System.Exception

Handling Exceptions

Logging Errors

Summary

Part II: Business Objects and Data Access

Chapter 7: Arrays, Collections, and Generics

Arrays

Collections

Generics

Creating Generics

Summary

Chapter 8: Using XML with Visual Basic

An Introduction to XML

XML Serialization

System.Xml Document Support

LINQ to XML

XSL Transformations

XML in ASP.NET

Summary

Chapter 9: ADO.NET and LINQ

ADO.NET Architecture

Basic ADO.NET Features

.NET Data Providers

The DataSet Component

Working with the Common Provider Model

Connection Pooling in ADO.NET

Transactions and System.Transactions

Summary

Chapter 10: Data Access with the Entity Framework

Object-Relational Mapping

Entity Framework Architecture

Mapping Objects to Entities

Summary

Chapter 11: Services (XML/WCF)

Web Services

The Larger Move to SOA

Building a WCF Service

Building a WCF Consumer

Working with Data Contracts

Namespaces

Summary

Part III: Specialized Topics and Libraries

Chapter 12: XAML Essentials

Features Shared by All XAML Platforms

The XAML Markup Language

The Layout System

Controls and Content

Resources in XAML

Data Binding

Data Templates and ItemControls

Styles

Control Templates

Summary

Chapter 13: Creating XAML Applications for Windows 8

How XAML Differs in Windows 8

Windows 8 UI Conventions

UI/UX Guidelines

New Visual Elements in Windows 8

Changes to the Visual Designer in Visual Studio 2012

Application Templates in Visual Studio 2012

Implementing a Live Tile

Implementing Contracts

Summary

Chapter 14: Applications with ASP.NET, MVC, JavaScript and HTML

Visual Studio Support for ASP.NET

Server-Side Development

Client-Side Web Development

Building Windows 8 Style Apps with HTML and JavaScript

Summary

Chapter 15: Localization

Cultures and Regions

Translating Values and Behaviors

ASP.NET Resource Files

Summary

Chapter 16: Application Services

Using IIS for Application Services

Windows Services

Characteristics of a Windows Service

Interacting with Windows Services

Creating a Windows Service

Creating a Windows Service in Visual Basic

Creating a File Watcher Service

Communicating with the Service

Custom Commands

Passing Strings to a Service

Debugging the Service

Summary

Chapter 17: Assemblies and Reflection

Assemblies

The Manifest

Assemblies and Deployment

Versioning Issues

Basics of Reflection

Dynamic Loading of Assemblies

Summary

Chapter 18: Security in the .NET Framework

Security Concepts and Definitions

Windows Store Projects

The System.Security.Permissions Namespace

Managing Code Access Permission Sets

User Access Control

Defining Your Application UAC Settings

Encryption Basics

Summary

Chapter 19: Parallel Programming Using Tasks and Threads

Launching Parallel Tasks

Transforming Sequential Code to Parallel Code

Parallelizing Loops

Specifying the Desired Degree of Parallelism

Creating and Managing Tasks

Summary

Chapter 20: Deploying XAML Applications via the Window 8 Windows Store

A New Deployment Option for Windows 8 Apps

Getting an Account at the Windows Store

Requirements for Apps in the Windows Store

Working with the Windows Store in Visual Studio 2012

Side-loading for LOB Apps in an Organization

Summary

Introduction

Part I

Language Constructs and Environment

Chapter 1: Visual Studio 2012

Chapter 2: The Common Language Runtime

Chapter 3: Objects and Visual Basic

Chapter 4: Custom Objects

Chapter 5: Advanced Language Constructs

Chapter 6: Exception Handling and Debugging

Chapter 1

Visual Studio 2012

What's in this chapter?

Versions of Visual Studio

An introduction to key Visual Basic terms

Targeting a runtime environment

Creating a baseline Visual Basic Windows Form

Project templates

Project properties—application, compilation, debug

Setting properties

IntelliSense, code expansion, and code snippets

Debugging

The Class Designer

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=9781118314456 on the Download Code tab. The code is in the chapter 1 download and individually named according to the code filenames listed in the chapter.

You can work with Visual Basic without Visual Studio. In practice, however, most Visual Basic developers treat the two as almost inseparable; without a version of Visual Studio, you're forced to work from the command line to create project files by hand, to make calls to the associated compilers, and to manually address the tools necessary to build your application. While Visual Basic supports this at the same level as C#, F#, C++, and other .NET languages, this isn't the typical focus of a Visual Basic professional.

Visual Basic's success rose from its increased productivity in comparison to other languages when building business applications. Visual Studio 2012 increases your productivity and provides assistance in debugging your applications and is the natural tool for Visual Basic developers.

Accordingly this book starts off by introducing you to Visual Studio 2012 and how to build and manage Visual Basic applications. The focus of this chapter is on ensuring that everyone has a core set of knowledge related to tasks like creating and debugging applications in Visual Studio 2012. Visual Studio 2012 is used throughout the book for building solutions. Note while this is the start, don't think of it as an “intro” chapter. This chapter will intro key elements of working with Visual Studio, but will also go beyond that. You may find yourself referencing back to it later for advanced topics that you glossed over your first time through. Visual Studio is a powerful and, at times, complex tool, and you aren't expected to master it on your first read through this chapter.

This chapter provides an overview of many of the capabilities of Visual Studio 2012. The goal is to demonstrate how Visual Studio makes you, as a developer, more productive and successful.

Visual Studio 2012

For those who aren't familiar with the main elements of .NET development there is the common language runtime (CLR), the .NET Framework, the various language compilers and Visual Studio. Each of these plays a role; for example, the CLR—covered in Chapter 2—manages the execution of code on the .NET platform. Thus code can be targeted to run on a specific version of this runtime environment.

The .NET Framework provides a series of classes that developers leverage across implementation languages. This framework or Class Library is versioned and targeted to run on a specific minimum version of the CLR. It is this library along with the language compilers that are referenced by Visual Studio. Visual Studio allows you to build applications that target one or more of the versions of what is generically called .NET.

In some cases the CLR and the .NET Framework will be the same; for example, .NET Framework version 1.0 ran on CLR version 1.0. In other cases just as Visual Basic's compiler is on version 10, the .NET Framework might have a newer version targeting an older version of the CLR.

The same concepts carry into Visual Studio. Visual Studio 2003 was focused on .NET 1.1, while the earlier Visual Studio .NET (2002) was focused on .NET 1.0. Originally, each version of Visual Studio was optimized for a particular version of .NET. Similarly, Visual Studio 2005 was optimized for .NET 2.0, but then along came the exception of the .NET Framework version 3.0. This introduced a new Framework, which was supported by the same version 2.0 of the CLR, but which didn't ship with a new version of Visual Studio.

Fortunately, Microsoft chose to keep Visual Basic and ASP.NET unchanged for the .NET 3.0 Framework release. However, when you looked at the .NET 3.0 Framework elements, such as Windows Presentation Foundation, Windows Communication Foundation, and Windows Workflow Foundation, you found that those items needed to be addressed outside of Visual Studio. Thus, while Visual Studio is separate from Visual Basic, the CLR, and .NET development, in practical terms Visual Studio was tightly coupled to each of these items.

When Visual Studio 2005 was released, Microsoft expanded on the different versions of Visual Studio available for use. Earlier editions of this book actually went into some of the differences between these versions. This edition focuses on using Visual Studio's core features. While some of the project types require Visual Studio Professional, the core features are available in all versions of Visual Studio.

In Visual Studio 2008, Microsoft loosened the framework coupling by providing robust support that allowed the developer to target any of three different versions of the .NET Framework. Visual Studio 2010 continued this, enabling you to target an application to run on .NET 2.0, .NET 3.0,.NET 3.5, or .NET 4.

However, that support didn't mean that Visual Studio 2010 wasn't still tightly coupled to a specific version of each compiler. In fact, the new support for targeting frameworks is designed to support a runtime environment, not a compile-time environment. This is important, because when projects from previous versions of Visual Studio are converted to the Visual Studio 2010 format, they cannot be reopened by a previous version.

The reason for this was that the underlying build engine used by Visual Studio 2010 accepts syntax changes and even language feature changes, but previous versions of Visual Studio do not recognize these new elements of the language. Thus, if you move source code written in Visual Studio 2010 to a previous version of Visual Studio, you face a strong possibility that it would fail to compile. However, Visual Studio 2012 changed this, and it is now possible to open projects associated with older versions of Visual Studio in Visual Studio 2012, work on them, and have someone else continue to work in an older version of Visual Studio.

Multitargeting support continues to ensure that your application will run on a specific version of the framework. Thus, if your organization is not supporting .NET 3.0, .NET 3.5, or .NET 4, you can still use Visual Studio 2012. The compiler generates byte code based on the language syntax, and at its core that byte code is version agnostic. Where you can get in trouble is if you reference one or more classes that aren't part of a given version of the CLR. Visual Studio therefore manages your references when targeting an older version of .NET, allowing you to be reasonably certain that your application will not reference files from one of those other framework versions. Multitargeting is what enables you to safely deploy without requiring your customers to download additional framework components they don't need.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!