.NET Coders and Developers

.NET Coders and Developers is a right place if you are new in development, it provides all stuff you need to develop and design web, window applications. And if not you can simply post your questions.

Google
 

Wednesday, January 30, 2008

C# | C Sharp Programming Language Getting Started

C# is an object-oriented programming language developed by Microsoft as part of the .NET initiative and later approved as a standard by ECMA and ISO. Anders Hejlsberg leads development of the C# language, which has a procedural, object-oriented syntax based on C++ and includes aspects of several other programming languages (Java) with a particular emphasis on simplification.

Tuesday, January 29, 2008

COMPILATION PROCESS

.Net application are not compiled as other programing language compilers compile. The compilation process is however more or less same as of JAVA. .Net compiler does this in 2 steps, first it compiles the code into the intermediate language called MSIL(Microsoft Intermediate Language) or CIL(Common Intermediate Language) which is not platform dependent and then CLR's(Common Language Runtime) JIT(Just in Time Compiler) convert MSIL or CIL code into the Native Code. Now this native code is machine dependent, but this does not means that .NET is platform independent as it requires only Microsoft dedicated server(although it comes for Linux too, but with less support and features).



In my last post missed out to discuss some main namespaces of Base Class Library, as BCL is updated and contains additional namespaces in every new release, so i will discuss only important one's

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.IO:- Allows you to read from and write to different streams, such as files or other data streams. Also provides a connection to the file system.

System.CodeDom:- This library provides the ability to create code and run it, at runtime.

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.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 set of computer software components that can be used by programmers to access data and data services.

System.Deployment:- Allows you to customize the way your application upgrades when using ClickOnce.

System.Diagnostics:- Gives you the ability to diagnose your application. It includes event logging, performance counters, tracing, and interaction with system processes.

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.Globalization:- Provides help for writing internationalized applications. Culture-related information, including the language, the country/region, the calendars in use, the format patterns for dates, currency, and numbers can be defined.

System.Management:- Allows you to query for 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 you the ability to play system sounds and .wav files.

System.Messaging:- Allows you 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.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. You have "the ability to dynamically create and invoke types". It exposes the API to access the Reflective programming capabilities of CLR.

System.Resources:- Allows you to manage many different resources in the application in order to internationalize an application for different cultures and languages.

System.Runtime:- Allows you to manage the runtime behavior of an application or the CLR. Some of the included abilities are interoping 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 you to build security into your application based on policy and permissions. It provides services such as cryptography.

System.ServiceProcess:- Allows you to create applications that run as a service within Windows.

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.Timers:- Allows you to raise an event on a specified interval.

System.Transactions:- Provides support for local or distributed transactions.

so in my next post i will start with the actual stuff..

Wednesday, January 23, 2008

BASIC FRAMEWORK STRUCTURE

Framework is designed for cross-language compatibility means its components can interact with each other even if they all are written in different languages. It is because of the unique compilation process of .NET, to understand that you need to understand the two main components of .NET
  • Common Language Runtime CLR.
  • .NET Framework Class Library or Base Class Library BCL.

    Common Language Runtime CLR is an environment that manages the code execution, code compilation, thread management, memory allocation and garbage collection. So when the code is compiled it is not directly converted binary machine code rather into MSIL (Microsoft Intermediate Language) then CLR convert it into binary code.

    Base Class Library BCL provides a collection of a useful and reusable types that are designed to integrate with CLR, these types are object-oriented and fully extensible.

    This cross language compatibility and interoperability is possible only because of CLR. Data types are different in each language in their structure and references so Framework provides Common Type System CTS which ensures type compatibility and enforces strict type safety, like VB has Integer and C# has int and both are represented in MSIL as System.Int32, as vb and c# both uses common type system.

    One another primary unit of .net application is ASSEMBLY: An Assembly is a self describing collection of code, resources and meta data. Assembly Manifest contains information about what is contained within assembly, like identity information , list of all types exposed by assembly, list of other assemblies required by assembly, etc. Each assembly contains only one assembly manifest. Further assemblies contains one or more modules which contains the code that makes up your application or library and contains meta data which describes that code.
  • Monday, January 21, 2008

    .NET Framework

    .NET Framework is the collection of various tools, technologies and languages which work together to communicate on multi-platform. It is a platform in which .net applications run and latest version is .NET Framework 3.5 and is available here.

    The Framework contains all the elements required to developer and execute the application. You can create Window Based as well as Web Based applications very easily and in language in which you feel more comfortable like c# or Visual Basic.
    Framework is consist of libraries and classes which makes this very easy to use, for instance Framework 2.0 contains :
  • 18,619 types
  • 12,909 classes
  • 401,759 public methods
  • 93,105 public properties
  • 30,546 public events
    Do not worry these all are easy to use and understand. So any one who wishes to be developer can easily learn and implement.
    Microsoft also provides special certifications in .NET called MCSD(Microsoft Certified Solution Developer), MCAD(Microsoft Certified Application Developer) and getting that you need to be fully prepared.
    Preparing for the .NET exam or interview you need to understand every aspect of it and going step by step but consistently holds key to success.

    So in next post i will be discussing about the various key points like CLR, CLS, etc
  •