If your company is looking for a solution with a wide range of features, you should think about .NET. .NET is an ecosystem that provides convenient development of desktop and web applications..NET framework is created and supported by Microsoft, it is a popular and free to use platform designed for various types of applications. The .NET framework delivers the programming environment for significant software development stages. 

Let’s get acquainted with .NET history, tools, and features. 

How did .NET start?

At the end of the ‘90s, Microsoft started its work on the .NET, a platform, based on the managed code. The feature of this code is that it can be executed under a runtime environment.   

Such a platform was needed to enhance and simplify software engineers’ work. C or C++ developers no longer had to deal with security operations, memory management, and other low-level actions.

As a solution to the problem, in 2002, they presented the first release of .NET framework with a new language for writing the managed code, C#. .NET framework was focused on the work with computers and servers based on Windows. It included WinForms, a GUI library for desktop applications, a framework for the Internet, ASP.NET, and for data access, ADO.NET. A common language runtime managed these tools for compiling and executing managed code. All these features should be united. For this purpose, there is a framework class library, FCL, that includes several libraries: a base class library (BCL), a network library, a numeric library, and more.  

With time, the .NET framework underwent a lot of iterations with the execution environment, desktop graphical systems, APIs for service-oriented apps, etc.

In 2014, Microsoft proclaimed a new era of .NET existence and presented it’s new cross-platform, cloud, and open-source version, named as .NET Core that was released in 2016. Also, this year, Microsoft bought Xamarin, technology for cross-platform mobile development, and transformed it into the open-source one. 

So, now Microsoft offers .NET specialists to work with different branches:

  • .NET framework for business needs,
  • .NET Core as a new environment,
  • Xamarin for mobile devices. 

Also, .NET-programmers can use a standard .NET library for API connection across these three branches. Despite .NET framework is still supported by Microsoft, its engineers turned their attention to the development of .NET Core and Xamarin.

What is included in the .NET development platform?

The .NET development platform is a combination of the .NET framework, .NET Core, and Xamarin. 

In their turn, each of them includes frameworks and libraries for developing different kinds of applications. Let’s consider their structure in detail.

.NET Framework

It is the first and the oldest platform realization, dated 2002 year. .NET framework includes Base Class Library (BCL) and three basic application models: Windows Forms, Windows Presentation Foundation (WPF), and ASP.NET forms.  

  • Windows Forms is a GUI class library inside of .NET frameworks. It is used for the development of graphical desktop applications with easy updating and deployment.
  • WPF is a framework of user interface that is used for creating graphical interfaces  for desktop client applications on Windows OS. XAML, Extensible Application Markup Language is involved in WPF.
  • ASP.NET is used for developing dynamic websites and web applications. It includes CLR, Common Language Runtime that allows engineers to write ASP.NET code on different .NET languages.
  • BCL is a core of Framework Class Library, provides classes in namespaces and ADO.NET, the technology used for database access.

.NET Core 

It is a cross-platform package that is needed for developers using .NET framework.

Engineers can run this product on Linux and OS X, as well as create Linux applications. .NET Core consists of ASP.NET Core and Universal Windows Platform (UWP) that are also cross-platform.

  • UWP is Microsoft API used for developing applications that work on all devices with Microsoft Windows: Windows, Windows Phone, and HoloLens.   
  • ASP.NET Core is a re-build, more modular version of ASP.NET. It is used for creating mobile servers, web-applications, and services that work on OS X, Windows, and Linux.

Xamarin

Till Microsoft bought it in 2016, it was a proprietary product. Now it is an open-source part of the .NET platform, needed for mobile applications and Mac products development. Xamarin uses the Mono runtime and special version of .NET framework, customized for work with APIs for iOS, Android, and Xamarin.Mac.

Common infrastructure (runtime components, languages, and compiles) ensures the work of all ecosystems and is used by all runtimes.  

.NET Standard

It is a common base class library for .NET Framework, .NET Core, and Xamarin that provides a higher consistency in case of reusing components on different platforms and unites the .NET ecosystem. If you are looking for an ideal runtime for .NET development,  you should use Visual Studio IDE. It suites creating, debugging, and launching applications on all platforms and devices.    

