There will be 2 coding sessions, 1 for Day Birds from 10am – 4pm and one for Night Owls from 6pm – 12am. You can join us for one or both sessions. Build an app, have fun and go home with a fantastic prize!
Don’t forget to register.
Occasional rantings about Dynamics CRM/365, Power BI and Azure cloud. Taking the first small steps in machine learning, Python and algorithmic trading
There will be 2 coding sessions, 1 for Day Birds from 10am – 4pm and one for Night Owls from 6pm – 12am. You can join us for one or both sessions. Build an app, have fun and go home with a fantastic prize!
Don’t forget to register.
In SharePoint 2007 you had two options when you needed to create a new template for a SharePoint site:
In SharePoint 2010, there is a new replacement and improved framework for handling site templates. When you save a site as template it will create a normal SharePoint Solution Package (a wsp file – if this is new for you take a look at WSP – SharePoint Solution Files). The new webtemplate feature allows you to build a “site definition” which is scoped to a site collection – this way you can built templates of a site and still deploy them to the SharePoint solution gallery in sandbox mode.
Every webtemplate is based on an existing site definition – listed below is a code sample using the minimal set of attributes that you have to use when creating a new webtemplate.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<WebTemplate
BaseTemplateID="1"
BaseTemplateName="STS"
BaseConfigurationID="1"
Name="JOPX"
Title="JOPX WebTemplate"
>
</WebTemplate>
</Elements>
The WebTemplate has to reference the Template (BaseTemplateName) and the configuration of the site definition (BaseConfigurationId) the template is based on.
The example on MSDN How to: Create a webtemplate starts from importing an existing saved webtemplate but in some cases it is easier to start from an empty SharePoint project and manually adding a elements.xml incorporating the webtemplate feature as well as the ONET.XML from the site definition from which you want to start.
References:
After having installed Visual Studio 2012 together with the Microsoft Office Dev Tools which are distributed with the Web Platform Installer 4.0 (Just search for Office within Web PI) you can start building your first SharePoint 2013 apps. There is only one project type for building SharePoint 2013 apps.
After having selected the SharePoint 2013 app template, you will need to decide what type of app you want to build.
Let’s start with exploring what is included in the Visual Studio 2012 project after you have selected SharePoint hosted app.
Visual Studio 2012 SharePoint 2013 App structure:
If you take a look at default.aspx you will notice the following javascript snippet added in to the page – this is quite important – and provides the binding with the business logic which is added into app.js
1: <script type="text/javascript">
2: $(document).ready(function () {
3: SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () { sharePointReady(); });
4: });
5: </script>
The snippet above uses the jQuery document ready event handler – “ $(document).ready(function())” to call SP.SOD.ExecuteFunc(). This is an example of a common pattern in Javascript called anonymous function calls. SP.SOD.ExecuteFunc(key,functionname,fn) ensures that the specified file - sp.js - that contains the specified function – SP.ClientContext - is loaded and then runs the specified callback.
So when both the DOM and SP.js are loaded and the ClientContext object is initialized the code will call the sharePointReady() function which is located in App.js.
If you look at the code in App.js – you will notice that the general way of working with the Javascript Client Object Model hasn’t changed a lot in SharePoint 2013.
1: // The code creates a context object which is needed to use the SharePoint object model
2: function sharePointReady() {
3: context = new SP.ClientContext.get_current();
4: web = context.get_web();
5:
6: getUserName();
7: }
References:
One of the challenges of designing a good search solution is understanding the range of different search requirements from users. When you look at the Google search screen (or a SharePoint search center screen for that matter) it is quite minimalistic. The trick is to look for the intention of the user who is performing a search operation.
So what is the user looking for?
Key in delivering a good search result is the fact whether the search engine has understood the unstated question. Traditional metrics which are commonly used to measure the efficiency and effectiveness of search are the following:
The measure with which it all start is relevance – and relevancy is dependent on the intent of the user. In any organization there will be a range of different search requirements from users, depending on the purpose for which they are searching. If you are serious about building a good search experience you should identify common tasks that user are trying to achieve when performing a search. These requirements are best identified though the development of search personas and scenarios. For more information on identifying personas and search information design take a look at the links listed below:
Don’t forget to mark September 12th 9:30 AM Pacific Time (for Belgium – 18:30 PM) in your agenda and follow the Visual Studio 2012 Virtual Launch event on http://www.visualstudiolaunch.com
In SharePoint 2010 the Client Side Object Model (CSOM) was made available through the _vti_bin/client.svc. Client.svc wasn’t really build to be accessed directly but calls would go through supported entry points (proxies) being the 3 flavours of the CSOM:
Unfortunately the Javascript CSOM was harder to use then the managed version and also more limited in functionality. SharePoint 2010 also provided oneREST/oData enabled service called ListData.svc also referred to as WCF Data Services (See Introduction to oData and SharePoint Server 2010 for more info)
In SharePoint 2013 the client.svc service is extended with REST capabilities and it now support direct access from REST clients which makes it easier for javascript and non .NET code to access it. There is also a new shorthand notation for accessing the REST API where CSOM URLs can go through the _api folder.
This means that you can now replace
http://sharepoint/_vti_bin/client.svc/web
with
The new SharePoint 2013 REST API follows the oData protocol specification but also extends it in some ways to support more complex SharePoint specific operations. The SharePoint 2013 Preview REST service responses are formatted by using the Atom protocol by default. But it is also possible to use HTTP Accept headers that enable you to specify that the response is returned in JSON format which is easier to use in Javascript code.
Since a number of REST calls are simple GET operations it is possible to learn the syntax by creating the URL in a browser and looking at the ATOM response being returned. Next are a number of examples to get you started:
In a next post I’ll explore the extensions in the REST API for SharePoint Server 2013.
More information:
There is lot of hours of video material available around building apps for SharePoint – check out SharePoint 2013 Developer training videos for all modules. To get you started you should with SharePoint 2013 app development, you should definitely take a look at the following modules (in total around 7 hours of training material around SharePoint 2013 app development alone)
Happy SharePoint-ing