Saturday, June 25, 2011

Can Agile Fix Bad Project Management?

 

Post From:

http://herdingcats.typepad.com/my_weblog/2011/06/can-agile-fix-bad-project-management-1.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+typepad/HerdingCats+(Herding+Cats)

Vin, has a post that outlines sources problems for project failure. I read this that each topic is the source of the project's problem. And then there is the suggestion that Agile can "fix" these problems. Like many suggestions around agile, there needs to be a seperation between "bad program management," actual benefical outcomes of agile, and the measureable outcomes from applying agile to specific problem domain and context in that domain.

  • Requirements: (there are) Unclear (requirements), (they) lack of agreement, lack of priority, contradictory, ambiguous, imprecise.
  • Resources: (there is a) Lack of resources, resource conflicts, turnover of key resources, poor planning.
  • Schedules: (are) Too tight, unrealistic, overly optimistic.
  • Planning: (is) Based on insufficient data, missing items, insufficient details, poor estimates.
  • Risks: (are) Unidentified or assumed, not managed.

Each of these can be traced to much simpler source than just the red herring of WaterFall.It is suggested Agile can address these issues. So let's look at that conjecture a bit more.

Requirements

A Requirement is ... "A statement identifying a capability, a physical characteristic, or a quality factor that bounds a product or process need for which a solution will be pursued." - IEEE Standard 1220-2005.

Along with requirements successful projects need to define what capabilities are to be provided by the solution.

A Capability is ...“the result of a method involves a functional analysis of operational requirements. Capabilities are identified based on the tasks required… Once the required capability inventory is defined, the most cost effective and efficient options to satisfy the requirements are sought.”

So when it is said "forget requirements, tell stories instead," what does this really mean? Because a story is a requirement. A requiremment told trough the narrative of the stiry. But it's missing several things good requirements need:

  • Traceability of the Requirements to the Business (or mission) Capabilities. Why is this requirement here? What other requirements are related to this requirement? What are the dependencies between this requirement and other requirements? If I drop this requirement to hold the iteration completion time, what's the impact on other requirement in the release.
  • Requirements can be represented in many ways. Scenarios are common in our domain. sysML process flows, systems engineering Concept of Operations, and other "story like" narratives can be found in defense

Resources

Resource management is a critical success factor for any project. The estimating, acquisition, management, and forecasting resource demand is the role of program management. The notion that Waterfall is somehow the source of the problem is a big stretch. Bad Project Management will ignore the resource management role. Resource Management is Chapter 9 in PMBOK and other chapter in other PM guides. This is NOT a waterfall isseu, it can just as easily be an agile issue too if not looked after.

Bring in resources as needed including using temporary workers to cover peak demand.

Really, how many resources, what kinds of resources, skills, capabilities, cost, fit with team?How far ahead do we need to start recruiting these resources? Our HR department has 3 full time recruiters just scrambling everyday for PM's, Program Managers, PP&C staff, testing, cost, and all other skill sets needed on our programs.

Agile provides no unique solution here.

Schedules

If your schedule is overly optimistic, then you've got a bad schedule. Period. You're a bad project manager if you sign up for this schedule. You've violated your obligation as a PM for provide a credible probability of success. You've probably violated the ethics code of your PMP.

Either allow schedules to flex or fix them and allow features to flex. You can’t have it all.

Here's some advice we apply and provide to our clients:

  • A schedule without margin is late and over budget before you start.
  • How much margin needs to be determined analytically. Either through past performance analysis on one end and Monte Carlo Simulation on the other. Either way, or all ways in between mean that you have some understanding of the probabilistic nature of the durations, cost, and technical performance.
  • Schedule have show the order of development at some level to maximize the value stream to the customer. This is done on multi-billion weapons systems and done in agile projects.

Planning

A Plan is a Strategy for the successful completion of the project. It's the Plan that describes the sequence of activities needed to maximize this value. Be the value autonomous landing of an F-18 on the deck of a carrier, the delivery of telecommunications services to clients, or some type business capability to customer. The notion of exchanging planning for deliverables requires very careful consideration. With a credible Plan, you cannot know what to deliver. A pile of story cards stuck to the wall is not a plan. It's a pile of story card stuck to the wall.

Plan less, deliver more. Let the deliverables guide the planning.

Which deliverables? What order are needed to minimize the duration of the project? What are the dependencies between these deliverables? Are there deliverables that depend on other deliverables? Who decides what order the deliverables appear? Is there oversight around these deliverables, their connection with the Capabilities needed for business success.

This has nothing to do with Waterfall and is not solved by Agile. Here's a sample of a Plan used for a Scrum based very large insurance program.

Risk Management

Let's start with the seminal quote:

Risk Management is how adults manage projects - Tim Lister

Vin suggests

Evaluate, prioritize and mitigate risks on every project.

Well close, here's some guidance

But the process actually is:

DoD Risk Management

Creating a Currency Masked TextBox with On-the-Fly Currency Formatting

 

Referred URL :

http://scottonwriting.net/sowblog/archive/2011/06/25/creating-a-currency-masked-textbox-with-on-the-fly-currency-formatting.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+ScottOnWriting+(Scott+on+Writing)

Allowing Only Currency-Related Characters In a TextBox

There are a number of existing masked input plugins for jQuery. After trying some out I decided to roll my own JavaScript functions. I intend to come back to these and turn them into jQuery plugins, but for now they’re just JavaScript functions. As you can see in the script below, I created four functions:

  • numbersOnly – allows just number inputs, whether they are from the letters at the top of the keyboard or from the number pad.
  • numbersAndCommasOnly – allows number inputs and commas.
  • decimalsOnly – allows numbers, commas, and periods (either from the main keyboard or the number pad).
  • currenciesOnly – allows numbers, commas, periods, and the dollar sign.

In addition to the allowed characters discussed above, the functions also permit “special character key codes,” namely Delete, Backspace, left arrow, right arrow, Home, End and Tab. What keycodes are valid are listed in the variables at the top of the script; see Javascript Char Codes for a table listing the keys and their corresponding key codes.

Here is the script of interest:

// JavaScript I wrote to limit what types of input are allowed to be keyed into a textbox 
var allowedSpecialCharKeyCodes = [46,8,37,39,35,36,9];
var numberKeyCodes = [44, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105];
var commaKeyCode = [188];
var decimalKeyCode = [190,110];

function numbersOnly(event) {
var legalKeyCode =
(!event.shiftKey && !event.ctrlKey && !event.altKey)
&&
(jQuery.inArray(event.keyCode, allowedSpecialCharKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, numberKeyCodes) >= 0);

if (legalKeyCode === false)
event.preventDefault();
}

function numbersAndCommasOnly(event) {
var legalKeyCode =
(!event.shiftKey && !event.ctrlKey && !event.altKey)
&&
(jQuery.inArray(event.keyCode, allowedSpecialCharKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, numberKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, commaKeyCode) >= 0);

if (legalKeyCode === false)
event.preventDefault();
}

function decimalsOnly(event) {
var legalKeyCode =
(!event.shiftKey && !event.ctrlKey && !event.altKey)
&&
(jQuery.inArray(event.keyCode, allowedSpecialCharKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, numberKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, commaKeyCode) >= 0
||
jQuery.inArray(event.keyCode, decimalKeyCode) >= 0);

if (legalKeyCode === false)
event.preventDefault();
}

function currenciesOnly(event) {
var legalKeyCode =
(!event.shiftKey && !event.ctrlKey && !event.altKey)
&&
(jQuery.inArray(event.keyCode, allowedSpecialCharKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, numberKeyCodes) >= 0
||
jQuery.inArray(event.keyCode, commaKeyCode) >= 0
||
jQuery.inArray(event.keyCode, decimalKeyCode) >= 0);

// Allow for $
if (!legalKeyCode && event.shiftKey && event.keyCode == 52)
legalKeyCode = true;

if (legalKeyCode === false)
event.preventDefault();
}

My script is, admittedly, very US-centric. I have not tested the key codes with a non-English keyboard and for currencies I only allow a dollar sign. For the project I wrote this script for this is (currently) a non-issue since it is used within the corporate firewall and all sales are domestic, but clearly the above script would not work as well for international settings.

Applying the Currency Masking Script to a TextBox on the Page


With the above script in place you can have a textbox on the page mask its input by having the appropriate function called in response to the keydown event. The following jQuery syntax wires up this logic to all single-line textboxes that have the CSS class currenciesOnly.

$(document).ready(function () {
$("input[type=text].currenciesOnly").live('keydown', currenciesOnly);
});

That’s it!

Formatting the Just-Entered Currency


Another requirement my client had was to format the just-entered number as a currency. That is, to change the user’s input – say, 45000 – to a formatted value like $45,000.00 immediately after their tabbed out of the textbox. To accomplish this I used Ben Dewey’s jQuery Format Currency Plugin, which you can see a demo of athttp://www.bendewey.com/code/formatcurrency/demo/. This plugin adds a formatCurrency function that you can call on a set of elements returned by a jQuery selector.

To use this plugin I updated the $(document).ready event handler shown above to also call theformatCurrency function on blur:

$(document).ready(function () {
$("input[type=text].currenciesOnly").live('keydown', currenciesOnly)
.live('blur',
function () {
$(this).formatCurrency();
}
);
});

In short, whenever a textbox with a CSS class of currenciesOnly is blurred, the just-blurred textbox’s inputs are formatted as a currency thanks to the formatCurrency function.

Thursday, June 16, 2011

Microsoft Silverlight 4 and SharePoint 2010 Integration

 

http://libproject.net/programming/microsoft-silverlight-4-and-sharepoint-2010-integration.html

The Six Sigma Handbook, Third Edition

 

http://libproject.net/business/the-six-sigma-handbook-third-edition-2.html

Microsoft SharePoint 2010 Administration: Real World Skills for MCITP Certification and Beyond (Exam 70-668)

 

http://libproject.net/programming/microsoft-sharepoint-2010-administration-real-world-skills-for-mcitp-certification-and-beyond-exam-70-668.html

Designing Forms for SharePoint and InfoPath: Using InfoPath Designer 2010, 2nd Edition

 

http://libproject.net/office/designing-forms-for-sharepoint-and-infopath-using-infopath-designer-2010-2nd-edition.html

Beginning SharePoint 2010: Building Business Solutions with SharePoint (Wrox Programmer to Programmer)

 

http://libproject.net/programming/beginning-sharepoint-2010-building-business-solutions-with-sharepoint-wrox-programmer-to-programmer.html

Mastering Microsoft SharePoint Foundation 2010

 

http://libproject.net/programming/mastering-microsoft-sharepoint-foundation-2010.html

Microsoft SharePoint 2010 Developer Reference

 

http://libproject.net/programming/microsoft-sharepoint-2010-developer-reference.html

Beginning C# Object-Oriented Programming

 

 

http://libproject.net/programming/beginning-c-object-oriented-programming.html

Applied WPF 4 in Context

 

http://libproject.net/programming/applied-wpf-4-in-context.html

Business Intelligence in Microsoft SharePoint 2010

 

http://libproject.net/programming/business-intelligence-in-microsoft-sharepoint-2010.html

Develop Your Leadership Skills: Develop Yourself as a Leader; Lead at a Strategic Level; Grow Leaders in Your Organisation

 

http://libproject.net/business/develop-your-leadership-skills-develop-yourself-as-a-leader-lead-at-a-strategic-level-grow-leaders-in-your-organisation.html

Silverlight Interview Questions

 

Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET–based media experiences and rich interactive applications for the Web.

Go here for more Silverlight related interview questions


1.) What features are missing from Silverlight presentation markup that will be supported in WPF (Windows Presentation Foundation)?

Some high-end Windows specific features of WPF, such as real 3D, hardware-based video acceleration, and full document support, will not be supported in Silverlight. This is by design in order to serve Silverlight’s cross-browser, cross-platform reach scenario that demands a light weight plug-in. That being said, Silverlight will offer a uniform runtime that can render identical experiences across browsers on both Mac OS and Windows.


2.) Will Silverlight-based applications and content run on any Web Server? What are the benefits to running it on servers running Windows?
Silverlight works with any web server just like HTML. Video and audio content can also be progressively downloaded and played back from any Web server platform. Benefits of Windows server-based distribution of Silverlight applications include Windows Media Services with Fast Stream (instant playback) and Fast reconnect technologies, lower distribution costs (streaming users only download what they watch), and tap into the full Windows server ecosystem of platform components and partner solutions. Those benefits will be enhanced in the future version of Windows Server (code name “Longhorn”) and with Internet Information Server 7 (IIS).

3.) Is Silverlight supported on various locales?
Silverlight installs on localized versions of Macintosh computers and Windows. At this time, the installation is available in an international English format. Final releases will render international text (using double-byte characters) and support the full 64K Unicode character set. Silverlight uses simple input mechanism that treats all the languages in the same way.

4.) What are the different ways to display text with Silverlight?
Silverlight supports displaying static preformatted text that is comprised out of glyph elements and also dynamic text that uses TextBlock. With glyphs, one needs to position the characters individually while TextBlock supports simple layout.

5.) What kinds of fonts are supported with Silverlight?
Beyond standard and western fonts, Silverlight also supports East Asian characters, double-byte characters, and can work with any East Asian font or Middle Eastern font by using the glyphs element and a supporting TrueType font file that supports the requested glyph.

6.) What is Microsoft® Silverlight Streaming by Windows LiveTM?
Microsoft® SilverlightTM Streaming by Windows LiveTM offers a free cloud-based hosting and streaming solution for quickly delivering high-quality, high-scale, cross-platform, cross-browser, media-enabled RIAs.

7.) How much does Silverlight Streaming cost?
While the product is in Beta, hosting is free of charge. Up to 4 GB of data and streaming is free of charge up to 700 kilobit/s. At the conclusion of the Beta program, the developer can chose to enable Microsoft-sponsored advertising in the application for continued free use of the service to or subscribe to a pay-for-use service that is free of advertisements.

8.) What video encoding formats are supported?
The designer or developer is free to use any encoding format for their video supported by the Windows Media Video codec. This includes Variable Bit Rate (VBR) encoding for DVD-quality video and the use of the VC-1 codec for high-definition content. However, for HD content, be aware that the maximum output rate from the service is 700 kilobit/s, which means the client will not receive real-time delivery of HD video.

9.) Do you support digital rights management to protect my videos?
In the future, Silverlight Streaming will provide support for DRM-encoded video as an optional paid turnkey offering.

10.) What applications will Microsoft provide to make hosting easy?
Microsoft is building a simple uploading tool and working to add publishing support directly to SilverlightTM Streaming via ExpressionTM Media Encoder, a feature of ExpressionTM Media. In addition, third-party companies are adding support to their own applications for SilverlightTM Streaming.

11.) How is my content secured from unauthorized access?
You will have to be signed into the SilverlightTM Streaming service to manage your account and your Silverlight applications. Your SilverlightTM Streaming ID and secret key, associated to your Windows Live ID, will authenticate you as the unique and legitimate owner of the applications and content you upload to the service. You will also need this information to manage your Silverlight applications using the API. The SilverlightTM Streaming ID is public. However, the secret key should be kept confidential.

12.)How do I get started?
To sign up for your free account, visit streaming.live.com. Anyone with a Windows Live ID can participate.

1.) Is Silverlight the official name for “WPF/E”?
Yes. Silverlight was formerly code-named “WPF/E.”

2.) Does silverlight web application work with all browsers ?
Yes, A web application developed by silverlight technology can work with any browser

3.)What are the main features and benefits of Silverlight?
-Compelling cross-platform user experiences.
-Flexible Programming Model with Collaboration Tools.
-High-quality media, low-cost delivery
-Connected to data, servers, and services

4.) How can I build experiences and applications with Silverlight?
Silverlight development tools include role-specific productivity tools for both designers and developers:
* Expression Studio empowers designers to create interactive UI and media-rich experiences, prepare media for encoding and distribution, and create W3C standards-compliant sites using modern XHTML, XML, XSLT, CSS, and ASP.NET. Expression Design includes support for exporting XAML for Silverlight. At MIX 07, Microsoft released Expression Blend 2 May Preview and Expression Media Encoder Preview to enable designers to build media experiences and RIAs.
* Visual Studio empowers developers to develop client and server code using full IntelliSense, powerful debugging, rich language support, and more.
By using Expression Studio and Visual Studio, designers and developers can collaborate more effectively using the skills they have today. Additionally, Silverlight supports a consistent subset of XAML (eXtensible Application Markup Language) for declarative programming, the same format found in .NET 3.0. Because XAML is toolable, there is always the potential for third-parties to provide additional XAML-based Silverlight tools in the future.

5.) How does Silverlight make the Microsoft development system better?
Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of media experiences and rich interactive applications (RIAs) for the Web. Examples include:
* For ASP.NET-based Web applications, Silverlight provides a rich UI front-end that, with a consistent programming model, adds support for richer interactivity, media, and audio.
* For Microsoft SharePoint–based content, Silverlight offers the ability to create rich Web parts.
* For Windows Live services, Silverlight offers the ability to consume services and APIs more effectively.

6.) What audio or video formats are supported in Silverlight?
Silverlight supports Windows Media Audio and Video (WMA, WMV7–9) and VC-1, as well as MP3 audio. Additional formats may be available by the final release based on customer feedback.

7.) Will Silverlight support all the codecs Windows Media Player supports?
Since Silverlight is a lightweight cross-platform technology, it only carries the most common codecs that are needed for Web playback. However, we are gathering information from customers about the needed codecs and can update Silverlight when necessary.

8.) Will Silverlight support digital rights management?
For content providers, Silverlight will support digital rights management (DRM) built on the recently announced Microsoft PlayReady content access technology on Windows-based computers and Macintosh computers.
Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. By using Silverlight’s support for .NET, High Definition video, cost-effective advanced streaming, unparalleled high-resolution interactivity with Deep Zoom technology, and controls, businesses can reach out to new markets across the Web, desktop, and devices(Fig. source : MS Site).
Silverlight provides a retained mode graphics system similar to WPF and integrates multimedia, graphics, animations and interactivity into a single runtime environment. In Silverlight applications, user interfaces are declared in XAML and programmed using a subset of the .Net framework. XAML can be used for making up the vector graphics and animations.

1.) Is Silverlight free?
Yes, Microsoft has made the Silverlight browser plug-in freely available for all supported platforms and browsers.

2.)What is the long-term goal or vision for Silverlight?
Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, IronPython, and IronRuby, and integrates with existing Web applications. By using Expression Studio and Visual Studio, designers and developers can collaborate more effectively using the skills they have today to light up the Web of tomorrow. By leveraging Silverlight’s support for .NET, High Definition video, cost-effective advanced streaming, unparalleled high-resolution interactivity with Deep Zoom technology, and controls, businesses can reach out to new markets across the Web, desktop, and devices.

