.NET 4 for Enterprise Architects and Developers
eBook - ePub

.NET 4 for Enterprise Architects and Developers

  1. 448 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

.NET 4 for Enterprise Architects and Developers

About this book

Presenting cutting-edge insights from industry practitioners, .NET 4 for Enterprise Architects and Developers supplies in-depth coverage of the various server-side features of Microsoft.NET Framework 4 that can be leveraged in Enterprise Application development. It provides a fundamental understanding of the technical aspects of implementation and

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access .NET 4 for Enterprise Architects and Developers by Sudhanshu Hate,Suchi Paharia in PDF and/or ePUB format, as well as other popular books in Computer Science & Information Technology. We have over one million books available in our catalogue for you to explore.

Chapter 1

.NET 4 Core Framework

Contents

1.1 Introduction
1.2 .NET Evolution
1.3 Common Language Runtime (CLR)
1.3.1 Managed Code
1.3.2 Assembly
1.3.3 Interoperability
1.4 Base Class Library (BCL)
1.4.1 Core
1.4.1.1 Collections (System.Collections.*)
1.4.1.2 Memory-Mapped Files (System.IO.MemoryMappedFiles)
1.4.1.3 Task Parallel Library (System.Threading.Tasks)
1.4.1.4 Managed Extensibility Framework (MEF)
1.4.1.5 XAML (System.Xaml)
1.4.2 User Interfaces
1.4.2.1 Windows Forms (System.Windows)
1.4.2.2 Windows Presentation Foundation (WPF) (System.Windows)
1.4.2.3 ASP.NET (System.Web)
1.4.2.4 Silverlight
1.4.3 Workflow and Services
1.4.3.1 Windows Communication Foundation (WCF) (System.ServiceModel)
1.4.3.2 Windows Workflow Foundation (WF) (System.Activities)
1.4.3.3 WCF Data Services (System.Data.Services)
1.4.4 Data Access
1.4.4.1 ADO.NET (System.Data)
1.4.4.2 LINQ to SQL (System.Data.Linq)
1.4.4.3 Entity Framework (System.Data.EntityClient)
1.5 CLR Improvements
1.5.1 In-Process Side-By-Side Execution
1.5.1.1 In Practice
1.5.1.2 Summary
1.5.2 Garbage Collection (GC)
1.5.2.1 Generations
1.5.2.2 Memory Cleanup
1.5.2.3 Workstation GC
1.5.2.4 Server GC
1.5.2.5 When to Use What?
1.5.2.6 How to Deal with Unmanaged Objects?
1.5.3 Security
1.5.3.1 Key Security Concepts
1.5.3.2 Transparency Model in CLR 4
1.5.3.3 Allowing Partial Trusted Callers (APTCA)
1.5.3.4 Sandboxing
1.5.3.5 Security Tools
1.5.3.6 Operating System Security
1.5.3.7 Cryptography
1.5.3.8 ASP.NET Web Application Security
1.5.4 Exception Management
1.5.5 Globalization
1.5.6 CPU, Memory Diagnostics
1.6 Summary
References

1.1 Introduction

Microsoft released .NET Framework version v1.0 in 2002, and since then, it has evolved significantly to cater to the needs of the enterprise bespoke application landscape by continuously improving developer productivity. The improvement has been along various dimensions such as introduction of new features, performance, productivity enhancements, security aspects, and application programming interfaces (APIs). Microsoft .NET Framework can be used to develop, deploy, and execute any thick, thin, distributed, service-oriented, smart client, or device applications in an enterprise. Microsoft .NET applications can be built using Microsoft Visual Studio, which provides a development environment for various .NET languages such as VB.NET, C#, etc.

1.2 .NET Evolution

Microsoft .NET Framework at its core consists of Common Language Runtime (CLR) and Base Class Library (BCL):
.NET 1.0 provided a framework for building windows and Web applications.
.NET 1.1 brought in improvements in CLR and base class library.
.NET 3.0 introduced WCF, WF, WPF, and WCS as the programming models for services, workflows, and presentation foundation and Identity management, respectively.
.NET 3.5 added LINQ, AJAX, and REST capability.
With .NET 4, there is a new efficient CLR (CLR 4) and significant additions in Base Class Library.
images
Figure 1.1 .NET evolution.
It is important to note that the core CLR version remained the same, that is, CLR 2.0 from .NET 2 to .NET 3.5 (Figure 1.1).

1.3 Common Language Runtime (CLR)

CLR is a layer between the operating system and CLR languages. On compilation of .NET programs, the compiler generates the Microsoft Intermediate Language Instructions (MSIL). At runtime, using JIT (just in time), CLR translates this MSIL to machine- and operating-system-specific instructions called native code and then executes the same. The native instructions are compiled and then executed at runtime and not interpreted, which helps achieve good performance. CLR provides the runtime execution environment to the .NET program. Apart from providing a runtime execution environment, it performs several critical program execution functions such as code management, memory management, thread management, exception management, type safety, code access security, etc. Let us look at some of the important aspects of CLR (Figure 1.2).
images
Figure 1.2 Code execution.

1.3.1 Managed Code

The code that can execute from within CLR is called managed code, while the code which cannot execute from within CLR is referred to as unmanaged code.
C# and VB.NET programming languages are written to target CLR and are referred to as managed languages, whereas languages such as C and C++ were not written to target CLR and are referred to as native programming languages. However, as late as in 2005, Microsoft introduced Visual C++ .NET to target CLR.

1.3.2 Assembly

Assemblies form a primary part of the .NET code. An assembly refers to a .NET EXE or DLL file that is compiled using any .NET compiler. Assemblies store the code that is executed by the CLR in the form of MSIL. Along with this executable code, assemblies also store the metadata. Metadata gets generated by language compilers which is also part of managed code. Metadata contains descriptions for code references, types, and members of the assembly. Metadata is used to load classes, generate native code, and implement security at runtime. Metadata is stored in the assembly manifest, which also contains the details of the security permissions granted to the assembly.

1.3.3 Interoperability

Managed languages are interoperable among themselves in the sense that the assemblies written in C# can be used in a VB.NET program and vice versa; this is because, to a large extent, all the managed languages follow Common Language Specification (CLS). Managed languages can call the unmanaged COM components by having a .NET wrapper on existing COM components, also called Runtime Callable Wrapper (RCW). Similarly .NET code can be accessed from COM components using COM Callable Wrapper (CCW).

1.4 Base Class Library (BCL)

BCL is a core class library that sits on top of CLR. It has a rich collection of application programming interfaces (APIs) organized by namespaces, which can be used to build various components or application parts such as user interfaces, services, workflows, and data access functionality for command line, Windows, service-oriented, or Web applications. Some of the key additions in Microsoft .NET Framework 4 BCL include Task Parallel Libra...

Table of contents

  1. Cover
  2. Half Title
  3. Title Page
  4. Copyright Page
  5. Dedication
  6. Table of Contents
  7. Foreword
  8. Preface
  9. The Authors
  10. Acknowledgments
  11. 1 .NET 4 Core Framework
  12. 2 BCL 4 New Features
  13. 3 DLR, F#, and C# 4 New Features
  14. 4 Windows Communication Foundation (WCF) 4
  15. 5 Windows Workflow Foundation (WF)
  16. 6 Windows Server AppFabric
  17. 7 ADO.NET Entity Framework 4
  18. 8 WCF Data Services 4
  19. Index