Book Image

Visual Studio 2012 and .NET 4.5 Expert Development Cookbook

By : Abhishek Sur
Book Image

Visual Studio 2012 and .NET 4.5 Expert Development Cookbook

By: Abhishek Sur

Overview of this book

<p>Working with a varied set of upcoming technologies is a challenge. Visual Studio 2012 is all about enabling you to develop and manage these consumer-focused and business-focused apps. It provides best-in-class tools that propel developers to create new apps or evolve existing ones, and it enables individuals and teams to deliver continuous value and agility. In conjunction, .NET 4.5 provides expansive capabilities for developers to work on all forms of apps and services, from client to mobile to web to cloud, enabling them to get to the market fast. This book shows you exactly how to do this, and much more. It focuses on giving expertise on upcoming technologies through complete architectural insights of .NET infrastructure and hands on examples.<br /><br />"Visual Studio 2012 and .NET 4.5 Expert Development Cookbook" is a step-by-step practical guide that teaches you how to work with new changes on technology under .NET. It provides in-depth analysis and expert advice on various elements of .NET, applying them in code using detailed practical examples. The book provides solutions to common development problems and helps you adapt to the latest technologies and get to grips with modern app development for the .NET 4.5 platform.<br /><br />This cookbook gets you startedon Visual Studio 2012 IDE and its various tooling capabilities. It provides expert knowledge on .NET infrastructure, internals of assemblies, and a basic introduction of Intermediate language. Common C# concepts and ideas are demonstrated through an example-driven approach.<br /><br />The recipes provide an overall view of ASP.NET Web applications and introduce the new performance boosters in .NET 4.5. It also gives a basic introduction to HTML 5 and JQuery library to enhance Web applications. It provides a complete introduction to Client applications using WPF and MVVM patterns and looks at some of the major enhancements on WPF 4.5. It shows you how to write applications for Windows 8 and provides expert advice on how to write applications in WinRT, either using XAML and C# or HTML/JavaScript. <br /><br />"Visual Studio 2012 and .NET 4.5 Expert Development Cookbook" gives you better understanding of&nbsp; overall .NET infrastructure using the latest technology updates, providing a broad guide for a basic developer to become an expert on .NET.</p>
Table of Contents (15 chapters)
Visual Studio 2012 and .NET 4.5 Expert Development Cookbook
Credits
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Moving through the last few decades, from being the new kid on the block, .NET has turned itself into the most talked about young thing on the IT horizon. More and more people are getting inclined to use .NET, to make a mark in their career and also, more and more, clients are coming to .NET to accomplish their dreams. The recent buzz about C# being the best programming language has now made the world of developers very eager to build .NET applications. As the crowd is growing in the developers arena, there is always a need to have a clear perception on how things work and ways to make things better.

Visual Studio 2012 and .NET 4.5 Expert Development Cookbook mainly focuses on things that you need to know in those crunch situations as a developer. It also tries to feed you with as much details as it can, and covers as much technological domain in the world of .NET. The book is written in the form of recipes with step-by-step tutorials on every topic where the developer accompanies the author in this wonderful journey into the known and hitherto unknown realms of .NET. The recipes in the book, which are mostly sought out by developers on the Internet, are chosen in such a way so as to practically demonstrate them and not restrict developers only to them, but to also expose the other unexplored domains on the same topic to give them a clear view of the whole picture. There is a special section for each recipes bearing the heading There's more…, which always focuses on giving you extra knowledge on things that you might have missed without it. By the time you come to the end of this journey, you will feel the comfort and enjoy the confidence that a clear understanding of the insight of .NET gives you.

The book is a practical handbook that could give you optimal utilization of time for knowledge. It separately presents the topics very precisely and elaborates the same which you can rely on for a deeper look. It explains the recipes with proper sample code blocks that might make the usage of each topic very clear and make you utilize the final source code while writing your real-world applications. The examples taken for this book will clear your understanding of how things exactly work for that particular recipe and also adapt you as a developer to make use of the same source code in your production environment efficiently and quickly. If you want to utilize your busy schedule to explore all the necessary ongoing technology in the market, this book is best suited for you.

