Wednesday, March 10

What is the difference between ADO and ADO.NET?

1. ADO objects are COM objects. ADO.Net objects are represented using XML
2. ADO objects have difficulty travelling through firewalls. ADO.Net objects represented as text (XML) travel easily through all kinds of network restrictions.
3. ADO recordsets are heavier than the ADO.Net counterparts datasets.
4. ADO recordsets can hold data from one data source at a time. ADO.Net datasets can hold data from various sources and integrate the data and write it back to one / several data sources.
5. ADO.Net dataset represents in memory representation of a database. ADO recordsets is merely a set of rows retrieved from a data source.

What is COM, DCOM objects in DotNet

The dot net frameworks allow you to build serviced components that can use com+ services. These components of dot net framework runs in the manages execution environment of dot net framework that is share their content with com+ application.

Now the question arise what com+ and what is doing how is its comes in existence. Before com+ comes into existence. COM (Component Object Model) is first programming model that provide component based approach to software development. This component based approach of com allowed us to develop small logical reusable and stand alone modules that integrates into a single application. But these components could not be display on over network.

So these drawback produce another model that is DCOM (distributes COM). DCOM programming model enabled you to display com components over network and distribute application easily across platforms. DCOM components also help in two-tier client/server applications. These models also have some drawback that helps to development of COM+ approach. What these drawbacks are…

These two-tier architecture helps us to sharing of resources and data but these approach have some drawbacks that are as follows.

The DCOM approach overburdened client computer with the responsibility of performing all processing functions while the server merely acted as traffic controller helps movement of data to and from the client and server components. So availability of resources was therefore always a problem and the performance of application suffered. Multiple request of data cause to network traffic. So performance of application decreases.

How dot net differs from other programming languages?

Other programming languages get compiled and run in their own specific run time environments and are not inter-operable.Where Dot Net supports programming languages run in a common runtime environment called CLR and get compiled into MSIL code which is interoperable with other programming languages supported by CLR.JIT is then used to convert MSIL to native code based on the operating system.CLR supports many utilities like Garbage Collection MemoryManagement and so on that make it a more efficient run time environment.


.NET is a framework and not a programming language. Hence we cannot compare .NET with other programming languages.

.NET framework has CLR (Common language runtime) which has the runtime libraries for all the languages supported by .NET. It is the responisbility of the runtime to take care of the code execution of the programs written using programming language.

.NET framework performs responsibilities like garbage collection (memory management) code access security code verification etc. In case of other programming languages these responsibilities has to be carried out by a programmer or s/w developer developing the application.

Advantage of using .NET is you can still continue programming in the language you are comfortable with.

Monday, March 8

Why choose C# over Visual Basic (VB)?

http://en.csharp-online.net/CSharp_FAQ:_Why_choose_CSharp_over_Visual_Basic_%28VB%29

The choice between C# and Visual Basic .NET is a subjective one based on prior experience. C++, Java, and J++ programmers will prefer the non-nonsense, terse syntax of C#. Visual Basic (VB) programmers may prefer to stick with the devil they know—Visual Basic .NET's case-insensitive, pseudo-natural language approach.

Both languages can access the identical .NET Framework libraries. Both perform largely similarly. In fact, with few exceptions, they perform almost the same assuming VB.NET has Option Strict turned on. Generally, C# is the favorite language of all but die-hard Visual Basic programmers.

The learning curve is steeper for the .NET Framework than for either language. Actually, it would be a simple matter to become fluent in both languages. Nevertheless, there are a few differences between C# and VB .NET as follows:
[edit]
C# advantages

* Explicit interface implementation - an interface implemented in a base class can be reimplemented in a derived class. Of course, this makes the class more obscure in the same way that member hiding does.
* Language support for unsigned types. Unsigned types can be used from VB .NET, but they are not supported by the language itself. This feature is available in VB .NET with Visual Studio 2005.
* Operator overloading. This feature is available in VB.NET with Visual Studio 2005.
* Unsafe code. This allows "pointer arithmetic", etc., and may improve performance in some situations. But, unsafe code circumvents most of the normal safety of features of C#. However, unsafe code is still managed code in a sense, i.e. it is compiled to IL, JITted, and run within the Common Language Runtime (CLR).
* using statement which makes unmanaged resource disposal simple. (Available in VB.NET with Visual Studio 2005.)
* Volatile variables.
* XML documentation generated from source code comments. This feature is available in VB.NET with Visual Studio 2005.

[edit]
Visual Basic.NET advantages

* Catch-When clauses allow exception filtering based upon runtime expressions in addition to by type.
* Late binding with Option Strict off makes legacy libraries without strongly typed interfaces easier to use; but, compile-time, type safety is not available.
* Named indexers - parameterized properties.
* Optional parameters - sometimes useful for COM interoperability
* Simpler event handling in which a method can declare that it handles an event instead of the handler being set up by code.
* Changing method names when implementing interfaces can cause readability and maintenance problems.
* Source code is compiled in the background by the VB.NET part of Visual Studio .NET. Unfortunately, Visual Studio slows down significantly as projects grow larger.
* Legacy Visual Basic functions - The Microsoft.VisualBasic namespace provides various legacy methods which can be used by other .NET languages using a reference to Microsoft.VisualBasic.dll. However, such methods can be detrimental to performance. Therefore, use them wisely or, perhaps, not at all. Readability is also a factor. The use of VB functions may make the source code easier to read for an old-time VB programmer. But, the code will be harder to read for a programmer trained in other .NET languages.

Saturday, February 27

What is different in Rules and Constraints

Rules and Constraints are similar in functionality but there is a An little diffrence between them.Rules are used for backward compatibility . One the most exclusive diffrence is that we an bind rules to a datatypes whereas constraints are bound only to columns.So we can create our own datatype with the help of Rules and get the input according to that.