Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

Date : 16/08/2011 CONTENTS:

1)JIT 2)BCL 3)Assemblies 4)C# 5)Arrays

JIT:
In a bytecode-compiled system, source code is translated to an intermediate representation known as bytecode. Bytecode is not the machine code for any particular computer, and may be portable among computer architectures. The bytecode may then be interpreted by, or run on, a virtual machine. The JIT compiler reads the bytecodes in many sections (or in full rarely) and compiles them interactively into machine language so the program can run faster. Java performs runtime checks on various sections of the code and this is the reason the entire code is not compiled at once.[1] This can be done per-file, per-function or even on any arbitrary code fragment; the code can be compiled when it is about to be executed (hence the name "just-in-time"), and then cached and reused later without needing to be recompiled. TYPES OF JIT: There are 3 types of JIT namely (1) PRE JIT: It Compiles complete source code to native caode In a single Compilation. (2) ECONO JIT : It compiles only those methods that are called at Runtime. (3) NORMALE JIT : It compiles only those methods that are called at Runtime and are stored in cache.

BCL:
The Base Class Library (BCL) is a standard library available to all languages using the .NET Framework. .NET includes the BCL in order to encapsulate a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation, which makes the programmer's job easier. It is much larger in scope than standard libraries for most other languages, including C+ +, and is comparable in scope to the standard libraries of Java. The BCL is sometimes incorrectly referred to as the Framework Class Library (FCL), which is a superset including the Microsoft.* namespaces. Namespaces: Some of the namespaces may or may not be officially considered part of the BCL by Microsoft, but all are included as part of the libraries that are provided with Microsoft's implementation of the .NET Framework.There are 2 types of namespaces namely

Standardized namespaces Non-standardized namespaces

Standardized namespaces These are the namespaces that are standardized as of the ECMA 335 and ISO/IEC 23271:2006 standards.

System This namespace includes the core needs for programming. It includes base types like String, DateTime, Boolean, and so forth, support for environments such as the console, math functions, and base classes for attributes, exceptions, and arrays. System.Collections Defines many common containers or collections used in programming, such as lists, queues, stacks, hashtables, and dictionaries. It includes support for generics. System.Diagnostics Provides the ability to diagnose applications. It includes event logging, performance counters, tracing, and interaction with system processes. System.Globalization Provides help for writing internationalized applications. "Culture-related information, including the language, the country/region, the calendars in use, [and] the format patterns for dates, currency, and numbers" can be defined. System.IO Enables reading from and writing to different streams, such as files or other data streams. Also provides a connection to the file system. System.Net Provides an interface "for many of the protocols used on networks today",such as HTTP, FTP, and SMTP. Secure communication is supported by protocols such as SSL. System.Reflection Provides an object view of types, methods, and fields; and "the ability to dynamically create and invoke types". It exposes the API to access the Reflective programming capabilities of CLR. System.Runtime Allows management of the runtime behavior of an application or the CLR. Some of the included abilities are interoperable with COM or other native code, writing distributed applications, and serializing objects into binary or SOAP. System.Security "Provides the underlying structure of the common language runtime security system." This namespace allows security to be built into applications based on policy and permissions. It provides services such as cryptography. System.Text Supports various encodings, regular expressions, and a more efficient mechanism for manipulating strings (StringBuilder). System.Threading Helps facilitate multithreaded programming. It allows the synchronizing of "thread activities and access to data" and provides "a pool of system-supplied threads. System.Xml "Provides standards-based support for processing XML, including reading, writing, schemas, serialization, searching, and transforming.

Non-standardized namespaces These are the namespaces that are not standardized as of the ECMA and/or ISO standards, and are specific to Microsoft implementation. However, even if implementing them is not mandatory, some of them have been implemented completely or partially by other .NET implementations. System.CodeDom This library provides the ability to create code and run it, at runtime. System.ComponentModel Provides the ability to implement the run-time and design-time behavior of components and controls. It contains the infrastructure "for implementing attributes and type converters, binding to data sources, and licensing components. System.Configuration Provides the infrastructure for handling configuration data. System.Data This namespace represents the ADO.NET architecture, which is a set of computer software components that can be used by programmers to access data and data services. System.Deployment Allows customization of the way applications upgrade when using ClickOnce. System.DirectoryServices Provides easy access to Active Directory from managed code. System.Drawing Provides access to GDI+ graphics functionality, including support for 2D and vector graphics, imaging, printing, and text services. System.EnterpriseServices "Provides .NET objects with access to COM+ services making the .NET Framework objects more practical for enterprise applications." System.Linq Defines the IQueryable<T> interface and related methods, that lets LINQ providers to be plugged in. System.Linq.Expressions Allows Delegates and Lambda expressions to be represented as expression trees, so that the high-level code can be examined and processed at runtime. System.Management Allows querying for system information, "such as how much free space is left on the disk, what is the current CPU utilization, which database a certain application is connected to, and much more." System.Media Provides the ability to play system sounds and .wav files. System.Messaging Provides the ability "to connect to, monitor, and administer message queues on the network and send, receive, or peek messages." .NET Remoting is another

