Tuesday, June 12, 2012


What is an application server?
As defined in Wikipedia, an application server is a software engine that delivers applications to client computers or devices. The application server runs your server code. Some well known application servers are IIS (Microsoft), WebLogic Server (BEA), JBoss (Red Hat), WebSphere (IBM).
Compare C# and VB.NET
A detailed comparison can be found over here.
What is a base class and derived class?
A class is a template for creating an object. The class from which other classes derive fundamental functionality is called a base class. For e.g. If Class Y derives from Class X, then Class X is a base class.
The class which derives functionality from a base class is called a derived class. If Class Y derives from Class X, then Class Y is a derived class.
What is an extender class?
An extender class allows you to extend the functionality of an existing control. It is used in Windows forms applications to add properties to controls.
A demonstration of extender classes can be found over here.
What is inheritance?
Inheritance represents the relationship between two classes where one type derives functionality from a second type and then extends it by adding new methods, properties, events, fields and constants.
C# support two types of inheritance:
·         Implementation inheritance
·         Interface inheritance
What is implementation and interface inheritance?
When a class (type) is derived from another class(type) such that it inherits all the members of the base type it is Implementation Inheritance.
When a type (class or a struct) inherits only the signatures of the functions from another type it is Interface Inheritance.
In general Classes can be derived from another class, hence support Implementation inheritance. At the same time Classes can also be derived from one or more interfaces. Hence they support Interface inheritance.
Source: Exforsys.
What is inheritance hierarchy?
The class which derives functionality from a base class is called a derived class. A derived class can also act as a base class for another class. Thus it is possible to create a tree-like structure that illustrates the relationship between all related classes. This structure is known as the inheritance hierarchy.
How do you prevent a class from being inherited?
In VB.NET you use the NotInheritable modifier to prevent programmers from using the class as a base class. In C#, use the sealed keyword.
When should you use inheritance?
Read this.
Define Overriding?
Overriding is a concept where a method in a derived class uses the same name, return type, and arguments as a method in its base class. In other words, if the derived class contains its own implementation of the method rather than using the method in the base class, the process is called overriding.
Can you use multiple inheritance in .NET?
.NET supports only single inheritance. However the purpose is accomplished using multiple interfaces.
Why don’t we have multiple inheritance in .NET?
There are several reasons for this. In simple words, the efforts are more, benefits are less. Different languages have different implementation requirements of multiple inheritance. So in order to implement multiple inheritance, we need to study the implementation aspects of all the languages that are CLR compliant and then implement a common methodology of implementing it. This is too much of efforts. Moreover multiple interface inheritance very much covers the benefits that multiple inheritance has.
What is an Interface?
An interface is a standard or contract that contains only the signatures of methods or events. The implementation is done in the class that inherits from this interface. Interfaces are primarily used to set a common standard or contract.
When should you use abstract class vs interface or What is the difference between an abstract class and interface?
I would suggest you to read this. There is a good comparison given over here.
What are events and delegates?
An event is a message sent by a control to notify the occurrence of an action. However it is not known which object receives the event. For this reason, .NET provides a special type called Delegate which acts as an intermediary between the sender object and receiver object.
What is business logic?
It is the functionality which handles the exchange of information between database and a user interface.
What is a component?
Component is a group of logically related classes and methods. A component is a class that implements the IComponent interface or uses a class that implements IComponent interface.
What is a control?
A control is a component that provides user-interface (UI) capabilities.
What are the differences between a control and a component?
The differences can be studied over here.
What are design patterns?
Design patterns are common solutions to common design problems.
What is a connection pool?
A connection pool is a ‘collection of connections’ which are shared between the clients requesting one. Once the connection is closed, it returns back to the pool. This allows the connections to be reused.
What is a flat file?
A flat file is the name given to text, which can be read or written only sequentially.
What are functional and non-functional requirements?
Functional requirements defines the behavior of a system whereas non-functional requirements specify how the system should behave; in other words they specify the quality requirements and judge the behavior of a system.
Functional - Display a chart which shows the maximum number of products sold in a region.
Non-functional – The data presented in the chart must be updated every 5 minutes.
What is the global assembly cache (GAC)?
GAC is a machine-wide cache of assemblies that allows .NET applications to share libraries. GAC solves some of the problems associated with dll’s (DLL Hell).
What is a stack? What is a heap? Give the differences between the two?
Stack is a place in the memory where value types are stored. Heap is a place in the memory where the reference types are stored.
Check this link for the differences.
What is instrumentation?
It is the ability to monitor an application so that information about the application’s progress, performance and status can be captured and reported.
What is code review?
The process of  examining the source code generally through a peer, to verify it against best practices.
What is logging?
Logging is the process of persisting information about the status of an application.
What are mock-ups?
Mock-ups are a set of designs in the form of screens, diagrams, snapshots etc., that helps verify the design and acquire feedback about the application’s requirements and use cases, at an early stage of the design process.
What is a Form?
A form is a representation of any window displayed in your application. Form can be used to create standard, borderless, floating, modal windows.
What is a multiple-document interface(MDI)?
A user interface container that enables a user to work with more than one document at a time. E.g. Microsoft Excel.
What is a single-document interface (SDI) ?
A user interface that is created to manage graphical user interfaces and controls into single windows. E.g. Microsoft Word
What is BLOB ?
A BLOB (binary large object) is a large item such as an image or an exe  represented in binary form.
What is ClickOnce?
ClickOnce is a new deployment technology that allows you to create and publish self-updating applications that can be installed and run with minimal user interaction.
What is object role modeling (ORM) ?
It is a logical model for designing and querying database models. There are various ORM tools in the market like CaseTalk, Microsoft Visio for Enterprise Architects, Infagon etc.
What is a private assembly?
A private assembly is local to the installation directory of an application and is used only by that application.
What is a shared assembly?
A shared assembly is kept in the global assembly cache (GAC) and can be used by one or more applications on a machine.
What is the difference between user and custom controls?
User controls are easier to create whereas custom controls require extra effort.
User controls are used when the layout is static whereas custom controls are used in dynamic layouts.
A user control cannot be added to the toolbox whereas a custom control can be.
A separate copy of a user control is required in every application that uses it whereas since custom controls are stored in the GAC, only a single copy can be used by all applications.
Where do custom controls reside?
In the global assembly cache (GAC).
What is a third-party control ?
A third-party control is one that is not created by the owners of a project. They are usually used to save time and resources and reuse the functionality developed by others (third-party).
What is a binary formatter?
Binary formatter is used to serialize and deserialize an object in binary format.
What is Boxing/Unboxing?
Boxing is used to convert value types to object.
E.g. int x = 1;
object obj = x ;
Unboxing is used to convert the object back to the value type.
E.g. int y = (int)obj;
Boxing/unboxing is quiet an expensive operation.
What is a COM Callable Wrapper (CCW)?
CCW is a wrapper created by the common language runtime(CLR) that enables COM components to access .NET objects.
What is a Runtime Callable Wrapper (RCW)?
RCW is a wrapper created by the common language runtime(CLR) to enable .NET components to call COM components.
What is a digital signature?
A digital signature is an electronic signature used to verify/gurantee the identity of the individual who is sending the message.
What is garbage collection?
Garbage collection is the process of managing the allocation and release of memory in your applications. Read this article for more information.
What is globalization?
Globalization is the process of customizing applications that support multiple cultures and regions.
What is localization?
Localization is the process of customizing applications that support a given culture and regions.
What is MIME?
The definition of MIME or Multipurpose Internet Mail Extensions as stated in MSDN is “MIME is a standard that can be used to include content of various types in a single message. MIME extends the Simple Mail Transfer Protocol (SMTP) format of mail messages to include multiple content, both textual and non-textual. Parts of the message may be images, audio, or text in different character sets. The MIME standard derives from RFCs such as 2821 and 2822”

Introduction to DOTNET


Dot Net Programming: New Lease of Life with the Current Demand

If you're a keen .NET programmer, you are probably aware of what the above title says. Since the birth of multi-core computing, there has been a requirement for parallel-programming architecture. Now, the multi-core computing has developed into the prevailing paradigm in computer architecture since the invention of multi core-processors.
Incidentally, almost every programmer considers Visual Studio 2008 and .NET Framework 3.5 as getting distant and out of the way. To prevent its programming market fiasco, recently, Microsoft released the beta versions of .NET Framework 4 and Visual Studio 2010. The major focus fell on .NET 4, yet the labels boasted the arrival of parallel-programming. The question is whether there are any benefits particularly towards performance, on sticking to existing APIs? Go through to get the answer of the question.

.NET 4's Multi-Core processing ability:

Primarily, the MSDN site shows that the parallel extensions in the .NET 4, has been improvised itself to support analogous programming, targeting multi-core computing or distributed computing. The support for the Framework can be divided into four areas like library, LINQ, data structures and diagnostic tools. .NET 4's peers and predecessors are devoid of the multi-core operable ability.
The main criteria like communication and synchronization of sub-tasks were considered as the biggest obstacles in getting a good parallel program performance; But .NET 4's promising parallel library technology enables developers to define simultaneous, asynchronous tasks without having to work with threads, locks, or the thread pool.

Full support for multiple programming languages and compilers:
Apart from VB & C# languages, .NET 4 offers a full support for programming languages like Ironpython, Ironruby, F# and other similar .NET compilers. Other than the 3.5 version of the same model, it encompasses both functional-programming and crucial object-oriented programming.

