Monday, December 6, 2010

The Indicator: 101 Things I Didn't Learn in Architecture School

Reffered URL:
This article is co-authored by Sherin Wing
1] Even if your boss is your friend he may have to axe you to save his business.
2] Read the book, On Bullshit, by Harry G. Frankfurt. Carry it with you. It’s pocket-sized.
3] Do not drink at work and especially do not get toasted around your colleagues under any circumstances.
4] No matter how highly you may think of yourself you may still be a minion in the eyes of others who hold more power than you.
5] Once you leave architecture school not everybody cares about architecture or wants to talk about it.
6] All eating habits and diets acquired during school should be jettisoned.
7] The hygiene habits you kept in architecture school are inappropriate for real life; bathe regularly and change your underwear.
8] The rush and exhilaration you experience in studio may be inversely proportional to how much you will enjoy working for a firm.
9] It’s architecture, not medicine. You can take a break and no one will die.
10] Significant others are more important than architecture; they are the ones who will pull you through in the end. See 49.
Keep reading after the break.
11] Being smart and having advanced degrees can make you a better designer.
12] The industry underpays. Push for what you are worth.
13] Mind your internet traffic at work unless you are certain your office does not have someone monitoring. Of course you should be working every minute, so this goes without saying.
14] Go home to your family.
15] Call your loved one’s frequently.
16] If you are working overtime, the firm buys dinner.*
*Contingent on office policies, of course.
17] Don’t keep a mayline screwed to your desk. They are not cool and they date you. The same goes for colored pencils.
18] Get the biggest monitor you can.
19] Do not, however, ask for two monitors. Even though it makes you look like a bad-ass you will be expected to do twice the amount of work.
20] Make sure team roles are clearly defined.
21] Know what your role is.
22] Be careful with emails. If in doubt, don’t send.
23] At times respect and civility seem to be scarce commodities in architecture.
24] Be cautious of “opportunities” that do not pay.
25] Sometimes the most critical person on your jury might actually be right.

26] Understand how your office is run as a business and how they go after projects.
27] It is best to keep your outside activities quiet.
28] Your boss reads your blog.
29] Pyromania, car soccer, and other antics you made up to amuse yourself at 3 am are not actually normal. See 49.
30] There are no architectural emergencies that should make you completely give up your life on the outside. That may have been the ethos in studio, but don’t carry it into the office.
31] Be suspicious if your firm expects you to work long hours of overtime for no compensation. Be doubly suspicious if they justify it by saying things like, “It’s just part of the learning curve” or “We had to go through this, too.”
32] If a police officer pulls you over on the freeway for doing 90 mph on a Sunday morning while heading into the office, it’s time to re-evaluate your priorities.
33] Know who the decision-makers are.
34] Don’t dress like an intern. See 72.
35] Read Dana Cuff’s Architecture: The Story of Practice.
36] Expect to be regarded with suspicion if your undergraduate degree is not in architecture.
37] Don’t be seduced by mere appearances.
38] If your firm is outsourcing work to save money, be concerned.
39] Architecture firms can have multiple glass ceilings. Be aware of them all.
40] If a principal of a firm sees making coffee or moving boxes as beneath him/her, consider looking for another office.
41] If a principal doesn’t say good morning when you say good morning to him/her, consider looking for another office.
42] When firms advertise themselves as think tanks or research labs, ask them specifically what it is that they do. And most importantly, make sure they pay. Well.
43] If you are invited to be on a jury, don’t trash the student just to make yourself look good or to contradict a rival on the jury. Be constructive and try to help the student. This is the point.
44] Subvert the signature of the software, unless you consciously want the architecture to convey this signature.
45] Architects are in a service industry. They provide services to clients.
46] In proportion to their pay, architects require the most education, most training, and the most exams to become licensed professionals.
47] Don’t be a Typhoid Mary. When sick, stay home.
48] Embrace the business-side of architecture.
49] If you are an architect you should automatically qualify for psychotherapy and medication.
50] Most architects believe they were destined to become architects because of their early childhood experiences. They showed signs of architectural greatness at a very young age. This is a myth that reinforces an unhealthy hero complex. See 49.

51] Architecture in the academy is completely removed from the profession. Likewise, the values within the academy are radically different from the values within a firm.
52] Be cautious about applying theory to space.
53] Do not take design strategies or operations learned in studio too seriously.
54] Know the difference between architectural celebrity and actual worth.
55] Read books with words, not just pictures.
56] All firms are different. Shop.
57] To save time, assume your wife is right.
58] Do not date an architect unless you are certain he/she is able to maintain a healthy life outside of architecture. See 49.
59] Architects should not intermarry. Inbreeding is not good for the gene pool. See 49.
60] If you are married when you go to architecture school, studio ends at 7:00.
61] Do not buy into the fashion of the moment and simply dismiss certain architects without examining them for yourself.
62] Architects who do not build things also have important things to say and should be listened to.
63] If your studio instructor is a recent graduate, be alarmed.
64] Do not obsess about sustainability to the exclusion of other factors.
65] Renderings done in China are so last year.
66] If you start a think tank make sure you have some thoughts to put in it.
67] Read Rem Koolhaas, but do not obsess and fantasize about being him. Delirious New York is still relevant.
68] Archi-babble does not make you sound cool.
69] Keep in touch with everyone you know, especially if they aren’t in architecture.
70] In fact, make friends who are not architects.
71] Do not wear the same shoes every day, They will start to smell.
72] Make sure your jeans are up-to-date. No acid-wash. No baggy.
73] The economically distressed urban zones you can afford while in school are not gentrified just because you and your friends have moved in.
74] If you must read Italo Calvino, read more than just Invisible Cities.
75] Expect a period of post-traumatic stress disorder after you graduate. Do not make any important decisions during this time.

76] Don’t get a dog just because you are lonely.
77] Architecture is fueled by fetishes—rectilinear designer eyewear, for instance.
78] When trying to decide if a theory book is good, check the bibliography first.
79] Listen to your elders. They are wise.
80] FAIA can mean different things to different people.
81] If you already have a B.Arch, consider further education in a different field. Your M.Arch. can’t make a real contribution to the field if you’re just showing off software skills.
82] Always back up your hard drive.
83] Embrace social media, but don’t be its bitch. Only tweet/post when you have something important to say.
84] Architecture firms should consider forming economic alliances similar to OPEC.
85] Even if you don’t like the look of someone’s architecture they may have something valuable to teach you.
86] Great architecture, like great art, tends to arise from deep psychological issues. See 49.
87] The eighties and postmodernism were not all bad.
88] Being avant-garde is a choice that should be evaluated.
89] Architect’s web pages are often out of control and take too long to load.
90] In one’s life there are a finite number of all-nighters one can pull. You probably used them all up in school.
91] Understand the contexts from which modernism arose.
92] When the economy is good architects can rely on experience to run firms, but when the economy is bad they need advanced business skills they may not possess.
93] Architecture is dependent on boom and bust cycles.
94] Good design is not necessarily the most important factor in running a successful architecture firm.
95] Branding is important.
96] In a corporate firm, those at the top are not necessarily the best but they may have been there the longest.
97] Being good at software does not make you a good architect.
98] Architecture is cliquish.
99] Many architects do not live in houses designed by themselves or other architects.
100] Architecture office parking lots communicate success. There should be at least a couple high-end luxury cars. If there are a lot of beaters, be wary. If all cars are beaters, don’t go in.
101] Be concerned when you are too idle at work.

Wednesday, September 29, 2010

Cannot find this file specified in the manifest file


Quick tip for Visual Studio SharePoint developers.  When you remove a web part from your project and you try to deploy it again you will get this error.  To solve it, simply edit the manifest.xml file in the \pkg folder in your project folder and remove the reference to the item that has been removed:

Remove the item from the manifest.xml and save.
Now the project should deploy as it should.

Monday, September 6, 2010

Uninstalling MOSS 2007 Manually

Note: Before performing these operations make sure you backup all Share Point databases and create a backup of the registry.

a) Disable and Stop the following services

-Microsoft Single Sign-on Service
-Office SharePoint Server Search
-Windows SharePoint Services Administration
-Windows SharePoint Services Search
-Windows SharePoint Services Timer
-Windows SharePoint Services Tracing
-Windows SharePoint Services VSS Writer

b) Note the following registry keys:

From HKLM\Software\Microsoft\Office Server\12.0
-Install Path (default is C:\Program Files\Microsoft Office Servers\12)

From HKLM\Software\Microsoft\Shared Tools\
Web Server Extensions\12.0
-Location (default is C:\Program Files\Common Files\Microsoft Shared
\Web Server Extensions\12)

c) Delete the following registry hives:

HKLM\Software\Microsoft\Office Server\12.0
HKLM\Software\Microsoft\Shared Tools
\Web Server Extensions\12.0

[x32] – HKLM\Software\Microsoft\Windows
[x64] – HKLM\SOFTWARE\Wow6432Node\Microsoft

d) Delete the following folders:
The value of the InstallPath key
The value of the Location key
C:\%CommonProgramFiles%\Microsoft Shared\SERVER12
Restart the server and perform an installation as normal.
Before running the configuration wizard, follow the steps as follows
You need to restore the Server Language registry value by
creating the following .reg file (open notepad and paste the following):

Windows Registry Editor Version 5.00

\Shared Tools\Web Server Extensions\12.0 \ServerLanguage]

-Save this as fixlanguage.reg and upload it to your server.
Double click the file and say yes to the prompts.

Sunday, September 5, 2010

How to Install Windows Media Player 11.0 Bypassing Genuine Windows Validation...

Referred URL:


Windows Media Player 11.0 is the latest Media Player by Microsoft. It offers great new ways to store and enjoy all your music, video and pictures along with its new cool look. You must have Windows XP Service Pack-2 (SP2) in order to install Windows Media Player 11.0. But still you will face a problem while installing this new Windows Media Player if your copy of Windows XP is not a genuine (non-pirated) one, since WMP 11.0 installation requires genuine windows validation!!!


But there are some tricky steps through which you can install WMP 11.0 even in your pirated copy of windows XP bypassing the genuine windows validation. You just have to follow the following steps one by one:

  1. Download Windows Media Player 11.0 (make sure its the final and latest version, not beta) from the Microsoft Site. Alternatively, you can download the installer file directly from here. Remember you can’t install Windows Media Player 11.0 if service pack 2.0 is not installed in your operating system.
  2. Extract the downloaded Windows Media Player setup file (wmp11-windowsxp-x86-enu.exe) using WinRAR to a directory (wmp11-windowsxp-x86-enu). Now make sure you have a “LegitLibM.dll” file in the extracted “wmp11-windowsxp-x86-enu” folder.
  3. Download the patched LegitLibM.dll and then copy-paste it to the “wmp11-windowsxp-x86-enu” folder and click yes when asked to overwrite.
  4. Now run “setup_wm.exe” file in the “wmp11-windowsxp-x86-enu” folder.
  5. Restart your PC, then run your Windows Media Player and you are done!!!

How to Find the Codec Your AVI Video File Needs

Referred URl:


1. Download qaviinfo.exe and save it to the same folder that your AVI file is located. Mine is at C:\Downloads for this example.

2. Open a DOS command prompt (Start > Run > CMD) and navigate to that folder. Type CD C:\Downloads.

3. The name of the video file in my case is presenta.avi. So I can now type qaviinfo presenta.avi.

4. A list of information about the file will be displayed. In the Codec column you can see what codec is being used. Here it is FMP4.

Command results

5. A Google search on FMP4 revealed to me this link. Which then led me to The Codecs where I found a download for a file that included the FMP4 codec.

Tuesday, August 24, 2010

Fantastic article about my uncle Artist A.V.Ilango

Fantastic article about my uncle Artist A.V.Ilango -

As one of the eldest person, He helped me at getting up in my career. :)

Monday, July 19, 2010

Now, a formula for happiness!

Referred URL :

A British psychologist claims to have created a happiness formula to calculate the things which could make people feel good such as blooming flowers, holiday anticipation and fond memories of childhood summers.

According to reports, 45-year-old former Cardiff University lecturer Cliff Arnall has attached numbers to the factors and created a happiness formula -

O + (N x S) + Cpm/T + He.
This means - when a value for being outdoors (O) is added to nature (N) multiplied by social interaction (S), added to childhood summer memories (Cpm) divided by temperature (T) and added to holiday excitement (He) then the third Friday in June comes out as the optimal day for peak happiness.

Dr Arnall, who runs happiness coaching clinics for health professionals and businesses, said"The third Friday in June came out with the highest rating due to peaking happiness factors such as warm summer evenings outdoors, seeing friends more frequently, and excitement about holidays."

Dr Arnall advised people to focus on happiness rather than material gain. He said: "Society is becoming more materialistic, with people wanting to keep up with the Joneses. People shouldn't be asking 'How much do I earn?' but 'How happy am I?' The best piece of advice I can give is work less and spend more time with people you love. That will make you happiest."

Thursday, June 24, 2010

10 ways to expand your creative possibilities: The Free Thinking Method By Michelle Conrad

Referred URL -

Open your mind: Consider your first reaction when faced with a new idea. You might admit that you frequently feel compelled to analyze and criticize new things. For tiny seedlings of ideas to grow to become big innovations, we must open our minds and defer judgment.
Here’s how: remind yourself that idea generation and idea evaluation are different, equally important modes of thinking, and that you'll work most effectively using one mode at a time. When you’re generating ideas, suspend your disbelief and say yes to everything. When you’re evaluating ideas, first look for the value in every idea. Power off the grading system that was installed in your head in kindergarten. Give all of the ideas you encounter an E for Exotic, Exciting and Excellent. Then phrase your concerns in constructive ways that build and refine ideas.
PIBs: Build and refine ideas with a simple process. First, state the Pluses for the idea. Next describe your Issues as questions, wishes or desires. For example, instead of creativity-stopping complaints like, “We don’t have the money for this idea,” state this concern as a "How to" or "I wish" statement like, “I wish to find another way to finance this idea”. Now the creative engine gears up again so that you can generate Builds for the idea, ways to solve the concern and move the idea forward.
Absurdity reigns: If it makes you laugh, pursue it further. Sometimes the most absurd suggestions lead to the best solutions. Focus on the ideas you have energy and passion for, not matter how crazy they may seem. It’s much easier to rein in a silly idea than it is to expand a dull one.
Diversity: The creative dream team includes people with different skill sets, backgrounds, personalities and perspectives. Bring in external resources for a fresh perspective from unrelated fields. If you’re working alone, take on the perspective of a different person to add diversity and ask yourself, “How would a teacher, sculptor or dentist solve this problem?” Follow Woodrow Wilson’s example, "I not only use all the brains that I have, but all that I can borrow."
More is better: To discover truly creative solutions, strive for quantity. After you’ve unearthed the tried and true, dig deeper to find ideas that surprise you. Linus Pauling said it best, "The only way to get a good idea is to get a lot of ideas."
Freshness: It is possible to recapture the curiosity that was a natural part of your childhood. Seek out new ideas, fresh perspectives and collect things that interest you. Constantly refresh your sources of inspiration. Hold a team meeting in a provocative new environment, like an art gallery, mountain lodge or children's museum, a space designed to take you away from the everyday distractions of your office. Create a Fresh Thinking Day and invite experts from outside of your industry to speak at your company, or visit an expert in their workplace. Force connections between fresh stimuli and your challenge by asking yourself, “What ideas does this suggest for my problem?”
Realness: To breathe life into new ideas, find a way to visually represent abstract concepts. Build a new product model out of play-doh or paint a picture of your key strategies. Research suggests that visuals increase understanding and acceptance of new ideas, leading to a better chance of implementation.
Momentum: Idea generation is usually the easiest part of the innovation process. The implementation phase is where things sometimes break down. To ensure that great ideas become true innovations create an innovation plan, a detailed outline of what must happen, who will do it and by when. Add to this plan a list of momentum breakers, the people and processes in your organization that might take your ideas off track. Problem-solve to overcome the potential challenges posed by the momentum breakers. Engage the support of an idea champion, a person with the power to take your new ideas further.
Celebrate failure: Taking risks and failing is an essential part of the innovation process. Celebrate failure to show that trying new things is more important than getting it right the first time. Throw a Failure Party to remind people that Edison built 3,000 light bulb prototypes before he found success.
Be the change: To bring a more creative mindset to your organization or team, model the creative behavior you’d like to see by listening generously, participating fully and building on ideas. Listening generously means truly listening to understand ideas, rather than rehearsing your responses and criticisms. Participating fully means offering all of your ideas, no matter how small or unfinished they may seem to you. Your idea nugget may spark a build for a colleague. Listening, participating and building on ideas helps to create an environment where ideas flow freely.

Wednesday, May 19, 2010

Fiddler inspector for WCF Silverlight Polling Duplex and WCF RIA - Joe Zhou

Reffered URL -

Fiddler is a wild popular tool for web development debugging. It enables user to look at the http traffic and diagnoses issues. Natively it provides Raw, Hex, Xml and some other views that understand specific formats. For the format it doesn’t understand, it provides an Inspector plugin model that user can easily implement and hook it up to display http package in a more readable format. In this post, I will show you a new inspector that understands .NET framing used by Polling Duplex WCF in Silverlight 4. It also understands raw binary Xml used by WCF RIA services and binary soap message used in general WCF services.

If you need some background on .Net framing protocol, you can start by reading Nicolas All’s blog posts on Message Framing. More information can be found in .Net framing specs if you want to know all the nitty-gritty details about the protocol. For the sake of simplicity, I will only talk about the framing protocols used in Silverlight 4 Polling Duplex.

One of the major change for Polling Duplex in Silverlight 4 is we enabled chunking. As shown by the Polling Duplex architecture diagram below, we supported duplex communication in Silverlight world using long poll HTTP request for messages from server to client. In Silverlight 2 we did some rudimentary performance optimization to let multiple sessions share the same poll to reduce number of current http requests. However the server side is still not very optimal in the sense that we only send back one message for each long poll request. This is because we used SOAP over http and there is no framing support to send back multiple messages.

To enable multiple callback messages sharing the same http poll request, we added a mode that uses .Net framing over http. In cases where the number of messages the server needs to send to the client is large, this mode provides dramatic improvements in communication performance compared to the old single message mode. More detail about performance comparison can be found from Tomek’s post here. The framing modes we chose are Single Sized mode for client to server message and Simplex mode for callback messages.

.Net framing is a binary format that breaks up a stream of data into demarcated messages. It has a series of typed records to indicate versions, modes, via, encoding, and soap envelops. Because of this, it is not the most human readable format. To help user understand their messages during development time, I implemented a WCF Silverlight  fiddler inspector that takes a message stream and return formatted SOAP message(s) as shown below. To look at raw stream, you client Raw tab. To look decoded stream, click WCF Silverlight tab. Below are raw and encode Polling Duplex messages as seen in fiddler

The reason this inspector is called WCF Silverlight is because it not only understand .Net Framing used in Polling Duplex, it also understand raw binary Xml used by WCF RIA services and binary SOAP messages. It will try to decode based on the content-type of the http package. Below tables shows the currently supported content-types


Decode as


.Net framing


Binary encoded SOAP message


Xml SOAP message


Binary Xml message

Deployment of the WCF Silverlight inspector is straightforward. Just copy the binary to %ProgramFiles%\Fiddler2\Inspectors. You should be able to find zipped Visual Studio 2010 solution file for the inspector and a compiled dll that you can readily use.

Intelligent Planning: interview with Vanessa Carpenter - Elizabeth

Intresting Article -

Differences Between a Good and Bad Leader - Stephen Seay

Referred URL - 

Good Leaders...

need to have a vision that is different, but still able to be accepted by the masses.

step outside of their comfort zones to make change happen

take risks, make sacrifices, and sometimes pay a cost to achieve their vision

instill confidence in others because they themselves are confident

build consensus

with charisma can change organizations

are encouragers

are positive

have the interests of others above their own

attract followers

bring new perspective to problem solving

