Tuesday, March 15, 2011

SharePoint 2010 Training Day 2

Today the second day of the Developing Solutions with SharePoint 2010 training.
We discussed today chapter 4, 5 and 6.
  1. SharePoint 2010 Developer Roadmap
  2. SharePoint Foundation Development
  3. SharePoint Developer Tools in Visual Studio 2010.
  4. Creating Sandboxed Solutions
  5. Pages and Navigation
  6. Developing Web Parts
  7. Creating Fields, Site Columns & Content Types
  8. Creating Lists & Event Handlers
  9. Accessing Data using LINQ to SharePoint
  10. Client Object Model
  11. Developing SharePoint 2010 Workflows
  12. Business Connectivity Services (BCS)
  13. Web Content Management (WCM)
  14. Enterprise Content Management (ECM)
Fourth Chapter
In this chapter we discussed about Sanboxed Solutions. SharePoint 2010 makes it possible to deploy and maintained customizations at site collection level. Because it's possible to deploy on the site collection level we don't need the administrator to deploy. We can do it if we are a site collection owner. A sandboxed solution can do most things we also can with a full solution, as long as it scoped to the site collection where the solution is deployed. A restriction of using Sandboxed solution is that we cannot access external data from web services or databases. You can use in a Sandboxed solution a subset of the SPSite Object Model, excluded SPSecurity, SPSite construction an no access to Web application or farm.
SharePoint 2010 monitored the Sandboxed Solution. With different Metrics the solution can get points. Those points grow every time a actions is started. By default there is a maximum of 300 points. If the solution reach the 300 point the solution is turned down for the rest of the day. A list of how you get the points is listed in the table below.
Resource Description Units Resources per Point Limit
AbnormalProcessTerminationCount Abnormally terminated process count 1 1
CPUExecutionTime CPU Execution Time for site seconds 3,600 60
CriticalExceptionCount Critical Exception Events Events 10 3
InvocationCount Solution Invocation Events Events

PercentProcessorTime % CPU usage by solution % 85 100
ProcessCPUCycles Solution CPU cycles cycles 1 x10^11 1 x10^11
ProcessHandleCount Windows handles count items 10,000 1,000
ProcessIOBytes Windows handles count items 0 1 x10^8
ProcessThreadCount Thread count in overall process Thread instances 10,000 200
ProcessVirtualBytes Memory consumed Bytes 0 1.0x10^9
SharePointDatabaseQueryCount Number of SharePoint database queries Query instances 20 100
SharePointDatabaseQueryTime Elapsed time to execute query seconds 120 60
UnhandledExceptionCount Number of unhandled exceptions Unhandled exception instances 50 3
UnresponsiveProcessCount Number of unresponsive processes Unresponsive process instances 2 1

A view of the monitoring screen.

Fifth Chapter
In SharePoint 2010 there is some changes in the Master page. In 2007 we had a "default.master" for the site pages and a "*.master" in the _layouts hive for the application pages. The changes in SharePoint 2010 is that we use for the v3 UI a "default.master", and for the v4 UI a new master page named "v4.master". If you want to make your own master page SharePoint 2010 delivered a "minimal.master" file where only the minimal placeholders are added so you can change it how you want.

The most important
tags in "v4.master" are:
  • s4-ribbonrow: this is the container for the server ribbon and the site actions menu.
  • s4-titlerow: this is the container for the title, tags and main navigation.
  • s4-leftpanel: this is the container for the left navigation and displays the Quick Launch.
  • mso-contenttable: this is the container for the content of the page instance.
To add a custom action to the Site Administration in Site Settings you can add some CustomAction element to the "elements.xml". Information you need to add in the CustomAction element are a Id, GroupId, Location, Richts, Sequence, Title, Description and in the element you can add a UrlAction element with an url. There are some more items you can fill in the element, if you want to know with see: "http://msdn.microsoft.com/en-us/library/ms460194.aspx". It is also possible to build your custom action in codebehind and add it to the flyout menu.

If you add a Customized site pages it runs in Safe Mode. Those Customized site pages don't support inline code. You van only add controls that are registered as Safe Controls in the web.config. If you add a Module section in the "elements.xml" and put in a set of File elements each File element provisions a instance of a page.

Finally the last part of this chapter. New in SharePoint 2010 is the Ribbon and you can extend the Ribbon with customactions. On the same way as you add Custom Actions to the Site Settings you can add customactions to the ribbon. For the button on the Ribbon you need to define a CommandUIHandler that specifies the name of the Command and the javascript to execute or you have to create a custom page component with JavaScript that executes the necessary JavaScript and eventually executes calls to the server.
You can send a message to the statusbar or notification area of the Ribbon. If you want to use those elements you have to use some javascript calls like:
SP.UI.Status.addStatus('Hello World Status Message'); // shows the status bar
SP.UI.Notify.addNotification('Hello World Notification Message'); // shows the notification area

Sixth Chapter
In this chapter we discussed how to make Custom Web Parts. Most of this chapter was already in SharePoint 2007 and we looked only as a reminder to this part.

No comments:

Popular Posts