Showing posts with label .NET Framework. Show all posts
Showing posts with label .NET Framework. Show all posts

Monday, April 18, 2016

Common Language Runtime Architecture

  • Class Loader: In this component the compiler of the .Net Framework compiles the source code into intermediate code and it consists of MSIL code and Metadata and they are contained in a portable executable (PE) file.
  • Code Manager: This component manages the code during execution time. It is the responsibility of the code manager to allocate memory to the objects.
  • Garbage collector: This component provides the automatic garbage collection of the object when the object is no longer in use. 
  • Security Checker: It is the most important component of CLR. The responsibility is to restrict the access to system resources such as hard disk.
  • Type Checker: This component provides the facility of data type checking of the variable. It also checks the valid operations on the corresponding data type.
Framework Class Library
The .Net Framework class library is the collection of reusable types which can be integrated with the Common Language Runtime. The class library is the object oriented. The other main component of the .Net Framework is Framework Class Library which is a standard library. It is the collection of thousands of reusable classes, interfaces and value types.

Sunday, April 17, 2016

Common Language Runtime (CLR)

The Common Language Runtime is the first main component of .Net Framework. The Common Language Runtime main features are to manage memory, thread execution, code execution, code safety verification and other services. CLR is an execution environment for the program code which is defined by CLI. Basically, CLR lies between operating systems and applications which are written in .Net languages. Some of the features of CLR are:
  • Automatic Memory Management – The CLR provides the garbage collection where the lifetime of the objects is managed by garbage collection only and it is known as managed data.
  • Platform Independence – We can build program in any language which targets the CLR, while compiling the program the compiler translates the code into an intermediate language which is CPU independent. It can be executed from any platform which supports the .Net CLR.
  • Security management – It can be achieved through code access Security model. In this, model CLR implements restrictions on managed code with the use of objects called permissions. It specifies what the code can access instead of specifying who can access the resources.
  • Language interoperability – The ability of an application to communicate with another application written in a different programming language. It helps in the reusability of code.

Thursday, April 14, 2016

Common Language Specification (CLS)

The Common Language Specification (CLS) is the set of some basic language features where .Net languages can develop the applications and services, which are compatible with the .Net Framework. If the situation arises of communicating objects which are written in different .Net Complaint languages, then those objects must expose the features that are common to all the languages.
Common Language Specification (CLS) provides the feature of complete interoperability among applications, which is regardless of the language used to create the application.
Common Language Specification (CLS) defines the subset of Common Type System (CTS) and the Common Type System (CTS) describes the set of types that can use different .Net languages are common, it ensure that objects written in different languages can communicate with each other.

Wednesday, April 13, 2016

Common Type System (CTS)

It describes the set of types which can be used in different .Net languages as common. It ensures that the objects which are written in different .Net languages can communicate with each other. But for the communication between programs that are written in any .NET complaint language, the types would have to be compatible on the basic level.
It supports the object oriented concepts that is why all the types are represented in this as objects and also provides support of sharing of common data types. CTS support two different types: Value and Reference type.
  • Value type: The primitive or built in data types of the programming language are known as Value type. It also includes user defined types and enumerations. They are used to store the value of the variable which includes String, Character, Integer, etc. These data types are passed in the method by using by value method. 
  • Reference Types: In the reference types they store a reference to the value's memory address, and are allocated on the heap. They can be self-describing types, pointer types, or interface types. Reference types are those whose data type objects are represented by a reference to the object's actual value.

Tuesday, April 12, 2016

Common Language Infrastructure

The Common Language Infrastructure (CLI) is developed by Microsoft and is standardized by ISO and ECMA which helps in running high level language application programs in different computer systems. The CLI allows multiple high-level languages to be used on different platforms without being writing again for the application. The CLI has four aspects which are as follows:-
  • CTS (Common Type System) - The set of data types and operations which are shared by all the CTS-compliant programming languages.
  • Meta data - It describes all those classes and class members which are defined in the assembly, and those classes and class members which are in the current assembly and will be called from the another assembly. 
  • CLS (Common Language specification) - The set of basic rules for any language which is targeting the CLI should conform to interoperate with other CLS-compliant languages. 
  • VES (Virtual Execution System) - The VES will load and execute CLI-compatible programs using the metadata to combine with the separated executed pieces of code at runtime.

Monday, April 11, 2016

