About Me

My photo
Currently working as a Pen Tester, I'm interested in Android and web apps.

Friday, 17 September 2010

Developing for SharePoint Online (Cloud Based SharePoint Site)

In the previous post I spoke about a point in the project where I wanted to do some specific things with the site. I also spoke about some difficulties I encountered. In this post I'll clarify the issues I'm facing. To begin with I'll describe the setup I am working with. It is a Microsoft BPOS (Business Productivity Online Services) SharePoint site. This is a cloud based SharePoint site based on SharePoint Server 2007. I access the site in an internet browser through a URL like this one https://exampleemeamicrosoftonlinecom-1.sharepoint.emea.microsoftonline.com/. Any changes I've made to the SharePoint site have been done in an internet browser or through SharePoint Designer. To edit a cloud based SharePoint site in SharePoint Designer simply click on the "open site" button and enter the URL used to access the site in the browser and then enter a username and password associated with the site.

Up until this point in the project  it has been sufficient to develop in an internet browser and through SharePoint Designer. However, now the site needs to function in very specific ways. These include;
  • Dynamically calculating (calculating in real time) a result from three SharePoint drop down menus and presenting the result to the user before they commit the value to a SharePoint List.
  • Populating the left hand side of a paired list box from a SharePoint List
  • Each value in the left hand side must be associated to a control number when they are added to the right hand side of the paired list box. When the user commits the values to a SharePoint List both the value and the control number must be together.
  • When the user adds a value to the right hand side of a second paired list box then a completion date must be appended to each value on the right hand side of that paired list box.

Initially I was going to use JavaScript for the first problem but I was unsure of using it with SharePoint drop down menus. A friend suggested that it would be messy to use JavaScript and to simply use the SharePoint APIs. This lead to the problem of setting up Visual Studio with a SharePoint BPOS site. I posted my problem on a couple of forums, the best answer coming from the TechNet forum. Basically Visual Studio is not built to develop for remote SharePoint sites and using a shared SharePoint environment means that it is not possible to deploy solutions built with compiled code.

Now I'm in the position where I have to use client-side code such as JavaScript for the functionality I need and also look at different ways around my other problems. So far I've got the problem of dynamically calculating the values just about done. There is still an issue of using the drop down menus with a List. I will continue to find work arounds for the problems as this prototype has to be developed on the setup I was given. If this was not just a prototype I would not recommend developing on a cloud based SharePoint site.

Thursday, 9 September 2010

SharePoint Designer or Visual Studio

I've come to a point in the project where I want to do very specific things, such as calculate values from drop down menus in real time, and display the result to the user. For me, the obvious solution to this problem is to use some JavaScript. However, because SharePoint uses a server side language that converts to HTML for internet browsers -have a look at the source in SharePoint Designer and then view the page source in an internet browser, different? This is why I don't think JavaScript is the best solution here; SharePoint is simply not built for the use of it in this way. I'm now looking at using the SharePoint APIs in Visual Studio instead. I just have to figure out how to use Visual Studio with a cloud based SharePoint server. I'm getting this error when I try to set it up;



EDIT: It's not possible to remotely develop with Visual Studio


Anyway while I sort this problem out I've been looking at when you should use SharePoint Designer and when you should use Visual Studio when developing for SharePoint. The quick answer can be found in the name of the products;
  • SharePoint Designer = Web Design
  • Visual Studio = Web Development

SharePoint Designer
  • Web page presentation and branding
  • Some coding and custom functionality but is mainly built as a no code solution
  • Customising the layout, using CSS and designing a master page

Visual Studio
Through some research I've found that you must use Visual Studio 2005/2008 when developing for SharePoint 2007. Visual Studio 2010 has limited functionality for SharePoint 2007 which I find really strange. I suppose it's a way of phasing out SharePoint 2007. So when to use Visual Studio;
  • For people who can code and don't rely on a WYSIWYG editor
  • Extend SharePoint functionality with your custom code
  • Design custom workflows
  • Creating custom features and event handlers

Friday, 3 September 2010

Removing Title from SharePoint List, not such a good idea

I had a previous post called Removing 'Title' from a SharePoint List but its caused some problems namely when you enter values into the List and then try to edit them. It seems that editing is removed by default when you remove Title and you have to go into Actions -> Edit in Datasheet to make changes. However, because I have a custom list this doesn't work. So the quick solution is keep Title and simply rename it to suit your List. This is easily done because Title doesn't have to be a unique value.