Common Language Runtime (CLR)

CLR is an application virtual machine, core of the .NET programming that unites all kinds of .NET development. CLR manages memory, implements security access to the code, and is needed for execution threads and code.  

With the help of CLR, developers can build systems with several languages and integrate their behavior. CLR verifies needed versions of applied services to see that all dependencies are intact and code works properly.   

Like .NET framework uses CLR, .NET Core uses open-source CoreCLR that is adjusted to the .NET Core cross-platform nature.

Supported languages

There are two groups of languages supported by .NET:

  1. Official languages supported by Microsoft: C#, F#, Visual Basic.
  2. Other languages that can comply with CLI. In this case, CLI is a marker of the infrastructure of the common language, it’s a technical standard for high-level languages. Such languages can be compiled into Common Intermediate Language and then compiled in bite-code.  There are about 25 active CLI-compiled languages, for example, C++/CLI, Oxygene, Phalanger, IronPython, etc. Some of such languages are no longer used, such as IronRuby.

Where to start .NET programming?

There are several resources useful for beginners in .NET programming:

Now, let’s consider what benefits can .NET offer to developers and what drawbacks they can find using its frameworks.

.NET programming: benefits

Object-oriented model software development

The basis of .NET is object-oriented programming, OOP.  Developing a model of OOP differs from the idea when the software is shared on the several parts that simplify managing and combining processes. OOP splits data into the data fields and declares classes to describe objects’ behavior. 

A modular structure in OOP makes programming and testing easier, also, such kind of code becomes more responsible for recurring issues. So, .NET allows developers to reuse code and its components, and save time and resources for the development. 

Secure caching system

Caching is the process when data is kept in temporary storage, and hence data requests work faster. Stored data is a result of previous data requests or duplicates of the data that lies in another place.

Caching .NET system is simple to use and extensible. With the help of class Object Cache, developers can create custom cache implementation that is needed for increased performance and scalability of Windows custom and server applications.

Visual Studio IDE

Visual Studio IDE from Microsoft, a common runtime for all ways of .NET programming, provides all needed tools for creating and testing software across all platforms. Visual Studio IDE gives developers the ability to use features of a specific language environment.  

There are main benefits of Visual Studio IDE:

  • It is a single IDE for all .NET applications.
  • It has compilation and debugging features. 
  • It can work with code written in different languages.
  • It can be customized according to the customer’s requirements.

If it is needed, developers can improve their Visual Studio IDE with Microsoft editor extensions for continuous integration, connections with third-party instruments, management of cloud solutions, etc. 

Cross-platform design with .NET Core

With the help of .NET Core programming, code can work on OS X, Windows, and Linux and it is completely open-source if we compare .NET Core to .NET framework. It means that the developers’ community can improve it all the time and share their experience.  So, code written in C#, F#, or Visual Basic, can work on every compatible operating system, and companies can stay in the borders of the .NET ecosystem and cover different platforms at the same time.

The flexibility of deployment and maintenance

You can install .NET Core as part of your application or as a self-sufficient tool; it is a simple and clear process. Its modular character of design makes it possible to include all needed dependencies. Also, you can install several .NET Core versions on your machine for different projects and performing deployment tasks. 

Universal .NET standard

.NET standard is a large class library that extends the .NET ecosystem. It includes base class libraries for all .NET ways, .NET framework, .NET Core, Xamarin. Such libraries are needed for graphic visualization, integrations with databases, and working with XML documentation. It supports all dependent libraries in different applications, which simplifies the job of developers. They just need to check the version’s compatibility for its efficient usage. For example, before .NET standard was released in 2016, engineers had to develop an application or libraries for a new platform and share all updates between different platforms. 

Great community

.NET unites developers from different companies so that the community can solve the most important questions. .NET Core libraries, runtime, and compiler are available on GitHub, and very popular among web frameworks. While .NET takes second place, .NET Core and ASP.NET take third and fourth places accordingly as the most frequently used frameworks beyond web development.  Also, there is the .NET Foundation, an independent organization that takes part in .NET ecosystem development. It is the main forum for the .NET community’s needs.

