Best Industrial Training in C,C++,PHP,Dot Net,Java in Jalandhar

Sunday, 25 December 2011

Data Types in .Net

Value Types
Reference Types
allocated on stack
allocated on heap
a value type variable contains the data itself
reference type variable contains the address of memory location where data is actually stored.
when you copy a value type variable to another one, the actual data is copied and each variable can be independently manipulated.
when copying a reference type variable to another variable, only the memory address is copied. Both variables will still point to the same memory location, which means, if you change one variable, the value will be changed for the other variable too.
integer, float, boolean, double,struct etc are value types.
string and object,class are reference types.

Friday, 23 December 2011

Features .Net Of 4.0

Interoperability
Because computer systems commonly require interaction between new and older applications, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework; access to other functionality is provided using the P/Invoke feature.
Common Runtime Engine
The Common Language Runtime (CLR) is the execution engine of the .NET Framework. All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling.
Language Independence
The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible datatypes and programming constructs supported by the CLR and how they may or may not interact with each other conforming to the Common Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework supports the exchange of types and object instances between libraries and applications written using any conforming .NET language.
Base Class Library
The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction, XML document manipulation and so on.

Why .Net Better Than Java

1.
1-      In .NET you have a choice of languages to code with (C#,VB.NET, Java,Boo,Python e.t.c), producing the same type of compiled code but in Java one is limited to the java language. One may argue that jython is an alternative, but even the creator of jython who later created it's .NET version called IronPython admitted that .NET is a more powerful technology.

2, NET prgrams run at native speed while java is interpreted which makes java slower.Although java has Just In Time compilation but it stills run slower. With .NET you are not limited to JIT but have the option AOT or ahead of time compilation if you want to eliminate startup delays.

3. Calling native code in java is not a very clean process. You need to generate some stub files which makes the whole process cumbersome and dirty. In .NET you just declare that you are calling a native function from a specified library and just start calling it.

4. .NET languages are richer than Java. They have object oriented feature that are absent in java e.g properties,delegates,generics.

5. Java GUI programs look alien on the host operating system. Even if you use the OS's theme you still notice that the java widgets look out of place.

6. .NET in the form of Mono has brought a whole revolution on the linux desktop in form of great applications like beagle, tomboy, diva, iFolder, banshee e.t.c. This is something that java has failed to do despite the fact that it's been there long
before .NET

7. Many programs that would have been difficult to develop with java have been developed with .NET things like compilers (Mono's C# and VB.NET) 3D game engines (unity game engine) e.t.c

8. The CLI is an open standard maintained by an independent standards organization (E.C.M.A) while java is still governed by SUN microsystems.Even though java has recently been open-sourced, it's future will still be highly influenced by SUN.

9. You can code on the .NET platform using Java but you cannot code on Java platform using any of the .NET languages.

10. Using Mono's IKVM to call java code from .NET or convert java classes to .NET assemblies. This is so efficient that large java programs like the eclipse I.D.E have been runned on .NET.