are enablers

are an inspiration

Bad Leaders...

drive wedges in between people, teams, and organizational structures

don't stand up for their peers or their subordinates

behave like children when they don't get their way

gossip and spread rumors

don't reward others for their accomplishments

use "technobabble" and jargon to confuse others

believe they are smarter than everybody else

are unaware (sometimes) that most people don't respect them

dictate policy and doctrine almost exclusively via e-mail or memo

are invisible to most of the organization

don't want rules, processes, or procedures... except for others

prescribe before diagnosing

don't solicit input from others unless it is to validate what they already believe

kill organizations through their arrogance and unwillingness to listen

are silent when they should speak

speak when they should be silent

Bad leaders are hurting our organizations, our governmental institutions, our local schools, churches, and neighborhoods.  Bad leaders poison many of those around them, run organizations into the ground, and are culture killers.

Do your part to eliminate the "cancerous" effect caused by bad leaders. Be a "good" leader by exhibiting the necessary leadership principles and ideals that inspire and motivate others.

Don't be just another talking head.

Be visible, don't gossip, be respectful of others, build consensus, and most of all be honest in all of your dealings.

Monday, May 17, 2010

30 Tips for Successful Communication as a Remote Worker By Scott Hanselman

Referred URL : 

Here's their list of tips, reprinted from an internal mail with permission.

Show consideration
  • Set up calls at mutually workable hours. Avoid blocking calendars with local meetings during shared hours. Fridays are often a poor choice.
  • Start on time. Leaders should set up the bridge or Live Meeting before the call starts. Attendees should always show up on time.
  • If you can't make it, cancel or decline least 18 hours in advance. Changing your plans to attend a non-existent meeting is very frustrating. Think carefully if the recipient will see your cancellation in time (they may be asleep).
  • Assume the best. If the other team isn't meeting your expectations, it's probably because of a lack of awareness or a misunderstanding—not incompetence. Clarify and confirm before drawing conclusions or judging.
Use the right tools
  • Choose the right tool. Office Communicator is great for 1-1s and small group meetings. LiveMeeting is usually better for large group meetings.
  • Use video.  Seeing faces increases the quality of the communication. It also helps create focus, preventing people from getting distracted, having side conversations, checking their email, etc.
  • In a group, use a RoundTable.  As well as enabling video, the noise-cancelling mics it has are excellent.  Make sure all your meeting rooms have one, including the satellite mics.
  • On your own, use a headset.  The sound quality for both parties is far superior.
  • Don't use your laptop microphone. Laptop microphones are poor quality and pick up noise from your laptop's fan, disk, and keyboard. Use the mic on your webcam or, better yet, an external mic.
  • Be a black-belt Ninja with the tools.  Make sure you can set up and join meetings quickly so that they start on time. Learn all the available features. Set up time to sit with your local team to practice and explore.
Be Heard and Understood
  • Speak clearly and slowly. The connections aren't always clear.
  • Be precise and concise. Help to keep the meeting short and productive.
  • Speak one at a time, otherwise no-one can be heard.
  • Ask for confirmation that the callers heard everything clearly.
  • Sit near the microphone, especially if your voice is soft.
  • Ask for comments. It's hard to break into the conversation over the phone.
  • Avoid jargon and culture-specific phrases. English is not the first language of many people on our teams, and can also vary greatly across cultures.
  • Meet face to face from time to time.  Meeting in person builds your knowledge of each other's mannerisms and communication style.  Subsequent remote communications are much richer and misunderstandings rarer as a result.
Make meetings effective
  • Pick the right forum. Use meetings rather than long email threads to discuss complex issues. For small meetings, it is often better if everyone is in their own office rather than using a meeting room—this promotes equality between local and remote team members.
  • Share the context and goals. Shared context is critical to clear communication. There are often a lot of assumptions you know in a particular location based on side-conversations, etc.
  • Share a deck. It's much easier to follow the conversation if everyone is looking at the same thing. Even if you are sharing via OC or Live Meeting, send the deck or a link to the deck by email well in advance (home connections can be slow) and call out each slide.
  • Send minutes promptly. After every meeting, send minutes documenting all decisions and including clear actions and owners. Avoid cryptic or overly-concise notes—imagine them being read or reported out by someone who wasn't there, six months later.
  • Record and share brown bags. Brown bags are often at unsociable hours. Recording and sharing helps partner teams as well as your own.
Make Email Work
  • Be clear and precise. It's very easy to misinterpret email, especially across cultures and languages. Re-read your emails before sending.
  • Document everything. Document all decisions - if it's not recorded in email, it didn't happen.
  • Share everything. Use email to share face-to-face hallway, office, lunchtime or post-meeting conversations.
  • Be inclusive. Leave time for other sites to read and reply before closing the issue (as appropriate).
  • Set up inclusive DLs. Having all stakeholders on the appropriate distribution lists is the easiest way to keep from forgetting other sites. Don't hide DL membership.
  • Answer all questions asked. Incomplete answers lead to frustration and wasted time.
  • Avoid unnecessary questions. Ask yourself ‘is it really worth a 24-hour turn-around to answer this question? Can I answer it myself, or ask someone local?' Don't block an important thread with a trivial question.

Monday, April 19, 2010

What’s new in Silverlight 4 – feature review

-> Tooling
-> Printing API
-> Right-click event handling
-> Webcam/microphone access
-> Mouse wheel support
-> RichTextArea Control
-> ICommand support
-> Clipboard API
-> HTML Hosting with WebBrowser
-> Elevated trust applications
-> Local file access
-> COM interop
-> Notification (“toast”) API
-> Network authentication
-> Cross-domain Networking changes
-> Keyboard access in full screen mode
-> Text trimming
-> ViewBox
-> Right-to-left, BiDi and complex script
-> Offline DRM
-> H.264 protected content
-> Silverlight as a drop target
-> Data binding
-> IDataErrorInfo and Async Validation
-> DependencyObject Binding
-> StringFormat, TargetNullValue, FallbackValue
-> Managed Extensibility Framework (MEF)
-> DataGrid enhancements
-> Fluid UI support in items controls
-> Implicit theming
-> Google Chrome support

New Features in the Visual Studio 2010 IDE and .NET Framework 4.0

· Call Hierarchy of methods

· A New Quick Search

· Multi-targeting more accurate

· Parallel Programming and Debugging

· XSLT Profiling and Debugging

· The XSD Designer

New ASP.NET features

· Static IDs for ASP.NET Controls

· The Chart control

· Web.config transformation

New VB.NET features

· Auto Implemented Properties for VB.NET

· Collection Initializers

· Implicit Line Continuations

· Statements in Lambda Expressions

New C# features

· Dynamic Types

· Optional parameters

· Named and Optional Arguments

VB .Net Interview Questions

1) Explain about visual basic?
Visual basic is associated with the IDE of Microsoft. It is basically useful to implement RAD of GUI. Creation of Active X scripts are very easy and efficient through VB. Windows API can also be used to create application on windows desktop and its applications. This was primarily designed to create applications for windows platform.

2) Explain about .NET?
.NET is a Microsoft Framework and a software component. .NET has a large library of pre-coded solutions which provided developer significant help in developing applications with solutions already present. It offers reliable security and cross platform compatibility.

3) Name some of the features present in VB 2005?
Some of the features present in VB 2005 are as follows: -
• Edit and continue: - It allows developers to modify and execute applications almost simultaneously.
• Namespace: - This provides access to various parts of the .NET framework and it also dynamically generates classes.
• Data source binding function is very useful for client server development.

4) Explain and brief about rapid application development tool?
Rapid action development tool describes about the software development process. This tool gives flexibility in iterative development and prototype deployment. It enhances the speed of application development. It is also used for application maintenance.

5) Describe about Visual basic.NET?
This is used in conjunction with Microsoft .NET platform and is a successor to visual basic sixth version. Visual basic is used in conjunction with.NET Framework. This tool has a serious defect it is not compatible with Microsoft visual basic sixth version. It has a huge library which assists programmers.

6) What are the various open source tool available for VB.NET?
When compared with the rapid development of open source tools for other languages from Microsoft (C#, etc) we can say that development of tools for VB has been slow. Mono development platform is one which is implementing VB libraries and is working on a compiler.

7) Explain about the performance of Visual basic?
Visual basic 5 and 6 are efficient in coding the code to native or P-code depending upon the programmer. Portability is a major addition to the performance of VB.NET and the code is also small. Additional layer is provided which interprets the code and this can be avoided by using special algorithms and native code programming.

8) Compare C# and Visual basic.NET?
.NET Frame work includes two languages which are language to IL compilers and in this C# and VB.NET are provided. The importance and flexibility of these as better programming languages is still questionable. Visual basic has been updated and revised to make it object oriented whereas C# has concepts from many languages such as Delphi, Java, etc and syntax from C and Java.

9) Explain about Visual basic.NET culture?
VB was always a RAD tool and it was always user friendly for any type of user whether professional or not. It also provided many users with shortcuts and features which made this language popular among many users. It had its share of debugging and maintenance issues of course.

10) Name and explain some of the exclusive features which are present in VB?
Some of the features which are exclusive to VB are as follows: -
1) Name space can be hidden which can be disabled.
2) Certain project files can be hidden and a user can show them if he intends to do.
3) Lots and lots of shortcuts are present which ease the development of programs.
4) Using the AddressOf myObject function a delegate can be made.

11) Name a feature which is common to all .NET languages?
There is only one feature which is common to all languages and that is Garbage collection or GC. This feature is automated which relieves developers of much work. This garbage is disposed only when there is need of memory or stress for memory. GC feature halts the application for few seconds before restarting it.

12) Name some of the features of C# which are not present in VB.NET?
Some of the features which are not present in VB are as follows they are: -
1) It supports unsafe code blocks for improved performance.
2) Partial interfaces and anonymous methods.
3) Multi line comments and static classes. Etc

13) Explain about the keyword Must Inherit?
This keyword prevents a class from directly instantiated. This keyword forces users to create references to only derived classes. This keyword is present in C# as abstract and it is very useful in creating applications.

14) What would you do to remove Microsoft visual basic name space?
.NET has many new features and application supportive tools. To remove Microsoft visual basic name space all you have to do is to
1) Remove the import manually every time you start the project.
2) Creating a template which does not contain Microsoft Visual Basic namespace.
3) About new features and changes names you can refer to MSDN.

15) Which is the tool which can convert Visual basic old version to .NET compatibility version?
There is a tool available which can convert old visual basic functions into new .NET code. Artin soft Visual basic upgrade Companion is very useful in converting VB code into .NET code. This tool was developed by Artin. This tool is integrated in Visual studio.NET 2005. It handles programs such as structured handling, error handling, etc.

16) Explain about the feature Anonymous type?
Anonymous type is a feature of VB.NET and it allows data types to be created from the code which requires it. This feature is present in VB as well as C#. They should be stored in variables declared with the keyword VAR. Dynamic typing is different and shouldn’t be confused with Anonymous type.

17) Explain about the Ruby interface generator?
Ruby interface generator is primarily responsible for providing the visual part of the Visual basic and this was clubbed with “EB” designed for Omega database system. VBX interface was added to this feature which had the ability to load dynamic link libraries.

18) To define abstract method which keyword is used in VB?

MustOverride keyword is used to define an abstract method in VB.

19) To define abstract class in VB which keyword is used?

MustInherit keyword is used to create an abstract class in VB.

20) Equivalent keyword of new in VB?

Shadow keyword is used to hide a method from a base class.

21) What is the keyword used in VB to carry out the work of virtual keyword of C#?

The Overridable keyword. It declare a method to support polymorphism.

22) Which method is used to delete a file in VB.NET?

Kill(File name with path) :- This method deletes the said file/files from the disk. The name of the file

to be deleted is passed to this method as string type arguments. Files are simply deleted and not moved to recycle-bin. The use of wild card(* and /) is permitted in this function.

Kill("C:\Files\abc.txt")This will delete the file abc.txt locates in C:\Files\

Kill("C:\Files\*.txt")This will delete all the files with .txt extension from C:\Files\

23) To reverse a string which function is used in VB.NET?

StrReverse(String):- This function reverse the specified string.

Dim Str,RStr As String



24) Name the method in VB.NET used to define a control's color?


25) What is VAL function?

This function is used to return integer part contained in the string argument.

It stops reading further as soon as first invalid character is recognized.

Valid characters for this function are: Blanks, tabs, and linefeed characters,

radix prefixes &O (for octal) and &H (for hexadecimal) and period(.)

test = Val(" 1 2 3 4") ' Returns 1234

test = Val("1 cannot be 2") 'Returns 1

With Visual Basic Runtime, NOTHING gets evaluated as,

NOTE: This is objective type question, Please click question title for correct answer.

26) What is difference between String.Substring and MID function?

Said both performs the same type of operation on string. The basic difference lies, how they indice the string characters.

In case, if you have got string "TEST", the MID function will indice the characters as 1,2,3,4. But with String.substring they will be indiced as 0,1,2,3.

27) What is difference between Mid function and Mid Statement ?

Mid function returns the characters while the Mid statement replaces the characters.

28) Write output: Dim testString = "TestingStringHere" Mid(testString, 5) = "..Bore.."


Justification : here we have used is MID statement not the MID function.

29) Difference between Fix and Int.

Both of them returns integer part of the provided number. Difference lies, how they deal with the negative numbers.

Fix returns the first negative integer greater than or equal to provided Number while Int returns the first negative integer less than or equal to provided Number.

For an example,

Int(-99.2) ' Returns -100.

Fix(-99.2) ' Returns -99.

30) What is “fix” ?

Fix is a function available in VB, which returns integer part of the number.

31) ____________ when turned on do not allow to use any variable without proper declaration?

Option Explicit

32) _________ when turned on do not allow incompatible type conversion?

Option Strict

DateTime variables can be null.

NOTE: This is objective type question, Please click question title for correct answer.

33) Have you ever used IIF? Explain.

Sometimes, you need to bind data using ternary functions from code file. With VB, you can achieve this thing using IIF function.

For an example, here in code below at the time of databinding I need to check value of “testString”. If the value is null/empty string it shows “NA” else the value.

<%#IIf(String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "testString")), "NA", DataBinder.Eval(Container.DataItem, " testString "))%>

You can achieve the same result from code behind by placing appropriate code in itemdatabound method.(if applicable)

34) How to assign width to label/button/textbox in ?

With some scenarios you need to assign width to the controls rubtime. Generally we tend to make it soecified with percentage. At runtime we can use following way to make such assignments.

Label1.Width = Unit.Percentage(12.12)

You can have “pixel” or “point” as measurement unit and get your desired result set.

35) How to assign font to label at run-time in ?

Label1.Font.Size = 12

Label1.Font.Name = "Broadway"

36) Which Keyword is used in VBScript to increase or decrease the counter variable by the value?

NOTE: This is objective type question, Please click question title for correct answer.

37) What is the default size of Integer data type in VB.NET as VB.NET has Int 16, Int 32 and Int 64 also?

The default size of Integer data type is 32 bit.

38) How to deal with return value of stored procedure when you are using DataReader ?

To deal with such scenario, you can find “ParameterDirection.ReturnValue”.

You can use this parameter direction to read the return value of the stored procedure.

Following example can make it more clearer.

In case, you have following or similar type of return statement somewhere in your stored procedure.

Return -999

To read this value, following code works,

Dim result As Integer = 0

Dim retValParam As New SqlClient.SqlParameter("@RETURN_VALUE", SqlDbType.Int)

retValParam.Direction = ParameterDirection.ReturnValue



result = retValParam.Value ‘ here the result must contain the returned value. In this case, it will be -999

39) How to find data with generics list in VB.NET (Write code).

In the code example below, the function “FindData” will return list(“sublist”) of the objects having matchingKey same as viewstate value.

Dim sublist As List(Of MyClass)

sublist = allClient.FindAll(AddressOf FindData) ‘sublist will contain objects matching specified matching condition

Function FindData(ByVal b As MyClass) _

As Boolean

If (b.matchingKey = CInt(ViewState("matchingKey "))) Then ‘matching condition

Return True


Return False

End If

End Function

Interview Questions – C#

Interview Questions – C#

1. Are private class-level variables inherited? - Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.

2. Why does DllImport not work for me? - All methods marked with the DllImport attribute must be marked as public static extern.

3. Why does my Windows application pop up a console window every time I run it? - Make sure that the target type set in the project properties setting is set to Windows Application, and not Console Application. If you’re using the command line, compile with /target:winexe, not /target:exe.

4. Why do I get an error (CS1006) when trying to declare a method without specifying a return type? - If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 error public static staticMethod (mainStatic obj) // This will work as wanted public static void staticMethod (mainStatic obj)

5. Why do I get a syntax error when trying to declare a variable called checked? - The word checked is a keyword in C#.

6. Why do I get a security exception when I try to run my C# app? - Some security exceptions are thrown if you are working on a network share. There are some parts of the frameworks that will not run if being run off a share (roaming profile, mapped drives, etc.). To see if this is what’s happening, just move the executable over to your local drive and see if it runs without the exceptions. One of the common exceptions thrown under these conditions is System.Security.SecurityException. To get around this, you can change your security policy for the intranet zone, code group 1.2, (the zone that running off shared folders falls into) by using the caspol.exe tool.

7. Why do I get a CS5001: does not have an entry point defined error when compiling? - The most common problem is that you used a lowercase ‘m’ when defining the Main method. The correct way to implement the entry point is as follows: class test { static void Main(string[] args) {} }

8. What optimizations does the C# compiler perform when you use the /optimize+ compiler option? - The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally. We optimize branches over branches: gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We optimize branches to ret, branches to next instruction, and branches to branches.

9. What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)? - The syntax for calling another constructor is as follows: class B { B(int i) { } } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) : this() // call C() { } public static void Main() {} }

10. What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development? - Try using RegAsm.exe. Search MSDN on Assembly Registration Tool.

11. What is the difference between a struct and a class in C#? - From language spec: The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes in several important ways; however, structs are value types rather than reference types, and inheritance is not supported for structs. Struct values are stored on the stack or in-line. Careful programmers can sometimes enhance performance through judicious use of structs. For example, the use of a struct rather than a class for a Point can make a large difference in the number of memory allocations performed at runtime. The program below creates and initializes an array of 100 points. With Point implemented as a class, 101 separate objects are instantiated-one for the array and one each for the 100 elements.

12. My switch statement works differently than in C++! Why? - C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#:



case 0: // do something

case 1: // do something as continuation of case 0

default: // do something in common with

//0, 1 and everything else



To achieve the same effect in C#, the code must be modified as shown below (notice how the control flows are explicit):

class Test


