.Net framework theory

.NET Framework

.NET Framework is the first and earliest implementation of the platform. It consists of three major application model - WPF, Windows Forms, ASP.NET forms - and base class library.

Windows Presentation Foundation (WPF) is a UI framework for creating graphical interface for the main desktop client applications on the Windows operating system. WPF using Extensible Application Markup Language (XAML) functions.

Windows Forms is the .NET Framework GUI library. Windows Forms used to develop desktop applications have easy to update and deploy rich graphics.

ASP.NET. While the first two components are designed for desktop engineering, but ASP.NET for developing dynamic Web sites and Web applications. The core has the common language runtime (CLR), the developer has the opportunity to use different .NET languages to write ASP.NET code. The common language runtime application is a virtual machine that manages memory, implementation code access security, verify code security, and provides a thread of execution and code.

Yl library (of BCL) provide the most common features, such as the namespace of the class, it is the core framework library (FCL), which is a set of interfaces, classes, and types of reusable value, and run common language runtime (CLR ) tightly integrated) . FCL and CLR combination constitutes a .NET Framework.

Since the .NET Framework supports only Windows-based device, so it needs to happen cross-platform package.

.NET Core

.NET Core released in 2016. It is cross-platform .NET Framework reconstruction. Older versions, engineers can now use the product on Linux and OS X, and create applications that are not necessarily related to the Windows family. The new system aims to conquer the cloud space, because, like Digital Ocean such suppliers are driven by the Linux. Not only .NET Core cross-platform, it's a different version can be mounted side by side on the same device. .NET Core includes ASP.NET Core and common Windows platforms (UWP).

Universal Windows platform (UWP) is an API created by Microsoft, for general-purpose applications developed to run on all Microsoft Windows-compatible device (ie Windows, Windows Phone and HoloLens).

ASP.NET Core is a reconstruction of ASP.NET, it happens to be a more modular than its predecessor framework. ASP.NET Core allows you to build a mobile back-end, Web applications and services. It is also cross-platform, it can run on OS X, Windows and Linux.

Xamarin

The third implementation is called Xamarin, for mobile applications and Mac products. Initially, Xamarin is independent of Microsoft-designed and is a proprietary product before Microsoft acquired it in 2016, is completely open source branch of the .NET platform. Xamarin use a version of the Mono runtime and the .NET Framework to be adjusted for use with iOS, Android and Xamarin.Mac the API. To learn more about the product, please see our Xamarin the pros and cons article.

Use a common infrastructure all run-time, so that the whole ecosystem work. It provides runtime components, languages ​​and compilers.

.NET Standard

2016, Microsoft also introduced .NET Standard, which is a combination of the .NET Framework, API libraries and .NET Core Xamarin, allowing engineers to use a single base class library, rather than to master three associated with each .NET implementation different libraries. This step unified ecosystem, and provide greater consistency for the reuse of components from different platforms.

.NET development platform is best suited for building across all platforms and devices, Visual Studio IDE debug and release applications.

Currently, the most popular .NET implementation is .NET Core and Xamarin. So let us better understand the advantages and disadvantages of using the .NET development platform. Most points can be applied to the entire ecosystem, but some points related only to its specific components, we will be specified in the appropriate section.

The advantages of .NET development

Object-oriented software development model

.NET-based object-oriented programming (OOP). OOP is a development model, the idea is to make software easier to manage and broken down into a combination of pieces. Dividing data into OOP objects (i.e., data fields), and by the class declaration describes the behavior of objects and content.

The modular structure helps to define objects and their interactive behavior without having to manage the properties inside the object. OOP manageable by the code, and in response to the test question easier to simplify the programming is repeated. It also eliminates unnecessary programming, usually means developers to code less. .NET code and components make it possible to reuse, save time, and then - development costs.

Reliable and simple caching system

Cache means that data stored in the temporary storage location, so call it when needed faster. Data storage is an earlier request for information or a copy of the information stored in the result of other places, such information takes longer to retrieve from it.

Caching system functions in .NET powerful and easy to use. It is also designed to be extensible. Object Cache class allows developers to create custom cache implementation, in order to improve the Windows client and server application performance and scalability.

Visual Studio IDE

Integrated Development Environment (IDE) is a programmer of a single product that enables applications by providing all the tools to write and test software development easier.

Visual Studio is a Microsoft IDE, used to build on all platforms (including Android and iOS), debugging and publishing applications. Visual Studio and .NET integration, and provide language-specific environmental features.

Visual Studio IDE's main features:

  • It is used as a single application all .NET IDE

  • IDE integrated compiler and debugger function

  • This solution can be used based on code written in different languages ​​application

  • Visual Studio allows you to customize the environment to match user preferences

The most important thing is, Visual Studio Marketplace provides a variety of editors from Microsoft and other providers extended to support teamwork, continuous integration, third-party access, cloud development and management.

Cross-platform .NET Core design and language independence

.NET Core .NET is to achieve a cross-platform, allowing code to run on OS X, Windows and Linux. The original .NET Framework (partially open only) different, .NET Core has a completely open source code, can ensure broad engineering community can continue to contribute to its development.

If you are using C #, F #, or Visual Basic to write code, the code will run on every compatible operating system. This allows the company to cover the most extensive .NET ecosystem of platform. At the same time, cross-platform design ensures the independence of language and share the experience with a large number of different engineering skills throughout the .NET community groups. Currently, .NET supports more than 25 languages, including C #, Visual Basic.NET, J #, Managed C ++, IronPython and IronRuby.