3.) When would a customer use Silverlight instead of ASP.NET AJAX?
Silverlight integrates with existing Web applications, including ASP.NET AJAX applications. Consequently, ASP.NET AJAX and Silverlight are designed to be complementary technologies. In the broader sense, Silverlight can talk to any AJAX application, both client-side and server-side. ASP.NET AJAX can additionally be used to control Silverlight-based visualization of data or delivery of rich experiences. Examples might include mapping applications or video playback with rich presentation.

4.) Will Silverlight support live streaming events as well as downloading media?
Yes. Silverlight together with Windows Media Services enable live streaming experiences.

5.) When would a customer use Silverlight versus Windows Presentation Foundation? Is Silverlight for a certain type of application?
For ASP.NET-based Web applications, Silverlight provides a rich UI front-end that, with a consistent programming model, adds support for richer interactivity, media, and audio.
For Microsoft SharePoint–based content, Silverlight offers the ability to create rich Web parts. For Windows Live services, Silverlight offers the ability to consume services and APIs more effectively.

6.) Will Silverlight work with my new or existing Windows Media services platform for streaming?
Silverlight takes advantage of Windows Server features for streaming.

7.) What features are missing from Silverlight presentation markup that will be supported in the Windows Presentation Foundation?
Microsoft recommends the Windows Presentation Foundation for building rich immersive applications and experiences that can take full advantage of the Windows platform, including UI, Media, offline communication, OS integration, Office integration, peripheral access, Document support and more. Silverlight will be used for broad reach interactive media content and browser-based rich interactive and high-performance applications and experiences.

8.) Is Silverlight a new media player?
No. Silverlight is a cross-browser, cross-platform plug-in for delivering media experiences and RIAs. It is not a desktop application or stand-alone media player.

Business Data Catalog (BDC) VS Business Connectivity Services (BCS)

 

What is Business Connectivity Services in SharePoint ?
SharePoint 2010 provides a new set of technologies known as Business Connectivity Services for retrieving, editing, updating, and deleting data from external systems(for e.g. data from ERP or CRM database). BCS enhances the SharePoint platform’s capabilities with out-of-box features, services and tools that streamline development of solutions with deep integration of external data and services.


How is BCS Different from BDC in SharePoint 2007 ?
Even though the BDC made it relatively easy to create read-only solutions that display data in the Business Data List Web Part, it was not so simple to create a solution that enabled users to make changes and write that data back to the external store.
BCS, on the other hand, provides you with Read-Write capable connectivity from Client and Server to Database, WCF/Web Services and .Net Sources.
A Developer can now use SharePoint Designer 2010 and VS 2010 rapid development tools to access external data. For e.g. you can now create read-write connections to external database from SharePoint designer and then can create webpart\other solutions to surface that data.
The BCS data can further be used in other SharePoint Fetaures such as Business Intelligence,Collaboration and in Enterprise Search.

SSP Vs Service Applications

Differences between SSP and Service Application are:
What are:
SSP : A Web application that contain all the services proived by sharepoint, and can be shared by various web applications. Some of the services are Search, Infopath,User Profiles etc.
Service Application : The Services that use to be together in SSP, now run independently as a Service Application.
Build -In:
SSP : Shared Services Provider (SSP) was only a part of Office SharePoint Server 2007.
Service Applications : The service application architecture is however, built into Microsoft SharePoint Foundation 2010 itself.
SSP Administration Site:
SSP : They require a SSP administration site to configure the associations with web applications.
Service Application : They are running independently and can be individually associated with the one or more web applications.
Web application's Burden :
SSP : Any Web application associated with the SSP has to take the burden of all the shared services in that SSP.
Service Application : Each web application now have a "Service application group" where they can just add the Services that they need.
Replication :
SSP : The Services where configured in SSP itself and were not replicated. All web applications will use one set of srevices.
Service Application : If the service is needed to be shared between few web applications, the service is re-configured and added into each web application's custom service connection group.


Get list items with Silverlight in Sharepoint 2010

In SharePoint 2010 we use three types of Client Object model extenstions. To get all items using .Net managed client Object model see -
.Net managed client Object model -

To get all items using ECMASCRIPT\Javascript object model see -
Using ECMAScript
In this post however, we will see an example of retrieving list items using Silverlight Client object model in SharePoint 2010.
using SP = Microsoft.SharePoint.Client;
namespace SPSilverlight
{
public partial class MainPage : UserControl
{
IEnumerable < SP.List > listItems = null;
public MainPage()
{
InitializeComponent();
}
private void getItemsSucceeded(object sender,
Microsoft.SharePoint.Client.ClientRequestSucceededEventArgs e)
{
Dispatcher.BeginInvoke(() = >
{
listBox1.ItemsSource = listItems;
listBox1.DisplayMemberPath = "Title";
});
}
private void getItemsRequestFailed(object sender,
Microsoft.SharePoint.Client.ClientRequestFailedEventArgs e)
{
Dispatcher.BeginInvoke(() = >
{
MessageBox.Show("Error: " + e.ErrorCode + " " + e.ErrorDetails + "
" + e.Message + " " + e.StackTrace.ToString());
});
}
private void button1_Click(object sender, RoutedEventArgs e)
{
ClientContext context = null;
if (App.Current.IsRunningOutOfBrowser)
{
context = new ClientContext(
"http://SP2010Site");
}
else
{
context = ClientContext.Current;
}
var query = from listCollection
in context.Web.Lists
where listCollection.Title != null
select listCollection;
listItems = context.LoadQuery(query);
ClientRequestSucceededEventHandler success = new
ClientRequestSucceededEventHandler(getItemsSucceeded);
ClientRequestFailedEventHandler failure = new
ClientRequestFailedEventHandler(getItemsRequestFailed);
context.ExecuteQueryAsync(success, failure);
}
}

Asp.net Webparts vs Sharepoint Webparts and SP 2007 Object Model Vs SP 2010

 

Choosing Between ASP.NET 2.0 Web Parts and Windows SharePoint Services 3.0 Web Parts

Office SharePoint Server 2007 and Windows SharePoint Services 3.0 are built on top of the ASP.NET 2.0 Framework. Windows SharePoint Services 3.0 uses the ASP.NET 2.0 Web Part infrastructure to take advantage of features such as master pages and custom Web Part development while providing a complete set of Windows SharePoint Services features, such as document services, events, workflow, search, site columns, content types and more.
You can build Web Parts for Windows SharePoint Services 3.0 in two ways:
* Create custom ASP.NET 2.0 Web Parts.
* Create SharePoint-based Web Parts.
Decision matrix for creating Web Parts
Create a custom ASP.NET 2.0 Web Part

· For most business needs.

· To distribute your Web Part to sites that run ASP.NET 2.0 or SharePoint sites.

· When you want to reuse one or more Web Parts created for ASP.NET 2.0 sites on SharePoint sites.

· To use data or functionality provided by Windows SharePoint Services 3.0. For example, you are creating a a Web Part that works with site or list data.


Create a SharePoint-based Web Part

· When you want to migrate a set of Web Parts using the SharePoint-based Web Part infrastructure to Windows SharePoint Services 3.0.

· To create cross page connections.

· To create connections between Web Parts that are outside of a Web Part zone.

· To work with client-side connections (Web Part Page Services Component).

· To use a data-caching infrastructure that allows caching to the content database.


SharePoint 2007 Lookup Column vs SharePoint 2010

Cascade Delete
SharePoint 2007: The Lookup column in SharePoint 2007 does not support cascade delete. i.e. if If an Item\Value in the the look-up list is deleted, then all those items referencing that value (as look-up value) will not be delete. This will rather present you with various errors and can also cause errors on the Site page if your are using one of them as filters.
SharePoint 2010: If an Item\Value in the the look-up list is deleted, then all those items referencing that value (as look-up value) in other lists will also be deleted.

Restrict Delete
SharePoint 2007: Does not have option to restrict deleting of lookup list items\values.
SharePoint 2010: Choosing this option would restrict the users from deleting an item in the column in the Look-up list, if the value is being used in some other lists.

Number of columns displayed
SharePoint 2007: This will only display the chosen lookup column in the referencing list.
SharePoint 2010: You can now display additional columns from the look-up list, along with the chosen lookup field.

 

SP 2007 Object Model Vs SP 2010

In Sharepoint Object model there are two Important namespaces.
In SharePoint 2007 - The Microsoft.Office.Server namespace is the root namespace of all Office Server objects and Microsoft.SharePoint is the root namespace for all WSS objects.
Hive:
In SharePoint 2007 - It has "12 hive" structure where all SharePoint resources are deployed.
In SharePoint 2010 - Microsoft has apparently added three new folders to its hive and calling it as "14 Hive"
* UserCode – files used to support sandboxed solutions
* WebClients – used for the client Object Model
* WebServices – New .svc files

Foundation :
SharePoint 2007 : Wss 3.0 was required for accessing all common SharePoint API's
SharePoint 2010 : SharePoint Foundation 2010 is required to provide base API's.

API's :
SharePoint 2007 : No API was available for Code to Interact with SharePoint site through Client side scripts (side Note : You can do it by calling Sharepoint web services using javascript )
SharePoint 2010 : MS has introduced Microsoft.SharePoint.Client namespace that enable you to interact with SharePoint sites through scripts that run in the browser from Microsoft .NET Framework managed code, and inside Microsoft Silverlight applications.

SharePoint Foundation 2010 VS SharePoint Server 2010

 

Used For :
SharePoint Foundation 2010: Is is for smaller organizations or departments looking for a low-cost entry-level or pilot solution for secure, Web-based collaboration.
SharePoint Server 2010: SharePoint Server 2010 builds on the Microsoft SharePoint Foundation 2010 infrastructure to provide a true enterprise portal platform.Any features that are available in SharePoint Foundation 2010 are also available in SharePoint Server 2010.
Features :
SharePoint Foundation 2010: Coordinate schedules, organize documents, and participate in discussions through team workspaces, blogs, wikis, and document libraries on the platform that is the underlying infrastructure for SharePoint Server.
SharePoint Server 2010: In addition to all the Features in SharePoint Foundation 2010, the server includes some additional features for every component available in Foundation 2010. Like Along with the BCS, sharePoint 2010 server also includes External data in search, Secure Store service,External Data Web Parts,Profile pages,External data in workflow,Rich client integration and lot more...

Stsadm Vs Windows PowerShell

 

Def :
Stsadm Tool: Microsoft Office SharePoint Server 2007 includes the Stsadm tool for command-line administration of Office SharePoint Server 2007 servers and sites.

Stsadm is located at the following path on the drive where SharePoint Products and Technologies is installed: %COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\bin. You must be an administrator on the local computer to use Stsadm.
Windows PowerShell: Windows PowerShell command-line interface is a new command-line tool and supporting scripting language from Microsoft that complements Cmd.exe in the Windows administration context. In the SharePoint administration context, Windows PowerShell supersedes the Stsadm.exe administration tool.
Return Parameter :
Windows PowerShell:Unlike most command-line tools, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects.

Access to File System :
Stsadm : It does not allow you to access file system,registry ans so on..
Windows PowerShell :Like many shells, Windows PowerShell gives you access to the file system on the computer. In addition, Windows PowerShell providers enable you to access other data stores, such as the registry and the digital signature certificate stores etc..

SharePoint 2010 Object Model - Backward Compatibility

 

Some Important things about SharePoint 2010 Object model and its backward compatibility.


Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 contain object model upgrades that are designed to be compatible with existing solutions developed for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007. Some namespaces, classes, and methods are now obsolete, but they are still available and will continue to work as expected in your custom code.


You can synchronize your customizations and applications with the upgraded versions of Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 after you have redeployed them.


The object model contains many changes and enhancements, but your custom code will still compile and, with one potential exception, it will run as expected. If in case, any of your customizations rely on list queries that can generate result sets in excess of 5,000 items or that scan all rows of lists that consist of more than 5,000 items, you must change the query size threshold.(See Later in the Post)..


Note: You must Re-compile or re-write your code in below conditions:
* You should rewrite and recompile any code that refers to files and resources in "12" hive.For example, if you have redeployed all of your files into the "14" folder and emptied your "12" folder, any references to files under the "12" folder will not work. You will need to rewrite your code to refer the files in "14 Hive" instead of "12 Hive" to make it work.


* You must recompile custom code written for Windows SharePoint Services 3.0 and Office SharePoint Server 2007 that does not run on IIS (such as console applications and services).


* You should recompile custom code written for Office SharePoint Server 2007 if your solution includes a feature receiver that implements the FeatureInstalled, FeatureUninstalling, FeatureActivated, or FeatureDeactivating methods and you are deploying by using either the Stsadm command-line tool or the timer service.


Lets Look at some of the custom solutions that you would be moving to SharePoint 2010.


Moving Using Solution Packages (.wsp Files)
You can simply deploy them as we did in SharePoint 2007. You dont need to recompile them(unless, your code has references to 12 hive). If however, you want to start upgrading your applications so that they use the most current classes and methods, you should recompile your code. The compiler warnings will tell you which elements of the object model are obsolete, and which newer alternatives you should use.

Moving Using Windows Installer Files
If you deploy your custom solutions by using Windows Installer (.msi) packages, be sure to change them so that your custom files are deployed to their correct locations in the "14" folder. This is especially true if you are deploying files to locations other than the TEMPLATE\FEATURES folder.


Moving Site templates
Site templates:
are deprecated. If you need to redeploy a site template to either SharePoint Foundation 2010 or SharePoint Server 2010, follow these steps:
1. Create a site from the site template.
2. Install SharePoint Foundation 2010 or SharePoint Server 2010 on your existing server farm or on a new server farm. If you install the upgrades on a new server farm, attach the content database that contains the site that you created to the new farm.
3. On the new installation, choose Save Site as Template from the Site Settings page. This creates a solution package with a .wsp file name extension.


CSS Changes:
When you upgrade to either SharePoint Foundation 2010 or SharePoint Server 2010, you are able to choose either backward compatibility mode or the upgraded user interface. You can however, switch between backward compatibility mode and the new interface at the site-collection level or site level.


Since, the UI has changed significantly in both SharePoint Foundation 2010 and SharePoint Server 2010, any customizations(made to SharePoint 2007 CSS) that rely on specific CSS classes and UI elements will work only in backward compatibility mode.


A property SPWeb.UIVersion is also available for developers, to programmatically get or set the UI version (3 for backward compatibility mode and 4 for the new interface).


Themes:
Themes no longer exist in SharePoint Foundation 2010 and SharePoint Server 2010, so any customizations and design work that you have done with themes will not be imported into the new interface.


Custom Actions and Toolbar Additions:
Most custom actions, including those targeted at links and edit control block (ECB) menus, continue to work as expected in the upgraded interface. Because the toolbar is replaced by the ribbon, most custom actions that add buttons to a toolbar will be placed in the Custom Commands tab of the ribbon.

Note: Any Custom Action Element that uses the ControlAssembly attribute, the ControlClass attribute, or the ControlSrc attribute, however, will not appear in the new interface.

Site definition:Migrate sites to a supported, predefined site definition, then apply custom features by using solution deployment. You can also continue to use a custom site definition. You do not have to create a new site definition based on SharePoint Server 2010.

Event handler : Rewrite and redeploy as a feature.
JavaScript : In some cases, you might have to adjust the scripts to work with the new page model. Verify that it works on an upgraded site, and in both Visual Upgrade modes.

Solution packages in Sharepoint 2010

 

First of all if you do not know what is this solution package then here is a simple definition : A solution package is a distribution package or a container that is use to deploy your custom SharePoint Server 2010 development work to the SharePoint Web servers.
In SharePoint 2010, user have many options to create and deploy solution packages for their custom development work, let me start with the most used method to create a solution package

1. Create Package using Visual Studio 2010 -
Developers can build their SharePoint solutions in Visual Studio 2010 and produce .wsp files by using the automated build process. After you build your thing in VS 2010 using the SharePoint related templates available, you can just hit ctrl + F5. This will create a .wsp file and will also deploy it to the SharePoint server you are developing on.
Create a package - To Create a package in VS 2010, In Solution Explorer, click the project that you want to package. Then, on the Build menu, click Package.
Where is the .wsp - In Solution Explorer, click the Show All Files button. This shows all project items, including excluded and hidden items.Expand the bin node and
Expand the Debug or Release node to get your .wsp file.
Modify solution Package - When you create a SharePoint solution, Visual Studio adds the default SharePoint Features (or items) to the solution package. Before final deployment, you can add and remove SharePoint project items and Features using the SharePoint package. To open Package Designer In your Solution Explorer, right-click Package and then click View Designer.
Use Add\Remove (>) or(<) button to add the items into the solution package.
In addition to select files for packaging, the Package designer allows you to set various properties for the deployment. Some of the properties that you can set are :
1. Name - It is a Required Property. The default name of the package is set to ProjectName.
2. Reset WebServer - Optional. Select if you want to restart the Web server after the .wsp file is installed on the SharePoint server.
3. Deployment Server Type - This is a Required Field. By default, the scope is set to ApplicationServer.
4. Items in the Solution - All SharePoint project items and Features that can be added to the package.
5. Items in the Package - Optional. All SharePoint items and Features that you want to deploy in your package.
After, VS 2010 lets see at other options to create a solution Package in SharePoint 2010.
2. Solution Package by Using MSBuild - Using MSbuild you can build, clean, and validate a SharePoint package (.wsp) using command-line MSBuild tasks on a development computer.

For this you need to Open a Visual Studio command prompt window

-> Cd to your Project folder

-> Type the command

"msbuild /t:Package ProjectName.csproj" to create a package for the project. ProjectName is a name for the solution Package.

Sharepoint 2010 WebPart Tutorial

 

Webparts as you know are Reusable components that can be deployed and added to many different sharepoint site pages. In this post we will talk about custom and Out-of-box webparts in SharePoint 2010.


In sharePoint 2010 we can create two kind of custom WebParts :


1. Visual WebPart - While creating a Visual webpart you will have a design interface available with you, where you can simply drag and drop checkboxes, labels or your own custom controls to make up the webpart UI. To add the business logic, a code behind file is also attached to the webpart.
Technically, a Visual webpart in SharePoint 2010 is a ascx User Control that is hosted inside a standard asp.net webpart. If you notice that the webpart class does not now inherit form a Microsoft.SharePoint.webpartpages.webparts or System.Web.UI.WebControls.WebParts instead it inherits from UserControl namespace.


2. Standard AsP.NET WbeParts - Here you will have to build uo your user interface and logic in a class file. Unlike, visual webpart standad asp.net webparts in SharePoint 2010 does not gives you any drag and drop design surface for developing WebPart UI. This type of webpart Inherits from Standard ASP.Net webpart instead of UserControl or SharePoint.webpart.

WebPart Packaging -
Visual Studio 2010 package and deploy webparts when you press Clt + F5. It has a packaging and deployment processor which will create the needed solution package for your webpart and will deploy it in your sharepoint site. You can then add the webparts on any sharepoint site page from webpart gallery.

SharePoint 2010 – Interview Questions

 

Q. Can we use our custom master page with the application pages in SharePoint 2010 ?
Ans
. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom applictaion page to inherit the site master page you must derive it from Microsoft.SharePoint.WebControls.LayoutsPageBase class.


Q. What does CMDUI.XML contain?
Ans
. The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.


Q. Why would you use LINQ over CAML for data retrieval?
Ans. Unlike CAML, with LINQ to SharePoint provider, you are working with strongly typed list item objects. For example, an item in the Announcements list is an object of type Announcement and an item on a Tasks list is an object of type Task. You can then enumerate the objects and get the properties for your use. Also, you can use LINQ syntax and the LINQ keywords built into C# and VB for LINQ queries.

Q. How do you write to SharePoint ULS logs in 2010 ?
Ans. In SharePoint Foundation, ULS exposes configurable settings in two ways, through the – Object model and Windows PowerShell cmdlets. For writing to SharePoint ULS logs developers can can use Diagnostics Service, which will make the customized categories viewable in the administrative UI for our errors.
or they can use the number of cmdlets available for accessing ULS logs using powershell. Some of the cmdlets are Get-SPDiagnosticConfig ,Get-SPLogEvent etc.

Q. How does Client object model works ?
Ans. When we use SharePoint client API’s to perform a specific task, the SharePoint Foundation 2010 managed client object model bundles up these uses of the API into XML and sends it to the server that runs SharePoint Foundation. The server receives this request, and makes appropriate calls into the object model on the server, collects the responses, forms them into JavaScript Object Notation (JSON), and sends that JSON back to the SharePoint Foundation 2010 managed client object model. The client object model parses the JSON and presents the results to the application as .NET Framework objects (or ECMAScript objects for ECMAScript).

Q. What is difference between Load() and LoadQuery() methods ?
Ans. Load method populates the client object directly with what it gets data from the server i.e. a collection object like ListItemCollection etc. but LoadQuery returns the data as a completely new collection in IEnumerable format. Other major difference is that the Collections that you load using the Load() method are eligible for garbage collection only when the client context variable itself goes out of scope where as, in these collections go out of scope at the end of IEnumerable list.

Q. How do you access ECMAScript object model API’s ?
Ans. The ECMAScript library is available in a number of JS files in the LAYOUTS folder. The main file among number of .js files is SP.js. When you include this file in the APSX page using a ScriptLink control, all other required JS files are loaded automatically. By linking SP.js to your page, the SP namespace gets registered. SP is the SharePoint namespace that contains all objects. For debugging purposes every js file also has a ‘debug’ equivalent in the same folder.


Q. What is the purpose of calling clientContext.ExecuteQuery() ?
Ans. ExecuteQuery gives you the option to minimize the number of roundtrips to the server from your client code. All the components loaded into the clientcontext are executed in one go.

SharePoint 2010

 

Some simple and understandable diagrams from microsoft documentations for SharePoint 2010.
Overview of SharePoint 2010 platform.
clip_image002

SharePoint 2010 Object Model options :
clip_image004

SharePoint sandboxed solution execution :
clip_image006
Architecture of Business Connectivity Services :
clip_image008


SharePoint 2010 Object Model

Microsoft has replaced the "12 hive" structure that we had in SharePoint 2007 with "14 Hive" structure in 2010.
It has apparently added four new folders to its hive.
The Folders are :
* Policy
* UserCode
* WebClients
* WebServices
14 hive and other SharePoint 2010 directories

In this post I will list out some important directories or folders used with SharePoint 2010 server. Lets Start with some directories that are related to SharePoint 2010 installation,Configration and its files, later in the post we will discuss about other 14 hive directories.

C:\Inetpub\wwwroot\wss -
This directory (or the corresponding directory under the Inetpub root on the server) is used as the default location for IIS Web sites.

C:\ProgramFiles\Microsoft Office Servers\14.0 - This directory is the installation location for SharePoint Server 2010 binaries and data. The directory can be changed during installation.

C:\ProgramFiles\Microsoft Office Servers\14.0\WebServices - This directory is the root directory where SharePoint back-end Web services are hosted, for example, Excel and Search.

C:\ProgramFiles\Microsoft Office Servers\14.0\Data - This directory is the root location where local data is stored, including search indexes.

C:\ProgramFiles\Microsoft Office Servers\14.0\Logs – This directory is the location where the run-time diagnostic logging is generated.

14 hive folders :


Program Files\Common files\Microsoft Shared\Web Server Extensions\14 -

This directory is the installation directory for core SharePoint Server files.

Program Files\Common files\Microsoft Shared\Web Server Extensions\14\ADMISAPI -

This directory contains the soap services for Central Administration. If this directory is altered, remote site creation and other methods exposed in the service will not function correctly.

Program Files\Common files\Microsoft Shared\Web Server Extensions\14\CONFIG -
This directory contains files used to extend IIS Web sites with SharePoint Server. If this directory or its contents are altered, Web application provisioning will not function correctly.

Program Files\Common files\Microsoft Shared\Web Server Extensions\14\LOGS -

This directory contains setup and run-time tracing logs.

Program Files\Common files\Microsoft Shared\Web Server Extensions\Policy -

Program Files\Common files\Microsoft Shared\Web Server Extensions\UserCode -
This directory contains files used to support your sandboxed solutions.

Program Files\Common files\Microsoft Shared\Web Server Extensions\WebClients -
This directory contains files related to the new Client Object Model.

Program Files\Common files\Microsoft Shared\Web Server Extensions\WebServices -
This directory contains new wcf or .svc related files.

In Sharepoint 2010 This is a step-by-step tutorial to learn using sharepoint 2010′s Server and client object model.
Server Object Model – Here we will look at how to use SharePoint API’s, LINQ, REST and SharePoint web service to extract data from sharepoint server.
Lets Start with using the API’s in Microsoft.SharePoint and Microsoft.SharePoint.Utilities namespaces.
Firstly, to work with SharePoint 2010 components, your code must first establish the site context or site collection context for requests that are made to the server.
Please Note : In SharePoint, the SPsite object also refered to as Site is actually a “Site Collection” object, not a website
and the SPweb object also refered to as “web” is a single site in the site collection.(It can be a top-level site collection site).
also, object of type SPWebApplication is a big boss object which has reference to the web applictaion that contains the site collection.
To get the reference to site context in your code use the recommended Microsoft.SharePoint.SPContext class and its members.
Lets look at how it is used
To get a reference to the site collection -
SPSite oSiteCollection = SPContext.Current.Site;
To get a reference to the current web site or web in the site collection -
SPWeb oWebSite = SPContext.Current.Web;
or
SPWeb oWebSite = SPControl.GetContextWeb(Context);
Note : if your are using Microsoft.SharePoint.SPContext class, you should not dispose any SPSite or SPWeb object obtained by any of the above methods. The SharePoint Foundation runtime will dispose of them after page completion.
To get a reference to all the webs or sites in a site collection -
SPWeb oWebSite = SPContext.Current.Site.AllWebs["mySite1"];
oWebSite.Dispose();
Note : You should explicitly dispose of references to objects that are obtained through the AllWebs() or Openweb() property. You can also use using clause
like below to avoid calling the dispose off method and let sharepoint do this for you.
using can be something like
using (SPWeb oWebSite = SPContext.Current.Site.AllWebs["mySite1"]);
{

}
You can also use the Openweb() as below
using (SPWeb oWebSite = mySiteCollection.OpenWeb(“mySite1″))
{

}
Lets look at some other components of the SharePoint farm that you can get using SPContext
To get a reference to the current top-level server farm object -
SPFarm myFarm = SPContext.Current.Site.WebApplication.Farm;
To get a reference to the site collection database -
SPSite oSiteCollection = SPContext.Current.Site.CurrentDatabase
Lets look at some of the general code snippets
To return the collection of site collections in a SharePoint Web application -
SPWebApplication webApplication = SPContext.Current.Site.WebApplication;
using (SPSiteCollection siteCollections = webApplication.Sites)
{
foreach (SPSite siteCollection in siteCollections)
{
Label1.Text += siteCollection.Url + “
”;
siteCollection.Close();
}
}
Note : To runthe above code reference the Microsoft.SharePoint.Administration.SPWebApplication assembly in your code.
To return the collection of The all the Webs or sites within a site collection, including the top-level site and all subsites.
SPSite oSiteCollection = SPContext.Current.Site;
using(SPWebCollection collWebsite = oSiteCollection.AllWebs);
{
for (int i = 0; i < collWebsite.Count; i++)
{
using (SPWeb oWebsite = collWebsite[i])
{
SPListCollection collList = oWebsite.Lists;
for (int j = 0; j < collList.Count; j++)
{
Label1.Text += SPEncode.HtmlEncode(collWebsite[i].Title) + ” ”
+ SPEncode.HtmlEncode(collList[j].Title) + “
”;
}
}}}
To return the all the subsites and lists of the current site
using (SPWeb oWebSite = mySiteCollection.OpenWeb())
{
using(SPWebCollection subSites = oWebsite.Webs)
{
foreach (SPWeb subSite in subSites)
{
Label1.Text += SPEncode.HtmlEncode(subSite.Title) + “
”;
SPListCollection collList = subSite.Lists;
foreach (SPList oList in collList)
{
Label1.Text += SPEncode.HtmlEncode(oList.Title) + ” ” +
oList.ItemCount.ToString() + “
”;
}subSite.Close();
} } }

Sharepoint interview questions

 

Q. What are WebParts?
Ans. Web Parts are self-contained packages of user interface that can be dropped onto a SharePoint Web Part page to provide discrete set of functionality to the users. They can simply be described as re-usable Code units.
Q. What are Features?
Ans. Features represent a set of functionality (code) that can be activated and de-activated at various levels in SharePoint. Using Features, you can do everything from adding a link to the Site Settings page to creating a complete fully functioning Project suite that can be added to any SharePoint site. Developers can scope feature to the following level -

. Web
. Site
. WebApplication
. Farm


Q. What are Solutions?
Ans. Solutions are the container packages for Features. Solution basically, is a cabinet (.cab) file with extension .wsp which contains various components needed to be deployed(features, webparts, custom forms etc) along with files that describe some important metadata about those Components. Once a Solution is installed on a server in the farm, you can deploy it to any webapplication from your Solution Management.
Q. What is a .ddf file and what does it have to do with SharePoint Solution creation?
Ans.
A .ddf file is a data directive file which describes the files need to be deployed and their destination (in SharePoint). .ddf is used when building the SharePoint solution. This file is a parameter to makecab.exe which outputs the wsp file.
Q. What is the difference between a site and a web in SharePoint?
Ans. A site in sharePoint is a site collection. It is an object of SPsite class in sharepoint. A Web however, is simply a blank site within that site collection. Web is a Part of SPweb class, thus represents a site within a site collection.
Q. What is CAML?
Ans. CAML stands for Collaborative Application Markup Language and is an XML-based language that is used in Microsoft Windows SharePoint Services to define sites and lists for E.g. fields, views, or forms etc. Developers mostly use CAML to write Queries to retrieve data from Lists\libraries.
Q. What is Custom action?
Ans. Represents a link, toolbar button, menu item, or any control that can be added to a toolbar or menu that appears in the UI. For e.g. "New Folder" button in your document library is a custom action or "View All Site Content" in your Site Settings is a custom action.
Q. What are Master pages in SharePoint?
Ans. These are the pages that provide a consistent layout and appearance (look and feel) for SharePoint sites. A master Page consist of a Site logo, Top navigation, left navigation(some cases) and a footer. In SharePoint Master Pages are stored in _catalogs folder or Master Page Gallery from UI.
Q. What are Layout Pages in SharePoint?
Ans. A Layout page defines the Layouts(structure including Webpart zones) of a content page in SharePoint. Layout pages are not same as Master Page. A Layout Page is contained inside the content area surrounded by mater Page.
Q. What is a SharePoint Theme?
Ans. A Theme is a group of files (CSS, images) that allow you to define the appearance (look and feel) of content pages in SharePoint. A Theme defines the design of various components for e.g. Content Page background-color,button color,webpart title color etc to give a different look and feel to your site.
Q. What is a web part zone?
Ans.
Web part zones are what your web parts reside in. Each webpart zone can contain number of webparts and can be positioned in a specific way to create a webpart Layout Page.
Q. What is Business Data Catalog or BDC ?
Ans. It is a shared service that enables Office SharePoint Server 2007 to display business data from various back-end servers into a SharePoint page. Business Data Catalog or BDC provides built-in support for displaying data with various webparts and list\list columns that can help in easy creation of dashboards with data from your SQL, web services, SAP, Siebel, or any other line-of-business (LOB) applications.
Q What is a Site definition?
Ans. A Site definition is a collection of Files such as ONET.XML which defines the Site template for e.g. Team Sites used to create a Site in SharePoit. All the out-of-box site Templates like Blog,Wiki,Team Site etc can be found in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\
Q What is a Site Template?
Ans.
Any Site along with the content can be saved as a template. If a site is saved as a Template it is stored in Site templates folder as a .stp file. This template is then re-used to create a new site which will have the pre-saved settings.
Q. What are content types?
Ans.
A content type is a flexible and reusable template of type list item or document that defines the columns and behavior for an item in a list or a document in a document library. For example, you can create a content type for a Requirement document with a columns such LOE,Version,Approver,Date Created,Date Revised etc and this can be re-used in various document libraries.
Q. what is Central administration?
Ans. This is a site used by admins to mange and configure settings for SharePoint web applications or the whole farm.


Q. What are event receivers or event Handlers in SharePoint?
Ans. Event Receivers or Event handlers are created to handle the basic actions or events against an item,list\library, a web or a site. There are two kinds of events in sharepoint.
Synchronous Events: Like Itemadding (not added yet), Uploading (document not uploaded yet) etc.
Asynchronous Events: ItemAdded (after item is added), Uploaded(after a document is uploaded)
Events receivers can be written to override an event for e.g. ItemAdded event to change the name of an Item once it is added.
Q. What is stsadm?
Ans.
It is a Command-line tool used for administration of Office SharePoint 2007 (or MOSS 2007) servers and sites. Basic operations like adding a solution or installing activating and feature is usually done by stsadm.
Q. What permissions are required to perform stsadm operations?
Ans. You need to be a member of WSS_ADMIN_WPG group to perform deployments for sharepoint server. Also, you need to be added into administrators group on a computer on which SharePoint Server or WSS 3.0 is installed. In addition to this you definitely need access to the required sharepoint databases so that you should not get errors while deploying sharepoint solutions.
Q. Where is it located?
Ans. You will normally, find it under C:\Program Files\Common Files\ shared\web server extensions\12\bin.


Q What is a DWP?
Ans.
Its a webpart file extension.
Q What is the GAC?
Ans. Global Assembly Cache folder (or assembly) stores the strongly typed signed assemblies for webparts or other sharepoint components(which require full trust) for services to share them.

Q. What are Application Pages, Site Pages and Content Pages?
Ans.
Application Pages - An application page is deployed once per Web server and cannot be customized on a site-by-site basis. They stay in 12 hive folder structure, mostly under layouts folder.
Site Pages - These are pages that make up the site interface and are specific to one site or site collection.They mostly get stored in the content database of the site collection.
Content Pages - Site Page which contains webpart or other custom components. This Page is stored in database. They mostly get stored in the content database of the site collection.
Q.What are the Permission levels in SharePoint?
Ans. Permission levels in SharePoint are -
* Limited Access - They can view Application Pages, Browse User Information, Use Remote Interfaces, Use Client Integration Features etc.
* Reader - Limited Access permissions plus: View Items, Open Items, View Versions, Create Alerts, Use Self-Service Site Creation, View Pages.
* Contributor - Read permissions plus: Add Items, Edit Items, Delete Items, Delete Versions, Browse Directories, Edit Personal User Information, Manage Personal Views, Add/Remove Personal Web Parts, Update Personal Web Parts.
* Design - Contribute permissions plus: Manage Lists, Override Check Out, Approve Items, Add and Customize Pages, Apply Themes and Borders, Apply Style Sheets.
* Administrator - Has full control of the Web site.
* Full Control - All permissions.
Q. What are Site Columns?
Ans.
Site columns are pre-defined data columns(along with default values) which are re-used in various content types. A Content type is usually a collection of site columns. For e.g. you can create a site column "Category" with a choice datatype along with the pre-defined values "It","Hr". This column then can be added to any content type in your list or library.
Q. What does each individual Site collection offers?
Ans. An Individual Site collection offers following :
For the Users:
Dedicated Recycle bins
Dedicated usage Reports
Distributed administration (site collection administrators)
Dedicated search scopes, keywords, and best-bets
Custom feature deployments
Dedicated language translation maintenance
Dedicated galleries for web parts, master pages, content types, site columns, site templates, and list templates
Dedicated shared libraries, such as site collection images and site collection styles
Dedicated real estate (Self Containment)
For the IT Administrators:
Site quota templates
Distributed administration
Site locking
Database maintenance options
Backup / Restore abilities
Content Deployments
InfoPath forms services global template targeting
Q. When would you use a Different Site Collection for you new site?.
Ans. We would prefer to make our new site in a seprate site collection for the following are the reasons:
1. Site quotas is one of the reasons. The issue is the recycle bin is based on site collections and the quota for a site collection. If everyone shares a site collection, then they share the recycle bins storage size.
2. Delegated Security and distributed administration is the next big thing. For eg, you have a IT department that doesn't know who should be able to see what content, besides how it should be organized. This is the job of the content owners and users. SharePoint site collections offers IT the ability to create a site collection for a project, team, department, document, or whatever the needs are, then assign an owner and hand it off to them.
3. In addition to these two if you need to separate the content between databases because of space issue.


Q. What is a Field Control?
Ans. Field controls are server controls that provide the basic field functionality of SharePoint. For example a Inputbox (single line text) to enter the title of the item. You can create your own FieldControl by inheriting classes from BaseFieldControl namespace.
Q. How do you develop webparts in SharePoint?
Ans. You can either develop a simple asp.net webpart with C# class library project or can use various tools available in the market. VSeWSS is an extension provided by Microsoft that consist of a webpart template for easy webpart creation and deployment. Other tools are wspbuilder, stsdev etc.
Q. Explain webpart life cycle.
Ans. protected override void OnInit(EventArgs e)
protected override void OnLoad(EventArgs e)
protected override void CreateChildControls()
protected override void LoadViewState(object savedState) //Only at Postback
protected override void OnPreRender(EventArgs e)
protected override void Render(System.Web.UI.HtmlTextWriter writer)
protected override void OnUnload(EventArgs e)
public override void Dispose()
Q. While creating a Web part, which is the ideal location to Initialize my new controls?
Ans. CreateChildControls is the method where we initialize all the child controls.
Q. Do we always need to override Is Render() method.
Ans. We override render only in case if we need to define the rendering of our controls in the webpart.
Q. What is the WebPartManager sealed class?
Ans. The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. Each Page will have only one WebPartManager reference on the page.
Q. What are WebPart Properties?
Ans.
WebPart Properties are properties defined from the right toolpane of the webpart. These are settings or values set by the end user and are used within your webpart. For e.g. WebPart title, Description etc. Some of the attributes which you can define for your custom property are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable.

Q. How does Windows SharePoint Services help render the Webapplictaion in ShrePoint?
Ans. When a new web applictaion is created via Central Admin, Windows SharePoint Services creates a new Web application in IIS. Then the WSS, loads the custom HTTP application and replaces all installed HTTP handlers and modules with Windows SharePoint Services–specific ones. These handlers and modules essentially tell IIS to route all file requests through the ASP.NET 2.0 pipeline. This is because most files in a SharePoint site are stored in a Microsoft SQL Server database.
Q. What files gets created on a file system, when a Site collection is created ?
Ans. Windows SharePoint Services does not create any files or folders on the file system when the site collection or sites are created; everything is created in the content database. The Pages for the site collection are created as instances in the content database. These instances refer to the actual file on the file system.
Q.How Does SharePoint work?
Ans. The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.
Q. What is Authentication and Authorization.
Ans. An authentication system is how you identify yourself to the computer. The goal behind an authentication system is to verify that the user is actually who they say they are.
Once the system knows who the user is through authentication, authorization is how the system decides what the user can do.

Q. What are Security methods(Authentication methods) available in sharepoint
Ans. "Out of the box", SharePoint 2007 supports nine authentication methods. But NTLM (Windows authentication) and Kerberos (Windows "standard" authentication) are offered during installation.
Q. Workflow can be applied to what all elements of SharePoint ?
Ans. Workflow associations can be created directly on lists\libraries and content types.
Q. What are the types of input forms that can be created for a workflow ?
Ans. You can create four different types of input forms including
1. An association form
2. An initiation form
3. A modification form
4. A task edit form
Q. What is the difference between method activity and event activity in WorkFlow ?
Ans. A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.
Q. What does SPWeb.EnsureUser() do?
Ans. This method Checks whether the specified login name is a valid user of the SharePoint web.
Q. What does AllowUnsafeUpdates do ?
Ans.
If you need to modify some data in you SharePoint site for e.g. update a list item or list properties you may need to allow unsafe updates on the Web site. you can set it to we.AllowUnsafeUpdates = false once your done.
Q. What is the webservice used to retrieve or add list items in sharepoint?
Ans. List.asmx is a Out-of-box webservice provided to add\update\delete and retrieve list items. It can be accessed from "http://SPSite/_vti_bin/lists.asmx" path.

Q. What Do you know about SharePoint Object Model?
Ans. In Sharepoint Object model there are two Important namespaces.
The Microsoft.Office.Server namespace is the root namespace of all Office Server objects and Microsoft.SharePoint is the root namespace for all WSS objects.
Read More at SharePoint 2007 Object Model
Q. Can you develop webparts and other SharePoint solutions at your local machine?
Ans. In order to run and debug sharePoint solutions, the project must reside on the server which has Windows sharePoint services installed. However, you can reference the Microsoft.SharePoint dll in your project at your local, but you won’t be able to run it.
Q. How do you debug SharePoint Webparts?
Ans. To debug SharePoint webpart (or any solution) you can simply drag and drop your complied .dll in GAC and recycle the app pool. You can also run upgrade solution command from stsadm.

Q. How would you retrieve large number of Items form the list ?
Ans. To retrieve large number of items with a better performance we can either use SPQuery or PortalSiteMapProvider Class. Read More with Examples
Retrieving large number of Items from sharepoint list
Q. How Do you implement Impersonation in ShrePoint.
Ans. By Using RunWithElevatedPrivileges method provided by SPSecurity class.
See e.g Impersonation in Sharepoint
Q: What is the performance impact of RunWithElevatedPrivileges?
Ans. RunWithElevatedPrivileges creates a new thread with the App Pool's credentials, blocking your current thread until it finishes.

Q. How will you add Code behind to a Custom Applictaion Page or a Layout Page in SharePoint?
Ans. You do not deploy a code behind file with your custom Layouts page. Instead, you can have the page inherit from the complied dll of the solution to access the code behind.
Q. What is the difference between a Site Definition and a Site Template?
Ans. Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites users can create. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site.
Q. Why do you use Feature Receivers ?
Ans. Feature Receivers are used to execute any code on Activation\Deactivation of a Feature. You can use it for various purposes.
Q. Can you give a example where feature receivers are used.
Ans. You can use it to assign an event receiver feature to a specific type of list or can write a code in a feature receivers Deactivate method to remove a webpart from webpart gallery.
Q. Where do you deploy the additional files used in your webpart, like css or javascript files, and how do you use them in your WebPart?
Ans. You can deploy the css or javascript files in _layouts folder in SharePoint's 12 hive. To use them in your webpart, you need to first register them to your webpart page and then specify a virtual path for the file for e.g. _layouts\MyCSS.css See Code examples at Using External Javascript, CSS or Image File in a WebPart.
Q: When should you dispose SPWeb and SPSite objects?
Ans. According to the best Practices you should always dispose them if you have created them in your code. You can dispose them in Finally block or you can use the "Using" clause, so that they gets disposed when not required. If you are using SPContext then you need not dispose the spsite or spweb objects.
Q. What are the best practices for SharePoint development.
Ans. Some of the best practices are:
1. You should always dispose SPsite and SPWeb objects, once you refer them in your code. Using the "Using" clause is recommended.
2. Use RunwithelevatePrivilages to avoid errors for end users.
3. Try writing your errors to SharePoint error logs (ULS Logs). Since it’s a bad idea to fill-up event log for your production environment.
4. Use SPQuery instead of foreach loop while retrieving Items from the list.
5. Deploy additional files used in your webpart to 12 hive. Use your solution package to drop the files in 12 hive. Also, make sure that all the references (for e.g. Css or .js files) get removed when the solution is retracted.
Also See : Best Practices to Improve Site Performance
Q.What is the main difference between using SPListItem.Update() and SPListItem.SystemUpdate()?
Ans. Using SystemUpdate() will not create a new version and will also retain timestamps.

Q. When do you use SPSiteDataQuery ?
Ans. You can use SPSiteDataQuery when you need to extract data from more than one list\library in your site colletcion. The data is extracted on the basis of the query you write and is
returened as a Datatable. You can also specify the GUID for the lists\libraries you want to query against.
Q. How do you create a Custom action for an item in a list ?
Ans. This can be done by adding a new feature into SharePoint. You would need to use customaction tag in your elements.xml file and will have to set various properties like imageurl or UrlAction for your customaction. You can later add this feature into sharepoint using stsadm install feature command.
Q. How would you bind this CustomAction to a specific list ?
Ans. To do this you can either create a new list type(again a feature) and use the listtype number for the new list in your RegistrationType property of the Customaction. The CustomAction will then show up only for the items of this list type. or You can create a new content type and then use that content type's id in your cutsomaction to bind the custom action to items of just that content type. Add the new content type to the list where you need this customaction.
Q. How will you deploy an existing asp.net webapplication or website in SharePoint?
Ans. You would need to wrap the web application in a solution package in order to deploy it in 12 hive or say ShraePoint. It is recommended to create a feature first, and then wrap everything in a Solution package. See example Depoly a Custom aspx Page in SharePoint
Q. How will you cancel a deployment from central admin -> solution managment, if its stuck at “deploying” or “Error”.
Ans. You can either try to force execute timer jobs using execadmsvcjobs command or can cancel the dpeloyment using stsadm command stsadm –o cancaldeployment –id {GUID} command. The Id here would be GUID of the timer or deployment job. You can get the Id from stsadm enumdeployment command. This will display all the deployments which are process or are stuck with Error.
Q. How do make an existing non-publishing site Publishing?
Ans. You can simply activate the SharePoint Publishing Feature for the Site, you want to make publishing.
Q. Can you name some of the tools used for SharePoint Administration?
Ans. Tools Used for SharePoint Administration

Q. What are Application Pages in SharePoint?
Ans. Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL.
A good example of an Application Page is the default Site Settings page: every site has one, and it's not customizable on a per site basis (although the contents can be different for sites).
With application pages, you can also add inline code. With site pages, you cannot add inline code.
Q. What is Authentication and Authorization?
Ans . An authentication system is how you identify yourself to the computer. The goal behind an authentication system is to verify that the user is actually who they say they are.
Once the system knows who the user is through authentication, authorization is how the system decides what the user can do.
Q. How do you deploy a User Control in SharePoint ?
Ans.
You deploy your User Control either by a Custom webpart, which will simply load the control on the page or can use tools like SmartPart, which is again a webpart to load user control on the page. User Control can be deployed using a custom solution package for the webapplication or you can also the control in the webpart solution package so that it gets deployed in _controlstemplate folder.
Q. Which is faster a WebPart or a User Control?
Ans. A WebPart renders faster than a User Control. A User Control in SharePoint is usually loaded by a webpart which adds an overhead. User Controls however, gives you an Interface to add controls and styles.
Q. What SharePoint Databases are Created during the standard Install?
Ans. During standard install, the following databases are created :
SharePoint_AdminContent
SharePoint_Config
WWS_Search_SERVERNAME%_%GUID_3%
SharedServicesContent_%GUID_4%
SharedServices1_DB_%GUID_5%
SharedServices1_Search_DB_%
GUID_6%WSS_Content_%GUID_7%



Q. What are content types?
Ans. A content type is a flexible and reusable WSS type definition (or we can a template) that defines the columns and behavior for an item in a list or a document in a document library. For example, you can create a content type for a leave approval document with a unique set of columns, an event handler, and its own document template and attach it with a document library/libraries.
Q. Can a content type have receivers associated with it?
Ans. Yes, a content type can have an event receiver associated with it, either inheriting from the SPListEventReciever base class for list level events, or inheriting from the SPItemEventReciever base class. Whenever the content type is instantiated, it will be subject to the event receivers that are associated with it.
Q. Can you add a Cutsom Http Handler in SharePoint ?
Ans. Yes, a Custom httphandler can be deployed in _layouts folder in SharePoint. Also, we need to be register the handler in the webapp's webconfig file.
Q. While creating a Web part, which is the ideal location to Initialize my new controls?
Override the CreateChildControls method to include your new controls. You can control the exact rendering of your controls by calling the .Render method in the web parts Render method.
Q. How do you return SharePoint List items using SharePoint web services?
Ans.
In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.
Q. How Do you deploy Files in 12 hive when using wspbuilder or vsewss?
Ans. Typically, you can add these files in the 12 hive folder structure in your project. In Vsewss however, you will have to create this structure manually.

Q. What files gets created on a file system, when a Site collection is created ?
Ans. Windows SharePoint Services does not create any files or folders on the file system when the site collection or sites are created; everything is created in the content database. The Pages for the site collection are created as instances in the content database. These instances refer to the actual file on the file system.
Q. What are Customized and Uncustomized Files in SharePoint ?
Ans. There are two types of Pages in SharePoint; site pages (also known as content pages) and application pages.
Uncustomized :
When you create a new SharePoint site in a site collection, Windows SharePoint Services provisions instances of files into the content database that resides on the file system. That means if you create a new Site "xyz" of type Team Site(or Team sIte Definition), an instance of the Team Site Definition( Which resides on the File System), i.e. "xyz" gets created in the Content database. So, When ASP.NET receives a request for the file, it first finds the file in the content database. This entry in the content database tells ASP.NET that the file is actually based on a file on the file system and therefore, ASP.NET retrieves the source of the file on the file system when it constructs the page.
Customized :
A customized file is one in which the source of the file lives exclusively in the site collection's content database. This happens When you modify the file in any way through the SharePoint API, or by SharePoint Designer 2007,which uses the SharePoint API via RPC and Web service calls to change files in sites. So, When the file is requested, ASP.NET first finds the file in the content database. The entry in the database tells ASP.NET whether the file is customized or uncustomized. If it is customized, it contains the source of the file, which is used by ASP.NET in the page contraction phase.
Q. What are event receivers?
Ans.
Event receivers are classes that inherit from the SpItemEventReciever or SPListEventReciever base class (both of which derive out of the abstract base class SPEventRecieverBase), and provide the option of responding to events as they occur within SharePoint, such as adding an item or deleting an item.


Q. When would you use an event receiver?
Ans. Since event receivers respond to events, you could use a receiver for something as simple as canceling an action, such as deleting a document library by using the Cancel property. This would essentially prevent users from deleting any documents if you wanted to maintain retention of stored data.

Q. If I wanted to restrict the deletion of the documents from a document library, how would I go about it?
Ans. You would create a event receiver for that list/library and implement the ItemDeleting method. Simply, set: properties.Cancel= true and display a friendly message using Properties.Message("How can u delete this... Its not your stuff!");

Q. What is the difference between an asynchronous and synchronous event receivers?
Ans. An asynchronous event occurs after an action has taken place, and a synchronous event occurs before an action has take place. For example, an asynchronous event is ItemAdded, and its sister synchronous event is ItemAdding

Q. How do you Increase trust level for a single WebPart in the WebConfig file.
Ans. To list a Web Part with Full Permissions within your Web Application while still retaining a WSS_Minimal permission set for all other Web Parts, You need to create a Custom policy file. This file will be then referenced in SharePoint Web.config file and will allow your specific webpart to be of Full trust.
Steps :
1. Make a copy of the WSS_Minimal.Config file from the 12\Config folder and paste it into the same folder renaming it to Custom_WSS_Minimal.Config. Now, edit the Custom_WSS_Minimal.Config file using NotePad. Obtain the Public Key Token for the Web Part assembly that you want to deploy, using the following command: sn –Tp filename.dll. Create a new entry in your Custom_WSS_Minimal.Config file for your WebPart. Save the File.
Finally, Create a new TrustLevel element for your config file in the Web.Config called Custom_WSS_Minimal that points to your custom file in the 12\config folder. Recycle the Application Pool and You’re Done.
Q. How does Windows SharePoint Services help render the Webapplictaion in ShrePoint?
Ans. When a new web applictaion is created via Central Admin, Windows SharePoint Services creates a new Web application in IIS. Then the WSS, loads the custom HTTP application and replaces all installed HTTP handlers and modules with Windows SharePoint Services–specific ones. These handlers and modules essentially tell IIS to route all file requests through the ASP.NET 2.0 pipeline. This is because most files in a SharePoint site are stored in a Microsoft SQL Server database.

Q. How would you pass user credentials while using SharePoint WebService from your Web Part or application.
Ans. The web service needs credentials to be set before making calls.
Examples:
listService.UseDefaultCredentials = true; // use currently logged on user
listService.Credentials = new System.Net.NetworkCredential("user", "pass", "domain"); // use specified user
Q. How would you remove a webapart from the WebPart gallery? Does it get removed with Webpart retraction?
Ans. No, Webpart does not get removed from the WebPart gallery on retraction. You can write a feature receiver on Featuredeactivating method to remove the empty webpart from the gallery.
Q. What is a SharePoint Feature? Features are installed at what scope
Ans. A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances, scope of which are defined as
1. Farm level 2. Web Application level 3. Site level 4. Web level
Features have their own receiver architecture, which allow you to trap events such as when a feature is Installing, Uninstalling, Activated, or Deactivated.
Q. What type of components can be created or deployed as a feature?
Ans. We can create menu commands, Custom Actions,page templates, page instances, list definitions, list instances,event handlers,webparts and workflows as feature.
Q. How Do you bind a Drop-Down Listbox with a Column in SharePoint List ?
Ans.
Method 1 : You can get a datatable for all items in the list and add that table to a data set. Finally, specify the dataset table as datasource for dropdown listbox.
Method 2 : You can also use SPDatasource in your aspx or design page.
See Code example Binding Drop-Down with Sharepoint List data
Q. How Does SharePoint work?
Ans. The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.
Q. What is CAML?
Ans. CAML stands for Collaborative Application Markup Language and is an XML-based languagethat is used in Microsoft Windows SharePoint Services to define sites and lists, including, for Eg, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Servies database during site provisioning. Developers mostly use CAML Queries to retrieve data from Lists\libraries.
Q. Can you display\add a Custom aspx or WebApplication Page in SharePoint Context ?
Ans. You need to make some modification in the aspx file to display it in SharePoint Context. Firstly, add the references for various sharepoint assemblies on the Page. Then wrap the Code in PlaceHolderMain contentPlaceholder, so that it gets displayed as a content page. Lastly, add a reference to SharePoint Master Page in aspx file and swicth it in Code behind if needed. See Code Example at Display aspx Page in SharePoint context

In Sharepoint Object model there are two Important namespaces.

The Microsoft.Office.Server namespace is the root namespace of all Office Server objects and Microsoft.SharePoint is the root namespace for all WSS objects.
The Chart Below illustrates some of the key classes contained in each of these namespaces, as well as to which functional area they belong.
Document Libraries (Microsoft.SharePoint)
SPDocumentLibrary , SPPictureLibrary
Business Data Catalog (Microsoft.Office.Server.ApplicationRegistry.Administration)
EntityCollection , ApplicationRegistry
Features (Microsoft.SharePoint)
SPFeatureDefinition, SPFeatureScope, SPElementDefinition, SPFeature, SPFeatureProperty

Sites (Microsoft.SharePoint)
SPSite, SPSiteAdministration, SPSiteCollection, SPWeb
Meetings (Microsoft.SharePoint.Meetings)
SPMeeting, MtgUtility
User Profiles (Microsoft.Office.Server.UserProfiles)
UserProfile, UserProfileManager
Solutions (Microsoft.SharePoint.Administration)
SPsolution, SPFeatureReceiver, SPSolutionCollection
Lists (Microsoft.SharePoint)
SPList, SPListItem, SPListItemCollection
Notes:
* To use the SharePoint API, your code must reside on one of the machines in a SharePoint application server farm. Your code can still work with other sites in the farm from any other site in the farm, but you cannot, for example, work with the SharePoint API from a machine on which MOSS or WSS is not installed.
* The only practical way to consume SharePoint data and functionality from a remote client is to use the SharePoint web services.
* The object model is not designed to support Remoting.
* To add a reference to a Sharepoint API, Right-click the project(in VS) and select Add Reference. Click the Browse tab and select the
following directory:
C:\program files\common files\microsoft shared\web server extensions\12\isapi