Other tools and utilities can be installed from the Extensions and Updates menu option, linked to the Tools menu in the different versions of Visual Studio.. Context As Wikipedia states:
Trang 2Mastering C# and NET
Trang 3Mastering C# and NET Framework
Copyright © 2016 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: December 2016
Trang 5About the Author
Marino Posadas is an independent senior trainer, writer, and consultant in
Microsoft Technologies and Web Standards He is a Microsoft MVP in C#, Visual Studio, and Development Technologies; an MCT, MAP (2013), MCPD, MCTS, MCAD, MCSD, and MCP Additionally, he was the former director for development
in Spain and Portugal for Solid Quality Mentors
He's published 14 books and more than 500 articles on development technologies in several magazines Topics covered in his books range from Clipper and Visual Basic 5.0/6.0 to C #, NET-safe programming, Silverlight 2.0 and 4.0, and Web Standards
The Guide to Programming in HTML5, CSS3 and JavaScript with Visual Studio is his
latest book
He is also a speaker at Microsoft events, having lectured in Spain, Portugal, England, the USA, Costa Rica, and Mexico
You can find him on LinkedIn at https://es.linkedin.com/in/mposadas
His website, http//elavefenix.net, also contains developer's resources and videos, in English and Spanish, interviewing representatives of the Microsoft and Web Standards development world
Trang 6I'd like to thank Denim Pinto, Priyanka Mehta, and Fabio Claudio Ferracchiati from Packt Publishing for their continuous support and confidence while writing this book
Special thanks to some professionals and technology evangelists whose work
inspired different parts of this book, in particular, Mark Russinowich, Scott
Hanselman, Scott Hunter (the "lesser" Scotts), Daniel Roth, Lluis Franco, Luis Ruiz Pavón, Dino Esposito, Miguel Katrib, James Gray, Paul Cotton, Stephen Toub, and Troy Hunt
Also, I would like to remember my MVP lead, Cristina González Herrero, for her continuous encouragement and help, and other people at Microsoft who have always supported my activities My memories go here to Alfonso Rodríguez, David Carmona, David Salgado, José Bonnín, César de la Torre, Andy Gonzalez, and Leon Welicki
My appreciation also goes to my mates at Netmind, Alex and Bernat Palau, Miquel Rodriguez, Israel Zorrilla, and Angel Rayo, for their support in this initiative from the beginning
Trang 7About the Reviewer
Fabio Claudio Ferracchiati is a senior consultant and a senior analyst/
developer using Microsoft technologies He works for React Consulting (www
reactconsulting.it) as Microsoft Dynamics 365 Solution Architect He is a
Microsoft Certified Solution Developer for NET, a Microsoft Certified Application Developer for NET, a Microsoft Certified Professional, and a prolific author
and technical reviewer Over the past 10 years, he's written articles for Italian
and international magazines and coauthored more than 10 books on a variety of computer topics
Trang 8eBooks, discount offers, and more
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files 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 customercare@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
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career
Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser
Trang 10with a special mention to my nephews and nieces: Fernando, Sarah, Ana, Paula, Pablo, Javier, Adrian, Irene, Luis, and Juan.
Trang 12Table of Contents
Preface xi
Trang 13Metadata 21
A quick tip on the execution and memory analysis of an assembly in
Relevant features appearing in versions 4.5x, 4.6, and
Chapter 2: Core Concepts of C# and NET 53
Generics 64
Chapter 3: Advanced Concepts of C# and NET 83
Trang 14Tuples: implementation in C# 93
Tuples 122 Decomposition 124
Lists 137
Trang 15A note on TypeScript's object-oriented syntax 155
Summary 156
Chapter 5: Reflection and Dynamic Programming 157
Interoperability 173
Summary 197
Chapter 6: SQL Database Programming 199
Summary 224
Chapter 7: NoSQL Database Programming 225
Trang 16MongoDB on Windows 233
Deletion 248 Insertion 249
Summary 251
An entire open source sample for you to check: ScriptCS 265
TypeScript 277
Functions 285
Summary 295
Trang 17Chapter 9: Architecture 297
Reports 324
BPMN 2.0 (Business Process Model and Notation) 326
Testing 332
Summary 338
Trang 18Dependency Inversion principle 359
Singleton 365
Summary 379
Chapter 11: Security 381
Prevention 387
Prevention 408
Trang 19A8 – Cross-Site Request Forgery 409
Prevention 410
Summary 445
Trang 22.NET and the C# language have continuously grown in adoption since its release
in early 2001 C#'s main author, Anders Hejlsberg, has lead several groups of
developers in constant growing and improvement, until reaching the current
version, NET 4.6, and the very important NET Core 1.0/1.1, and keeps on going with this work, also linked to the new TypeScript language, which we will also cover
in this book
This book is a journey through the different options and possibilities NET
Framework in general, and C# in particular, provide to developers to build
applications that run on Windows and, as seen in the last chapter, on other platforms and devices
I believe that it can be a reference for programmers wanting to update their
knowledge to the latest versions of this set of technologies, but also for those who, coming from other environments, would like to approach NET and the C# language
to extend their skills and programming toolset
All the main points discussed in here are illustrated with examples, and the
important parts of these demos are explained in detail, so you can easily follow this route
What this book covers
Chapter 1, Inside the CLR, goes through the internal structure of NET, the way
assemblies are built, the tools and resources we have to work with them,
and the way NET integrates with the operating system
Chapter 2, Core Concepts of C# and NET, reviews the foundations of the language,
its main characteristics, and some of the true reasons for the appearance of certain features, such as delegates
Trang 23Chapter 3, Advanced Concepts of C# and NET, starts with version 4.0, viewing some
common practices new to the language and Framework libraries, especially those related to synchronicity, execution threads, and dynamic programming Finally,
we can find many new aspects that appeared in versions 6.0 and 7.0, intended to simplify the way we write code
Chapter 4, Comparing Approaches for Programming, deals with two members of the
.NET language ecosystem: F# and TypeScript (also called functional languages), which are gaining momentum among the programmer's community
Chapter 5, Reflection and Dynamic Programming, covers the ability of a NET program
to examine, introspect, and modify its own structure and behavior, and also how
to interoperate with other programs, such as the Office Suite
Chapter 6, SQL Database Programming, deals with access to databases built according
to the principles of the Relational Model, and in particular to SQL databases It covers Entity Framework 6.0 and gives a brief reminder of ADO.NET
Chapter 7, NoSQL Database Programming, reviews the emerging database paradigm
called NoSQL databases We will use MongoDB, the most popular of its kind, and see how to manage it from C# code
Chapter 8, Open Source Programming, goes through the current state of open source
programming with Microsoft technologies, the open source ecosystem We will review Node.js, Roselyn, and also TypeScript, although with a slightly different point of view
Chapter 9, Architecture, goes through the structure of an application and the tools
available in its construction, such as MSF, good practices, and so on
Chapter 10, Design Patterns, focuses on the quality of the code and its structures in
terms of efficacy, precision, and maintainability It deals with SOLID principles, the Gang of Four patterns, and other proposals
Chapter 11, Security, analyzes the OWASP Top 10 security recommendations from
the point of view of the NET developer
Chapter 12, Performance, deals with common issues that a developer encounters
in relation to an application's performance, and which techniques and tips are commonly suggested in order to obtain flexible, responsive, and well-behaved software, with a special emphasis on web performance
Chapter 13, Advanced Topics, covers interaction with the OS via subclassing and
platform/invoke, system data retrieval through WMI, parallel programming, and an introduction to the new NET Core and ASP.NET Core multiplatform technologies
Trang 24What you need for this book
As this book is dedicated to C# and NET, the main tool to use is Visual Studio However, you can use several versions to follow the majority of the sections in this book
I've used Visual Studio 2015 Ultimate Update 3, but you can also use the free
Community Edition for more than 90% of its contents Other available options are Visual Studio 2015 Express Edition, which is also free, and Visual Studio Code, which is also free and multiplatform
Additionally, a basic installation of SQL Server Express 2014, which is free, is
required together with the SQL Server Management Studio (version 2016 works equally well with the topics covered here)
For the NoSQL part, MongoDB is also required in its basic installation
To debug websites, it's good to have Chrome Canary or Firefox Developer Edition, for they have extended capabilities for developers
Other tools and utilities can be installed from the Extensions and Updates menu option, linked to the Tools menu in the different versions of Visual Studio.
Finally, in some cases, there are tools that you can download from the sites
indicated in this book; although, they're not an absolute requirement for the full comprehension of this book's contents
Who this book is for
This book was written exclusively for NET developers If you're creating C#
applications for your clients, at work or at home, this book will help you develop the skills you need to create modern, powerful, and efficient applications in C#
No knowledge of C# 6/7 or NET 4.6 is needed to follow along—all the latest features are included to help you start writing cross-platform applications immediately You will need to be familiar with Visual Studio, although all the new features in Visual Studio 2015 will also be covered
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information Here are some examples of these styles and an explanation of their meaning
Trang 25Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"We use the ForEach method, which receives an Action delegate argument."
A block of code is set as follows:
static void GenerateStrings()
{
string initialString = "Initial Data-";
for (int i = 0; i < 5000; i++)
New terms and important words are shown in bold Words that you see on the
screen, for example, in menus or dialog boxes, appear in the text like this: "In the
Memory Usage tab, we can take a snapshot of what's going on."
Warnings or important notes appear in a box like this
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 disliked Reader feedback is important for us as it helps us develop titles that you will really get the most out of
To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in 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 at www.packtpub.com/authors
Trang 26Customer 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 this book 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
You can download the code files by following these steps:
1 Log in or register to our website using your e-mail address and password
2 Hover the mouse pointer on the SUPPORT tab at the top.
3 Click on Code Downloads & Errata.
4 Enter the name of the book in the Search box.
5 Select the book for which you're looking to download the code files
6 Choose from the drop-down menu where you purchased this book from
7 Click on Code Download.
You can also download the code files by clicking on the Code Files button on the
book's webpage at the Packt Publishing website This page can be accessed by
entering the book's name in the Search box Please note that you need to be logged
in to your Packt account
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
• WinRAR / 7-Zip for Windows
• Zipeg / iZip / UnRarX for Mac
• 7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-C-Sharp-and-.NET-Framework We also
have other code bundles from our rich catalog of books and videos available
at https://github.com/PacktPublishing/ Check them out!
Trang 27Although 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 could 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 to our website or added
to any list of existing errata under the Errata section of that title
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field The required
information will appear under the Errata section.
Please contact us at copyright@packtpub.com 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
If you have a problem with any aspect of this book, you can contact us at
questions@packtpub.com, and we will do our best to address the problem
Trang 28In short, this chapter covers the following topics:
• A brief, but carefully selected, dictionary of the common terms and concepts utilized in general and NET programming
• A rapid review of goals after the creation of NET and the main architects behind its construction
• Explanations of each of the main parts that compose the CLR, its tools, and how the tools work
• A basic approach to the complexity of algorithms and how to measure it
• A select list of the most outstanding characteristics related to the CLR that appeared in recent versions
Trang 29An annotated reminder of some
important computing terms
Let's check out some important concepts widely used in software construction that show up frequently in NET programming
Context
As Wikipedia states:
In computer science, a task context is the minimal set of data used by a task (which may be a process or thread) that must be saved to allow a task interruption at a
given date, and a continuation of this task at the point it has been interrupted and
at an arbitrary future date.
In other words, context is a term related to the data handled by a thread Such data is conveniently stored and recovered by the system as required
Practical approaches to this concept include HTTP request/response and database scenarios in which the context plays a very important role
The OS multitask execution model
A CPU is able to manage multiple processes in a period of time As we mentioned, this is achieved by saving and restoring (in an extremely fast manner) the context of execution with a technique called context switch
When a thread ceases to execute, it is said to be in the Idle state This categorization
might be useful at the time of analyzing processes execution with the tools that are
able to isolate threads in the Idle state:
Trang 30Process P0 Operating System Process P1
Executing Interrupt or system call
Save state into PCB0
Reload state from PCB1
Save state into PCB1
Reload state from PCB0
Context types
In some languages, such as C#, we also find the concept of safe or secure context In
a way, this relates to the so-called thread safety
Thread safety
A piece of code is said to be thread-safe if it only manipulates shared data structures
in a manner that guarantees safe execution by multiple threads at the same time There are various strategies used in order to create thread-safe data structures, and the NET framework is very careful about this concept and its implementations
Actually, most of the MSDN (the official documentation) includes the indication this
type is thread-safe at the bottom for those to whom it is applicable (a vast majority).
Trang 31The state of a computer program is a technical term for all the stored information, at
a given instant in time, to which the program has access The output of a computer program at any time is completely determined by its current inputs and its state A very important variant of this concept is the program's state
In addition, a common taxonomy of programming languages establishes two
categories: imperative and declarative programming C# or Java are examples of the former, and HTML is a typical declarative syntax (since it's not a language itself) Well, in declarative programming, sentences tend to change the state of the program while using the declarative paradigm, languages indicate only the desired result, with no specifications about how the engine will manage to obtain the results
Serialization
Serialization is the process of translating data structures or the object state into a format that can be stored (for example, in a file or a memory buffer) or transmitted across a network connection and reconstructed later in the same or another computer environment
Trang 32So, we used to say that serializing an object means to convert its state into a byte stream in such a way that the byte stream can be converted back into a copy of the object Popular text formats emerged years ago and are now well known and accepted, such as XML and JSON, independently of other previous formats (binary included):
DeserializationSerialization
The OS fragments operations among several functional units This is done by
allocating different memory areas for each unit in execution It's important to
distinguish between processes and threads
Each process is given a set of resources by the OS, which—in Windows—means that a process will have its own virtual address space allocated and managed
accordingly When Windows initializes a process, it is actually establishing a context
of execution, which implies a process environment block, also known as PEB and a data structure However, let's make this clear: the OS doesn't execute processes; it only establishes the execution context
Trang 33A thread is the functional (or working) unit of a process And that is what the OS executes Thus, a single process might have several threads of execution, which is something that happens very often Each thread has its own address space within the resources previously allocated by the creation of the process These resources are shared by all threads linked to the process:
A process with two threads of execution, running on a single processor
Process
Thread #2 Thread #1
as memory and data
Different processes do not share these resources In particular, the threads of a process share its instructions (the executable code) and its context (the values of its variables at any given moment)
Programming languages such as NET languages, Java, or Python expose threading
to the developer while abstracting the platform-specific differences in threading implementations at runtime
Note that communication between threads is possible through the common set of resources initialized by the process creation
Of course, there is much more written about these two concepts, which go far beyond the scope of this book (refer to Wikipedia, https://en.wikipedia.org/wiki/
Thread_(computing), for more details), but the system provides us with mechanisms
to check the execution of any process and also check what the threads in execution are
Trang 34If you are curious about it or just need to check whether something is going wrong, there are two main tools that I recommend: the Task Manager (included in the operating system, which you'll probably know), and—even better—one of the tools designed by the distinguished engineer and technical fellow Mark Russinowitch, available for free and composed of a set of more than 50 utilities.
Some have a Windows interface and others are console utilities, but all of them are highly optimized and configurable to monitoring and controlling the inner aspects
of our operating system at any moment They are available for free at https://technet.microsoft.com/en-us/sysinternals/bb545021.aspx
If you don't want to install anything else, open Task Manager (just right-click on the task bar to access it) and select the Details tab You will see a more detailed
description of every process, the amount of CPU used by each process, the
memory allocated for each process, and so on You can even right-click on one of the processes and see how there is a context menu that offers a few possibilities, including launching a new dialog window that shows some properties related to it:
Trang 35If you really want to know how a process behaves in its entirety, the tools to use are SysInternals If you go to the link indicated earlier, you'll see an item menu especially dedicated to process utilities There, you have several choices to work with, but the
most comprehensive are Process Explorer and Process Monitor.
Process Explorer and Process Monitor don't require installation (they're written in
C++), so you can execute them directly from any device for a Windows platform
For example, if you run Process Explorer, you'll see a fully detailed window showing
every single detail of all the processes currently active in the system
With Process Explorer, you can find out what files, registry keys, and other objects
processes have opened, together with the DLLs they have loaded, who owns each process, and so on Every thread is visible and the tool provides you with detailed information, available through a very intuitive user interface:
Trang 36It's also very useful to check the system's general behavior at real time, since it creates graphics of activities of CPU usage, I/O, Memory, among others, as shown
in the following screenshot:
In a similar way, Process Monitor, focuses on monitoring the filesystem, the
Registry, and all processes and threads with their activities in real time, since it
actually is a mixture of two previous utilities merged together: FileMon (File
Monitor) and RegMon (Registry Monitor), which are not available anymore.
If you try out PM, you'll see some of the information included in PE, plus the specific information provided by PM—just conveyed in a different manner
Static versus dynamic memory
When a program starts execution, the OS assigns a process to it by means of
scheduling: the method by which work specified by some means is assigned to resources that complete the work This means that the resources for the process are assigned, and that implies memory allocation
Trang 37As we'll see, there are mainly two types of memory allocation:
• Fixed memory (linked to the stack), determined at compile time Local variables are declared and used in the stack Note that it is a contiguous block of memory allocated when the process resources are initially assigned The allocation mechanism is very fast (although the access not so much)
• The other is dynamic memory (the heap), which can grow as the program required it, and it's assigned at runtime This is the place where instance variables are allocated (those that point to an instance of a class or object).Usually, the first type is calculated at compile time since the compiler knows how much memory will be needed to allocate the variables declared depending on its type (int, double, and so on) They are declared inside functions with a syntax such
as int x = 1;
The second type requires the new operator to be invoked Let's say there is a class named Book in our code, we create an instance of such Book with an expression of this type:
Book myBook = new Book();
This instructs the runtime to allocate enough space in the heap to hold an instance
of that type along with its fields; the state of the class is allocated in the heap This means that the whole state of a program will store its state in a different memory (and, optionally, disk) locations
Of course, there are more aspects to account for, which we'll cover in the The Stack
and the Heap section in this chapter Luckily, the IDE lets us watch and analyze all
these aspects (and many more) at debug time, offering an extraordinary debugging experience
Garbage collector
Garbage collection (GC) is a form of automatic memory management The GC in
.NET, attempts to reclaim garbage or the memory occupied by objects that are no longer in use by the program Going back to the previous code declaration of Book, when there are no references to the Book object in the stack, the GC will reclaim that space to the system, liberating memory (it's a bit more complex, in fact, and I'll get into further detail later in this chapter—when we talk about memory management—but let's put it that way for the moment)
It's important to note that garbage collectors are not something exclusive to the NET platform Actually, you can find it in all platforms and programs even if you're dealing with browsers Current JavaScript engines, for instance, such as Chrome's V8, Microsoft's Chakra—and others—use a garbage collection mechanism as well
Trang 38Concurrent computing
Concurrency or concurrent computing is a very common concept nowadays, and we'll discover it at several instances along this book The official definition in
Wikipedia (https://en.wikipedia.org/wiki/Concurrent_computing) says:
"Concurrent computing is a form of computing in which several computations are executed during overlapping time periods—concurrently—instead of sequentially (one completing before the next starts) This is a property of a system—this may be
an individual program, a computer, or a network—and there is a separate execution point or "thread of control" for each computation ("process") A concurrent system
is one where a computation can advance without waiting for all other computations
to complete; where more than one computation can advance at the same time."
Parallel computing
Parallel computing is a type of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved at the same time .NET offers several variants of this type of computing, which we'll cover over the next few chapters:
Serial Approach Parallel Approach
Start
Stop
workers
Evaluate model Evaluatemodel
Evaluate model
Evaluate model Start
Stop
For k =1 : N
Evaluate model
Imperative programming
Imperative programming is a programming paradigm that describes computation
in terms of the program's state C#, JavaScript, Java, or C++ are typical examples of imperative languages
Trang 39Declarative programming
In contrast to imperative programming, languages considered declarative describe only the desired results without explicitly listing commands or steps that must be performed Many markup languages, such as HTML, XAML, or XSLT, fall into this category
The evolution of NET
Until the arrival of NET, the Microsoft programming ecosystem had been ruled by a few classic languages, Visual Basic and C++ (with the Microsoft Foundation classes) being typical examples of this
Also known as MFC, Microsoft Foundation Classes is a library
that wraps portions of the Windows API in C++ classes, including
functionalities that enable them to use a default application framework
Classes are defined for many of the handle-managed Windows
objects and also for predefined windows and common controls It was
introduced in 1992 with Microsoft's C/C++ 7.0 compiler for use with
16-bit versions of Windows as an extremely thin object-oriented C++
wrapper for the Windows API
However, the big changes proposed by NET were started using a totally different component model approach Up until 2002, when NET officially appeared, such
a component model was COM (Component Object Model), introduced by the
company in 1993 COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE automation, ActiveX, COM+, DCOM, the Windows
shell, DirectX, UMDF (User-Mode Driver Framework), and Windows runtime.
A device-driver development platform (Windows Driver Development
Kit) first introduced with Microsoft's Windows Vista operating system
is also available for Windows XP It facilitates the creation of drivers for
certain classes of devices
At the time of writing this, COM is a competitor with another specification named
CORBA (Common Object Request Broker Architecture), a standard defined by
the Object Management Group (OMG), designed to facilitate the communication
of systems that are deployed on diverse platforms CORBA enables collaboration between systems on different operating systems, programming languages, and computing hardware In its life cycle, it has received a lot of criticism, mainly
because of poor implementations of the standard
Trang 40.NET as a reaction to the Java World
In 1995, a new model was conceived to supersede COM and the unwanted effects related to it, especially versions and the use of the Windows Registry on which COM depends to define accessible interfaces or contracts; a corruption or modified fragment of the registry could indicate that a component was not accessible at runtime Also, in order to install applications, elevated permissions were required, since the Windows Registry is a sensible part of the system
A year later, various quarters of Microsoft started making contacts with some of the most distinguished software engineers, and these contacts remained active over the years These included architects such as Anders Hejlsberg (who became the main author of C# and the principal architect of NET framework), Jean Paoli (one of the signatures in the XML Standard and the former ideologist of AJAX technologies), Don Box (who participated in the creation of SOAP and XML Schemas), Stan
Lippman (one of the fathers of C++, who was working at the time at Disney),
Don Syme (the architect for generics and the principal author of the F# language), and so on
The purpose of this project was to create a new execution platform, free from the caveats of COM and one that was able to hold a set of languages to execute in a secure and extensible manner The new platform should be able to program and integrate the new world of web services, which had just appeared—based on
XML—along with other technologies The initial name of the new proposal was
Next Generation Windows Services (NGWS).
By late 2000, the first betas of NET framework were released, and the first version appeared on February 13, 2002 Since then, NET has been always aligned with new versions of the IDE (Visual Studio) The current version of the classic NET framework at the time of writing this is 4.6.1, but we will get into more detail on this later in the chapter
An alternative NET appeared in 2015 for the first time In the //BUILD/ event, Microsoft announced the creation and availability of another version of NET, called NET Core
The open source movement and NET Core
Part of an idea for the open source movement and NET Core comes from a deep change in the way software creation and availability is conceived in Redmond nowadays When Satya Nadella took over as the CEO at Microsoft, they clearly
shifted to a new mantra: mobile-first, cloud-first They also redefined themselves
as a company of software and services.