public static void Main() {

int x = 3;



case 0: // do something

goto case 1;

case 1: // do something in common with 0

goto default;

default: // do something in common with 0, 1, and anything else





13. Is there regular expression (regex) support available to C# developers? - Yes. The .NET class libraries provide support for regular expressions. Look at the System.Text.RegularExpressions namespace.

14. Is there any sample C# code for simple threading? - Yes:

using System;

using System.Threading;

class ThreadTest


  public void runme()


           Console.WriteLine("Runme Called");


  public static void Main(String[] args)


           ThreadTest b = new ThreadTest();

           Thread t = new Thread(new ThreadStart(b.runme));




15. Is there an equivalent of exit() for quitting a C# .NET application? - Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app.

16. Is there a way to force garbage collection? - Yes. Set all references to null and then call System.GC.Collect(). If you need to have some objects destructed, and System.GC.Collect() doesn’t seem to be doing it for you, you can force finalizers to be run by setting all the references to the object to null and then calling System.GC.RunFinalizers().

17. Is there a way of specifying which block or loop to break out of when working with nested loops? - The easiest way is to use goto:

using System;

class BreakExample


     public static void Main(String[] args) {

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


                      Console.WriteLine("Pass {0}: ", i);

                      for( int j=0 ; j<100 ; j++ )


                               if ( j == 10)

                                        goto done;

                               Console.WriteLine("{0} ", j);


                      Console.WriteLine("This will not print");



                      Console.WriteLine("Loops complete.");



18. Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace? - There is no way to restrict to a namespace. Namespaces are never units of protection. But if you’re using assemblies, you can use the ‘internal’ access modifier to restrict access to only within the assembly.

LINQ Interview Questions

Which assembly represents the core LINQ API?

System.Query.dll assembly represents the core LINQ API.

What is the use of System.Data.DLinq.dll?

System.Data.DLinq.dll provides functionality to work with LINQ to SQL.

What is the use of System.XML.XLinq.dll?

System.XML.XLinq.dll contains classes to provide functionality to use LINQ with XML.

Why can't datareader by returned from a Web Service's Method

Cos, it's not serializable

What is the LINQ file extension that interacts with Code Behind's objects.

its .dbml

What is the extension of the file, when LINQ to SQL is used?

The extension of the file is .dbml

Why Select clause comes after from clause in LINQ?

The reason is, LINQ is used with C# or other programming languages, which requires all the variables to be declared first. From clause of LINQ query just defines the range or conditions to select records. So that’s why from clause must appear before Select in LINQ.

How LINQ is beneficial than Stored Procedures?

There are couple of advantage of LINQ over stored procedures.

1. Debugging - It is really very hard to debug the Stored procedure but as LINQ is part of .NET, you can use visual studio's debugger to debug the queries.

2. Deployment - With stored procedures, we need to provide an additional script for stored procedures but with LINQ everything gets complied into single DLL hence deployment becomes easy.

3. Type Safety - LINQ is type safe, so queries errors are type checked at compile time. It is really good to encounter an error when compiling rather than runtime exception!

What is LINQ?

It stands for Language Integrated Query. LINQ is collection of standard query operators that provides the query facilities into .NET framework language like C# , VB.NET.

What is a Lambda expression?

A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator => and read as 'goes to' operator.

Left side of this operator specifies the input parameters and contains the expression or statement block at the right side.

Example: myExp = myExp/10;

Now, let see how we can assign the above to a delegate and create an expression tree:

delegate int myDel(int intMyNum);

static void Main(string[] args)


//assign lambda expression to a delegate:

myDel myDelegate = myExp => myExp / 10;

int intRes = myDelegate(110);

Console.WriteLine("Output {0}", intRes);


//Create an expression tree type

//This needs System.Linq.Expressions

Expression<myDel> myExpDel = myExp => myExp /10;



The => operator has the same precedence as assignment (=) and is right-associative.

Lambdas are used in method-based LINQ queries as arguments to standard query operator methods such as Where.

C# Threading Questions

1)What is Multi-tasking ?

Its a feature of modern operating systems with which we can run multiple programs at same time example Word,Excel etc.

(2)What is Multi-threading ?

Multi-threading forms subset of Multi-tasking instead of having to switch between programs this feature switches between different parts of the same program.Example you are writing in word and at the same time word is doing a spell check in background.

(3)What is a Thread ?

A thread is the basic unit to which the operating system allocates processor time.

(4)Did VB6 support multi-threading ?

While VB6 supports multiple single-threaded apartments, it does not support a free-threading model, which allows multiple threads to run against the same set of data.

(5)Can we have multiple threads in one App domain ?

One or more threads run in an AppDomain. An AppDomain is a runtime representation of a logical process within a physical process.Each AppDomain is started with a single thread, but can create additional threads from any of its threads. Note :- All threading classes are defined in System.Threading namespace.

(6)Which namespace has threading ?

Systems.Threading has all the classes related to implement threading.Any .NET application who wants to implement threading has to import this namespace. Note :- .NET program always has atleast two threads running one the main program and second the garbage collector.

(7)How can we change priority and what the levels of priority are provided by .NET ?

Thread Priority can be changed by using Threadname.Priority = ThreadPriority.Highest.In the sample provided look out for code where the second thread is ran with a high priority.

Following are different levels of Priority provided by .NET :-






(8)What does Addressof operator do in background ?

The AddressOf operator creates a delegate object to the BackgroundProcess method. A delegate within VB.NET is a type-safe, object-oriented function pointer. After the thread has been instantiated, you begin the execution of the code by calling the Start() method of the thread

(9)How can you reference current thread of the method ?

"Thread.CurrentThread" refers to the current thread running in the method."CurrentThread" is a public static property.

(10) What's Thread.Sleep() in threading ?

Thread's execution can be paused by calling the Thread.Sleep method. This method takes an integer value that determines how long the thread should sleep. Example Thread.CurrentThread.Sleep(2000).

(11)How can we make a thread sleep for infinite period ?

You can also place a thread into the sleep state for an indeterminate amount of time by calling Thread.Sleep (System.Threading.Timeout.Infinite).To interrupt this sleep you can call the Thread.Interrupt method.

(12) What is Suspend and Resume in Threading ?

It is Similar to Sleep and Interrupt. Suspend allows you to block a thread until another thread calls Thread.Resume. The difference between Sleep and Suspend is that the latter does not immediately place a thread in the wait state. The thread does not suspend until the .NET runtime determines that it is in a safe place to suspend it. Sleep will immediately place a thread in a wait state. Note :- In threading interviews most people get confused with Sleep and Suspend.They look very similar.

(13)What the way to stop a long running thread ?

Thread.Abort() stops the thread execution at that moment itself.

(14)What's Thread.Join() in threading ?

There are two versions of Thread.Join :-


Thread.join(Integer) this returns a boolean value.

The Thread.Join method is useful for determining if a thread has completed before starting another task. The Join method waits a specified amount of time for a thread to end. If the thread ends before the time-out, Join returns True; otherwise it returns False.Once you call Join the calling procedure stops and waits for the thread to signal that it is done. Example you have "Thread1" and "Thread2" and while executing 'Thread1" you call "Thread2.Join()".So "Thread1" will wait until "Thread2" has completed its execution and the again invoke "Thread1". Thread.Join(Integer) ensures that threads do not wait for a long time.If it exceeds a specific time which is provided in integer the waiting thread will start.

(15)What are Daemon thread's and how can a thread be created as Daemon?

Daemon thread's run in background and stop automatically when nothing is running program.Example of a Daemon thread is "Garbage collector".Garbage collector runs until some .NET code is running or else its idle. You can make a thread Daemon by Thread.Isbackground=true

(16) When working with shared data in threading how do you implement synchronization ?

There are a somethings you need to be careful with when using threads. If two threads (e.g. the main and any worker threads) try to access the same variable at the same time, you'll have a problem. This can be very difficult to debug because they may not always do it at exactly the same time. To avoid the problem, you can lock a variable before accessing it. However, if two threads lock the same variable at the same time, you'll have a deadlock problem. SyncLock x 'Do something with x End SyncLock

(17)Can we use events with threading ?

Yes you can use events with threads , this is one of the technique to synchronize one thread with other.

(18)How can we know a state of a thread?

"ThreadState" property can be used to get detail of a thread.Thread can have one or combination of status.System.Threading.Threadstate enumeration has all the values to detect a state of thread.Some sample states are Isrunning,IsAlive,suspended etc.

(19) What is use of Interlocked class ?

Interlocked class provides methods by which you can achieve following functionalities :-

v increment Values.

v Decrement values.

v Exchange values between variables.

v Compare values from any thread. in a synchronization mode.

Example :- System.Threading.Interlocked.Increment(IntA)

(20) what is a monitor object?

Monitor objects are used to ensure that a block of code runs without being interrupted by code running on other threads. In other words, code in other threads cannot run until code in the synchronized code block has finished. SyncLock and End SyncLock statements are provided in order to simplify access to monitor object.

(21) what are wait handles ?

Twist :- What is a mutex object ? Wait handles sends signals of a thread status from one thread to other thread.There are three kind of wait modes :-

v WaitOne.

v WaitAny.

v WaitAll.

When a thread wants to release a Wait handle it can call Set method.You can use Mutex (mutually exclusive) objects to avail for the following modes.Mutex objects are synchronization objects that can only be owned by a single thread at a time.Threads request ownership of the mutex object when they require exclusive access to a resource. Because only one thread can own a mutex object at any time, other threads must wait for ownership of a mutex object before using the resource. The WaitOne method causes a calling thread to wait for ownership of a mutex object. If a thread terminates normally while owning a mutex object, the state of the mutex object is set to signaled and the next waiting thread gets ownership

(22) what is ManualResetEvent and AutoResetEvent ?

Threads that call one of the wait methods of a synchronization event must wait until another thread signals the event by calling the Set method. There are two synchronization event classes. Threads set the status of ManualResetEvent instances to signaled using the Set method. Threads set the status of ManualResetEvent instances to nonsignaled using the Reset method or when control returns to a waiting WaitOne call. Instances of the AutoResetEvent class can also be set to signaled using Set, but they automatically return to nonsignaled as soon as a waiting thread is notified that the event became signaled.

(23) What is ReaderWriter Locks ?

You may want to lock a resource only when data is being written and permit multiple clients to simultaneously read data when data is not being updated. The ReaderWriterLock class enforces exclusive access to a resource while a thread is modifying the resource, but it allows nonexclusive access when reading the resource. ReaderWriter locks are a useful alternative to exclusive locks that cause other threads to wait, even when those threads do not need to update data.

(24) How can you avoid deadlock in threading ?

A good and careful planning can avoid deadlocks.There so many ways microsoft has provided by which you can reduce deadlocks example Monitor ,Interlocked classes , Wait handles, Event raising from one thread to other thread , ThreadState property which you can poll and act accordingly etc.

(25) What’s difference between thread and process?

A thread is a path of execution that run on CPU, a process is a collection of threads that share the same virtual memory. A process has at least one thread of execution, and a thread always run in a process context. Note:- Its difficult to cover threading interview question in this small chapter.These questions can take only to a basic level.If you are attending interviews where people are looking for threading specialist , try to get more deep in to synchronization issues as that's the important point they will stress.

26) Explain Threading Model. What is STA and MTA Model?

In this type of thread model only one thread is used to run the process remaining process needs to wait . The other processes must wait for the current execution of the thread to complete. The main disadvantage of this model is system idle time and long time to complete of small task.

