Monday, June 16, 2008

what is different between BCL (Base Class Library) and FCL (Framework Class Library) in Microsoft dot net (.net)?

Base Class Library :

 

The Base Class Library (BCL) is a standard library available to all languages using the .NET Framework. In order to make the programmer's job easier, .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. It is much larger in scope than standard libraries for most other languages, including C++, and would be comparable in scope to the standard libraries of Java.

Framework Class Library:

 

The .NET Framework Class Library (FCL) consists of a series of classes, interfaces, and value types that can be used to program with. The .NET Framework has types that allow one to easily:

  • Create extravagant graphical user interface applications
  • (System.Windows.Forms)
  • Access and manipulate data in various database formats (System.Data and System.Xml)
  • Dynamically query type information (System.Reflection)
  • Perform basic Input/Output operations (System.IO)
  • Perform operating system security checks (System.Security)
  • Create internet enabled applications (System.Net and System.Net.Sockets)
  • Create dynamic web based applications – also known as ASP.NET (System.Web)
  • Access basic data types, event handlers, and exceptions (System)

 

what is different between BCL and FCL in dot net (.net)?

BCL , FCL both are not same. The Base Class Library (BCL), sometimes incorrectly referred to as the Framework Class Library (FCL) (which is a superset including the Microsoft.* namespaces), is a library of types available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions such as file reading and writing, graphic rendering, database interaction, XML document manipulation, and so forth. The BCL is much larger than other libraries, but has much more functionality in one package. The BCL would include everything in mscorlib and system and possibly some additional assemblies.  It includes all the type, assembly, reflection and collection classes of the framework (among others).  It does not include ASP.NET, ADO.NET, WinForms, management namespace and other classes/namespaces that provide additional functionality.

FCL  = All namespaces (entire framework).

BCL = Common namespaces (core framework).

FCL = BCL + everything else that ships as part of the .NET Framework. 

Tuesday, June 3, 2008

Download the latest SQL Server 2008 trial software Today

clip_image001[5]

 

Download the latest SQL Server 2008 Community Technology Preview (CTP) and try out the latest features for 180 days! The SQL Server development team uses your feedback to help refine and enhance product features. Download the newest CTP today and share your feedback.

Select one of the options listed below. The CTP software for IT Professionals and Developers is exactly the same, but the supporting experience has been tailored to offer greater relevance for each profession

 

clip_image001[7]

Monday, May 12, 2008

Download Eclipse Classic 3.3.2 eclipse-SDK-3.3.2-win32.zip - free

Eclipse 3.3.2 :

clip_image002

Download eclipse -SDK-3.3.2-win32.zip just click on download button below.

You will need a Java 5 JRE recommended.

Eclipse Classic is the most recent release from the Eclipse top-level project (it is what has traditionally been the main download on this site). It contains what you need to build applications based on Eclipse technology, including integrated development environments (IDE), and rich client applications using the Eclipse Rich Client Platform (RCP). The Eclipse Classic provides superior Java editing with incremental compilation, the Plug-in Development Environment (PDE), complete source code for the Eclipse Platform, and much more.

click here to download

clip_image004

Download Visual Studio 2008 Professional Edition & Team System 2008 Trial Software – Free:

Download Visual Studio 2008 Professional Edition 90-Day Trial – free:

clip_image002

Hi

You can Download Visual Studio Team System 2008 90-day trial software. Just click on Download button below

clip_image004

Download Visual Studio Team System 2008 Trial Software – Free:

clip_image006

You can Download Visual Studio Team System 2008 - Trial Software. . Just click on Download button below

clip_image004[1]

Thursday, May 8, 2008

Difference between String and StringBuilder

C# and Java What is the difference between String and StringBuilder classes?

String is an object. Both String and StringBuilder class stores strings

String :

String is immutable i.e. Read only, non updatable.

Example: String somename = "Lavakumar";

We cannot change a String object after creating one.It means we can’t change the value internally.

If you want change the value of somename object a new object is created then the reference of somename object is changed to new object. The old object is collected by GC ( garbage collecter).

Example: String somename = "sangeetham";

New object with value “sangeetham” is created. Then the reference of somename variable changed from “Lavakumar” object to “sangeetham” object. And the old object “sangeetham” is collected by GC (garbage collector).

Example:

using System;

sing System.Text;

public class string

{

static void Main()

{

DateTime start = DateTime.Now;

string x = "";

for (int i=0; i < 100000; i++)

{

x += "~";

}

DateTime end = DateTime.Now;

Console.WriteLine ("Time taken: {0}", end-start);

}

}

It takes nearly 10 seconds. Double the number of iterations, and it takes over a minute.

The problem is that strings not changeable (immutable). Just because we're using "+=" here doesn't mean the runtime actually appends to the end of the existing string. In fact, x += "!"; is absolutely equivalent to x = x+"!";. The concatenation here is creating an entirely new string, allocating enough memory for everything, copying all the data from the existing value of x and then copying the data from the string being appended ("~"). As the string grows, the amount of data it has to copy each time grows too, which is why the time taken didn't just double when I doubled the number of iterations.

String Builder :

String Builder is mutable i.e. subject to change.(we can change the value, updatable)

Default some space is allocated for String Builder.

If you are using for loop definitely go to stringBuilder.

It gives better performance when we are adding more than 10 strings.

In this there is no object creation for each addition. So String Builder is faster than String.

String builder initially some default memory.

By using StringBuilder.Append() method we can append Strings.

Example:

using System;

using System.Text;

public class stringbuild

{

static void Main()

{

DateTime start = DateTime.Now;

StringBuilder builder = new StringBuilder();

for (int i=0; i < 100000; i++)

{

builder.Append("~");

}

string x = builder.ToString();

DateTime end = DateTime.Now;

Console.WriteLine ("Time taken: {0}", end-start);

}

}

It takes nearly 30-40ms only. The time taken is roughly linear in the number of iterations (i.e. double the iterations and it takes twice as long). It does this by avoiding unnecessary copying - only the data we're actually appending gets copied. StringBuilder maintains an internal buffer and appends to that, only copying its buffer when there isn't room for any more data. (In fact, the internal buffer is just a string - strings are immutable from a public interface perspective, but not from within the mscorlib assembly.) We could make the above code even more efficient by passing the final size of the string (which we happen to know in this case) to the constructor of StringBuilder to make it use a buffer of the right size to start with - then there'd be no unnecessary copying at all. Unless you're in a situation where you have that information readily to hand though, it's usually not worth worrying about - StringBuilder doubles its buffer size when it runs out of room, so it doesn't end up copying the data very many times anyway.

visualized comparison of both:

clip_image002[6]

                                                                                     no of iterates

clip_image001( blue)is the performance of the pure String approach.

clip_image002(red) is StringBuilder at its basic settings.

clip_image003(green) represents a StringBuilder initialized to the size of the final string.

StringBuilder performance can sometimes be a bit tricky because there’s kinda “break-even-point” you always keep in mind.

Conclusion:
If you have to concatenate a string more than 10 times, it’s better to use StringBuilder.

Read more.....(Thanks to yoda.arachsys)

Read more.....(Thanks to bka-bonn.de)

Lava

Google
 

blogger templates 3 columns | Techzilo