Menu
Is free
check in
the main  /  Education / Basic concepts of platform.net. General information about the basic concepts of the platform .NET Framework The main components of NET Framework

The basic concepts of the platform.net. General information about the basic concepts of the platform .NET Framework The main components of NET Framework

Is one of the most sought-after, multifunctional and actively developing programming languages \u200b\u200bon this moment. With it, you can develop almost any software, ranging from simple Win Forms applications, close-up client-server web applications or even mobile applications and computer games. And it works on the basis of a platform .NET Framework. Let's figure out what it is.

See my video on the topic .NET Framework platform and CLR execution environment for C #

C # Programming Language It is relatively fresh, but he has already managed to earn confidence. The release of the first version took place in February 2002. The extreme version of the language at the time of writing the article is C # 7.2, which came out 08/16/2017.

The C # syntax as follows from the name enters the SI-like languages \u200b\u200bfamily and is similar to other popular languages \u200b\u200bfrom this group (C ++, Java). Therefore, if you are already familiar with one of these languages, you will be much easier for you to master the C # programming language.

Since C # is an object-oriented language, it supports inheritance, polymorphism, encapsulation, strict typing of variables, overload operators and more. All these concepts will be considered in detail in subsequent articles. Thanks to the use of the object-oriented design paradigm using a programming language, it is possible to easily develop large-scale and flexible projects. With all this regularly published new versions of C #, adding new functionality to simplify the developer's life, increasing the development speed, increase productivity and reliability.

Platform.net.

.NET Framework. - This is a software platform from the companyMicrosoft. allowing to perform development in various programming languages, since unified general-language execution environment is used for all languages.COMMON LANGUAGE RUNTIME (CLR). Thus, the main possibilities of the platform.net are:

  • Crospersplate - .NET Framework. maintained by most modern operating systemsWindows, and also have the ability to create applications supported Linux systems, and even mobile applications.
  • Multilingual - Since the source code written in the programming language used is broadcast in the Common Intermediate Language (CIL) code, it is possible to develop on any supported programming language, and even use different programming languages \u200b\u200bin one solution. The most popular supported languages \u200b\u200bare C #, VB.NET, C ++, F #.
  • Extensive Library of Classes and Technology - exists great amount Ready to use libraries to solve the necessary tasks. Often, it is not necessary to implement the low-level logic of the application, it suffices to use the finished solution that is conveniently supplied through the NUGET package manager. In addition, Platform.net provides easy development for almost any type of necessary software.

Managed and unmanaged code. Jit compilation

Managed Code (Managed Code) - This is the code controlled by the Communitary CLR environment. This means that the control environment has the ability to suspend the execution of the application and obtain specific information about the state of the application at any time of its execution. The source code of the programming language used is broadcast to the CIL managed code (it is also called high-level assembler).

After creating a class library or application, the source code continues to be stored in CIL. And when you start an application or access to the library, Just-In-Time is running. Jit.) Compilation of the application in a machine code specific to the environment on which the application is executed. In this case, an important feature is that compiling only the part of the application or library, to which the appeal is performed (well, naturally). This allows you to increase the performance of the system and save resources.

Unmanaged code (UNMANAGED CODE) - This code is broadcast immediately into the machine executable code and is executed directly by the operating system.

In addition, I recommend reading an article. And also subscribe to the Vkontakte group, Telegram and YouTube channel. There is even more useful and interesting for programmers.

Concept of environment. Environment factors and their classification