Flexible deployment, easy to maintain

An important feature is the flexibility to deploy .NET Core. It can be installed as part of the application, it may be installed separately. The modular design allows the inclusion of all the dependencies you need. Deployment is as simple as copying a file folder itself.

Another benefit is that you can run multiple versions of .NET Core in parallel on the same computer, with different covers and seamless project execution deployment tasks.

General .NET Standard

Since 2016, .NET ecosystem has been enhanced by the large class library called .NET Standard. It is based on the number of .NET Framework, .NET Core and Xamarin base class library. These are used to handle common functions, such as graphics rendering, database interaction and XML document manipulation. .NET standard library greatly simplifies the work developers.

Prior to .NET Standard, the programmer must re-develop applications for the new platform or library, and then distribute all updates on a variety of platforms. Currently, the library supports applications across all dependent libraries. However, you should check the version compatibility in order to successfully take advantage of .NET Standard.

Taisha District

.NET has a huge developer community. Interestingly, it engineer with small, medium and enterprise companies together. This means that almost all problems can be solved with the help of community members.

Because .NET Core is open source, so it's libraries, runtime and compiler available on GitHub, and there are many contributions. According to the survey Stack Overflow 2018, the two most popular products are included in .NET technologies: .NET Core ranked fourth, Xamarin ranked ninth.

Most importantly, there is an independent organization called .NET Foundation, which promotes teamwork and open development ecosystem around .NET. .NET community and commercial developers to use it as the main forum for the exchange of ideas.

ASP.NET automatic monitoring

ASP.NET has built-in automatic monitoring function. Windows Web Server strictly monitor Web pages and applications that run on it. If any problems such as memory leaks or infinite loop occurs, it will alert you immediately. This allows direct correct these behaviors and create new processes. Monitoring to ensure greater stability and transparency of .NET applications.

Shortcoming .NET development

Despite the extensive infrastructure and mature product development history, .NET is considered one of the most powerful engineering platform, but it brings a series of problems.

Limited object-relational support

As described above, .NET using object-oriented programming (OOP) language model. The object-based model rather than the "action" instead of the logic and data. Entity Framework provides support for the .NET Framework data-oriented software application development.

Entity is an object-relational mapper (ORM), which bridge the gap between the object-oriented and relational .NET Framework (SQL) database. Some engineers believe the Entity Framework is not flexible enough, may not support all available database design. This also means that at some point the Entity Framework may not support the new database design. Another problem is that the framework could eventually abandoned by Microsoft, which will force you to adapt to new technology suppliers recommendations.

On the plus side, we have not encountered problems entities, so it is still a question worth discussing.

Vendor lock-in

A second disadvantage related to the previous one portion. Based on Microsoft .NET and running. Although .NET Core and Xamarin is open source, but the entire ecosystem is far from community-driven. This means that your products are still dependent on suppliers and decision-making at Microsoft.

License fees

No matter how open source technology to build .NET applications are not cheap. In most cases, your expenses will be used for other collaboration and quality assurance services as well as Microsoft Visual Studio IDE offers to simplify your work. As of today, Visual Studio engineer the basic version will cost $ 539 a year. It contains various cloud, enterprise mobility, QA functions of the Enterprise Edition is about $ 3,000 per year. However, you can still try to become a Microsoft partner, get a lot of free subscription. For-profit and educational purposes, as well as free Visual Studio community.

Even though you can use .NET Core on Mac and Linux computers, the best way is to use Windows for .NET project, which also brought licensing costs.

If you've never used Microsoft products, and must migrate from the AWS cloud ecosystem to Azure, then the barrier will be higher.

The gap between the release and stability

Perhaps, this problem weakens all Microsoft products instead of .NET stack. But it's definitely worth mentioning. The new release products that lack proper documentation, support, stability, and prone to dramatic changes. In a project AltexSoft, we architects decided to use the new DocumentDB (now Azure Cosmos DB), but was later forced to design custom data architecture, because the product met many could endanger the entire project of technical problems.

One user Y Combinator's vivid description of the problem: "I have these problems lies in Microsoft technology evangelism article / video, it seems that Microsoft is always to make their new job becomes warm, and tell the world it is great, and production ready. then you go to achieve it, once you leave the perfect world of their presentation, it all fell apart, and then you find that the document is written as a test version, is no longer applicable, so you just the way you need to guess at the the correct call signature. "

Minor drawbacks include performance problems due to the closed system of garbage collection occurs. Moreover, in general, managed environment is slower than direct communication with the hardware environment.

When to use .NET

Scalable product . In general, the business demand is growing, your software will have to expand. .NET provides a scalable environment that allows ongoing redesign of applications to meet growing business needs.

Cross-platform requirements. If you need cross-platform .NET applications that work would be a good choice, because most platforms are covered, you can reduce development effort in the desktop or mobile applications extended to other operating systems at the same time. The most important thing is, .NET can be used for games (including Xbox) and AR developers (including HoloLens) and other specific Projects.

Enterprise-class infrastructure. .NET whether primarily for business use and design is still a debatable issue. But Microsoft to ensure the most extensive set of tools to build and cross-enterprise integration products, including both internal and public goods. It also supports a strong enterprise mobility ecosystem.

 

Original Address: https://www.kingwins.com.cn/content-7050.html

Guess you like

Origin www.cnblogs.com/suqq/p/11130941.html