name for some of the functionality provided. This namespace is being superseded by Windows Communication Foundation. System.Resources Allows management of resources in the application in order to internationalize an application for different cultures and languages. System.ServiceProcess Allows the creation of applications that run as a service within Windows. System.Timers "Allows you to raise an event on a specified interval." System.Transactions Provides support for local or distributed transactions. System.Web Provides various web related functionality. It enables browser-server communication and the creating XML Web services. Most or all of these libraries are referred to as the ASP.NET architecture. System.Windows.Forms This namespace contains the Windows Forms architecture which provides access to the native Windows interface elements by wrapping the existing Windows API. This allows for writing graphical applications for Windows from within managed code.[33] This system is being superseded by the Windows Presentation Foundation.

ASSEMBLIES:
In the .NET framework, an assembly is a compiled code library used for deployment, versioning, and security. There are two types: process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. .NET assemblies contain code in CIL, which is usually generated from a CLI language, and then compiled into machine language at run time by the CLR just-in-time compiler. 1. private assembly- can be accessed only by single application. 2. shared assembly-can be accessed by multiple applications in a system. 3. Static Assembly- It uses fixed resources. 4. Dynamic Assembly- It supports dynamic creation of resouces or files. 5.Satellite Assembly- Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. .

CONVERTING PRIVATE ASSEMBLY INTO PUBLIC ASSEMBLY:


To convert private assembly into public assembly 3 factors are to be considered. Section 1: Create a strong name for assembly: <1> Go to command prompt; <2> Type C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\; While building strong name we use one tool called sn.exe Syntax: sn.exe k < assembly-name> Section2:-k "C:\[PathInVSProject]\Projectname.snk" <1>Add <Assembly: AssemblyKeyFile ("..\..\Projectname.snk")> to AssemblyInfo.vb in VS project; <Assembly: AssemblyTitle("")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("")> <Assembly: AssemblyCopyright("")> <Assembly: AssemblyTrademark("")> <Assembly: CLSCompliant(True)> <Assembly: AssemblyKeyFile("..\..\projectname.snk")> <2>build VS project(it will generate a new strong named dll); Section 3:Install assembly to GAC: <1> Go back to command prompt(make sure that location still points to C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\; <2> Type gacutil -i"C:\[PathToBinDirectoryInVSProject] \projectname.dll"(if project is in release mode) gacutil -i"C:\[PathToObj\DebugDirectoryInVSProject] \projectname.dll"(if project is in debug mode) To uninstall Type gacutil -u C:\[PathToBinDirectoryInVSProject]

PORATABLE EXECUTABLE FILE IN .NET:


The Portable Executable (PE) format is a file format for executables, object code and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term

"portable" refers to the format's versatility in numerous environments of operating system software architecture. The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. This includes dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data. On NT operating systems, the PE format is used for EXE, DLL, SYS (device driver), and other file types. The Extensible Firmware Interface (EFI) specification states that PE is the standard executable format in EFI environments. PE is a modified version of the Unix COFF file format. PE/COFF is an alternative term in Windows development.

C#:
C# (pronounced "C-sharp") is an object-oriented programming language from Microsoft that aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java.

ARRAY:
An array is a systematic arrangement of objects, usually in rows and columns. Syntax: Data Type[] Array-name=new Data type[]; Types of Arrays: 1) Single-dimensional arrays are the simplest form of arrays. These types of arrays are used to store number of items of a predefined type. All items in a single dimension array are stored in a row starting from 0 to the size of array n-1. Ex: int[] myArray = {1, 3, 5, 7, 9};
string[] weekDays = {"Sun","Sat","Mon","Tue","Wed","Thu","Fri"};

2) multi-dimensional array of dimension n (i.e., an n-dimensional array or simply n-D array) is a collection of items which is accessed via n subscript expressions. For example, in a language that supports it, the dimensional array x is accessed by writing x[i,j]. Ex: int[,] myArray = new element of the two-

int[,] {{1,2}, {3,4}, {5,6}, {7,8}};

3) Jagged arrays also known as arrays of arrays, offer not only a space savings in certain conditions, but also a performance enhancement. Jagged arrays, on the other hand, allow you to allocate a different number of columns for each row. In the CreateArrays subroutine shown below, we populate both arrays inside of

loops. Notice the jagged array initialization includes the extra step to allocate an array of days for each month. Using the exact amount of storage required for a month saves a small amount of memory in comparison to the multidimensional array. 4) Static array is the array where the memory size is fixed. 5) Dynamic array does not have a predefined size. The size of a dynamic array
increases as you add new items to the array. You can declare an array of fixed length or dynamic. You can even change a dynamic array to static after it is defined.

6) Normal array is the array where the memory size is less than 64KB. 7) Huge array is the array where the memory size is greater than 64KB.

You might also like