The term "environment" in ecology is applied in a wide and narrow sense of the word. In the broad sense of the word medium is the environment. The environment is a combination of all living conditions that exist on planet Earth. American biologist P. Earlich in his book "Demographic Explosion", which was published in the late 60s, so figuratively described the environment: "Our environment is the only" skin "of soil, water and gaseous atmosphere, Mineral nutrients and living organisms covering anything else particularly not a remarkable planet. " The medium in the narrow sense of the word is the habitat. The habitat is the part of nature that surrounds the body and with which it directly interacts. The habitat of each body is diverse and changeable. It is composed of many elements of alive and inanimate nature and elements introduced by man as a result of its economic activity.
All elements of the medium in relation to the body are unequivocal: some of them affect its vital activity, and others are indifferent for it. In this regard, all elements of the medium are grouped as follows.
1. Neutral factors are those elements of the medium that do not affect the body and do not cause any reaction.
2. Environmental factors are those elements of the medium that can directly or indirectly influence the body at least throughout one of the phases of its individual development and cause a specific adaptive response.
Environmental environmental factors are diverse, they have different nature and specificity of action. For the significance of them for the body, they are divided into two groups:
1. The conditions of existence or living conditions are those environmental factors, without which the body cannot exist and with which it is in an inseparable unity. The absence of at least one of these factors leads to the death of the body.
2. Secondary factors are those environmental factors that are not vital, but can modify the existence of the body, improving or worsening it.
An analysis of the huge variety of environmental factors by nature of their origin allows them to divide them into three large groups, in each of which, in turn, subgroups can be distinguished:
I. Abiotic factors are factors of inanimate nature, which directly or indirectly affect the body. They are divided into four subgroups:
a) climatic factors - these are all factors that form climate and are able to influence the life of organisms (light, temperature, humidity, atmospheric pressure, wind speed, etc.);
b) Effigic, or soil, factors are the properties of the soil, which affect the life of organisms. They, in turn, are divided into physical (mechanical composition, commerciality, capillary, wellness, air and moisture permeability, air and moisture intensity, density, color, etc.) and chemical (acidity, mineral composition, humus content) soil properties;
c) orographic factors, or relief factors - this is the influence of the nature and specificity of the relief on the life of organisms (the height of the terrain over the sea level, the latitude of the area in relation to the equator, the steepness of the area is the angle of inclination to the horizon, the exposition of the area is the locality of the area relation to the parties of light);
d) hydrophysical factors - this is the effect of water in all states (liquid, solid, gaseous) and physical environmental factors (noise, vibration, gravity, magnetic, electromagnetic and ionizing radiation) to the life of organisms.
II. Biotic factors are the factors of wildlife, the influence of living organisms on each other. They are most diverse and act not only directly, but also indirectly through the surviving inorganic nature. Depending on the type of acting organism, they are divided into two groups:
a) intravidal factors - this is the effect of the individuals of the same form on the body (hare per hare, pine on pine, etc.);
b) interspecific factors are the influence of individuals of other types of organism (wolf per hare, pine on birch, etc.).
Depending on the belonging to a certain kingdom, biotic factors are divided into four main groups:
a) phytogenic factors - this is the influence of plants on the body;
b) Zogenic factors are the effect of animals on the body;
c) Microbogenic factors are the effect of microorganisms (viruses, bacteria, simplest, rickettsia) on the body;
d) Micogenous factors - this is the effect of mushrooms on the body.
III. Anthropogenic factors are a combination of human impacts on the life of organisms. Depending on the nature of the impact, they are divided into two groups:
a) direct influence factors are the direct impact of a person on the body (mowing grass, cutting down the forest, shooting animals, fish catch, etc.);
b) The factors of indirect influence are the influence of a person with the fact of its existence (annually in the process of respiration of people in the atmosphere, 1.1x1012 kg of carbon dioxide and from the environment in the form of food are 2,7x1015 kcal energy) and through economic activities (agriculture, industry , transport, household activities, etc.).
Depending on the effects of impact, both groups of anthropogenic factors, in turn, are still divided into positive factors (landing and feeding plants, breeding and guarding animals, environmental protection, etc.), which improve the life of organisms or increase their number, and negative Factors (cutting down of trees, environmental pollution, destruction of habitats, gasket of roads and other communications), which worsen the life of organisms or reduce their number.
Original classification of environmental factors according to the degree of consistency, i.e. According to their periodicity, A.S.monchadsky proposed. According to this classification, the following three groups of factors distinguish.
1. Primary periodic factors - these are factors whose action began before the appearance of life on Earth and living organisms should have been adapted to them directly (daily periodicity of illumination, seasonal periodicity of the seasons, lunar rhythms, etc.).
2. Secondary periodic factors are factors that are a consequence of primary periodic factors (humidity, temperature, food dynamics, gases in water, etc.).
3. Disposal factors are factors that do not have the right periodicity or cyclicity (auction factors, anthropogenic factors, the content of pollutants in water, atmosphere or soil, etc.).
Depending on the nature of the change in time, the environment factors are divided into three groups:
1. Regularly periodic factors are factors that change their strength depending on the time of day, season of the year or rhythm of tides and sings (illumination, temperature, light day length, etc.).
2. Irregular factors are factors that do not have clearly pronounced periodicity (climatic factors in different years, catastrophic origin factors as a result of flooding, hurricane, earthquake, etc.).
3. The directional factors are factors acting for a long period of time in one direction (cooling or climate warming, overgrowth of the reservoir, grazing in one place, etc.).
According to the nature of the response of the body, the following groups of environmental factors differ on the impact of an environmental factor:
1. Irriters are factors causing adaptive changes to physiological functions and biochemical reactions.
2. Modifiers are factors causing adaptive anatomical and morphological changes in the body.
3. Limiters are factors resulting in the impossibility of existence in these conditions and limiting the environmental distribution environment.
4. The alarms are factors indicating the change in other factors and act as a preventive signal.
Depending on the possibility of consumption when interacting with the body, environmental factors are divided into two categories:
1. Conditions are environmental factors of habitat in time and space, to which the body responds in different ways, depending on the force of the factor (temperature, humidity, atmospheric pressure, physical properties of the soil, etc.). The conditions of the body are not consumed and are not exhausted.
2. Resources are all environmental habitat factors that the body consumes, consumes in the sense that the amount of them (Cash) as a result of interaction with the body may decrease. Resources are the advantage of the substance that consists of the body of the body, the energy involved in the processes of its vital activity, as well as the places where those or other phases of its life cycle flow.
In addition to the above classifications of environmental factors, other classifications are also applied in ecology, which are based on various criteria, depending on the interests of the researcher.

