Steps to implement workflows in MOSS:
RunWithElevatedPrivileges executes code as the System account. This basically then me that the code that you supply as a delegate to the method, has full permissions to modify SharePoint objects in question.
The SPWebApplication class consists of various methods and properties to perform various manipulations on web applications. i.e. Perform backups, add content databases, add site collections, set alert settings, change the web.config file etc. The class simply represents the IIS load balanced web application that is installed on the server farm.
In Moss, a method activity is one that performs an action, e.g.: creating/updating a task. However, an event activity is a cascading one which runs in response to an action which has occurred.
Ways to initiate a workflow:
Once a workflow has been linked to a document, one can start the workflow by selecting the workflow that you want from the list of workflows available for the document or item. If needed, one may have to fill a form with the information that is needed by the workflow. Based on how the workflow was configured, it might be possible to customize it and start it.
There are basically 3 ways, Manually, When new list item is added, and When a new list item is updated.
Types of sharepoint sites:
The SPWebApplication class consists of various methods and properties to perform various manipulations on web applications. i.e. Perform backups, add content databases, add site collections, set alert settings, change the web.config file etc. The class simply represents the IIS load balanced web application that is installed on the server farm.
The WebPartManager sealed class manages everything in context of a WebPart page, i.e. WebParts controls, events, functionality in WebPartZones etc. It is also known as the central class of the WebPart control set.
Synchronous event are the ones in which the caller needs to pause to wait for a response. The fact that it waits for a response me that the call is a “blocking” call to the event handler. This gives the thread that encountered the event an opportunity avoid executing code that the event identifies undo the effects of code that the event identifies.
Asynchronous event is one in which the caller continues without pausing for a response. This allows concurrency between both the caller and the method being called.
Data Protection Manager provides the ability to backup an entire sharepoint farm including the SQL Server databases, metadata, farm configuration files and indexes for federated search. Bakups can be automated to occur upto 4 times an hour based on the need. DPM starts by backing up a baseline copy of the sharepoint environment.
It then there onwards performs full backups on regular basis using the sharepoint VSS writer and underlying component VSS writers to identify blocks or fragments of the farm and content databases which have changed. It is designed for sharepoint administrators and provides them with wizards and workflows to help protect the data. It represents data to be protected in the same context as the user accesses it.
Steps to implement workflows in MOSS:
A .ddf file: Data Directive File. It contains the metadata like the source files and their destination locations. The .ddf file is passed as a parameter to the MAKECAB utility to orchestrate construction of the SharePoint solution file.
One can create custom application pages to add GUI components in Sharepoint. Unlike site pages, an application page is deployed only once per Webserver. Application pages cannot be customized based on sites, and are based on virtual _layouts directory. Application pages are all compiled together into a single dll and are also used across all sites within a server farm. They are preferred to site pages because of their performance benefits over them and they also support inline code.
Six pillars of MOSS2007:
AllowUnsafeUpdates allows updates on a GET request. It basically allows code to bypass security validation while making changes to Sharepoint objects which are not executed within a HTTP POST request.
Components of workflow architecture:
One can create workflows using Visual Studio2010 workflow designer. Every single workflow is compiled into its own dll. One needs to create a Workflow definition (XML based) to use it in a farm. The xml consists of the following information:
Each server farm contains an association table for workflow, which links various workflows to the content type, list or document it applies to. It also includes information regarding how the workflow is initiated i.e.by users or automatically along with the tasks associated with that workflow.
MOSS stands for Microsoft Office Share Point Server. MOSS is a portal based platform for complete management of documents & web services. It is a platform for creation of customized web based applications & portals like blogs, wiki etc. MOSS provides security features and can be configured to return separate content based on the fact that the user has logged on using internet, intranet or extranet.
Page layout defines the look and feel of a Web page. Content for the page is stored in fields on the page. When you view or edit a page, the content is displayed in the field controls.
The types of fields on a page are determined by the content type for the page. Each content type contains columns. When you create a content type, you add column templates to the content type for each field. Column templates determine the default field control that is associated with the columns as well as the kind of content the field can contain, such as a single line of text, a hyperlink, or a picture.
Workflows are implementation of business processes allowing people to collaborate on documents through various project tasks assigned to individuals. They enhance productivity and organization of work in an organization. This enables people to only concentrate on tasks given to them. It’s basically a planned series of tasks assigned to individuals to achieve an outcome.
Workflows included in MOSS:
CAML:- Collaborative Application Markup Language.It is an XML based language and provides data constructs used to build up the SharePoint fields and is also used for table definition. CAML is used to build or customize SharePoint based sites and construct a CAML query in a WebPart to retrieve values from a SharePoint List.
ClassResources are defined in the SharePoint solution file. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, objects (images) are referenced by embedding them as resources within an assembly. ClassResources allows us to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files. Just saving the files can work.
SPSite:
SPWeb:
Sharepoint Websites exist in a hierarchy. At the top of the hierarchy is a Top-Level website. There can then be multiple sub sites under this top-level website and sub sites under sub sites. The entire structure is then called a site collection.
Administrators can decide who can create sub sites under the top level website. One can see the list of sites and sub sites below the top level site by using the Sites and Workspaces web page. The list shows only one level at a time.
A collection of sites along with the top level site is known as a single site collection in Sharepoint. While creating a new Web Application, one has to follow creating a site collection to specify the content of the web application. A web application can thus even contain thousands of site collections. The web application is needed to host those site collections. Web application is the logical & physical partition/container within IIS to create portals.
WebPart properties are just like ASP.NET control properties, they are used to specify the characteristics of a webpart and by specifying the attributes with the desired values by a user. Some of the attributes are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable.
Create a reference to the SharePoint Lists.asmx web service by appending “/_vti_bin/Lists.asmx” to the end of a site name. One can use this url to add a service reference in Visual studio there onwards. This will query the WSDL for the Lists.asmx service.
Next step is to configure the security to be able to call the service methods. You can do this by altering the bindingConfiguration to indicate the trport uses NTLM authentication, which is the default.
We can then iterate through all the lists.
Example:
ServiceReference1.ListsSoapClient proxy = new ServiceReference1.ListsSoapClient();
proxy.ClientCredentials.Windows.ClientCredential = new NetworkCredential();
XmlNode node = proxy.GetListCollection();
XPathNavigator nav = node.CreateNavigator();
XPathNodeIterator iter = nav.SelectDescendants("List", "http://schemas.microsoft.com/sharepoint/soap/", false);
while (iter.MoveNext())
{
string title = iter.Current.GetAttribute("Title", string.Empty);
string id = iter.Current.GetAttribute("ID", string.Empty);
Messagebox.Show ("title:" + title + “ and id:” + id);
}
writer.Flush();
Impersonation is the concept of providing functionality in the context of a different identity, for example letting a user access the system with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that would provide just the very basic rights to access the system.
Master pages provide a base look and feel and standard behaviors that are needed for all of the pages in your site. The content page combines with the layout of the master page to form the complete output. Microsoft SharePoint Foundation is built on top of Microsoft ASP.NET, therefore, it supports master pages for defining elements that are common to all pages.
Advantages of Master Pages:
Types of page layout columns:
Architecture of MOSS:
Sharepoint based websites can be configured to be password protected to restrict access to users. Only registered users can then access it and an invitation to those users is sent via email. Moreover, they also support roles, enabling administrators to restrict certain members based on their roles to certain permissions.
When adding a new user, one may store their email address and request sharepoint to send an email to the user to enable them to access the sharepoint based website. Shrepoint itself provide with web pages to administer users, user groups, roles and permissions to ensure security and ease of user management on sharepoint based websites.
Impersonation is the concept of providing functionality in the context of a different identity, for example letting a user access the system with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that would provide just the very basic rights to access the system.
Comparison of UserControl and WebPart :
Advantages of UserControl:
Disadvantages of UserControl:
Advantages of WebPart:
Disadvantages of WebPart: