SharePoint Evolution Conference–things to remember / learn

April 18, 2013 Leave a comment

 

So today was the last of the 3 day Evolution conference that has been running at the QEII centre in Westminster. http://www.sharepointevolutionconference.com/ 

 

The whole conference has been fantastic with a very good selection of speakers

My highlights were Andrew Connell’s (http://www.andrewconnell.com/blog) Talk on single page applications or SPA’s. I am sure this will appear on his blog soon

the other was Chris O’Brien’s (http://www.sharepointnutsandbolts.com) talk on SharePoint App’s and why they make a lot of sense. He did a mock conversation, which i have gone through myself, on how SharePoint hosted apps are not powerful enough and we want to use c# in a provider hosted app which then leads down the rabbit whole of either Azure costs or the maintenance and DR of our own server. This all leads back to the question “What was wrong with SharePoint hosted apps anyway?”

 

The big take away from the conference was that there is not that much you cannot do with SharePoint hosted app if you really think about it. So we need to get outside of our nice comfy C# sofa and start learning JavaScript.

 

By this I mean REALLY learn JavaScript and not the hacking about we have been doing for the last few years. This means that we need to treat JavaScript as a real language (I realise that it is) and write the code properly using proper patterns. So that when we look at it all in a weeks time or have to show it in a demo it will make sense and that other people can actually support the code.

 

This seems daunting given the limited tooling that exists for JavaScript, especially when we think how lucky we are with the debugging tools we get for .NET code.

 

Someone, I forget who, came up with a brilliant analogy for what JavaScript is and it was “JavaScript is assembly language for the web”

When you think about it this makes a lot of sense. In the end the C# code we write is assembly when it finally gets executed.

 

This means that to write good JavaScript we need to use extra tools and frameworks that other people have provided.

 

The obvious one is jQuery which i now think is synonymous with JavaScript. If you are not using jQuery in you JS then you are just making life difficult.

 

The other frameworks that we should look to use and the main reason for this post are the following:

 

Using some or all of the above does make the learning a little more daunting but after seeing the results this is clearly the way to move forward. When you see how little code you actually have to write it is just amazing what can be done.

 

As well as the extra frameworks the other key JavaScript things to learn are namespaces and promises

 

Something else to note. Make sure you have the latest version of the SharePoint development tools installed and make sure you have the “Web Essentials 2012” extension installed as well. This will make life easier.

 

Please do not ask me for any code samples or video’s of the event as I do not have any and if I did I wouldn’t be allowed anyway.

Custom Navigation in a SharePoint Hosted App in SharePoint 2013

February 10, 2013 Leave a comment

 

I have been playing round with a SharePoint hosted app to learn about how it all works. This has been going well but i ran into more problems than i though i would when trying to implement a menu for my App.

 

If you are using the auto hosted or developer hosted app model then this is easy (ish) you use the new chrome control, create you menu links in JS and you are done. MS have some documentation on this that works great.

 

But i am creating a SharePoint hosted app. So this causes a few “problems”. The first one being that if i add a chrome control to my page i get 2 menu which is just silly.

 

Google wasn’t much help although i did find this post here

http://www.intrateam.com/gb/blogpost/sharepoint-2013-app-master-page

which pointed me in the right direction.

 

My first issue was actually getting hold of a copy of the master page that app’s use. I could not work out how to do this only having an office 365 tenant. In the end I grabbed the app.master and default.master from the GLOBAL folder in the hive on a on premise install.

 

The first thing i worked out is that the reference to “~masterurl/default.master”  seems to translate to the app.master from the GLOBAL folder in the HIVE.

 

So i made a copy of the app.master and added it to my project. Changing the elements.xml file as per the post linked above.

 

I also changed the link in my ASPX pages from ~masterurl/default.master to ~site/_catalogs/masterpage/<Name of my master page>.master

 

This assumes you have you elements file setup like

elementsfile

 

 

While doing this I noticed that there is a content place holder with an id of PlaceHolderLeftNavBar. This isn’t hidden.

 

So I added

image

into my Default.aspx page and loaded it into SharePoint.

menu

 

Bingo I have a menu in the standard place in SharePoint. What is also nice is that if the user hits the “Focus on Content” button then the menu gets hidden.

 

But wait a minute we just setup our own master page, what was the point? Well at the moment you do not need you own master page but this does now mean you could move any of the other Content Place Holders to put a menu in a different location. It also helps get rid of some of the warnings in visual studio as it now knows the master you are using.

 

I do have an issue that  have to copy my <asp:menu> content onto all the pages. I tried using the XML data source but this appears to not be supported but there may be another way to store the menu logic centrally.

 

The next problem to solve was that we need to pass the query string values around the system, so these have to be added to the menu.

This can be done with some simple jQuery.

 

image

 

Just make sure this will run on all of the pages and your querystring values will be maintained between page loads

Sorry for the images but my code plugin was not working.

Hope this helps someone.

Categories: CPS, work Tags: ,

Visual Studio 2012 templates for SharePoint 2013

January 23, 2013 2 comments

 

So I just fired up Visual Studio 2012 and went to create a new SharePoint 2013 App just to play around with. Only to find that Visual Studio only has the 2010 templates available.

 

The search to find out what I needed to install wasn’t as quick and simple as I was hoping so now that I have worked it all out i may as well share with the rest of you.

 

Assuming you have Visual Studio 2012 installed. Go to

http://msdn.microsoft.com/en-us/office/apps/fp123627

 

Scroll down and under the tools section there is a web downloader (Direct Link). Download and run it, it will download everything you are missing.

 

After a couple of restarts you can then create 2013 projects in visual studio

image

Hope that helps

Categories: CPS, work Tags: ,

Building a Project Server app

December 13, 2012 1 comment

Getting changed field values from SPItemEventReceiver

November 26, 2012 1 comment

 

http://www.thedotnotcorner.com/2012/11/26/helper-methods-for-getting-the-changed-field-value-in-spitemeventreceiver/

has written a very interesting looking helper function for getting old values out of events.

Categories: work Tags:

Creating a Project Server 2013 App

November 26, 2012 1 comment

 

The first in a series of posts about creating a Project Server app.

http://epmsource.com/2012/11/23/building-your-first-project-server-app-part-1-getting-started-setting-up-a-development-environment/

 

This will be interesting.

Service descriptions for SharePoint 2013

November 26, 2012 1 comment

 

This post here http://modery.net/new-service-descriptions-for-office-365-wave-15/

has a list of all the services in SharePoint 2013 and what version they are available in.

 

The interesting one for me is that SSRS is available in the E3 and E4 Office 365 plans. Not seen anything about that and I am interested as to how it will work.

Categories: CPS, work Tags:
Follow

Get every new post delivered to your Inbox.