Introduction

The platform is at least the program execution environment and ... anything else that defines the features of the development and execution of the program code - programming paradigms, programming languages, many basic classes.

Microsoft.net (.NET Framework) is a software platform. Contains the following main components: The Common Language Runtime (CLR) and The .NET Framework Class Library (.NET FCL).

CLS (COMMON LANGUAGE SPECIFICATION) - the overall specification of programming languages. This is a set of designs and restrictions that are manual for library creators and compilers in the .NET Framework. Libraries built in accordance with CLS can be used from any programming language supporting CLS. Languages \u200b\u200bcorresponding to CLS (to their number include Visual C #, Visual Basic, Visual C ++ languages), can integrate with each other. CLS is the basis of emergency interaction within the Microsoft.net platform.

CLR (Common Language Runtime) - runtime or virtual machine. Provides assembly. The main component .NET Framework. Under the virtual machine, an abstraction of an encapsulated (separate) controlled high-level operating system, which ensures the execution of the program code and involves the solution of the following tasks:

§ Code Management (download and execution),

§ Memory management when placing objects,

§ Isolation application memory,

§ Code security check,

§ Intermediate language transformation into machine code,

§ access to metadata (extended type information),

§ Exception processing, including intersective exceptions,

§ interaction between managed and uncontrollable code (including COM objects),

§ Service support for development (profiling, debugging, etc.).

In short, the CLR is a set of services required for assembly. Wherein program code Assembly can be both manageable (code, when executing the CLR, in particular, activates the memory management system) and unmanaged ("old" program code).

The CLR itself consists of two main components: kernels (mscoree.dll) and basic class libraries (mscorlib.dll). The presence of these files on the disk is the correct sign that an attempt to install the platform is made on the computer at least.

The exercise core is implemented as a MSCoree.dll library. When building an assembly in it, special information is embedded, which, when running an application (EXE) or when loading the library (accessing the DLL from an unmanaged module - call the LoadLibrary function to download the controlled assembly) leads to the clr loading and initialization. After loading the CLR in the address space of the process, the nucleus of the runtime performs the following actions:

§ finds the location of the assembly,

§ loads assembly in memory,

§ Analysis of the assembly content (identifies classes, structures, interfaces),

§ performs metadata analysis,

§ Provides a compilation of code in an intermediate language (IL) to platform-dependent instructions (assembler code),

§ performs checks associated with security,

§ Using the main flow of the application, transmits the control of the assembly code into the processor command.

FCL (.NET Framework Class Library) is a corresponding CLS Specifications Object-oriented Library of Classes, Interfaces, and Type System (Type-Values), which are included in the Microsoft .NET platform.

This library provides access to functional features Systems and is designed as a basis for the development of .NET applications, components, controls.

NET Class Library is the second CLR component.

NET FCL can use all .Net applications, regardless of destination, architecture used in developing programming language. In particular, it contains:

§ Built-in (elementary) types presented in the form of classes (on platform.net everything is built on structures or classes),

§ Classes for developing a graphical user interface (Windows Form),

§ Classes for developing Web applications and Web services based on ASP.NET technology (Web Forms),

§ Classes for developing XML and Internet protocols (FTP, HTTP, SMTP, SOAP),

§ Classes for developing applications running with databases (ADO.NET),

§ and much more.

Net application is an application designed to execute on the Microsoft.NET platform. It is implemented in programming languages \u200b\u200bcorresponding to CLS.

MSIL (Microsoft Intermediate Language, it is IL - Intermedia Language) - Intermediate Language of the Microsoft.net platform. The source code of programs for .NET applications are written in programming languages \u200b\u200bcorresponding to CLS specifications. For programming languages, the corresponding CLS specification can be built converter in MSIL. Thus, programs in these languages \u200b\u200bcan be broadcast to the intermediate code on MSIL. Thanks to CLS compliance, as a result of the transmission of the program code written in different languages, a compatible IL code is obtained.

In fact, MSIL is an assembler of a virtual processor.

Metadata - When converting a program code in MSIL, a metadata block is also formed containing information about the data used in the program. In fact, these are sets of tables containing information about the types of data defined in the module, the types of data referenced by this module. Previously, such information was preserved separately. For example, the application could include interface information that was described in Interface Definition Language (IDL). Now metadata are part of the managed module.

In particular, the metadata are used for:

§ Saving information about types. When compiling, the header and library files are no longer required. All the necessary information compiler reads directly from the controlled modules,

§ code verification in the process of execution of the module,

§ Dynamic memory management (memory release) in the process of executing the module,

§ When developing a program standard tools (Microsoft Visual Studio.Net)

§ based on metadata is provided by a dynamic prompt (IntelliSense).

Languages \u200b\u200bfor which transfer to MSIL:

and many other languages.

The executable module is independent of the compiler (and input language). The signal of the application is the controlled executable module (controlled module). This is a standard portable executable (PE-Portable Executable) Windows file.

The elements of the managed module are presented in the table.

The managed module contains a managed code.

The managed code is the code that is performed in the CLR environment. The code is based on the structures and classes that are announced in the original module containing the ads of methods. The managed code must comply with a certain level of information (metadata) for the runtime environment. C #, Visual Basic code, and JScript is manageable by default. Visual C ++ code is not manageable by default, but the compiler can create a managed code, for this you need to specify the argument on the command line (/ CLR). One of the features of the controlled code is the presence of mechanisms that allow you to work with managed data.

Managed Data - Objects that, during the execution of the module code, are placed in the controlled memory (in the controlled heap) and are destroyed by the CLR garbage collector. C #, Visual Basic and JScript .NET data are managed by default. C # data can also be labeled as uncontrollable.

Assembly - basic building block of the V.NET Framework. Controlled modules are combined in assembly. The assembly is a logical grouping of one or more managed modules or resource files. Controlled modules are executed in the execution time (CLR). The assembly can be either executable application (it is placed in the file with extension.exe) or library module (in the file with the extension.dll). At the same time, nothing in common with the usual (old sample!) The assembly does not have executable applications and library modules.

Assembly declaration (Manifest) - component assembly. Another set of metadata tables, which:

§ Identifies the assembly in the form of a text name, its version, culture and digital signature (if the assembly is divided among applications),

§ Determines the files included in the composition (by name and hash),

§ indicates the types and resources that exist in the assembly, including the description of those that are exported from the assembly,

§ Lists dependencies from other assemblies,

§ Indicates the set of rights required by the assembly for correct operation.

This information is used during the execution period to support the correct operation of the application.

The processor cannot execute IL code. And the IL code translation is carried out by the JIT compiler (Just in Time - at the right moment), which is activated by the CLR as needed and performed by the processor. In this case, the results of the JIT-compiler activity are saved in RAM. Between the fragment of the exclusive IL code and the corresponding memory unit, a correspondence is set, which in the future allows the CLR to transmit control commands to the processor commands recorded in this memory block by passing the jit compiler again.

In the CLR environment, collaboration and interaction of software components implemented in various programming languages \u200b\u200bare allowed.

Based on the previously formed block of Metadata CLR, it provides effective interaction performed by .NET applications.

For CLR, all builds are the same, regardless of which programming languages \u200b\u200bthey were written. The main thing is that they match the CLS. In fact, CLR destroys the boundaries of the programming languages \u200b\u200b(Cross-Language Interoperability). Thus, thanks to CLS and CTS .NET applications are actually provided by applications on MSIL (IL).

CLR assumes many problems that have traditionally been in the special attention of application developers. The functions performed by the CLR are:

§ Check and Dynamic (JIT) Compiling MSIL code in the processor command,

§ Memory management, processes and streams,

§ organization of interaction of processes,

§ Solution of security problems (within the system of safety policies in the system).

APPDOMAIN (application domain) is a logical assembly container, which is used to isolate the application within the address space of the process. All objects created by the application are created within a specific application domain. Several application domains can exist in the same operating system process. CLR isolates applications by running memory within the application domain.

The code performed in the CLR (CLR process) is separated from other processes performed on the computer at the same time.

The usual process is started by the system within the framework of the specifically allocated to the target space process. CLR provides the ability to perform a plurality of managed applications in one process. Everyone controlled application associated with its own domain of the application (abbreviated APPDOMAIN). In addition to the main domain, several additional domains can be created in addition to the main domain.

The structure of the CLR runtime is presented in the picture.

Domain properties:

§ Domains are isolated from each other. Objects created within the same domain are not available from another domain,

§ CLR is able to upload domains with all assemblies related to these domains,

§ additional configuration and protection of domains are possible,

§ To exchange data between domains, a special mechanism has been implemented safe access (Marshaling).

§ V.Net Framework Developed its own component model, the elements of which are .Net assemblies (.NET-Assembly), and for direct and backward compatibility with the COM / COM + model in CLRs are built-in mechanisms (COM INTEROP), providing access to COM objects According to the rules.net and to the COM assemblies according to the COM rules. At the same time, for.net applications do not require registration of components in system Registry Windows.

To execute .Net applications it is enough to accommodate related to this application Assembly in the same directory. If the assembly can be used in several applications, it is posted and registered using a special utility in the GAC (Global Assembly Cache with general assembly cache).

CTS - COMMON TYPE SYSTEM Standard system Types. Supported by all the languages \u200b\u200bof the platform. Due to the fact that the.NET child is a speech here comes on elementary types, classes, structures, interfaces, delegates and enumerations.

Common Type System is an important part of the runtime, determines the structure of syntactic structures, methods for ads, use, and applying common types of runtime. CTS focuses basic information about the system of common predefined types, about their use and management (values \u200b\u200bof the transformation of values). CTS plays an important role in the integration of multilingual managed applications.

The namespace is a way to organize a type system in a single group. There is a general general language library of basic classes. And the concept of namespace provides an effective organization and navigation in this library. Regardless of the programming language, access to specific classes is ensured by grouping within the framework of common names.

Space names Purpose
System.
System.data. To appeal to databases
System.data.common.
System.Data.OLDB.
System.data.sqlClient.
System.collections Classes for working with container objects
System.Diagnostics. Classes for trace and debug code
System.Drawing. Graphic support classes
System.Drawing.Drawing2D.
System.Drawing.printing.
System.io. I / O support
System.net. Support data transfer on networks
System.Reflection. Working with user types during application execution
System.Reflection.EMIT.
System.Runtime.interopServices. Support for interaction with the "normal code" - DLL, COM servers, remote access
System.Runtime.Remoting.
System.Security Cryptography, permissions
System.Threading. Working with flows
System.Web. Working with Web applications
System.Windows.Form. Working with Windows Interface Elements
System.xml. XML data support

Performing unmanaged executable modules (ordinary Windows applications), Provided directly by the Windows system. Unmanaged modules are performed in windows Environment As "simple" processes. The only requirement to which such modules must meet are correct operation in the Windows environment. They must "correctly" work (do not hang the system, prevent memory leaks, do not block other processes and correctly use the tools for working on behalf of the processes). That is, meet the most common rules for Windows.

At the same time, most of the problems of the correct execution of an unmanaged module (problems of interaction, allocating and freeing up memory) are the problems of application developers. For example, the well-known COM technology is a way to organize the interaction of heterogeneous components within the application.

Object - In a broad sense, this is a memory area (stack or heap), allocated during the program execution program for recording any values. It is characterized by a type (fixed set of properties that determine the size of the occupied area, the method of interpretation of the value, the range of values, a variety of actions allowed when manipulating an object) location in memory (address).

The garbage collection is a mechanism that allows CLR to determine when the object becomes not available in the managed program memory. When assembling the garbage, the controlled memory is released. For the application developer, the presence of a garbage collection mechanism means that it should no longer take care of the release of memory. However, this may require changes in programming style, for example, special attention should be paid to the procedure for the release of system resources. It is necessary to implement the methods released system resourcesoperating under the application.

The stack is a specially organized memory area designed to temporarily store objects (variables and constants), to transmit parameters when calling methods to save the return address. Control stack compared to a bunch is simple enough. It is based on changing the value of the corresponding stack vertex. When cutting the size of the stack, objects are simply lost.

C # program

The program is properly built (not causing objections from the C # compiler) The sequence of proposals based on which the assembly is formed.

In the general case, the programmer creates a file containing declarations of classes, which is supplied to the input of the compiler. The results of the compilation seems to be a translator in the form of an assembly and is determined by the preferences of the programmer. In principle, the assembly can be two types:

§ Portable Executable File (PE file with extension.exe) is suitable for direct execution of CLR,

§ Dynamic Link Library File (DLL file with extension.dll) is designed to be reused as a component as part of an application.

In any case, based on the input code, the translator is building a module on IL, manifest, and forms an assembly. In the future, the assembly either can be performed after JIT compilation, or can be used as part of other programs.

Types of applications.net

C # language can be used to create console applications - text applications running in the DOS window. Most likely, such applications will be applied to testing class libraries. However, much more often the C # language will have to be used to create applications that have access to multiple technologies related to S.Net. This article presents a brief overview of various types of applications that can be written on C #.

Creating ASP.Net applications

Initially, the appearance of ASP.NET 1.0 fundamentally changed the web programming model. ASP.Net 4 is a senior product release and built on the basis of previous achievements. In ASP.net 4, the main revolutionary steps aimed at improving productivity of work are implemented. The main goal of ASP.NET 4 - allow you to build powerful, secure, dynamic applications using the minimum possible amount of code.

ASP.Net features

First and perhaps the most important thing is that pages structured. That is, each page is, in essence, the class inherited from class.Net System.Web.ui.page.which can override a set of methods caused during the life cycle of the Page. (You can perceive these events as specific for the relatives of the events Onapplication_start. and Onsession_start.which entered the Global.asax files in the classic ASP platform.) Since the functionality of the pages can be highlighted in the event handlers of a specific purpose, the ASP.NET pages are much easier to understand.

Another pleasant feature of ASP.NET pages is that they can be created in the Visual Sludio 2010 - the same environment in which the business logic and data access components are programmed by the same ASP.NET pages. Visual Studio 2010, or Solution (Solution), contains all files associated with the application. Moreover, classic ASP pages can be debugged directly in the editor. IN former timesRelated to Visual Interdev existed an unpleasant need to specifically configure the InterDev and the project's web server to enable debugging.

For greater clarity, the device of the separated code (Code-Behind) ASP.NET allows you to distribute a structured approach even further. ASP.NET allows you to isolate the server functionality in the classroom, compile this class along with other pages to the DLL library and place this DLL in the directory below the HTML part. Directive @page, specified at the beginning of the page, associates this file with the class. When the browser requests the page, the web server generates events in the class located in the page class file.

The last but equally important property of ASP.NET, which should be mentioned is increased productivity. While the classic ASP pages were interpreted each time a page message, ASP.NET pages after compilation are cached on a web server. This means that all subsequent requests of ASP.NET pages are performed faster than the first.

ASP.NET also facilitates writing pages displaying forms in the browser that can be used in the corporate network. The traditional view of the form-oriented applications is that they provide a developed user interface, but they are more difficult to accompany them, as they are launched on many client machines. For this reason, people rely on forms oriented applications, only when a developed interface is required and it is possible to ensure reliable support to users.

Webms

To make it easier to construct web pages, Visual Studio 2010 offers a Web Forms library (Web forms). This tool allows you to graphically create ASP.NET pages - in the same way as windows are created in Visual Basic 6 and in C ++ Builder. In other words, you will need to drag the necessary controls from the toolbar to the form surface, then slightly correct the shape code and write event handlers for controls. When using the C # language to create a web form, you create a C # class inherited from the basic class Page, and the ASP.NET page, which displays this class as its separated code. Of course, you are not obliged to apply to creating a web form exactly C #; To do this, you can also use Visual Basic 2010 or any other language oriented by on.

In the past, the complexity of web development kept some developers teams from attempting to master it. To achieve success in developing web applications I had to know many different technologiessuch as VBScript, ASP, DHTML, JavaScript, etc. The use of Web Forms concepts to web pages has significantly simplified the construction of web applications.

Web Server Control Elements

The controls used in web forms are not controls in the same sense, in which them are the elements of ActiveX. Instead, they are XML descriptors belonging to ASP.NET namespace, which the web browser dynamically transforms into HTML descriptors and client scenarios when the page is requested. Surprisingly, the web server can display the same server side controls. different ways, generating a transformation that meets the specific web browser, which sent a request. This means that you can now easily create perfect user interfaces of web pages without worrying about how to achieve the page to work in any of the available browsers - Web Forms will take care of this.

XML web services

To date, the HTML pages constitute most of the World Wide Web traffic. However, thanks to XML, computers get an independent format that can be used to interact on the Internet. In the future, computers will be able to use XML to exchange information instead of sending each other by dedicated lines of the message in a special proprietary format similar to EDI (Electronic Data Interchange). XML Web Services are designed for a service-oriented web environment when remote computers provide each other dynamic information that can be analyzed and reformatted before getting its final representation for the user. XML Web Services is an easy way for computers to provide information in the form of XML to other computers on the Internet.

Within the framework of technical terminology, the website of the XML V.NET is an ASP.NET page that returns an XML code at customer requests instead of HTML code. Such pages are based on the DLL library of the separated code that contain classes inherited from WebService. Integrated Visual Studio 2010 development environment offers a mechanism facilitating the creation of web services.

A enterprise or organization may provide preference to XML web services for two main reasons. The first reason is that they are based on HTTP; Websons can use existing HTTP-based networks as intermediaries for information transfer. Another reason is related to the fact that since XML web services use XML, the transmitted data format is self-documenting, open and independent of the platform.

Creating Windows Forms

Although C # i.net is designed, in particular, for web development, they still support the so-called "thick" client applications - i.e. Applications that should be installed on the end-user machine, where most of the processing is performed. This provides the Windows Forms library (Windows form).

However, if you start learning the platform.net, I would not recommended You are studying Windows Forms, and immediately move to the study of the latest WPF technology.

Windows Presentation Foundation (WPF)

One of the newest revolutionary technologies is Windows Presentation Foundation (WPF). When building WPF applications relies on the use of XAML. XAML abbreviation means Extensible Application Markup Language - expandable application markup language. This new way to create applications inside the Microsoft environment, first submitted in 2006, is part of versions .NET Framework 3.0, 3.5 and 4. This means that in order to start any WPF application, you must make sure that the platform is installed on the client machine .NET Framework 3.0, 3.5 or 4. WPF applications are available for Windows 7, Windows Vista, Windows XP, Windows Server 2003 and Windows Server 2008 (only these operating systems allow you to install.net Framework 3.0, 3.5 or 4).

XAML is an XML announcement used to create forms that represent all visual aspects and behavior of WPF applications. Since the WPF application you can work programmatically, this technology is a step towards declarative programming to which the entire industry is moving. Declarative programming means that instead of creating objects by writing code on a compiled language, such as C #, VB or Java, everything is declared using XML-like programming.

Windows services

Windows Service (Windows Service Initially called NT Service) is a program designed to start in the background in the Windows NT / 2000 / XP / 2003 / Vista / 7 environment (but not Windows 9x). These services are convenient when you need to organize the continuous operation of programs that are ready to respond to events, without the need to explicitly run them on the user's initiative. A good example is the WORLD WIDE WEB Service service on web servers, which listens to client's web requests.

Develop services in C # is very simple. In the namespace System.Service.Process. Basic Classes are available .Net, which allow you to solve most of the template tasks associated with system services. In addition, the Visual Studio .NET environment allows you to create a C # Service project, which uses the C # source code to build a Windows service.

Windows Communication Foundation (WCF)

Studying ways to move data and services from one point to another, used in Microsoft technologies, you will find that at your disposal is a wide variety of possible solutions. For example, you can use ASP.NET web services, technology.NET Remoting, Enterprise Services or MSMQ. What technology to choose? The answer to this question is dictated by what you are trying to achieve, because each of these technologies is preferable in a specific situation.

Mighting about it, Microsoft has really collected all these technologies together, and in the version of .NET Framework 3.0, as well as in its inclusion of V.Net Framework 3.5 and 4, there is a single method of moving data - Windows Communication Foundation (WCF). The WCF library provides the possibility of initial construction of the service with the subsequent delivery of this service in various ways (even by different protocols) by simply changing the configuration file. WCF. - A very powerful new means of connecting distributed systems.

Windows Workflow Foundation (WF)

The Windows Workflow Foundation (WF) service was first presented in the version .NET Framework 3.0, but now underwent a thorough restructuring, as a result of which many will now find it much more useful. You will find that Visual Studio 2010 has significantly improved the means of working with WF, and create your own workflows has become much more convenient. You will also find new flow controls, Flowchart class, as well as a number of new actions, such as Dowhile, Foreach and Parallelforeach.

Insofar as. Net. Framework is a powerful platform for developing applications, it makes it possible to develop applications of a completely different type.

· Desktop applications (applications that run on the user's local computer);

· Web applications (applications that work within the web server and are available to the user through the browser under the HTTP / HTTPS protocol);

· Web applications with a rich user interface (applications that are delivered by the user using the HTTP / HTTPS protocol within the browser and are executed on the client side);

· Web services (program code that runs on the server side and can be called from the client to obtain any data or execution of the operation);

· Mobile applications (applications that are performed on mobile devices).

For each of the above applications in the composition. Net. Framework exist relevant technologies that allow you to create applications. Moreover, . Net. Framework contains common libraries that can be used in different types of applications. To such libraries include libraries:

· To work with rows;

· To work with mathematical functions;

· To work with graphics;

· Access to data;

· To work with files and other I / O operations;

· To perform cryptographic operations;

· To organize data synchronization between data sources;

· And a huge number of other libraries.

Let's review every type of applications. As already noted above, for each of the types of applications as part of the platform. Net. Framework exist special project templates.

Desktop applications They differ in that they start directly on the user's computer. This is the most common type of application. Desktop applications usually have access to user computer resources, such as hDD, sound equipment etc. The advantages of this type of applications can be attributed interactivityuser interface and the ability to work the application regardless of network connection the Internet and other resources. However, to work such applications, they must be installed on the local a computer.

Desktop applications can be divided into three types - window applications, console applications and services Windows. Window applications possess graphical interface. Console applications typically have a command line type, and interface Such applications are textual, not graphic. Finally service Windows Do not have a user interface at all, and work in the background.

To build applications with window graphical interface within the platform. Net. Framework can use technology Windows Forms (available from. Net. Framework 1.0) and Windows Presentation Foundation. (Available from. Net.Framework 3.0). The last technology is more new and promising.


Web applications They differ from the desktop what they work remotely on the web server. User uses web applications through browser and protocol Http./ Https. The advantage of this type of application is that there is no need to install them on a computer Each user - attachment need to install on the web server, after which it becomes available to all users. However, the disadvantage of such applications is the limited ability to build user interfaces. This is due to the fact that user interface based on formats HTML., CSS. And JavaScript, which are quite limited. Therefore, user interface functionality is usually quite limited.

Since web applications have a serious disadvantage - limited features. by The formation of the user interface - a new type of application appeared, which is called rich online applications or internet applications with a rich user interface (RICH Internet Applications, RIA). The ideology of these applications is that browser integrate special addition (plugin), which is capable of displaying additional content type. After that when user Removes the page in the browser, the program code is transferred to the client side, which works as part of this addition. Since in this case, the entire code works on the client side, developers appear more opportunities by forming user interfaces.

To build such a type of application there are several technologies. One of the most famous technologies is Adobe Technology Flash.. In addition, there is also a technology Microsoft Silverlight.which allows you to most conveniently integrate with other technologies within. Net. Framework.

Another type of applications are services (or web services). Services are a certain software code that is located on the server and starts by Request from user. For example, you can create a set of services. by working with data from databasestored on the server. Usually, other types of applications (desktop applications, web applications, etc.) refer to services in order to perform any operation on the server or get data from the server.

Within the platform. Net. Framework There are a number of technologies that allow you to create services. The oldest technology is ASP..Net Web. Services. It allows you to create simple web services that work by Protocol Http./ Https. Further development Fixed technology Windows Communication Foundation (WCF). This platform is the most powerful and flexible tool that supports different types channels ( Http., TCP., named channels, etc.) and significantly expands the opportunities of the developer by Creating services.

There are also additional branches of the WCF project - this is WCF Syndication. Extensions (WCF REST) \u200b\u200band ADO..NET DATA. Services. These projects are designed to ensure that it is convenient to build data access services.

Finally, the latest type of applications are mobile applications. Mobile applications Work as part of mobile devices based on the operating system Windows Mobile. For mobile devices, there is also a subset of possibilities. Net. Framework called. Net Compact. Framework.

Thus, the entire spectrum of technologies within the platform. Net. Framework can be submitted to the following scheme.