1. Trang chủ
  2. » Công Nghệ Thông Tin

visual studio 2012 and .net 4.5 expert development cookbook

380 889 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 380
Dung lượng 5,45 MB

Nội dung

www.it-ebooks.info Visual Studio 2012 and .NET 4.5 Expert Development Cookbook Over 40 recipes for successfully mixing the powerful capabilities of .NET 4.5 and Visual Studio 2012 Abhishek Sur PUBLISHING professional expertise distilled BIRMINGHAM - MUMBAI www.it-ebooks.info Visual Studio 2012 and .NET 4.5 Expert Development Cookbook Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: April 2013 Production Reference: 1050413 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84968-670-9 www.packtpub.com Cover Image by Siddhart Ravishankar (sidd.ravishankar@gmail.com) www.it-ebooks.info Credits Author Abhishek Sur Reviewers Carlos Hulot Ahmed Ilyas Sergiy Suchok Ken Tucker Acquisition Editor Kartikey Pandey Lead Technical Editor Susmita Panda Technical Editors Jalasha D'costa Amit Ramadas Project Coordinator Anish Ramchandani Proofreader Claire Cresswell-Lane Indexer Tejal Soni Graphics Aditi Gajjar Production Coordinator Aparna Bhagat Cover Work Aparna Bhagat www.it-ebooks.info About the Authors Abhishek Sur is a Microsoft MVP in Client App Dev since 2011. He is an architect in the .NET platform. He has profound theoretical insight and years of hands on experience in different .NET products and languages. Over the years, he has helped developers throughout the world with his experience and knowledge. He owns a Microsoft User Group in Kolkata named KolkataGeeks, and regularly organizes events and seminars in various places for spreading .NET awareness. A renowned public speaker, voracious reader, and technology buff, his main interest lies in exploring the new realms of .NET technology and coming up with priceless write-ups on the unexplored domains of .NET. He is associated with the Microsoft Insider list on WPF and C#, and is in constant touch with product group teams. He holds a Masters degree in Computers along with various other certicates to his credit. On the web, Abhishek is a freelance content producer, developer, and a site administrator. His website abhisheksur.com guides both budding and experienced developers to understand the details of languages and latest technology. He enjoys a huge fan following on social networks. You can reach him at books@abhisheksur.com, or get online updates from Facebook or Twitter @abhi2434. www.it-ebooks.info Acknowledgement Writing this book would not have been possible without the help of many people. Knowledge is a priceless alternative of time. While writing this book, I have spent a considerable amount of time in reading a lot of online journals, documentations, and blogs to explain and present concepts and ideas in a more lucid way. First of all, I am extremely thankful to the entire Packt Publishing team for their continuous help. I would like to thank Anish Ramchandani and Susmita Panda, who have been very supportive and helped me to meet the deadlines. My most sincere thanks to my reviewers Carlos Hulot, Ahmed Illyas, Sergiy Suchok, and Ken Tucker for reviewing every line I wrote for this book, which resulted in bringing so many positive changes in this book. Last but not the least, a lot of thanks to Amit Ramadas and Jalasha D'costa for editing the chapters of this book. I would also like to thank my colleague cum friends Shibatosh, Ranjit, Pallab, Ayan, Malini, and other members of our group for their continuous support and motivation to write this book. I am also thankful for being in touch with Mr. Raj Goswami, CEO and Mr. D. K Goswami, Director of BuildFusion, India. I would also like to extend my sincere thanks to Anoop Madhusudan, Abhijit Jana, Kunal Chowdhury, Dhananjay Kumar, Karthikayan Anabarasan, Lohith, Abhishek Kant, and Shivprasad Koirala for their continuous help and motivation. I would also like to acknowledge my ancée Riya for helping me and motivating me to write better. I want to dedicate this book to her. Being a community lover I used to write a lot of blogs and articles, but this is the rst time I am putting my experience and efforts in the form of a book. I am really thankful to all my readers and followers all over the world who loved my blogs and hopefully they will love this book too. www.it-ebooks.info About the Reviewers Carlos Hulot has been working in the IT area for more than 20 years in different capabilities, from software development, project management to IT marketing product development and management. Carlos has worked for multinational companies like Royal Philips Electronics, PricewaterhouseCoopers, and Microsoft. Currently, Carlos is working as an independent IT consultant. Carlos is a Computer Science lecturer at two Brazilian universities. Carlos holds a Ph.D in Computer Science and Electronics from the University of Southampton, UK, and a B.Sc. in Physics from the University of São Paulo, Brazil. Ahmed Ilyas has a bachelor's degree in engineering from Napier University in Edinburgh, Scotland, and has majored in software development. He has 15 years of professional experience in software development. After leaving Microsoft, he ventured into setting up his consultancy company offering the best possible solutions for a magnitude of industries and providing real-world answers to problems. They only use the Microsoft stack to build these technologies, to be able to bring in best practice, patterns, and software to their client base. Thus, enabling long term stability and compliance in the ever changing software industry and also improving software developers around the globe—pushing the limits in technology as well as develop themselves to become better. This went on to being awarded the MVP in C# three times by Microsoft for providing excellence and independent real-world solutions to problems that developers face. With the breadth and depth of knowledge he as obtained not only from his research but also with the valuable wealth of information and research at Microsoft, the motivation and inspirations come from this, with 90 percent of the world using at least one form of Microsoft technology. www.it-ebooks.info Ahmed Ilyas has worked for a number of clients and employers. With the great reputation that he has, this has resulted in having a large client base for his consultancy company, Sandler Ltd (UK) which includes clients from different industries from, media to medical and beyond. Some clients have included him on their "approved contractors/consultants" list, which include ICS Solution Ltd and he has been placed on their "DreamTeam" portal and also CODE Consulting/EPS Software (www.codemag.com, based in the US). Ahmed Ilyas has also been involved, in the past, in reviewing books for Packt Publishing and wishes to thank them for the opportunity once again. I would like to thank the author/publisher of this book for giving me the great honor and privilege in reviewing the book. I would also like to thank my client base and especially Microsoft Corporation and my colleagues over there for enabling me to become a reputable leader as a software developer in the industry, which is my passion. Sergiy Suchok graduated in 2004 with honors from the Faculty of Cybernetics, Taras Shevchenko National University of Kyiv (Ukraine), and has since then been keen on information technology. He currently works in the banking area and has a PhD in Economics. Sergiy is the coauthor of more than 45 articles and has participated in more than 20 scientic and practical conferences devoted to economic and mathematical modeling. He is a member of the New Atlantis Youth Public Organization ( newatlantida.org.ua) and devotes his leisure time to environmental protection issues, historical, and patriotic development and popularization of a grateful attitude towards the Earth. He also writes poetry and short stories and makes macramé. I would like to thank my wife and my young daughter for their patience and understanding while reviewing. Ken Tucker is a web developer for Sea World, and has been a Microsoft MVP since October 2003. In his spare time he enjoys writing Windows Phone and Windows Store apps. www.it-ebooks.info www.PacktPub.com Support les, eBooks, discount offers and more You might want to visit www.PacktPub.com for support les and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub les available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print and bookmark content f On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Instant Updates on New Packt Books Get notied! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page. www.it-ebooks.info Table of Contents Preface 1 Chapter 1: Introduction to Visual Studio IDE Features 7 Introduction 7 Identifying the various components of Visual Studio IDE 8 Working with Solution Explorer and Class View 14 Working with the main workspace area of IDE 18 Navigating between code inside the IDE 22 Extending Visual Studio templates 29 Using Code Snippets in Visual Studio 39 Using Smart Tags and Refactor in Visual Studio 45 Chapter 2: Basics of .NET Programs and Memory Management 51 Introduction 52 Inspecting the internal structure of a .NET assembly 53 Working with different types of assemblies 60 Inspecting the major components of a .NET program 70 How to work with custom congurations for an application 75 How to disassemble an assembly 81 Securing your code from reverse engineering by using obfuscation 89 Understanding .NET garbage collection and memory management 96 How to nd memory leaks in a .NET program 104 Solutions to 10 common mistakes made by developers while writing code 115 Chapter 3: Asynchronous Programming in .NET 123 Introduction 123 Introduction to Threading and Asynchronous Threading patterns 125 Working with Event-based asynchronous pattern and BackgroundWorker 135 Working with thread locking and synchronization 139 Lock statement using task-based parallelism in concurrent programming 147 www.it-ebooks.info [...]... statically-typed model binding in ASP.NET applications 185 Introduction to HTML5 and CSS3 in ASP.NET applications 189 Working with jQuery in Visual Studio with ASP.NET 205 Working with task-based asynchronous HttpHandlers and HttpModules 211 New enhancements to various Visual Studio editors 214 Introduction 223 Getting started with WPF and its major enhancements in NET 4.5 226 Building applications using... 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... sometime, but the new Visual Studio had been redesigned totally and released as Visual Studio 7.0 to support NET languages Evolution of Visual Studio As time progressed, Microsoft released newer versions of Visual Studio with additional benefits and enhancements Visual Studio being a plugin host to host number of services as plugins, has evolved considerably with a lot of tools and extensions available;... developer In this recipe, we will try to get our hands on to various Visual Studio IDE features to get started with using Visual Studio 8 www.it-ebooks.info Chapter 1 Getting ready Before we start using Visual Studio, we need to first make a choice on which version practically suits us Let's have a look at the features of all the versions of Visual Studio ff Visual Studio Express: If you are looking to try... 2012 IDE and will show you where to start 1 To start with the recipe, let us navigate to the Start menu | All Programs, choose the Visual Studio 2012 folder and select Visual Studio 2012 This will launch the Visual Studio IDE 9 www.it-ebooks.info Introduction to Visual Studio IDE Features 2 After displaying the initial splash screen for a while when the IDE has been loaded, it presents you with a Start... options to handle Visual Studio better Let's try to look into other options that can be good to eye on Visual Studio command switches Visual Studio being a normal executable that runs under Windows also provides some switches that can be used when we open the IDE To use Visual Studio with these switches, we need to either use command prompt or use Run to add switches to the IDE To use command prompt, just... large number of files and loaded in the IDE 21 www.it-ebooks.info Introduction to Visual Studio IDE Features Navigating between code inside the IDE Visual Studio comes with a number of useful code navigators; most of them are pretty useful and handy First of all let us try the Code Highlighting feature in Visual Studio How to do it… To try the Code Highlighting feature in Visual Studio, perform the following:... of Visual Studio In this chapter, we will tour Visual Studio IDE features, its utilities, and mostly cover parts that can really help to make your work done more quickly Identifying the various components of Visual Studio IDE Visual Studio 2012 has come up with lots of new enhancements and features Some of these features widely enhance productivity of development Knowing your IDE better is always an... 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... IDE for the first time, the IDE will present you few options and ask you what type of development you want to take In most cases, I would recommend you to choose General Development, as this is the most convenient layout of Visual Studio How to do it… In this recipe, we will understand the different sections of the Visual Studio 2012 IDE and will show you where to start 1 To start with the recipe, . www.it-ebooks.info Visual Studio 2012 and .NET 4. 5 Expert Development Cookbook Over 40 recipes for successfully mixing the powerful capabilities of .NET 4. 5 and Visual Studio 2012 Abhishek Sur . 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,. Visual Studio templates 29 Using Code Snippets in Visual Studio 39 Using Smart Tags and Refactor in Visual Studio 45 Chapter 2: Basics of .NET Programs and Memory Management 51 Introduction 52 Inspecting

Ngày đăng: 01/08/2014, 16:21

TỪ KHÓA LIÊN QUAN