Apartment Thread Model (Single Thread Apartment Model)

In this model we can have multiple threads executing with in an application. In single threaded apartment (STA) each thread is isolated in a separate apartment underneath the process. Each process can have multiple apartments that can share data between these apartment. Here the application is responsible for defining the time duration of each thread execution under these apartment. All requests are serialized through the Windows message queue such that only a single apartment is accessed at a time and thus only a single thread will be executing at any one time. Advantage of this model over single threaded is that multiple tasks can be processed at one time on the users request instead of just a single user request. This model still lack in performance as it is serialized thread model, task will be performed one after another.

Multi Thread Apartment Model (Free thread Apartment Model)

The Multi Threaded Apartment (MTA) model has a single apartment created underneath the process rather than multiple apartments. This single apartment holds multiple threads rather than just a single thread. No message queue is required because all of the threads are a part of the same apartment and can share. These applications typically execute faster than single threaded and STA because there is less system overhead and can be optimized to eliminate system idle time. These types of applications are complex to program as thread synchronization should be provided as part of the code to ensure that threads do not simultaneously access the same resources. A race condition can occur for the shared resource. Thus it is completely necessary to provide a locking system. When locking is provided this can result in a deadlock of the system.

Interview Questions

1. What is a static class?

2. What is static member?

3. What is static function?

4. What is static constructor?

5. How can we inherit a static variable?

6. How can we inherit a static member?

7. Can we use a static function with a non-static variable?

8. How can we access static variable?

9. Why main function is static?

10. How will you load dynamic assembly? How will create assesblies at run time?

11. What is Reflection?

12. If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) in my application?

13. How do you create threading in.NET? What is the namespace for that?

14. What do you mean by Serialize and MarshalByRef?

15. What is the difference between Array and LinkedList?

16. What is Asynchronous call and how it can be implemented using delegates?

17. How to create events for a control? What is custom events? How to create it?

18. If you want to write your own dot net language, what steps you will you take care?

19. Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

20. How dot net compiled code will become platform independent?

21. Without modifying source code if we compile again, will it be generated MSIL again?

22. How does you handle this COM components developed in other programming languages in.NET?

23. How CCW (Com Callable Wrapper) and RCW (Runtime Callable Wrappers) works?

24. What are the new thee features of COM+ services, which are not there in COM (MTS)?

25. What are the differences between COM architecture and.NET architecture?

26. Can we copy a COM dll to GAC folder?

27. What is Shared and Repeatable Inheritance?

28. Can you explain what inheritance is and an example of when you might use it?

29. How can you write a class to restrict that only one object of this class can be created (Singleton class)?

30. What are virtual destructures?

31. What is close method? How its different from Finalize and Dispose?

32. What is Boxing and UnBoxing?

33. What is check/uncheck?

34. What is the use of base keyword? Tell me a practical example for base keyword’s usage?

35. What are the different.NET tools which you used in projects?

36. What will do to avoid prior case?

37. What happens when you try to update data in a dataset in.NET while the record is already deleted in SQL Server as backend?

38. What is concurrency? How will you avoid concurrency when dealing with dataset?

39. One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?

40. How do you merge two datasets into the third dataset in a simple manner?

41. If you are executing these statements in commandObject. “Select * from Table1; Select * from Table2″ How you will deal result set?

42. How do you sort a dataset.

43. If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?

44. What is the use of Parameter object?

45. How to generateXML from a dataset and vice versa?

46. How do you implement locking concept for dataset?

47. How will you do Redo and Undo in TextBox control?

48. How to implement DataGrid in.NET? How would you make a combo-box appear in one column of a DataGrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for DataGrid methods. what is the access specifier used for that methods in the code behind file and why?

49. How can we create Tree control in asp.NET?

50. Write a program in C# to find the angle between the hours and minutes in a clock?

51. Write a program to create a user control with name and surname as data members and login as method and also the code to call it.

52. How can you read 3rd line from a text file?

53. Explain the code behind wors and contrast that using the inline style.

54. Explain different types of HTML, Web and server controls.

55. What are the differences between user control and server control?

56. How server form post-back works?

57. Can the action attribute of a server-side

tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page?

58. How would ASP and ASP.NET apps run at the same time on the same server?

59. What are good ADO.NET object to replace to ADO Recordset object.

60. Explain the differences between Server-side code and Client-side code.

61. What type of code(server or client) is found in a Code-Behind class?

62. Should validation (did the user enter a real date) occur server-side or client-side? Why?

63. What does the “EnableViewState” property do? Why would I want it on or off?

64. What is the difference between Server.Transfer and response.Redirect? Why?

65. Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced.NET component?

66. Let’s say I have an existing application written using VB6 and this application utilizes Windows 2000 COM+ transaction services. How would you approach migrating this application to.NET?

67. If I am developing an application that must accomodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?

68. What are ASP.NET web forms? How is this technology different than what is available though ASP(1.0-3.0)?

69. How does VB.NET achieve polymorphism?

70. How does C# achieve polymorphism?

71. Can you explain what is Inheritance and an example in VB.NET and C# of when you might use it?

72. Describe difference between inline and code-behind?

73. What is loosely coupled solution in.NET?

74. What is diffgram?

75. Where would you use an iHTTPModule and what are the limitations of any approach you might take in implementing one?

76. What are the Advantages and DisAdvantages of viewstate?

77. Describe session handling in a webform, how does it work and what are the limitations?

78. How would you get ASP.NET running in Apache web servers? Explain it’s limitations.

79. What is MSIL and why should my developers need an appreciation of it if at all?

80. Which methos do you invoke on the DataAdapter control to load your generated dataset with data?

81. Can you edit data in Repeater control? How?

82. Which template must you provide, in order to display data in a Repeater control?

83. How can you provide an alternating color scheme in a Repeater control?

84. What property must you set, and what method must you call in your code, in order to bind the data from some data source to the repeater control?

85. What base class do all web forms inherit from?

86. What method do you use to explicitly kill a user’s session? How?

87. How do you turn off cookies for one page in your site? Give an example.

88. Which two properties are on every validation control?

89. What tags do you need to add within the asp:datagrid tags to bind columns manually? Give an example.

90. How do you create a permanent cookie?

91. What tag do you use to add a hyperlink column to the dataGrid?

92. What is the standard you use to wrap up a call to a Web Service?

93. Which method do you use to redirect the user to another page without performing a round trip to the client? How?

94. What is the transport protocol you use to call a Seb Service SOAP?

95. What does WSDL stand for?

96. What property do you have to set to tell the grid which page to go to when using the Pager object?

97. Where on the Internet would you look for Web Services?

98. What tags do you need to add within the asp:datagrid tags to bind columns manually? How?

99. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?

100. How is a property designated as read-only?

101. Which control would you use if you needed to make sure the values in two different controls matched?

WCF and REST Interview Questions

What is WPF?

The Windows Presentation Foundation (WPF) is a next generation graphics platform that is part of .NET 3.0 and .NET 3.5. It allows you to build advanced user interfaces that incorporate documents, media, 2D and 3D graphics, animations, and web-like characteristics. In just 24 sessions of one hour or less, you will be able to begin effectively using WPF to solve real-world problems, developing rich user interfaces in less time than you thought possible. Using a straightforward, step-by-step approach, each lesson builds on a real-world foundation forged in both technology and business matters, allowing you to learn the essentials of WPF from the ground up

What is WCF?

Windows Communication Foundation (WCF) is an SDK for developing and deploying services on Windows. WCF provides a runtime environment for services, enabling you to expose CLR types as services, and to consume other services as CLR types.
WCF is part of .NET 3.0 and requires .NET 2.0, so it can only run on systems that support it.

Difference between WCF and Web services?

Web Services
1.It Can be accessed only over HTTP
2.It works in stateless environment
WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services:
Managed Windows Service

What are the various ways of hosting a WCF service?

Self hosting the service in his own application domain. This we have already covered in the first section. The service comes in to existence when you create the object of ServiceHost class and the service closes when you call the Close of the ServiceHost class.
Host in application domain or process provided by IIS Server.
Host in Application domain and process provided by WAS (Windows Activation Service) Server.

What is three major points in WCF?

We Should remember ABC.
Address --- Specifies the location of the service which will be like http://Myserver/MyService.Clients will use this location to communicate with our service.
Binding --- Specifies how the two paries will communicate in term of transport and encoding and protocols
Contract --- Specifies the interface between client and the server.It's a simple interface with some attribute.

What is the difference WCF and Web services?

Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type.
Second web services are not flexible. However, WCF Services are flexible. If you make a new version of the service then you need to just expose a new end. Therefore, services are agile and which is a very practical approach looking at the current business trends.
We develop WCF as contracts, interface, operations, and data contracts. As the developer we are more focused on the business logic services and need not worry about channel stack. WCF is a unified programming API for any kind of services so we create the service and use configuration information to set up the communication mechanism like HTTP/TCP/MSMQ etc
For more details, read

What are various ways of hosting WCF Services?

There are three major ways of hosting a WCF services
• Self-hosting the service in his own application domain. This we have already covered in the first section. The service comes in to existence when you create the object of Service Host class and the service closes when you call the Close of the Service Host class.
• Host in application domain or process provided by IIS Server.
• Host in Application domain and process provided by WAS (Windows Activation Service) Server.

What was the code name for WCF?

The code name of WCF was Indigo .
WCF is a unification of .NET framework communication technologies which unites the following technologies:-
NET remoting
Web services

What are the main components of WCF?

The main components of WCF are
1. Service class
2. Hosting environment
3. End point

How to set the timeout property for the WCF Service client call?

The timeout property can be set for the WCF Service client call using binding tag.



binding = "wsHttpBinding"

bindingConfiguration = "LongTimeout"





<binding name = "LongTimeout" sendTimeout = "00:04:00"/>



If no timeout has been specified, the default is considered as 1 minute.

How to deal with operation overloading while exposing the WCF services?

By default overload operations (methods) are not supported in WSDL based operation. However by using Name property of OperationContract attribute, we can deal with operation overloading scenario.