Features of .Net Framework

  • Memory Management – In many other programming languages the responsibility of developers is to allocate and reallocate the memory but in .Net Framework CLR is responsible for all these.
  • Common Type System – In other programming languages, the basic types are defined by the compiler only, where interoperability is not possible whereas in the .NET Framework, the basic types are defined by the .NET Framework type system which are common to all languages which are the part of the .NET Framework.
  • Extensive class library – The programmers can use the readily accessible library of various data types and members from the .NET Framework Class Library instead of writing the vast amount of codes.
  • Version compatibility – Applications which have been developed by using a particular version of the .NET Framework can run without modification on a later version.

Tuesday, December 23, 2014

Application Deployment

1. What is deployment?
Deployment refers to the distribution of an application among various end-users. It is a process that makes software available for use by just installing it on the client computer.

2. List different ways of deployment that are supported by .NET Framework 4.0.
  • Windows Installer
  • ClickOnce
  • XCOPY
  • Copy Web Site
  • Publish Web Site tool
3. What is XCOPY?
XCOPY enables you to deploy an application by copying the application directory and all subdirectories to the target computer and then executing the application on the client. The application starts executing on the target computer by using its assembly file, which is a self-description file that contains all the information about the application. The XCOPY deployment does not make any impact on the target system while configuring the components and registering entries, and is therefore known as zero-impact installation.

4. Does XCOPY copy the hidden and system files?
No. By default, XCOPY excludes the hidden and system files. However, you can include the hidden and system files using the /h switch.

5. Why do you use Windows Installer?
The Windows Installer deployment technique allows you to deploy Windows-based and Web applications by creating a Windows Installer Package. The installer package has an extension of .msi and it contains the application, any dependent files, registry entries, and the rest. The installer package can then be distributed to various end-users by simply copying it on the target computers.

The end-users can then run the installer package to install the application anywhere in their computers. The installation takes place using the installation wizard; therefore, the users can easily install the application on their system. Once your application is installed on the target computer, end-users can open the application from the installed location.

Monday, December 22, 2014

Windows Workflow Foundation

1. What is Windows Workflow Foundation (WF)?
Windows Workflow Foundation (WF) is a technology that was first introduced in .NET Framework 3.0. WF consists of a programming model, a workflow runtime engine, workflow designer, a rules engine, and tools to quickly build workflow-based applications on Windows. WF facilitates the separation between the business process code and the actual implementation code.

2. What are the components of WF 4.0?
WF consists of several components that work together to create desired workflow. The components of WF are given as follows:
  • Workflows and activities
  • Base activity library
  • Custom activities
  • Host process
  • Activity data mode!
  • Runtime engine
  • Runtime services

3. What is a workflow?
A workflow is a collection of actions (called activities) that presents the model of a process. A workflow provides a way to describe the order of the execution of a long running process and relationships between different activities. Multiple instances of a workflow may be active at any given moment in an application.

Sunday, December 21, 2014

ASP.NET

1. What is ASP?
Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting languages to create dynamic Web pages, which can be run on any type of browser. The Web pages are built by using either VBScript or JavaScript and these Web pages have access to the same services as Windows application, including ADO (ActiveX Data Objects) for database access, SMTP (Simple Mail Transfer Protocol) for e-mail, and the entire COM (Component Object Model) structure used in the Windows environment. ASP is implemented through a dynamic-link library (asp.dll) that is called by the IIS server when a Web page is requested from the server.

2. What is ASP.NET?
ASP.NET is a specification developed by Microsoft to create dynamic Web applications, Web sites, and Web services. It is a part of .NET Framework. You can create ASP.NET applications in most of the .NET compatible languages, such as Visual Basic, C#, and J#. The ASP.NET compiles the Web pages and provides much better performance than scripting languages, such as VBScript. The Web Forms support to create powerful forms-based Web pages. You can use ASP.NET Web server controls to create interactive Web applications. With the help of Web server controls, you can easily create a Web application.

Saturday, December 20, 2014

Dynamic Programming

1. What is Dynamic Language Runtime (DLR)?
DLR is a runtime environment that allows you to integrate dynamic languages with the Common Language Runtime (CLR) by adding a set of services, such as expression trees, call site caching, and dynamic object interoperability to the CLR.

The System.Dynamic and System.Runtime.CompilerServices namespaces are used to hold the classes for DLR. It also provides dynamic features to statically-typed languages, such as C# and Visual Basic to enable their interoperation with dynamic languages.