Automatic monitoring in ASP.NET

ASP.NET characterizes in-build automatic monitoring control. Monitoring provides stable and clear work of .NET applications. If memory leak or infinite loops happen, web-server Windows alerts about these issues. This allows developers to quickly solve problems and create new processes.   

Roslyn and RyuJIT compilers

In .NET programming, two Microsoft compilers are used: Roslyn is needed for compiling C# or VB code in the common intermediate language, and RyuJIT for running just-in-time CIL compilation into native code. 

Roslyn was released in 2011, in 2014 it became open-source, and in 2015 was added to the Visual Studio set of tools. With the help of Roslyn API, developers can read compilation data at every stage and analyze code.

RyuJIT is intended to increase performance during compiling CIL into bite-code, so it replaced the previous JIT in 2018. 

Microsoft support

Microsoft is engaged in the development of .NET ecosystem, its supporting, and increasing performance. So, they turned on to the .NET Core and embraced cloud services. Not so long ago Microsoft started to offer developers to use ML.NET for C# and F# languages. It emphasizes that .NET can be a universal platform for everyone.

.NET programming: drawbacks

Despite its strong side .NET programming also has weaknesses in its infrastructure and working processes.

Limitations in object-relational support

The object-oriented language model, which is the heart of .NET, is imperfect. It is based on objects and data rather than actions and logic. Special object-relational mapper, the Entity framework,  provides support for data-oriented software in .NET framework and Core and sets connections between them and SQL. 

This mapper isn’t flexible enough and supports not all available databases. It is likely that Entity framework won’t support new databases, so Microsoft will be forced to give up this platform.

Vendor lock-in

Despite .NET Core and Xamarin are open-source solutions, they are not completely managed by the community and depend on the vendor’s policy. Microsoft runs and places the .NET ecosystem.

The high price of the license

The .NET ecosystem includes both open-source technologies and paid tools. In general, the main costs will be connected with Visual Studio IDE and other features for more convenient and simple work. For example, the standard subscription for Visual Studio is  $1,999 per engineer per the first year and $799 in case of a renewal of the subscription. For educational and non-commercial goals, Microsoft provides a free Visual Studio Community.

Additional cost can be required if you never used Microsoft products and need to migrate from some cloud ecosystem to Microsoft solution, Azure.

Also, you don’t need to forget about Windows licenses, if you want to engage in .NET programming not on Mac or Linux but on native software.

The raw state of new products

It applies to all Microsoft products, not only to .NET tools, but its new solutions are often launched without proper documentation, relevant support, and can significantly and unexpectedly change. So, companies should develop their own parts of the ecosystem for their project’s needs.

Memory leaks

It means that .NET doesn’t release irrelevant memory. Such a problem isn’t new for technology. Developers should perform proper resource management to avoid memory leaks, although .NET provides a special garbage collector. Besides, a quantity of leaks is increasing as the application scales. Also, there are a lot of tips on the Internet on how to check memory leaks in .NET. 

After-effects of transition to .NET Core

This can be a problem for companies whose products were developed with .NET, before the .NET Core release. So, companies need to transfer their old products to .NET Core or maintain two systems for old and new products. 

This transition can be a difficult process: there are no ASP.NET Web Forms, .NET Remoting, and other services in .NET Core; over time, they will be replaced with other technologies. 

For example, Windows Communication Foundation (WCF), a runtime and API set for service-oriented apps, is now irrelevant. For programming with .NET Core, Core WCF, a GitHub project, is now used.

When do you need to use .NET?

There are several cases when a company requires .NET.

  • Scalable products

If your business requirements grow, your software also should scale. In .NET you will find a scalable runtime to redesign your products as you need.

  • Cross-platform needs

If you want to create a desktop or mobile application that would work on different platforms, .NET is the best solution. Also, it can be used for game development, including Xbox, and AR (Augmented Reality) development, including HoloLens.  

  • Enterprise-scale infrastructure

Microsoft provides a proper enterprise mobility ecosystem and a great set of tools for creating or cross-integration of enterprise products.

Comment below if you have any questions about .NET, or you are interested in such programming!