interface ICalculator


[OperationContract(Name = "AddInt")]

int Add(int arg1,int arg2);

[OperationContract(Name = "AddDouble")]

double Add(double arg1,double arg2);


Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is different. In this case client proxy will have two methods with different name AddInt and AddDouble.

How to configure Reliability while communicating with WCF Services?

Reliability can be configured in the client config file by adding reliableSession under binding tag.



<service name = "MyService">


address = "net.tcp://localhost:8888/MyService"

binding = "netTcpBinding"

bindingConfiguration = "ReliableCommunication"

contract = "IMyContract"






<binding name = "ReliableCommunication">

<reliableSession enabled = "true"/>





Reliability is supported by following bindings only

What is Transport and Message Reliability?

Transport reliability (such as the one offered by TCP) offers point-to-point guaranteed delivery at the network packet level, as well as guarantees the order of the packets. Transport reliability is not resilient to dropping network connections and a variety of other communication problems.
Message reliability deals with reliability at the message level independent of how many packets are required to deliver the message. Message reliability provides for end-to-end guaranteed delivery and order of messages, regardless of how many intermediaries are involved, and how many network hops are required to deliver the message from the client to the service.

What are different elements of WCF Srevices Client configuration file?

WCF Services client configuration file contains endpoint, address, binding and contract. A sample client config file looks like



      <endpoint name = "MyEndpoint"

         address  = "http://localhost:8000/MyService/"

         binding  = "wsHttpBinding"

         contract = "IMyContract"





What is Proxy and how to generate proxy for WCF Services?

The proxy is a CLR class that exposes a single CLR interface representing the service contract. The proxy provides the same operations as service's contract, but also has additional methods for managing the proxy life cycle and the connection to the service. The proxy completely encapsulates every aspect of the service: its location, its implementation technology and runtime platform, and the communication transport.

The proxy can be generated using Visual Studio by right clicking Reference and clicking on Add Service Reference. This brings up the Add Service Reference dialog box, where you need to supply the base address of the service (or a base address and a MEX URI) and the namespace to contain the proxy.

Proxy can also be generated by using SvcUtil.exe command-line utility. We need to provide SvcUtil with the HTTP-GET address or the metadata exchange endpoint address and, optionally, with a proxy filename. The default proxy filename is output.cs but you can also use the /out switch to indicate a different name.

SvcUtil http://localhost/MyService/MyService.svc /out:Proxy.cs

When we are hosting in IIS and selecting a port other than port 80 (such as port 88), we must provide that port number as part of the base address:

SvcUtil http://localhost:88/MyService/MyService.svc /out:Proxy.cs

What are contracts in WCF?

In WCF, all services expose contracts. The contract is a platform-neutral and standard way of describing what the service does.

WCF defines four types of contracts.

Service contracts

Describe which operations the client can perform on the service.

There are two types of Service Contracts.

ServiceContract - This attribute is used to define the Interface.

OperationContract - This attribute is used to define the method inside Interface.


interface IMyContract



   string MyMethod( );


class MyService : IMyContract


   public string MyMethod( )


      return "Hello World";



Data contracts

Define which data types are passed to and from the service. WCF defines implicit contracts for built-in types such as int and string, but we can easily define explicit opt-in data contracts for custom types.

There are two types of Data Contracts.

DataContract - attribute used to define the class

DataMember - attribute used to define the properties.


class Contact



   public string FirstName;


    public string LastName;


If DataMember attributes are not specified for a properties in the class, that property can't be passed to-from web service.

Fault contracts

Define which errors are raised by the service, and how the service handles and propagates errors to its clients.

Message contracts

Allow the service to interact directly with messages. Message contracts can be typed or untyped, and are useful in interoperability cases and when there is an existing message format we have to comply with.

What is the address formats of the WCF transport schemas?

Address format of WCF transport schema always follow

[transport]://[machine or domain][:optional port] format.

for example:

HTTP Address Format


the way to read the above url is

"Using HTTP, go to the machine called localhost, where on port 8888 someone is waiting"

When the port number is not specified, the default port is 80.

TCP Address Format


When a port number is not specified, the default port is 808:


NOTE: Two HTTP and TCP addresses from the same host can share a port, even on the same machine.

IPC Address Format


We can only open a named pipe once per machine, and therefore it is not possible for two named pipe addresses to share a pipe name on the same machine.

MSMQ Address Format



How to define a service as REST based service in WCF?

WCF 3.5 provides explicit support for RESTful communication using a new binding named WebHttpBinding.

The below code shows how to expose a RESTful service


interface IStock




int GetStock(string StockId);


By adding the WebGetAttribute, we can define a service as REST based service that can be accessible using HTTP GET operation.

What is endpoint in WCF?

Every service must have Address that defines where the service resides, Contract that defines what the service does and a Binding that defines how to communicate with the service. In WCF the relationship between Address, Contract and Binding is called Endpoint.

The Endpoint is the fusion of Address, Contract and Binding.

What is binding and how many types of bindings are there in WCF?

A binding defines how an endpoint communicates to the world. A binding defines the transport (such as HTTP or TCP) and the encoding being used (such as text or binary). A binding can contain binding elements that specify details like the security mechanisms used to secure messages, or the message pattern used by an endpoint.

WCF supports nine types of bindings.

Basic binding

Offered by the BasicHttpBinding class, this is designed to expose a WCF service as a legacy ASMX web service, so that old clients can work with new services. When used by the client, this binding enables new WCF clients to work with old ASMX services.

TCP binding

Offered by the NetTcpBinding class, this uses TCP for cross-machine communication on the intranet. It supports a variety of features, including reliability, transactions, and security, and is optimized for WCF-to-WCF communication. As a result, it requires both the client and the service to use WCF.

Peer network binding

Offered by the NetPeerTcpBinding class, this uses peer networking as a transport. The peer network-enabled client and services all subscribe to the same grid and broadcast messages to it.

IPC binding

Offered by the NetNamedPipeBinding class, this uses named pipes as a transport for same-machine communication. It is the most secure binding since it cannot accept calls from outside the machine and it supports a variety of features similar to the TCP binding.

Web Service (WS) binding

Offered by the WSHttpBinding class, this uses HTTP or HTTPS for transport, and is designed to offer a variety of features such as reliability, transactions, and security over the Internet.

Federated WS binding

Offered by the WSFederationHttpBinding class, this is a specialization of the WS binding, offering support for federated security.

Duplex WS binding

Offered by the WSDualHttpBinding class, this is similar to the WS binding except it also supports bidirectional communication from the service to the client.

MSMQ binding

Offered by the NetMsmqBinding class, this uses MSMQ for transport and is designed to offer support for disconnected queued calls.

MSMQ integration binding

Offered by the MsmqIntegrationBinding class, this converts WCF messages to and from MSMQ messages, and is designed to interoperate with legacy MSMQ clients.

For WCF binding comparison, see

Where we can host WCF services?

Every WCF services must be hosted somewhere. There are three ways of hosting WCF services.

They are

1. IIS

2. Self Hosting

3. WAS (Windows Activation Service)

For more details see

What is address in WCF and how many types of transport schemas are there in WCF?

Address is a way of letting client know that where a service is located. In WCF, every service is associated with a unique address. This contains the location of the service and transport schemas.

WCF supports following transport schemas



Peer network

IPC (Inter-Process Communication over named pipes)


The sample address for above transport schema may look like







What is service and client in perspective of data communication?

A service is a unit of functionality exposed to the world. The client of a service is merely the party consuming the service.

1. A user has a service with a one-way operation that includes a fault contract, and he

gets an exception when he tries to host the service. Why?

    This happens because, to return faults, the service needs some form of a two-way communication channel in place, which is not the case with one-way operations.

2. A user has a service he wants to expose on the Internet, and it needs to send notifications

out to its consumers. Would the WCF Duplex MEP be a good choice for

implementing this?

    No. The WCF Duplex MEP can be problematic to enable, even inside an enterprise.

Its implementation depends upon the service establishing a connection back to the consumer, which can’t happen in certain scenarios, such as when the client’s machine uses NAT behind a firewall. On the Internet, where you are never certain

where your consumers are coming from, this type of callback channel would rarely, if ever, work. When you factor in the security risks it could pose and the scalability concerns with the fact that callback channels require the presence of sessions

between client and service, it isn’t a feasible solution.

3. You have a Data contract specifying a Person class from which you derive a Customer class. Does a Customer object automatically have a Data contract as well?

    No. The Data contract is not inherited, so any derived class, such as the Customer class, would have to be explicitly declared as having a Data contract as well.

4. Your company has its own proprietary authentication mechanism, and you are required to authenticate every message coming into the service. What is the best way to handle using this mechanism with WCF?

    Likely the best way to handle this would be to design a Message contract that accepts these proprietary authentication tokens in the header.

5. Can you support the Rpc SOAP style by using the DataContractSerializer?

    Yes. You need only adorn your service with the DataContractFormatAttribute and explicitly set the attribute’s Style property to OperationFormatStyle.Rpc.

6. What does the “ABCs of endpoints” refer to?

    The ABCs of endpoints refers to the three required elements that comprise a service endpoint: address, binding, and contract.

7. Which standard binding could be used for a service that was designed to replace an existing ASMX Web service?

    The basicHttpBinding standard binding was designed to expose a service as if it were an ASMX Web service. This enables you to support existing clients as applications are upgraded to WCF.

8. What is the main disadvantage of using IIS to host a service?

    Using IIS to host your services means that you will not be able to support non-HTTP protocols such as TCP, named pipes, and MSMQ. You will have access to the many built-in features available with IIS such as process recycling and messagebased


9. Which file specifies the types that your service will expose in IIS?

    Service types are exposed through IIS by using the service file. This file must have an .svc file extension and should reside in the application directory for your IIS hosting application. This file will include an @ServiceHost directive, which specifies

the service name and language for the service code files. These files should be located in an App_Code subdirectory.

1.) How does Windows Communication Foundation address Service Oriented Architecture (SOA)?