Dynamic language runtime:

Addition of the dynamic language runtime (DLR) is a blessing for the .NET beginners. Using this new DLR runtime environment, developers can insert a set of services for dynamic languages to the CLR. Apart from that, the DLR makes it simpler to develop dynamic languages and to add dynamic features to statically typed languages. An original System Dynamic name space has been supplemented to the .NET Framework on supporting the DLR and numerous new classes supporting the .NET Framework infrastructure are extra to the System Runtime Compiler Services. Nevertheless, the new DLR provides the following advantages to developers: Developers can use speedy feedback loop which lets them enter diverse statements and execute them to see the results nearly immediately.

It has the ability to support for the top-down and more traditional bottom-up development. You can take the example of a developer using top down approach. He has the ability for call-out functions that are not yet can implement and then add them when required. There are simple refactoring and code modifications in which the Dot Net Programmers do not require to change static type declarations throughout the code.

Introduction for SQL Server


Introduction for SQL Server

Reason of this project:
If you are a beginner in the domain of Data Base then you may don't know what's SQL Server. SQL server is good for data base management and will make your applications save much time.
In this tutorial that doesn't include any sample, we'll learn how to install and prepare MS SQL server; I'll post sample tutorials in later time.

Project details:
1- Introduction to SQL Server 2005
2- Installation of SQL Server 2005
3- Getting started with SQL Server 2005

1- Introduction to SQL Server 2005

I think you have an idea about Data bases (even about MS Access). A data base is a group of tables. Each tables posses some content and text on it. We'll see in later tutorials that we can include images and any file format.
The Database group the data and the server help us manage those data. With the server, we can add record, delete, drop tables. We can also do queries, for example searching for special text in the database..
An example of the power of the database:
This example will show you the obvious difference that makes a server and a database.
If you make a search for example using Windows Search (not in Vista because in Vista it indexes files), and suppose that you have 100,000 files to search.
The computer will spend about 15 minutes crawling your disk and may block!
Now let's make a search with Google or Yahoo. It find the words that you are searching in less than 1 second. However it searches in billions of pages!
How this can be done? Simply those search engines are using a database.
So you see the benefits of a database.
However if you want to use SQL Server, then you need to install it on the machine where you want your application to use the database.
luckily Microsoft offer MS SQL Server Express edition for free, so your clients can install it on their machines.
This is a common and very asked question: What's the difference between Access and SQL?
Access is a database but not a server; SQL is a server, it's role is to group all the databases and to manage them.
This is what make SQL more customizable and faster. It also have many other advantages.
SQL Server can also be used on Web application!

2- Installation of SQL Server 2005

We need to install SQL Server in order to use it; SQL server is like the sea, you can't take control of all its functionalities and tools. But Don't worry, me also I don't know all SQL Server tools and settings.
This is not a problem. But if you want to become a professional I think, you must take some special lessons about it. You'll need also a long time to become professional. But this tutorial can be an introduction.
Ok first we need to prepare the computer.
We'll install the express edition that is free. You can download it from the Microsoft site.
You'll need a 1 GHZ processor (at least 600 MHZ) and 1 GB memory.
More the computer is fast, more SQL become fast. If you'll manipulate small data SQL won't be slow; but it's first starting or use may take some time (when you connect for the first time).
After downloading SQL Server (about 50 Mb), execute the installation process.
The setup will analyze your computer, this may take some time and then we'll give you the report.
You may find warnings, read out the messages. It's better to have all the item green (success).
Then press next to continue the setup.
The SQL server should be installed

3- Getting started with SQL Server 2005

Now you should have SQL Server 2005 installed, I recommend also that you download the Microsoft Online documentation about SQL Server as it includes many important and basic things.
Now we are going to focus on the most important part of this server.
So select Start > All programs > SQL Server 2005 > Configuration tools.
Here you'll find the main SQL server applications.
We'll see only the "SQL Server Configuration manager" tool.
This tools we'll allow us to stop and start the SQL servers.
Click over SQL server 2005 services to see the installed servers on your Pc.
It contains very important information and excellent tutorials.
You may need to change those properties (of each SQL Server) in future when using SQL with VB.net.
Now if you want to install a new server then do it with the installation package.
There's other important things that I'm going to notice now.
Sometimes users complain that SQL server doesn't work on a network.
This is normal as you have this setting disabled by default.
To enable it and other settings, go to Protocols for YOURSERVERNAME and enable what you need.

Note: There's no source code for this tutorial
Download this tutorial

The Zip file contains:
-The readme.txt file
-The tutorial.txt file

Still have question:
If you have any problem or you found a bug, post a comment describing your problem.
If you have a general question, we highly recommend the MSDN Forums as the best Dot Net forums in the net.

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com