The book focuses on giving you:

  • Maximum utilization of time for learning

  • Major insights into ongoing technologies such as Visual Studio 2012, .NET 4.5, ASP.NET, Windows 8 Applications, Windows Presentation Foundation, HTML5, jQuery, memory management, and so on

  • Practical examples on procedures to create real-world applications

  • Step-by-step examples to create simple applications based on heads

What this book covers

Chapter 1, Introduction to Visual Studio IDE Features, starts with a basic introduction to Visual Studio IDE and gives the developer insights into how to increase productivity of development using a common set of tools and features present inside the IDE.

Chapter 2, Basics of .NET Programs and Memory Management, introduces the intersection of a .NET program and its core components. It dives deep in demonstrating the .NET infrastructure with detailed explanation of memory management and related techniques.

Chapter 3, Asynchronous Programming in .NET, focuses on introducing all existing techniques to deal with threading in .NET followed by the newer patterns that takes over the existing working principles with in-depth explanation on their working principles.

Chapter 4, Enhancements to ASP.NET, gives you an introduction to latest enhancements of ASP.NET 4.5 with HTML5 and jQuery. It also introduces some of the performance boosters available in .NET 4.5 and Visual Studio 2012 with ASP.NET.

Chapter 5, Enhancements to WPF, introduces the enhancements to WPF 4.5 and the major components of WPF. It gives a practical implementation of MVVM based WPF application covering all the facets required to program in WPF environment.

Chapter 6, Building Touch-sensitive Device Applications in Windows 8, introduces the new programming model for developing Windows 8 style tiles application. It gives a step-by-step introduction in how to program using HTML5 and JavaScript as well as WPF and C# for developing Windows 8 applications.

Chapter 7, Communication and Sharing Using Windows 8, focuses on how to implement network-enabled applications in Windows 8 with step by step implementation on how sharing and searching works inside the Windows 8 environment.

Appendix, .NET languages and its Construct, focuses on giving insights on how languages work in the .NET framework and C# with details explanation with examples of various features of C# language.

You can download this Appendix from http://www.packtpub.com/sites/default/files/downloads/6709EN_Appendix_NET_Languages_and_its_Construct.pdf

What you need for this book

The basic software requirements for this book are as follows:

  • Microsoft .NET Framework 4.5 and higher

  • Microsoft Visual Studio 2012 Express or higher editions

  • Windows 8 Operating System (especially to work with Chapter 6 and 7)

  • Latest web browsers

Who this book is for

The purpose of this book is to give you ready made steps in the form of recipes to develop common tasks that, as a developer, you might often be required to access. The book utilizes its chapters skillfully to provide as much information as it can and also with as much detail as necessary to kick start the subject. The book also delivers in-depth analysis of some advanced section of the subject to get you to expertise level. If you are a starter in the development environment and want to get expertise on ongoing technologies in the market, this book is ideal for you. Even for architects and project managers, the book can be a guide to enrich their existing knowledge.

The book uses C# and Visual Studio 2012 with Windows 8 (as the operating system) in the examples. Even though the book does not require any knowledge to start, it expects some basic theoretical and practical overall experience on the subjects to understand the recipes. The book bridges the gap between a normal developer to an expert architect.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The requestValidationMode attribute of httpRuntime defines how the request is validated to the server before calling HttpPipeline."

A block of code is set as follows:

(function($){
  $.fn.extend({
    Value1 : 20,
    myMethod : function(msg){
      alert(msg + "value : " + this.Value1);
    }
  });
})(JQuery);

Any command-line input or output is written as follows:

Install-Package Microsoft.Web.Optimization

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "you can also open Nuget package manager by right-clicking on the references folder of the project and select Add Library Package Reference".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it. You can also contact the author directly at to address any technical problems while covering the recipes.