WCF is the first programming model built from the ground up to provide implicit service-oriented application development, enabling developers to work autonomously and build applications that are more version independent, thereby increasing application resilience to change.

2.) How to deal with operation overloading while exposing the WCF services?

By default overload operations  are not supported in WSDL based

operation. However by using Name property of OperationContract attribute, we can deal with operation overloading scenario.


interface Isum


[OperationContract(Name = "MultiplyInt")]

int Multiply(int arg1,int arg2);

[OperationContract(Name = "MultiplyDouble")]

double Multiply(double arg1,double arg2);


Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is different. In this case client proxy will have two methods with different name MultiplyInt and MultiplyDouble.

3.) Is Windows Communication Foundation going to interoperate with my existing applications?

The current plan is for Windows Communication Foundation to provide wire-level interoperability with WSE3, System.Messaging, .NET Enterprise Services, and ASMX applications. With minimal or no changes to code, applications built with these technologies will be able to call Windows Communication Foundation services and be callable by Windows Communication Foundation services.


4.) How to configure Reliability while communicating with WCF Services?

Reliability can be configured in the client config file by adding reliableSession under binding tag.

Reliability is supported by following bindings only:




5.) Will Windows Communication Foundation applications interoperate with Web services built with other technologi


Yes. By default,services built with WCF will communicate with other services based on the interoperable Web services specifications. This means that WCF services will communicate with any application built on an infrastructure that also conforms to these standards. Microsoft is deeply committed to p

latform interoperability and is an active member of key standards organizations defining the latest Web services standards.


6.) How to set the timeout property for the WCF Service client call?

The timeout property can be set for the WCF Service client call using binding tag. If no timeout has been specified, the default is considered as 1 minute.

7.) What are the core components of an Windows Communication Foundation service?

A host environment—an application domain and process—in which the service runs;

A service class, implemented in C# or VB.NET or another CLR-based language that implements one or more methods;

One or more endpoints that allow clients to access the service.

8.) What are different elements of WCF Srevices Client configuration file?

clip_image006WCF Services client configuration file contains endpoint, address, binding and contract.

The IHttpHandler and IHttpHandlerFactory interfaces ?

The IHttpHandler interface is implemented by all the handlers. The interface consists of one property called IsReusable. The IsReusable property gets a value indicating whether another request can use the IHttpHandler instance. The method ProcessRequest() allows you to process the current request. This is the core place where all your code goes. This method receives a parameter of type HttpContext using which you can access the intrinsic objects such as Request and Response. The IHttpHandlerFactory interface consists of two methods - GetHandler and ReleaseHandler. The GetHandler() method instantiates the required HTTP handler based on some condition and returns it back to ASP.NET. The ReleaseHandler() method allows the factory to reuse an existing handler.

What is REST?

REST is a term coined by Roy Fielding in his Ph.D. dissertation [1] to describe an architecture style of networked systems. REST is an acronym standing for Representational State Transfer.

Why is it called Representational State Transfer?

The Web is comprised of resources. A resource is any item of interest.

Motivation for REST

The motivation for REST was to capture the characteristics of the Web which made the Web successful. Subsequently these characteristics are being used to guide the evolution of the Web.

REST - An Architectural Style, Not a Standard

REST is not a standard. You will not see the W3C putting out a REST specification. You will not see IBM or Microsoft or Sun selling a REST developer's toolkit. Why? Because REST is just an architectural style. You can't bottle up that style. You can only understand it, and design your Web services in that style. (Analogous to the client-server architectural style. There is no client-server standard.)

While REST is not a standard, it does use standards:

  • HTTP

  • URL

  • XML/HTML/GIF/JPEG/etc (Resource Representations)

  • text/xml, text/html, image/gif, image/jpeg, etc (MIME Types)

The Classic REST System

The Web is a REST system! Many of those Web services that you have been using these many years - book-ordering services, search services, online dictionary services, etc - are REST-based Web services. Alas, you have been using REST, building REST services and you didn't even know it.

REST is concerned with the "big picture" of the Web. It does not deal with implementation details (e.g., using Java servlets or CGI to implement a Web service). So let's look at an example of creating a Web service from the REST "big picture" perspective.

Parts Depot Web Services

Parts Depot, Inc (fictitious company) has deployed some web services to enable its customers to:

  • get a list of parts

  • get detailed information about a particular part

  • submit a Purchase Order (PO)

Let's consider how each of these services are implemented in a RESTful fashion.

Get Parts List

The web service makes available a URL to a parts list resource. For example, a client would use this URL to get the parts list:

Note that "how" the web service generates the parts list is completely transparent to the client. All the client knows is that if he/she submits the above URL then a document containing the list of parts is returned. Since the implementation is transparent to clients, Parts Depot is free to modify the underlying implementation of this resource without impacting clients. This is loose coupling.

Here's the document that the client receives:

<?xml version="1.0"?>

<p:Parts xmlns:p="" 


      <Part id="00345" xlink:href=""/>

      <Part id="00346" xlink:href=""/>

      <Part id="00347" xlink:href=""/>

      <Part id="00348" xlink:href=""/>


[Assume that through content negotiation the service determined that the client wants the representation as XML (for machine-to-machine processing).] Note that the parts list has links to get detailed info about each part. This is a key feature of REST. The client transfers from one state to the next by examining and choosing from among the alternative URLs in the response document.

Get Detailed Part Data

The web service makes available a URL to each part resource. Example, here's how a client requests part 00345:

Here's the document that the client receives:

<?xml version="1.0"?>

<p:Part xmlns:p=""   




      <Description>This part is used within the frap assembly</Description>

      <Specification xlink:href=""/>

      <UnitCost currency="USD">0.10</UnitCost>



Again observe how this data is linked to still more data - the specification for this part may be found by traversing the hyperlink. Each response document allows the client to drill down to get more detailed information.

Submit PO

The web service makes available a URL to submit a PO. The client creates a PO instance document which conforms to the PO schema that Parts Depot has designed (and publicized in a WSDL document). The client submits PO.xml as the payload of an HTTP POST.

The PO service responds to the HTTP POST with a URL to the submitted PO. Thus, the client can retrieve the PO any time thereafter (to update/edit it). The PO has become a piece of information which is shared between the client and the server. The shared information (PO) is given an address (URL) by the server and is exposed as a Web service.

Logical URLs versus Physical URLs

A resource is a conceptual entity. A representation is a concrete manifestation of the resource. This URL:

is a logical URL, not a physical URL. Thus, there doesn't need to be, for example, a static HTML page for each part. In fact, if there were a million parts then a million static HTML pages would not be a very attractive design.

[Implementation detail: Parts Depot could implement the service that gets detailed data about a particular part by employing a Java Servlet which parses the string after the host name, uses the part number to query the parts database, formulate the query results as XML, and then return the XML as the payload of the HTTP response.]

As a matter of style URLs should not reveal the implementation technique used. You need to be free to change your implementation without impacting clients or having misleading URLs.

REST Web Services Characteristics

Here are the characteristics of REST:

  • Client-Server: a pull-based interaction style: consuming components pull representations.

  • Stateless: each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server.

  • Cache: to improve network efficiency responses must be capable of being labeled as cacheable or non-cacheable.

  • Uniform interface: all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE).

  • Named resources - the system is comprised of resources which are named using a URL.

  • Interconnected resource representations - the representations of the resources are interconnected using URLs, thereby enabling a client to progress from one state to another.

  • Layered components - intermediaries, such as proxy servers, cache servers, gateways, etc, can be inserted between clients and resources to support performance, security, etc.

Principles of REST Web Service Design

1. The key to creating Web Services in a REST network (i.e., the Web) is to identify all of the conceptual entities that you wish to expose as services. Above we saw some examples of resources: parts list, detailed part data, purchase order.

2. Create a URL to each resource. The resources should be nouns, not verbs. For example, do not use this:

Note the verb, getPart. Instead, use a noun:

3. Categorize your resources according to whether clients can just receive a representation of the resource, or whether clients can modify (add to) the resource. For the former, make those resources accessible using an HTTP GET. For the later, make those resources accessible using HTTP POST, PUT, and/or DELETE.

4. All resources accessible via HTTP GET should be side-effect free. That is, the resource should just return a representation of the resource. Invoking the resource should not result in modifying the resource.

5. No man/woman is an island. Likewise, no representation should be an island. In other words, put hyperlinks within resource representations to enable clients to drill down for more information, and/or to obtain related information.

6. Design to reveal data gradually. Don't reveal everything in a single response document. Provide hyperlinks to obtain more details.

7. Specify the format of response data using a schema (DTD, W3C Schema, RelaxNG, or Schematron). For those services that require a POST or PUT to it, also provide a schema to specify the format of the response.

8. Describe how your services are to be invoked using either a WSDL document, or simply an HTML document.

What is a REST Web Service

The acronym REST stands for Representational State Transfer, this basically means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET, to delete it, you then might use a POST, PUT, or DELETE to modify the object (in practice most of the services use a POST for this).

Who's using REST?

All of Yahoo's web services use REST, including Flickr, API uses it, pubsub, bloglines, technorati, and both eBay, and Amazon have web services for both REST and SOAP.

Who's using SOAP?

Google seams to be consistent in implementing their web services to use SOAP, with the exception of Blogger, which uses XML-RPC. You will find SOAP web services in lots of enterprise software as well.


As you may have noticed the companies I mentioned that are using REST api's haven't been around for very long, and their apis came out this year mostly. So REST is definitely the trendy way to create a web service, if creating web services could ever be trendy (lets face it you use soap to wash, and you rest when your tired). The main advantages of REST web services are:

  • Lightweight - not a lot of extra xml markup

  • Human Readable Results

  • Easy to build - no toolkits required

SOAP also has some advantages:

  • Easy to consume - sometimes

  • Rigid - type checking, adheres to a contract

  • Development tools

For consuming web services, its sometimes a toss up between which is easier. For instance Google's AdWords web service is really hard to consume (in CF anyways), it uses SOAP headers, and a number of other things that make it kind of difficult. On the converse, Amazon's REST web service can sometimes be tricky to parse because it can be highly nested, and the result schema can vary quite a bit based on what you search for.