SharePoint – 2010 Syllabus
Part-1:General Introduction
What is IIS
IIS Website & Web Application
Steps to Create Multiple Website on Port 80
What is Application Pool
What is AppDomain
What is ISAPI Filter / Extension
Web Garden & Web Farm
HTTPS and SSL
Active Directory users and groups creation
Introduction to SharePoint
What is SharePoint
High Level Features
Six Pillars of SharePoint 2010
Version History of SharePoint
Role of SharePoint Server in LAN.
Components in SharePoint
Developers Onion View of SharePoint.
SharePoint Installation and Administration
Hardware & Software Requirements
Supported Browser
Types of Installation
Software’s to be Installed
Central Administration Site
Managed Accounts
Configuration To Send and Receive E-Mail
SharePoint Site Hierarchy
SharePoint Site Hierarchy
Web Application
Site Collection
Creating Site and Sub Site
SharePoint site Home Page.
Branding Site Look and Feel
Working with Quota Templates
Save Site as Template
Create Site from Template
Lists
Overview of Lists
Create Custom List
Add Custom Columns
Site Columns and Groups
Sort and Filter List
Create / Manage List View
Content Type
List Template
Versioning of Data
Metadata Navigation Settings
List Throttling
Predefined List & Libraries
• Predefined Lists
• Predefined LibrariesSharePoint – 2010 Syllabus
Part-2:
• Editing Document properties
• Version Settings
• Check out, edit, and check in files.
• Create folders and navigate between them
• Adding Documents
• Document Template
• Document Workspace
Security – User Groups and Permissions
Authentication vs. Authorization
Creating users and groups in Active Directory
SharePoint Groups
Creating Custom Permissions Groups
Granting Permission to User/groups
To Create a Custom Permission level
To bind Users/Groups and Permission Level
Managing Permissions in Sub site.
Allow Users to create their own site
To Set Site Confirmation and Deletion of unused sites
Permissions for Lists / Libraries / ListItems
Claim Based Authentication
How does Claims Based Authentication works?
Creating SQL Server Database for authentication using Membership and Role Provider
Creating Web Application using CBA.
Allowing Anonymous Access in a Web Application
Enable Form Based Authentication
Editing web.config of Web Application, Central Admin Application and STS
Zones in SharePoint
Creating an Alternate Access Mapping
Enterprise Content Management
Managed Metadata Service
Term, Termsets& Keywords
Enterprise Content Type
Document sets
Document ID Service and IDs
Content Organizer and Automatic routing
In Place Record Management
User Profile Service Administration
What is Social Computing?
Managing User Profiles
User Profile Service Application
Synchronization Service
Working with Audience
Tags and Notes
Working with MySite
Administering and configuring Search
Purpose of Enterprise Search solution
Microsoft Server Side Search Products
What’s New in SharePoint Search Server 2010
Logical architecture for the Enterprise Search Components
Setting up Search Service Application
Configuring Crawler SettingsSharePoint – 2010 Syllabus
Part-3:
Queries and Results Settings
Search Administration at the Site Collection Level
Creating Keywords, Definitions, Best Bets and Synonyms
Creating Search Scopes
PowerShell
Overview of PowerShell
Pipelining of cmdlets
Windows PowerShell Scripts
Using .NET Objects
SharePoint PowerShell Snap-In
Creating/Managing a Web Application
Creating/Managing Site Collection and Site
Backup and Restore
Complete Backup of Web Application
Complete Restore of Web Application
Granular Backup of Site Collection
Exporting & Importing of List
Server Object Model
Using Microsoft.SharePoint.DLL
Site Architecture and Object Overview
SPWebApplication, SPSite, SPWeb, SPList and more…
Sample Programs to understand the Object Model
CAML and LINQ
Introduction to CAML
Writing CAML Queries
Implementing Join
LINQ Introduction
LINQ to SharePoint
Client Object Model
Managed Object Model
Silverlight Client Object Model
Javascript Client Object Model
Using SharePoint Web Services in Client Application
SharePoint Tools for Visual Studio 2010
Visual Studio Project templates for SharePoint 2010
Server Explorer, Feature Designer, Package Explorer
Building and Deploying Solutions in Visual Studio 2010 for SharePoint 2010
Features
SharePoint Root Directory
Features Overview
Features Scope
Create a new feature and Deploying Features using VS2010
Feature Events
Manage SharePoint Solution (WSP) using PowerShell Commands
Visual Studio Templates
Creating Content Type.
Creating SharePoint List Definition with List Instance.
Modify the User Interface Using Custom ActionsSharePoint – 2010 Syllabus
Part-4:
Event Receivers
Event Handlers - Before events and After Events.
Event receiver base classes.
Registering Event Handlers
Example of Before Events
Programming After Events
Working with WebParts
Building a Simple Web Part
Persisting Properties
Editing Properties in Editor WebPart
Developing Custom Editor WebPart
Composite Web Part
Visual Web Part
Web Part Communication.
Sandboxed Solutions
What is Sandboxed Solution.
Comparing Farm Solution with Sandbox Solutions.
Benefits of using sandboxed solutions.
To enable sandboxed solutions by using Central Administration.
Create a Sandboxed Solution Project with a web part.
Build and Deploy the Sandboxed Solution.
Using Windows PowerShell for Administration Sandboxed Solutions.
InfoPath
About InfoPath 2010
Creating SharePoint list and Publishing in SharePoint site
Creating Form and Publishing to SharePoint site
Deploy Form Templates That Contain Form Code That Requires Full Trust
Writing Custom Code in InfoPath Form
Walkthrough to Delete SharePoint list items from InfoPath form
Business Connectivity Service
Creating a BDC Project in VS.NET
Working with Entities and Methods
Type Descriptor
Using Data in External List
Granting Permissions to the BDC List.
Workflow
What is Workflow
SharePoint Workflows
o 3-State Workflow
o Approval Workflow
Custom Workflow: Role of Visio 2010, SharePoint Designer 2010 and VS-2010
o Building Workflow with Visio 2010
o Building Workflow with SharePoint Designer 2010
o Developing Workflow with Visual Studio 2010
o Adding Association Forms in Visual Studio 2010
SharePoint Designer
Introduction to SharePoint Designer 2010
Creating / Opening a site in SPD 2010
Creating / Customizing Lists and LibrariesSharePoint – 2010 Syllabus
Part-5:
Ghosted and Unghosted Pages
Understand Master Pages
Branding SharePoint 2010
Introduction
"SharePoint is a browser based business collaboration tool with composites and insights and search and communities and content and publishing and a document management. It’s collaborative, it’s business intelligence, it’s colleagues, partners, intranet, extranet, internet and much more."
What Is SharePoint
SharePoint is basically a web site or a collection of web sites that enables users to share data, information and knowledge with each other. In one word, collaborate, and you'll often hear people describing it as a collaboration tool or platform.
SharePoint Versions
There are different versions of SharePoint and it can be hard to know which version your organization has deployed. The only way to really know is to ask you IT department but here is a brief description of some.
The following are early versions of SharePoint that shouldn't be deployed anymore. If your organization does, they're in need of an upgrade really bad:
- Microsoft SharePoint Portal Server 2001
- Microsoft SharePoint Team Services (2002)
- Windows SharePoint Services 2.0 (free license) - Microsoft SharePoint 2003 (paid)
Starting with SharePoint 2003, Microsoft offers a free version and a more powerful paid version of SharePoint. So for 2007, there's Windows Services 3.0 (free) and Microsoft Office SharePoint Server (MOSS) which is the paid version. If your organization still has some version of 2007 it's also time for an upgrade as the next version after 2010 is already around the corner.
The 2010 versions are called SharePoint Foundation 2010, free, and SharePoint Server 2010 (Standard or Enterprise) which is the paid version.
Free vs Paid
The free versions of SharePoint include the ablility to create lists for storing data, libraries for storing documents and files, and sites for storing the lists, libraries and other pages. These are just a few features but are the most important ones.
The paid version includes all of the free version's features plus things like My Profiles, enterprise search and business intelligence features. Again these are just a very few of the many features included.
The Cloud
Microsoft now offers SharePoint Online for a per-user monthly rate. The great thing about SharePoint Online is you get the power of SharePoint without the headaches of trying to manage and maintain it from an infrastructure point. You don't have to worry about backups or patches and upgrades as Microsoft and their engineers do that for you.
Administrators:
Site Administrator
A SharePoint site is the place where users perform their daily interactions. A site administrator can set permissions, create security groups, add and delete lists, libraries and sub sites. They can also configure navigation, title, icon, master page, theme, page layout availability and enable or disable site features.
Site Collection Administrator
Sites are grouped together within site collections and administered by the site collection administrator. Site Collection administrators can do everything a site administrator can do plus add, modify and delete master pages and page layouts. They can also configure search settings, variations and enable or disable site collection features.
Farm Administrator
All the servers, services and databases for a SharePoint implementation is called the farm. The settings are stored in the "config" database. A farm can be as small as one server or can contain many servers. A farm administrator configures and maintains it's servers, services, service applications, timer jobs, search settings, and can install farm solutions and infopath forms.
Developers:
Workflows
Workflows are tasks and actions that can be organized as a series of items or can be setup to respond to events based on the state of something. Serial types of workflows can be developed using SharePoint Designer and Visual Studio. You can only develop state workflows with Visual Studio.
Forms
There are many ways to develop forms to collect and store information in SharePoint. All lists and libraries come with forms that can be modified with SharePoint Designer. You can also develop forms with InfoPath and attach them to a list or include them in Form Libraries that are saved as XML documents. Forms can be created using Visual Studio through the development of custom web parts, user controls and layout pages using ASP.net technology. Lastly, using the SharePoint client object model, forms can be developed with client side scripting code or managed code through Silverlight.
Branding/Look and Feel
There are two main modes that SharePoint is implemented in organizations, as a web content management system or as a collaborative solution. In both instances the look and feel of the sites can be customized using Visual Studio and ASP.net features such as master pages, page layouts, user controls and web parts. All of these of which can contain html, client side scripts and styles. SharePoint Designer can be used to modify master pages and page layouts.
Web Parts
Web parts are components that provide some type of functionality that can be easily added or removed to a page in SharePoint. Some other systems refer to these types of components as plug-ins or widgets. Web parts can be developed as regular ASP.net web parts, the recommended approach, or as SharePoint web parts that offer a few more capabilities. Web parts can only be developed with Visual Studio and can be developed as regular web parts that don't have a visual interface, as visual web parts that offer the visual interface which makes them easier to develop, or as Silverlight application web parts.
Applications
SharePoint provides several libraries and ways to extend it or to develop full blown applications.
The SharePoint object model or the server object model (SOM) is a set of libraries of classes the lets developers do anything in SharePoint programmatically. Application using SOM must be deployed and can only run on SharePoint servers.
The SharePoint client object model (COM) comes in two versions. The ECMAScript version runs on web browsers as a scripting language based on JavaScript. The .NET managed code version is based on .NET and can be run on computers just as other .NET or Silverlight applications.
Both the SOM and the .NET managed COM are developed using Visual Studio. ECMAScript COM can be developed with anything type of client which can be as advanced as Visual Studio or as simple as Notepad.
Basic Intro SharePoint Architecture
Questions
1) What are Web Applications in SharePoint?
An IIS Web site created and used by SharePoint 2010. Saying an
IIS virtual server is also an acceptable answer.
2) What is an application pool?
A group of one or more URLs that are served by a particular
worker process or set of worker processes.
3) Why are application pools important?
They provide a way for multiple sites to run on the same server
but still have their own worker processes and identity.
4) What are zones?
Different logical paths (URLs meaning) of gaining access to the
same SharePoint Web application.
5) What are Web Application Policies?
Enables security policy for users at the Web application level,
rather than at the site collection or site level. Importantly, they override
all other security settings.
6) What is a site collection?
A site collection contains a top-level website
and can contain one or more sub-sites web sites that have the same
owner and share administration settings.
7) What are content databases?
A content database can hold all the content for one or more site
collections.
8) What is a site?
A site in SharePoint contains Web pages and
related assets such as lists, all hosted within a site collection.
9) What are My Sites?
Specialized SharePoint sites personalized and targeted for
each user.
10) What is the difference
between Classic mode authentication and Claims-based authentication?
As the name implies, classic authentication supports NT authentication
types like Kerberos, NTLM, Basic, Digest, and anonymous. Claims based
authentication uses claims identities against a against a trusted identity
provider.
11) When would you use claims, and when would
you use classic?
Classic is more commonly seen in upgraded 2007 environments
whereas claims are the recommended path for new deployments.
12) Describe the potential components for both
a single server, and multiple servers, potentially several tiered farms:
A single-server SharePoint Server 2010 environment leverages a
built-in SQL Server 2008 Express database. The problems with this environment
is scalability, not being able to install the with built-in database on a
domain controller, the database cannot be larger than 4 GB, and you cannot use User
Profile Synchronization in a single server with built-in database installation.
An example of a multiple tier farm would be a three-tier
topology, considered one of the more efficient physical and logical layouts to
supports scaling out or scaling up and provides better distribution of services
across the member servers of the farm. This is considered a good architecture
since one can add Web servers to the Web tier, add app servers to the
application tier, and add database servers to the database tier.
SharePoint Backup and Restore Questions
13) What are some of the tools that can be
used when backing up a SharePoint 2010 environment?
·
SharePoint farm backup and recovery
·
SQL Server
·
System Center Data Protection Manager
14) What Microsoft tool can be used for
incremental backups?
System Center Data Protection Manager
Managed Metadata Questions
15) What is Managed Metadata?
Managed metadata is a hierarchical collection of centrally
managed terms that you can define, and then use as attributes for items.
16) What are Terms and Term Sets?
A term is a word or a phrase that can be associated with an
item. A term set is a collection of related terms.
17) How do Terms And Term Sets relate to
Managed Metadata?
Managed metadata is a way of referring to the fact that terms
and term sets can be created and managed independently from the columns
themselves.
18) Are there different types of Term Sets?
There are Local Term Sets and Global Term Sets, one created
within the context of a site collection and the other created outside the
context of a site collection, respectively.
19) How are terms created and used?
There are several ways; however the most common is to use the
Term Store Management Tool.
20) How is Managed Metadata, and the related
Term technology used?
Through the UI, the most common use is through the managed
metadata list column which allows you to specify the term set to use. It also
related to searching and enhancing the user search experience.
Sandbox Solutions Questions
21) What is a sandboxed solution?
Components that are deployed to run within the sandboxed
process rather than running in the production Internet Information Services
(IIS) worker process.
22) What are some examples of things that
might run within the SharePoint sandbox?
Any of the following are acceptable answers:
Web Parts
Event receivers
Feature receivers
Custom Microsoft SharePoint Designer workflow activities
Microsoft InfoPath business logic
Event receivers
Feature receivers
Custom Microsoft SharePoint Designer workflow activities
Microsoft InfoPath business logic
others….
23) Why are sandboxed solutions used?
Primarily because they promote high layers of isolation. By
default they run within a rights-restricted, isolated process based around
Code Access Security (CAS). Isolation is possible to increase with activities
like running the sandboxing service on only specific SharePoint 2010 servers.
SharePoint Search Questions
24) What is a content source in relation to
SharePoint search? What’s the minimum amount of content sources?
A content source is a set of options that you can use to specify
what type of content is crawled, what URLs to crawl, and how deep and when to
crawl. You must create at least one content source before a crawl can occur.
25) What is a search scope?
A search scope defines a subset of information in the search
index. Users can select a search scope when performing a search.
26) What is a federated location with
SharePoint search?
Federated locations provide information that exists outside of
your internal network to your end-users.
27) How does managed metadata affect search?
Enhances the end-user search experience by mapping crawled
properties to managed properties. Managed properties show up in search results
and help users perform more successful queries.
28) What is query logging in SharePoint
2010?
Collects information about user search queries and search
results that users select on their computers to improve the relevancy of search
results and to improve query suggestions.
29) What authentication type does the
SharePoint crawler use?
The crawl component requires access to content using NTLM
authentication.
Services Architecture Questions
30) Please describe what a Service Application
is in SharePoint 2010.
Service applications in SharePoint 2010 are a set
of services that can possibly be shared across Web applications.
Some of these services may or may not be shared across the SharePoint 2010
farm. The reason these applications are shared is the overall reduction
of resources required to supply the functionality these services
cultivate.
31) Please provide an example of one of these
service applications.
Any of the below are acceptable answers:
Access Services
Business Data Connectivity service
Excel Services Application
Managed Metadata service
PerformancePoint Service Application
Search service
Secure Store Service
State service
Usage and Health Data Collection service
User Profile service
Visio Graphics Service
Web Analytics service
Word Automation Services
Microsoft SharePoint Foundation Subscription Settings Service
Business Data Connectivity service
Excel Services Application
Managed Metadata service
PerformancePoint Service Application
Search service
Secure Store Service
State service
Usage and Health Data Collection service
User Profile service
Visio Graphics Service
Web Analytics service
Word Automation Services
Microsoft SharePoint Foundation Subscription Settings Service
32) What are Service Application Groups used
for?
Just provides a logical grouping of services that are scoped to
a particular Web Application.
33) How are Service Applications deployed in
terms of IIS (Internet Information Services)?
They are provisioned as a single Internet Information
Services (IIS) Web site.
34) Explain how connections are managed with
Service Applications.
A virtual entity is used that is referred to as a proxy,
due to label in PowerShell.
35) What are some common examples of
SharePoint 2010 services architectures, and what are the
advantages of each design?
The three most popular designs are single farms with either a
single service application group or multiple service application groups,
or Enterprise services farms.
Single farms with a single service application group are
generally the most common, and have the advantages of easy deployment, simple
service application allocation, effective resource utilization and cohesive
management.
Single farms with multiple service application groups is
less common, and have the advantage of potential individual management of
service applications as well as allowing data isolation, and while being more
complex to deploy and maintain allows targeting of sites to particular service
applications.
Enterprise Service Farms is pretty uncommon as it is a complete
farm dedicated to Service Applications but promotes autonomous management and
high levels of data isolation.
36) Are there any other type of relevant
service architectures?
Depending on the environment requirements, a specialized farm
can also be used in order to deploy specific services tailored to the organizational
requirements which can aid in scaling out and conservation of resources.
37) What is the User Profile service?
Allows configuring and managing User profile properties,
Audiences, Profile synchronization settings, organization browsing and management
settings, and My Site settings.
38) What are User Profiles?
Aggregates properties from diverse identity content sources
together to create unified and consistent profiles across an organization, used
throughout the SharePoint environment.
39) What is Excel Services?
Allows sharing, securing, managing, and using Excel 2010
workbooks in a SharePoint Server Web site or document library. Excel Services
consists of the Excel Calculation Services (ECS), Microsoft Excel Web Access
(EWA), and Excel Web Services (EWS) components.
40) What is PerformancePoint Services?
Allows users to monitor and analyze a business by building
dashboards, scorecards, and key performance indicators (KPIs).
41) What is Visio Services?
Allows users to share and view Microsoft Visio Web drawings. The
service also enables data-connected Microsoft Visio 2010 Web drawings to be
refreshed and updated from various data sources.
42) What is Access Services?
Allows users to edit, update, and create linked Microsoft Access
2010 databases that can be viewed and manipulated by using an internet browser,
the Access client, or a linked HTML page.
43) What is the Secure Store Service (SSS)?
A secure database for storing credentials that are associated
with application IDs
44) What is Content Deployment?
Content deployment enables you to copy content from a source
site collection to a destination site collection.
Backup / DR Questions
45) Describe how redundancy can be built into
a SharePoint environment. Please be specific in regards to any auxiliary
components.
Multiple front-end web servers (WFE’s) can be deployed and
correlated through Windows NLB or anything approach. Application servers
can be deployed into the farm for a variety of purposes, depending on
organizational requirements. Databases can be clustered or mirrored, again
depending on requirements and environment.
46) From a basic standpoint, what is the
difference between SQL clustering and mirroring?
Clustering provides a failover scenario whereby one or more
nodes can be swapped as active depending on whether a node goes down. In
mirroring, transactions are sent directly from a principal database and server
to a mirror database to establish essentially a replica of the database.
Governance Questions
47) What Is Governance in terms of SharePoint
2010?
Governance is the set of policies, roles, responsibilities, and
processes that guide, direct, and control how an organization’s business
divisions and IT teams cooperate to achieve business goals.
48) What are some useful, OOB features of
SharePoint that aid with governance of an environment?
Any of the below are acceptable answers. There are some others
but these are the major ones that I generally look for from a candidate:
Site templates – consistent branding,
site structure, and layout can be enforce a set of customizations that are
applied to a site definition.
Quotas – limits to the amount
of storage a site collection can use.
Locks - prevent users
from either adding content to a site collection or using the site collection.
Web application permissions and policies – comprehensive
security settings that apply to all users and groups for all site collections
within a Web application.
Self-service site creation - enables users
to create their own site collections, thus must be incorporated into a
governance scheme.
Monitoring Questions
49) Describe the monitoring features that are
baked into SharePoint 2010.
Diagnostic logging captures data about the state of the system,
whereas health and usage data collection uses specific timer jobs to perform
monitoring tasks, collecting information about:
·
Performance Counter Fata
·
Event Log Data
·
Timer Service Data
·
Metrics For Site Collections and Sites
·
Search Usage Data
General Workflow Questions
50) What is a declarative workflow? Can non-authenticated
users participate in workflows?
Workflows created by using Microsoft SharePoint Designer 2010,
the default setting enable deployment of declarative workflows. Yes, however
you do not give non-authorized users access to the site. The e-mail message and
attachments sent from notifications might contain sensitive information
1) What are the two base classes a WebPart you
are going to use within SharePoint 2007 can inherit from?
There are two base classes that a WebPart which is going to be consumed
by SharePoint can inherit from, either the SharePoint WebPart Base class or the
ASP.NET 2.0 WebPart base class. When inheriting from the SharePoint WebPart
Base class your derived WebPart class will inherit from
Microsoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0
WebPart base class your derived WebPart class will inherit from
System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to
use the ASP.NET WebPart base class since the old base class is meant for
backwards compatibility with previous version of SharePoint, however there are
four exception when it is better to leverage functionality from the SharePoint
WebPart base class:
Cross page connections
Connections between Web Parts that are outside of a Web Part
zone
Client-side connections (Web Part Page Services Component)
Data caching infrastructure
2) What are the differences between the two
base classes and what are the inherit benefits of using one over another?
The difference is the Microsoft.SharePoint.WebPartPages.WebPart
base class is meant for backward compatibility with previous versions of
SharePoint. The benefit of using the SharePoint WebPart base class is it
supported:
Cross page connections
Connections between Web Parts that are outside of a Web Part
zone
Client-side connections (Web Part Page Services Component)
Data caching infrastructure
ASP.NET 2.0 WebParts are generally considered better to use
because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting
from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET
2.0, such as embedding resources as opposed to use ClassResources for
deployment of said types.
3) What is the GAC?
The GAC stands for the global assembly cache. It is the machine
wide code cache which will give custom binaries place into the full trust code
group for SharePoint. Certain SharePoint assets, such as Feature Receivers need
full trust to run correctly, and therefore are put into the GAC. You should
always try to avoid deployment to the GAC as much as possible since it will
possibly allow development code to do more than it was intended to do.
4) What is strong naming (signing) a WebPart
assembly file mean?
Signing an assembly with a strong name (a.k.a strong naming)
uses a cryptographic key pair that gives a unique identity to a component that
is being built. This identity can then be referred throughout the rest of the
environment. In order to install assemblies into the GAC, they must be strongly
named. After signing, the binary will have a public key token identifier which
can be use to register the component in various other places on the server.
5) What are safe controls, and what type of
information, is placed in that element in a SharePoint web.config file?
When you deploy a WebPart to SharePoint, you must first make it
as a safe control to use within SharePoint in the web.config file. Entries made
in the safe controls element of SharePoint are encountered by the
SharePointHandler object and will be loaded in the SharePoint environment
properly, those not will not be loaded and will throw an error.
In the generic safe control entry (this is general, there could
be more), there is generally the Assembly name, the namespace, the public key
token numeric, the typename, and the safe declaration (whether it is safe or
not). There are other optional elements.
6) What is the CreateChildControls() method?
How can you use it to do something simple like displaying a Label control?
The CreateChildControls method in WebParts is used to notify the
WebPart that there are children controls that should be output for rendering.
Basically, it will add any child ASP.NET controls that are called instantiating
each control with its relevant properties set, wire any relevant event handlers
to the control, etc. Then the add method of the control class will add the
control to the controls collection. In the relevant WebPart render method, the
EnsureChildControls method can be called (or set to false if no child controls
should be called) to ensure that the CreateChildControls method is run. When
using CreateChildControls it implies that your WebPart contains a composition
of child controls.
In order to create something like a label control in Create, you
would create a new label control using the new keyword, set the various
properties of the control like Visible=True and ForeColor = Color.Red, and then
use Controls.Add(myLabelControl) to add the control to the controls collection.
Then you can declare EnsureChildControls in the Render method of the WebPart.
7) What does the RenderContents method do in
an ASP.NET 2.0 WebPart?
The render contents method will render the WebPart content to
the writer, usually an HtmlTextWriter since WebParts will output to an HTML
stream. RenderContents is used to tell how the controls that are going to be
displayed in the WebPart should be rendered on the page.
*** Side Question: I got asked what the
difference between CreateChildControls and the RenderContents method. The
CreateChildControls method is used to add controls to the WebPart, and the
RenderContents method is used to tell the page framework how to render the
control into HTML to display on a page.
8) What is the WebPartManager sealed class?
What is its purpose?
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. For example,
the WebPartManager is responsible for the functionality that is provided when
you are working with moving a WebPart from WebPartZone to WebPartZone. It is
known as the the central class of the Web Part Control Set.
*** Side Question: I got asked how many
WebPartManager controls should be on a page. In order to have WebParts on a
page there has to be just one WebPartManager control to manage all the WebParts
on the page.
9) What is a SPSite and SPWeb object, and what
is the difference between each of the objects?
The SPSite object represents a collection of sites (site
collection [a top level sites and all its subsites]). The SPWeb object
represents an instance SharePoint Web, and SPWeb object contains things like
the actual content. A SPSite object contains the various subsites and the
information regarding them.
10) How would you go about getting a reference
to a site?
C#
1. oSPSite = new SPSite("http:/server");
2.
3. oSPWeb = oSPSite.OpenWeb();
11) What does a SPWebApplication object
represent?
The SPWebApplication objects represents a SharePoint Web
Application, which essentially is an IIS virtual server. Using the class you
can instigate high level operations, such as getting all the features of an
entire Web Application instance, or doing high level creation operations like
creating new Web Applications through code.
12) Would you use SPWebApplication to get
information like the SMTP address of the SharePoint site?
Yes, since this is a Web Application level setting. You would
iterate through each SPWebApplication in the SPWebApplication collection, and
then use the appropriate property calls (OutboundMailServiceInstance) in order
to return settings regarding the mail service such as the SMTP address.
Side Question: I got asked if there
are other ways to send emails from SharePoint. The answer is yes, there is. You
can use the SendMail method from the SPutility class to send simple emails,
however it is not as robust as using the System.Net.Mail functionality since it
doesn’t allow things like setting priorities on the email.
13) How do you connect (reference) to a
SharePoint list, and how do you insert a new List Item?
C#
1. using(SPSite mySite = new SPSite("yourserver"))
2. {
3. using(SPWeb myWeb = mySite.OpenWeb())
4. {
5. SPList interviewList = myWeb.Lists["listtoinsert"];
6. SPListItem newItem = interviewList.Items.Add();
7.
8. newItem["interview"] = "interview";
9. newItem.Update();
10. }
11. }
14) How would you loop using SPList through all SharePont List
items, assuming you know the name (in a string value) of the list you want to
iterate through, and already have all the site code written?
C#
1. SPList interviewList = myWeb.Lists["listtoiterate"];
2. foreach (SPListItem interview in interviewList)
3. {
4. // Do Something
5. }
15) How do you return SharePoint List items
using SharePoint web services?
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.
Side Question: I got asked how I built queries with the
lists.asmx web service. In order to build queries with this service, one of the
parameters that the GetListItems method exposes is the option to build a CAML
query. There are other ways to do this as well, but that was how I answered it.
16) When retrieving List items using
SharePoint Web Services, how do you specify explicit credentials to be passed
to access the list items?
In order to specify explicit credentials with a Web Service, you
generally instantiate the web service, and then using the credentials
properties of the Web Service object you use the System.Net.NetworkCredential class
to specify the username, password, and domain that you wish to pass when making
the web service call and operations.
*** Side Question: I got asked when you
should state the credentials in code. You must state the credentials you are
going to pass to the web service before you call any of the methods of the web
service, otherwise the call will fail.
17) What is CAML, and why would you use it?
CAML stands for Collaborative Application Markup Language. CAML
is an XML based language which provides data constructs that build up the
SharePoint fields, view, and is used for table definition during site
provisioning. CAML is responsible for rending data and the resulting HTML that
is output to the user in SharePoint. CAML can be used for a variety of circumstances,
overall is used to query, build and customize SharePoint based sites. A general
use would be building a CAML query in a SharePoint WebPart in order to retrieve
values from a SharePoint list.
18) What is impersonation, and when would you use impersonation?
18) What is impersonation, and when would you use impersonation?
Impersonation can basically provide the functionality of
executing something in the context of a different identity, for example
assigning an account to users with anonymous access. You would use
impersonation in order to access resources on behalf of the user with a
different account, that normally, that wouldn’t be able to access or execute
something.
19) What is the IDesignTimeHtmlProvider
interface, and when can you use it in WebParts?
The IDesignTimeHtmlProvider interface uses the function GetDesignTimeHtml()
which can contain your relevant render methods. It was helpful to use in 2003
since it allowed your WebPart to have a preview while a page was edited in
FrontPage with the Webpart on it, because the GetDesignTimeHtml() method
contains the HTML for the designer to render.
20) What are WebPart properties, and what are
some of the attributes you see when declaring WebPart properties in code?
WebPart properties are just like ASP.NET control properties,
they are used to interact with and specify attributes that should be applied to
a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties
are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable.
Although most of these properties come from the System.Web.UI.WebControls.WebParts
class, ones like Category come out of System.ComponentModel namespace.
21) Why are properties important in WebPart
development, and how have you exploited them in past development projects? What
must each custom property have?
Properties are important because WebParts allow levels of
personalization for each user. WebPart properties make it possible for a user
to interact, adjust, and increase overall experience value with the
programmatic assets that you develop without having the need to use an external
editor or right any code. A very simple example of exploiting a property would
be something like allowing the user to change the text on the WebPart design
interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get
and set accessor methods.
22) What are ClassResources? How do you
reference and deploy resources with an ASP.NET 2.0 WebPart?
ClassResources are used when inheriting from the
SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the
SharePoint solution file as things that should be stored in the wpresources
directory on the server. It is a helpful directory to use in order to deploy
custom images. In ASP.NET 2.0, typically things such as images are referenced
by embedding them as resources within an assembly. The good part about
ClassResources is they can help to eliminate recompiles to change small
interface adjustments or alterations to external JavaScript files.
23) What is a SharePoint Solution File? How
does it differ from WebPart .cab files in legacy development? What does it
contain?
A SharePoint solution file is essentially a .cabinet file with
all a developers ustom componets suffixed with a .wsp extension that aids in
deployment. The big difference with SharePoint solution files is is that a
solution:
allows deployment to all WFE’s in a farm
is highly manageable from the interface allowing deployment,
retraction, and versioning
Can package all types of assets like site definitions, feature
definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC
deployments
Just to name a few things…
24) What is a .ddf file and what does it have
to do with SharePoint Solution creation?
A .ddf file is a data directive file and is used when building
the SharePoint solution bundle specifying the source files and their
destination locations. The important thing for someone to understand is that
the .ddf file will be passed as a parameter to the MAKECAB utility to
orchestrate construction of the SharePoint solution fiel.
25) What file does a SharePoint solution
package use to orchestrate (describe) its packaged contents?
The solution Manifest.XML file.
26) What deployment mechanism can you use to
instigate Code Access Security attributes for your WebParts?
SharePoint solution files can add in order to handle code access
security deployment issues. This is done in the element in the SharePoint
solution manifest.XML, which makes it easier to get assemblies the appropriate
permissions in order to operate in the bin directory of the web application.
27) What is a SharePoint Feature? What files
are used to define a feature?
A SharePoint Feature is a functional component that can be
activated and deactivate at various scopes throughout a SharePoint instances,
such as at the farm, site collection, web, etc. Features have their own
receiver architecture, which allow you to trap events such as when a feature is
installing, uninstalling, activated, or deactivated. They are helpful because
they allow ease of upgrades and versioning.
The two files that are used to define a feature are the
feature.xml and manifest file. The feature XML file defines the actual feature
and will make SharePoint aware of the installed feature. The manifest file
contains details about the feature such as functionality.
Side Question: I got asked how the
introduction of features has changed the concept of site definitions.
SharePoint features are important when understanding the architecture of site
definitions, since the ONET.XML file has been vastly truncated since it has
several feature stapled on it.
28) What types of SharePoint assets can be
deployed with a SharePoint feature?
Features can do a lot. For example, you could deploy
Simple site customizations
Custom site navigation
WebParts
pages
list types
list instances
event handlers
workflows
custom actions
just to name a few….
29) What are event receivers?
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.
30) When would you use an event receiver?
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.
31) What base class do event receivers inherit
from?
Event receivers either inherit from the SPListEventReciever base
class or the SPItemEventReciever base class, both which derive from the
abstract base class SPEventReceiverBase.
32) If I wanted to not allow people to delete
documents from a document library, how would I go about it?
You would on the ItemDeleting event set: properties.Cancel=
true.
33) What is the difference between an
asynchronous and synchronous event receivers?
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.
34) How could you append a string to the title
of a site when it is provisioned?
In the OnActivated event:
C#
1.
SPWeb
site = siteCollection.RootWeb;
2.
site.Title += "interview";
3.
site.Update();
35) Can an event receiver be deployed through
a SharePoint feature?
Yes.
36) What is a content type?
A content type is an information blueprint basically that can be
re-used throughout a SharePoint environment for defining things like metadata
and associated behaviors. It is basically an extension of a SharePoint list,
however makes it portable for use throughout an instance regardless of where
the instantiation occurs, ergo has location independence. Multiple content
types can exist in one document library assuming that the appropriate document
library settings are enabled. The content type will contain things like the
metadata, listform pages, workflows, templates (if a document content type),
and associated custom written functionality.
37) Can a content type have receivers associated
with it?
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.
38) What two files are typically (this is kept
generally) included when developing a content type, and what is the purpose of
each?
There is generally the main content type file that holds things
like the content type ID, name, group, description, and version. There is also
the ContentType.Fields file which contains the fields to include in the content
type that has the ID, Type, Name, DisplayName, StaticName, Hidden, Required,
and Sealed elements. They are related by the FieldRefs element in the main
content type file.
39) What is an ancestral type and what does it
have to do with content types?
An ancestral type is the base type that the content type is
deriving from, such as Document (0×0101). The ancestral type will define the
metadata fields that are included with the custom content type.
40) Can a list definition be derived from a
custom content type?
Yes, a list definition can derive from a content type which can
be seen in the schema.XML of the list definition in the element.
41) When creating a list definition, how can
you create an instance of the list?
You can create a new instance of a list by creating an
instance.XML file.
42) What is a Field Control?
Field controls are simple ASP.NET 2.0 server controls that
provide the basic field functionality of SharePoint. They provide basic general
functionality such as displaying or editing list data as it appears on
SharePoint list pages.
43) What base class do custom Field Controls
inherit from?
This varies. Generally, custom field controls inherit from the
Microsoft.SharePoint.WebControls.BaseFieldControl namespace, but you can
inherit from the default field controls.
44) What is a SharePoint site definition? What
is ghosted (uncustomized) and unghosted (customized)?
SharePoint site definitions are the core set
of functionality from which SharePoint site are built from, building from the
SiteTemplates directory in the SharePoint 12 hive. Site definitions allow
several sites to inherit from a core set of files on the file system, although
appear to have unique pages, thereby increasing performance and allowing
changes that happen to a site propagate to all sites that inherit from a site
definition. Ghosted means that when SharePoint creates a new site it will
reference the files in the related site definition upon site provisioning.
Unghosted means that the site has been edited with an external editor, and
therefore the customizations are instead stored in the database, breaking the
inheritance of those files from the file system.
45) How does one deploy new SharePoint site
definitions so that they are made aware to the SharePoint system?
The best way
to deploy site definitions in the SharePoint 2007 framework is to use a
SharePoint solution file, so that the new site definition is automatically
populated to all WFE’s in the SharePoint farm.
3) What is the use of
safe controls entry in web.config?
When you deploy a WebPart to SharePoint, you
must first make it as a safe control to use within SharePoint in the web.config
file. Entries made in the safe controls element of SharePoint are encountered
by the SharePointHandler object and will be loaded in the SharePoint
environment properly, those not will not be loaded and will throw an error.
4) Explain the Webpart
life cycle.
Webpart life cycle also same as asp.net life
cycle. Here you can find some additional events like CreateChildControls,
RenderContents etc.
§ OnInit
§ OnLoad
§ CreateChildControls
§ OnPreRender
§ Render (RenderContents, etc)
5) What is the
CreateChildControls() method?
The CreateChildControls method in WebParts is
used to notify the WebPart that there are children controls that should be output
for rendering. Basically, it will add any child ASP.NET controls that are
called instantiating each control with its relevant properties set, wire any
relevant event handlers to the control, etc.
6) What does the
RenderContents method do in an ASP.NET 2.0 WebPart?
The render contents method will render the
WebPart content to the writer, usually an HtmlTextWriter since WebParts will
output to an HTML stream. RenderContents is used to tell how the controls that
are going to be displayed in the WebPart should be rendered on the page.
7) What is the
WebPartManager sealed class? What is its purpose?
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.
For example, the WebPartManager is responsible for the functionality that is
provided when you are working with moving a WebPart from WebPartZone to
WebPartZone.
8) What is a SPSite and
SPWeb object, and what is the difference between each of the objects?
The SPSite object represents a collection of
sites (site collection [a top level sites and all its subsites]). The SPWeb
object represents an instance SharePoint Web, and SPWeb object contains things
like the actual content. A SPSite object contains the various subsites and the
information regarding them.
9) When should you
dispose SPWeb and SPSite objects? And even more important, when not?
You should always dispose them if you created
them yourself, but not otherwise. You should never dispose
SPContext.Current.Web/Site and you should normally not dispose SPWeb if
IsRootWeb is true.
10) What
is RunWithElevatedPrivileges? when you can use it?
RunWithElevatedPrivileges impersonates the
identity of the current thread. In effect, this means that the code will run
with higher level permission instead of using login
user permission.
11) When running
with SPSecurity.RunWithElevatedPrivileges (web context) what credentials are
being used? What is the performance impact of RunWithElevatedPrivileges?
The App Pool Identity for the web application
running SharePoint. Performance impact
with RunWithElevatedPrivileges creates a new thread with the App
Pool’s credentials, blocking your current thread until it finishes.
12) When modifying a list
item, what is the “main” difference between using SPListItem.Update() and
SPListItem.SystemUpdate()?
Using SystemUpdate() will not create a new
version and will also retain timestamps. Using SystemUpdate alerts is not sent,
and modified by is not changed to system account.
13) What is CAML, and why
would you use it?
CAML stands for Collaborative Application
Markup Language. CAML is an XML based language which provides data constructs
that build up the SharePoint fields, view, and is used for table definition
during site provisioning. CAML is responsible for rending data and the
resulting HTML that is output to the user in SharePoint. CAML can be used for a
variety of circumstances, overall is used to query, build and customize
SharePoint based sites. A general use would be building a CAML query in a
SharePoint WebPart in order to retrieve values from a SharePoint list.
14) What is a SharePoint
Feature? What files are used to define a feature?
A SharePoint Feature is a functional component
that can be activated and deactivate at various scopes throughout a SharePoint
instances, such as at the farm, site collection, web, etc.
15) What are event
receivers?
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.
16) If you have an
ItemUpdated or ItemUpdating event receiver and it causes an update to the item,
how do you prevent another ItemUpdated and ItemUpdating event from being fired
during your update?
Before performing your update, call
DisableEventFiring(). After update, call EnableEventFiring().
17) How would you
programmatically retrieve a list item?
You can use SPQuery to filter the list
and SPSiteDataQuery used to join multiple list. Learn more
on CrossListQueryCache, PortalSiteMapProvider.
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.
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.
Reference Books
Download: Pro SharePoint 2010 Governance
Download: SharePoint 2010 at Work
No comments:
Post a Comment