Difference between Client Object Model and Server Object Model in SharePoint 2010

Server Object Model:
1-SharePoint itself uses the server object model.You can also use this model on a sharepoint server bcz it has some dependencies satisfied by the sharepoint server.
2-Here you can use LINQ programming like LINQ to SharePoint.
3-different classes are there like SPFarm, SPServer, SPService, and SPWebApplication etc.
Client Object Model:
1-Client Side APIs refer to the Client Object Models that were introduced in SharePoint 2010.
2-It is available in three different flavors like: .NET managed,Silverlight and ECMAScript.
3-The Main advantage of the CSOMs is that you do not need to be on the Server to use them in your program. The .NET client object can be used in any Desktop or Web Client. The Silverlight CSOM can be used in silverlight applications and you can call the JS Client Object Model directly from your web pages.
Managed Object Model
ISAPI folder
Silverlight client object model
LAYOUTS\ClientBin folder
JavaScript client object model
LAYOUTS folder
Different types of Objects:
Server object model
Managed Model
Silverlight Model
Javascript Model

Difference between SharePoint 2010 and MOSS 2007

SharePoint 2010
MOSS 2007
Look and feel
In SP 2010 look and feel perspective there will be a ribbon where we can have a look and feel like Office 2010
In MOSS 2007 there is no ribbon
Deployment of Web parts
In SharePoint 2010 deploying custom web part is pretty simple i.e. just right click on the solution and click Deploy
In MOSS 2007 you need to drag the dll either to bin or GAC
Silverlight Application
In SP 2010 we can create a Silverlight application directly from Visual Studio 2010
In MOSS 2007 we have to create a web part to host Silverlight application
Shared Database & Service Application
In SP 2010 there is no SSP but there is a concept of Service Application like BCS as one service application, Excel Services as another service application, User Profile as separate service application
General idea is that you have an application for each service, rather than one application with lots of service crammed into it
Own database rather than shared database in SP 2010
In MOSS 2007 we have SSP where we can work around with BI,Search Settings, User Profile Import, Excel Services, Info path
In Database also we use to have separate area for SSP stuff
Easy exports/imports between the forms
In SP 2010 we can update existing information
In MOSS 2007 through we can just read the information and we can't update the existing services
Improvement in Deployment
In SP 2010 we can Deploy through Farm based and solution based solution in SP 2010
In MOSS 2007 there is no such option

In SP 2010 alerts were sent only through emails and send alerts to mobile device as SMS message. A New property delivery channel is introduced to indicate, whether the alerts is delivered as Email or an SMS message.
In MOSS 2007 alerts were sent only through emails.
Improvements of events
New events for list creation and web creation
No List and web events in MOSS 207
Getting Items from the list
In SP 2010 through object model we can fetch multiple list data by LINQ query and object model
In MOSS 2007 we can fetch only through object model
In SP 2010 we can have rating column by default
In MOSS 2007 we should install the feature that is available in codeplex to have rating
Key Word Suggestions
In SP 2010 we can have keyword suggestions
In MOSS 2007 we don’t have any keyword suggestions
In SP 2010 we can create Taxonomy by using Managed Metadata service
In MOSS 2007 we don’t have taxonomy
Other Features
In SP 2010 we have Power Shell Scripting, JavaScript object model, Chart Web Parts
In MOSS 2007 we don’t have Power Shell Scripting, JavaScript object model, Chart Web Parts
Running stsadm command
In SP 2010 we have to go 14 hive path to run stsadm command
In MOSS 2007 we have to go 12 hive path to run stsadm command

User Control Life cycle

Event Phase
Method or event to override
InitializeInitialize settings needed during the lifetime of the incoming Web request. Init event (OnInit method)
Load view stateAt the end of this phase, the ViewState property of a control is automatically populated. A control can override the default implementation of the LoadViewState method to customize state restoration.LoadViewState method
LoadPerform actions common to all requests, such as setting up a database query. At this point, server controls in the tree are created and initialized, the state is restored, and form controls reflect client-side data. Load event
(OnLoad method)
Handle postback eventsHandle the client-side event that caused the postback and raise appropriate events on the server.

Note Only controls that process postback events participate in this phase.
RaisePostBackEvent method
PrerenderPerform any updates before the output is rendered. Any changes made to the state of the control in the prerender phase can be saved, while changes made in the rendering phase are lost.PreRender event
(OnPreRender method)
SaveViewStateThe ViewState property of a control is automatically persisted to a string object after this stage. This string object is sent to the client and back as a hidden variable. For improving efficiency, a control can override the SaveViewState method to modify the ViewState property.SaveViewState method
RenderGenerate output to be rendered to the client. Render method
DisposePerform any final cleanup before the control is torn down. References to expensive resources such as database connections must be released in this phase. Dispose method
UnloadPerform any final cleanup before the control is torn down. Control authors generally perform cleanup in Dispose and do not handle this event. UnLoad event (On UnLoad

Web Part life cycle in SharePoint 2010

OnInit: This method handles initialization of the control.
OnLoad: This event handles the Load event. This is also used for initialize the control but is not intended for loading data or other processing functionality.
CreateChildControls: This is the most popular event in web part life cycle. This creates any child controls. So if you are adding any control to display then you have to write in this method.
EnsureChildControls: This method ensures that CreateChildControls has executed.
EnsureChildControls method must be called to prevent null reference exceptions.
SaveViewState: View state of the web part saved.
OnPreRender: This method handles or initiates tasks such as data loading that must complete before the control can render.
Page.PreRenderComplete: The page fires the PreRenderComplete event after all controls have completed their OnPreRender methods.
Render: This method is used to render everything.
RenderContents: Renders the contents of the control only, inside of the outer tags and style properties.
OnUnload: Performs the final cleanup.

ASP.NET Web Part Vs SharePoint Web Part

ASP.NET 2.0 Web PartSharePoint-based 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.
  • 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.

Wipro Dotnet Interview Questions

  • What is SDLC 
  • What is CLR
  • What is Garbage collector and his methods
  • Difference between Encapsulation and Abstraction
  • What is abstract class
  • What is polymorphism
  • What is sealed class
  • What is Access modifier
  • In JavaScript how to call particular control
  • In grid-view how to call hyperlink in the column
  • Difference between Custom control and user control
  • Difference between Function and stored-procedure
  • Difference between primary key and composite key
  • What is view
  • What is ACID
  • What is RAC
  • What is Execute non-query, Execute-scalar, Execute-reader 
  • Difference between Web-service and WCF
  • Different types of bindings in WCF
  • What is default Contract
  • Difference between Message contract and Data contract
  • What is A , B, C in WCF
  • Is it possible have multiple endpoints in one service
  • How to know the service details
  • What is Configuration tool in .net 3.5, which version and use
  • Different design architectures 

Honeywell SharePoint Interview Questions for 1 year experience

  • What is SharePoint
  • Difference between  SharePoint  Foundation and SharePoint Server
  • What is Default List in SharePoint
  • What is Default column in a list
  • Is it possible to documents in a list
  • Is it possible connect with other databases(oracle, SAP) ? If yes, how explain
  • SharePoint Features
  • What is default size of the empty class
  • Is it possible to instantiate the abstract class
  • What is Static Binding
  • What is Late Binding
  • Difference between Application page and Web-part
  • What is workflow ? And how it will work 
  • How to give permissions in SharePoint

Value Labs Dotnet Interview Questions

  • What is dependency property
  • What is event routing
  • WBP 
  • What is class library
  • What is entity frame work
  • What is generics
  • Difference between Dictionary, Collection, Hash 
  • MVC architecture
  • Types of design patterns available in .net
  • Difference between delegate and event
  • What is config manager
  • Difference between cursor and loops
  • How can we maintain multiple web.config files in one application
  • How to read XML data
  • SOAP architecture
  • What is WSDL
  • How to create objects in javascript
  • What is anonymous types
  • Difference between Union and Unionall 
  • What is Reflection
  • What is GAC and gacutil.exe
  • In AJAX why Script manager is mandatory
  • What is cross page post back

Accenture Dotnet Interview Questions

  • What is Exception handling 
  • How can we handle multiple exceptions
  • What is script timeout in asp.net
  • How can we validate drop down box in asp.net
  • Types of Indexes 
  • In ado.net which one is best
  • What is copy constructor
  • Difference between user control and custom control
  • What is serialization

Persistant Dotnet Interview Questions

  • What is polymorphisam
  • Difference between DataSet and DataReader
  • Difference between function and storedprocedure
  • What is dell hell
  • Difference between deep copy and shallow copy
  • What is singleton
  • What is Access specifier
  • What is static constructor
  • Difference between primary key, unique key and composite key
  • Define garbage collector

Create a Custom List in SharePoint 2010 Using Client Object Model

Convert from Classic Mode to Claim Based Authentication in SharePoint 2010 Using PowerShell

$App = Get-SPWebApplication  "URL"
$App.useclaimsauthentication = "TRUE"

Difference between Classic and Claim based Authentication in SharePoint 2010

Classic Based Authentication :

  •  You cannot configure the Forms based authentication if your web application is using Classic Mode Authentication.You can convert a web application from Classic Mode Authentication to Claims Based Authentication. However, that can only be done using PowerShell commands and its an irreversible process.
  •  Classic authentication supports authentication types like Kerberos, NTLM,  anonymous.
  •  Classic is more commonly seen in 2007 environments.

Claim Based Authentication:

  •  It enables authentication from windows as well as non-windows based systems. This also provides the capability to have multiple authentication in a single URL.
  • Claims based authentication uses claims identities against a against a trusted identity provider.
  • Claims are the recommended path for new deployments in SharePoint 2010

Wipro DotNet Interview Questions

  • ASP.Net Page Life cycle ?
  • Difference between Abstract and Interface ?
  • GridView Events ?
  • GridView Fields ?
  • Where we need store the session values in Database ?
  • How to call JavaScript in C# ?
  • Static functions in .net ?
  • How to call user-control in run-time ?
  • What is Normalization and Types ?
  • What is triggers ?

SharePoint 2010 MCTS Certification Questions and Answer

1. You have a SharePoint Server 2010 server farm that contains a web application named WebApp1 and a sitecollection named Site1.
Users deploy several SharePoint user solutions to Site1.
You need to view the average resource usage of the SharePoint user solutions for the last 14 days.
What should you view?
A. the General Settings of WebApp1
B. the Site Web Analytics reports of Site1
C. the content of the solution gallery of Site1
D. the health reports of WebApp1 from Central Administration

Answer: C

2. You have a SharePoint Server 2010 server farm.
You need to enable trace logging for the Search service.
What should you configure?
A. diagnostic logging
B. the Health Analyzer rule definitions
C. the Search service application
D. usage and health data collection

Answer: A

3. You have a SharePoint Server 2010 server farm.
You modify the Web application default settings to prevent views from displaying more than 2,000 Items.
You discover a custom SharePoint user solution that contains a custom Web Part display with more than 2,000
You need to prevent all Web Parts from displaying more than 2,000 items.
What should you do?
A. From Library Settings, modify the Validation Settings.
B. From Library Settings, modify the Per-location view settings.
C. From Central Administration, modify the Resource Throttling settings.
D. From Central Administration, modify the User Solutions Management settings.

Answer: C

ASP.Net Interview Questions

  • ASP.Net Page life cycle ?
  • In page life cycle which event view state will load ?
  • How to change the session time ? 
  • How to kill the particular session ?
  • How to kill the particular cookie ?
  • What is Trace ? How to enable the trace ?
  • Difference between Web.config and Machine.config ?
  • Disadvantages of View State ?
  • In session which one is better ? Why ?
  • How to improve the performance of the application ?
  • In web.config, connection-string section is it possible encrypt the connection-string ?
  • State Management in ASP.Net ?
  • Difference between Session and application ?
  • Difference types of caching techniques ?
  • Difference between Query String and Server.Transfer() and Response.Redirect ?
  • What is Global.asax ? In which situation we go for this ?
  • Difference between Gridview and Repeater control ?
  • What is Window.location ?
  • Gridview events ?
  • Difference between DataGrid and GridView ?
  • What is Event bubbling ?
  • What is IsPostback() ?
  • Difference between http handler and http module ?
  • What is Worker Process ?
  • What is Application Pool ?