2. What are the advantages of DLR?
The various advantages provided by DLR are:
  • Allows you to easily implement the dynamic languages to the .NET Framework.
  • Provides dynamic features to statically-typed languages. The statically-typed .NET Framework languages, such as C# and Visual Basic can create dynamic objects and use them together with statically-typed objects.
  • Implements sharing of libraries and objects, which means that the objects and libraries implemented in one language can be used by other languages using DLR. The DLR also enables interoperation between statically-typed and dynamic languages.
  • Enables fast execution of dynamic operations by supporting advance caching.

3. Give a brief introduction to Binders.
Binders are used by DLR to communicate with not the .NET Framework but also with various other services, such as Silverlight and COM. These services represent language-specific semantics and specify how a particular operation can be performed at the call site.

Call sites refer to the area in the code where logical and mathematical operations, such as a + b or a.b() are performed on dynamic objects.

Friday, December 19, 2014

ADO.NET

1. What is the full form of ADO?
The full form of ADO is ActiveX Data Object.

2. Explain ADO.NET in brief.
ADO.NET is a very important feature of .NET Framework, which is used to work with data that is stored in structured data sources, such as databases and XML files. The following are some of the important features of ADO.NET:
  • Contains a number of classes that provide you with various methods and attributes to manage the communication between your application and data source.
  • Enables you to access different data sources, such as Microsoft SQL Server, and XML, as per your requirements.
  • Provides a rich set of features, such as connection and commands that can be used to develop robust and highly efficient data services in .NET applications.
  • Provides various data providers that are specific to databases produced by various vendors. For example, ADO.NET has a separate provider to access data from Oracle databases; whereas, another provider is used to access data from SQL databases.
3. What are major difference between classic ADO and ADO.NET?
Following are some major differences between both
  • In ADO we have recordset and in ADO.NET we have dataset.
  • In recordset we can only have one table. If we want to accommodate more than one tables. We need to do inner join and fill the recordset. Dataset can have multiple tables.
  • All data persist in XML as compared to classic ADO where data persisted in Binary format also.

Thursday, December 18, 2014

Object-Oriented Programming

1. What is object-oriented programming (OOP)?
OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object is created in the program to represent a class. Therefore, an object encapsulates all the features, such as data and behavior that are associated to a class. OOP allows developers to develop modular programs and assemble them as software. Objects are used to access data and behaviors of different software modules, such as classes, namespaces, and sharable assemblies. .NET Framework supports only OOP languages, such as Visual Basic .NET, Visual C#, and Visual C++.

2. What is a class?
A class describes all the attributes of objects, as well as the methods that implement the behavior of member objects. It is a comprehensive data type, which represents a blue print of objects. It is a template of object.

A class can be defined as the primary building block of OOP. It also serves as a template that describes the properties, state, and behaviors common to a particular group of objects.

A class contains data and behavior of an entity. For example, the aircraft class can contain data, such as model number, category, and color and behavior, such as duration of flight, speed, and number of passengers. A class inherits the data members and behaviors of other classes by extending from them.

3. What is an object?
They are instance of classes. It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Attributes and behavior of an object are defined by the class definition.

Tuesday, December 16, 2014

.NET Framework

1. What is .NET Framework?
.NET Framework is a complete environment that allows developers to develop, run, and deploy the following applications:
  • Console applications
  • Windows Forms applications
  • Windows Presentation Foundation (WPF) applications
  • Web applications (ASP.NET applications)
  • Web services
  • Windows services
  • Service-oriented applications using Windows Communication Foundation (WCF)
  • Workflow-enabled applications using Windows Workflow Foundation (WF)

.NET Framework also enables a developer to create sharable components to be used in distributed computing architecture. NET Framework supports the object-oriented programming model for multiple languages, such as Visual Basic, Visual C#, and Visual C++. .NET Framework supports multiple programming languages in a manner that allows language interoperability. This implies that each language can use the code written in some other language.

2. What are the main components of .NET Framework?
.NET Framework provides enormous advantages to software developers in comparison to the advantages provided by other platforms. Microsoft has united various modern as well as existing technologies of software development in .NET Framework. These technologies are used by developers to develop highly efficient applications for modern as well as future business needs. The following are the key components of .NET Framework:
  • .NET Framework Class Library
  • Common Language Runtime
  • Dynamic Language Runtimes (DLR)
  • Application Domains
  • Runtime Host
  • Common Type System
  • Metadata and Self-Describing Components
  • Cross-Language Interoperability
  • .NET Framework Security
  • Profiling
  • Side-by-Side Execution