24 February 2012

SharePoint 2013 is here

On the horizon loomed a new version of SharePoint! On the Microsoft site appeared SharePoint 2013 Technical Preview Managed Object Model Software Development Kit.

What is it?
On the download page says that the functionality described in the SDK, only applies to the interaction with other applications, Microsoft. So, what will happen with CAML-queries, receive a further development of Linq to SharePoint is still not clear.

Download here : http://www.microsoft.com/download/en/details.aspx?id=28768

SharePoint App Store
Much points to the fact that the new SharePoint'e appears something like the online application directory (sandbox solutions) that you can download and install on your portal. That such a method SPWeb.LoadAndInstallApp, which takes a parameter of type Stream (ie package) and returns an object of type SPAppInstance (Represents an SPApp object installed to a specific SPWeb site).
We'll have to reconsider plans for boxed portals like Deskwork. All hope of integration with corporate systems and customer-specific software

Facebookable
No less interesting is the class SPOAuth2BearerCredentials (Provides credentials for authentication with a service that supports OAuth 2.0 bearer token authentication). Now you can log in to your account using facebook. Socialization, which appeared in SharePoint 2010, walking out of his father's house.

Resource Management on page
Now you do not have to guess, is registered on the page jQuery or not. For this purpose, a new static class SPPageContentManager, having for this purpose a handful of static methods.

Let's wait for the new version.
Roi

17 February 2012

No need to dispose in 2010 at SPWebInfo object

Who has not encountered during the development toolpart - create a dropdownlist with a list of all sites.

The 2007 version used with SPWeb object and it must to make a Dispose.
 
// 2007
using (SPSite site = new SPSite("http://mysite"))
{
    foreach (SPWeb web in site.AllWebs)
    {
        ddlWebs.Items.Add(new ListItem(web.Title,web.ID.ToString()));
        // ... Continuing operations ...
        web.Dispose();
    }
}

The 2010 version we use object SPWebInfo.
In SPWebInfo we do not we will dispose.

Here is an example (in this case a loop that sets the title and ID for dropdownlist )

// 2010
using (SPSite site = new SPSite("http://mysite"))
{
     foreach (SPWebInfo webInfo in site.AllWebs.WebsInfo)
     {
          ddlWebs.Items.Add(new ListItem(webInfo.Title, webInfo.Id.ToString()));
          // ... Continuing operations ...
     }
}

SPWebInfo object contains:
Properties: Configuration, CustomMasterUrl, Description, Id, Language, LastItemModifiedDate, MasterUrl, ServerRelativeUrl, Title, UIVersion, UIVersionConfigurationEnabled, WebTemplateId
Methods : Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Yours,
Roi