.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions

How do you access ECMAScript object model API's ?

Posted By :Gowthammanju     Posted Date :November 30, 2011    Points :40   Category :SharePoint 

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.

You can also find related Interview Question to How do you access ECMAScript object model API's ?  below: 

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.

(More...)

What is Object Oriented model?

  
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes. (More...)

what is sharepoint client object model?

  

The Client Object Model is a new programming interface for SharePoint 2010 where code runs on a user's client machine against a local object model and interacts with data on the SharePoint Server. Client OM methods can be called from JavaScript, .NET code or Silverlight code and makes building rich client applications for SharePoint easy. (More...)

what are the classes in share point client object model?

  
1. Client Context
2.Site
3.Web
4.List
5.List Item
6.Field
(More...)

Why do we need Client Object Model?

  
Microsoft was constantly getting request from customers for more webservices. to make it easier to get data from outside of sharepoint (for example : to show sharepoint data on your desktop, by consuming a webservices), So there are two options: 1) Request microsoft to produce more web serivices or 2) Create your own custom web services, Instead creating more and more web services over and over agin in each release, Microsoft came up with a different approach , they created someting called 'Client Object Model'. (More...)

What Do you know about SharePoint Object Model?

  
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
(More...)

How many types of Client Object model extension are available in 2010 and when would you use one or the other.

  

Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three APIs are targeted for three different types of clients.
1. .net Managed applications - These are used when we have to create console applications or window applications, web applications which are not running inside SharePoint Contex.
2. For Silverlight applications
3. ECMAScript - It is a client object model extension for using with JavaScript or JScript. This is used for creating applications which are hosted inside SharePoint. For example, web part deployed in SharePoint site can use this JavaScript API for accessing SharePoint from browser using JavaScript. (More...)

What has Changed in 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 (More...)

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) (More...)

How many types of Client Object model extension are available in 2010 and when would you use one or the other.

  

Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three APIs are targeted for three different types of clients.
1. .net Managed applications - These are used when we have to create console applications or window applications, web applications which are not running inside SharePoint Contex.
2. For Silverlight applications
3. ECMAScript - It is a client object model extension for using with JavaScript or JScript. This is used for creating applications which are hosted inside SharePoint. For example, web part deployed in SharePoint site can use this JavaScript API for accessing SharePoint from browser using JavaScript. (More...)

What are the Authentication methods for your client object model application ?

  

Ans. Basically there are three (3) authentication options you can use when you're working with the Client Object Model in SharePoint 2010:

* Anonymous
* Default
* FormsAuthentication

You can specify clientContext.Authentication = Anonymous\Default\FormsAuthentication, If you do not choose an authentication method in your code, the application will default to using the client's Windows Credentials (DefaultCredentials). (More...)

Q. What Do you know about SharePoint Object Model?

  

Ans. In Sharepoint Object model there are two Important namespaces, Microsoft.Office.Server and Microsoft.SharePoint . 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.


Q. How Do you use\refer External Javascript and Css file in your WebPart?

Ans. You can use javascript,Css or Image files placed in _Layouts or any other location by registering them on the webpart page.


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.

Q. What are the various tools used for creating the solutions?

Ans. Some of the common tools are

1. WsPBuilder

2. VSeWSS (Visual Studio extensions for WSS )

3. Stsdev


(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend