Eamon Barker's eb.NET

Not quite vb.NET, but getting close!

Filter by APML
RSS Feed

Search

Profiles/Groups

Google Ads

Top Posts

Tags

Categories

Archive

Calendar

<<  November 2008  >>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

Blogroll

Disclaimer

All postings are provided AS IS with no warranties, and confer no rights.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright Eamon Barker 2008

CC License

Visitor Map

Locations of visitors to this page
Welcome to eb.NET... a place that I can keep the things that help me in my day, that might help you in your's!

SharePoint Development - Three Phases for Customisation

In this post I cover the steps I use when developing in SharePoint and when to use out-of-the-box functionally or custom code.

image

After a couple of weeks on holiday, I am back into it... and I thought I would get started with a post on the way I customise a SharePoint project. This post  won't cover coding or how to configure sites, but more of the philosophy behind the customisation of a deployment.

When I get a new project to sink my teeth into I generally split the customisation into three parts: Configuration, SharePoint Designer and Custom Coding.

The three phases

As I explained above, I use three phases when I do any customisation in SharePoint. Some projects may only need to use the first, some may need all three. Below is an explanation of each of those phases:

Configuration

Using SharePoint's out-of-the-box functionality you should be able to achieve between 60%-80% of the required customisation (or 100% if it is a less complicated project).

imageUsing Sites, Lists, Content Types, etc. you should be able to get a working example of a site. Usually this can be done with the users to ensure your requirements are correct and saves re-work later on.

I also find starting the build like this, you can let the project team loose on the site and as they get a feel for it they may move the requirements... it is better it happens at this stage, rather than on delivery when a lot more work has been done to the solution.

Once the initial configuration has been completed and a gap analysis has been done to determine what (if any) further customisation needs to be done you will need to crack open either SharePoint Designer (SPD) or Visual Studio (VS).

SharePoint Designer image

The next phase of any custom work I do requires SharePoint Designer (SPD). SPD is a tool that doesn't require masses of coding (VB.NET or C#) knowledge and can be used by technical BA's or skilled up power users. This doesn't mean developers can't use it as well!

I generally use SharePoint designer to:

  • Change the look and feel for the site
  • Display Cross-Site information in the Data View Web Part
  • Use SP Data source controls to populate ASPX controls
  • Do basic customisation of list views using the Custom List Form Web Part
  • Create basic workflows
  • Generally messing with the SharePoint Pages

Most of the time SharePoint Designer will get you close to the finish line. There are a few issues with it (not being able to easily move Workflows is one of them), but the good out-weights the bad!

Custom Coding (Visual Studio)

The third and final phase in any custom work is the cutting of custom code. The tool I use when customising a project in this way is Visual Studio. This is the realm of the developer and comes with all of the "extras" that go with full custom development (support, bugs, upgrade changes, etc.). But, VS allows you to really make the final changes to customise the project to 100% of the users requirements.

I use VSeWSS and other tools along with VS to do the following tweaks:

  • Create full site definitions so re-deploying the same site template is easy!
  • Create state machine and complex sequential workflows
  • Create custom Web Parts to modify and display information
  • Write event handlers to catch and process requests

and the list can go on and on... Where there are any gaps left after the first two steps, it should be cleaned up with code.

What to use and When

The size of the project generally dictates how far down the list you will need to go to get the solution you want. Below is a table that shows where you which direction you need to head:

Project Outline Skills Required Products to use
You are required to create a project management site that has the following functionality:
  • A place to store Risks, Issues, Communication Plans, Team Tasks
  • A place to store meeting information
  • A place to keep documents
  • A calendar to keep track of important events
  • A way to track tasks and view due/over due information
Knowledge of List & Site creation. This can be a Power User, BA, IT Pro or Developer. General SharePoint Configuration
You are asked to enhance the site with the following functionality:
  • A workflow that creates an unassigned task when an issue has been raised
  • A summary page displaying information on different phases of the project
  • Dashboard showing risk information using Red Light/Green Light indicators
SharePoint Designer Experience, HTML & CSS.
This can be a Technical BA, Web Designer or Developer
SharePoint Designer
The project team have used the site for several weeks and come back with the following enhancements:
  • A Web Part that shows statistical information about communications that have taken place. This Web Part is to be available to anyone to place on their personal page views
  • A workflow that produces an Office 2007 document with information from the issues & risk list to be used as a weekly report
VB.NET or C# programming skills & SharePoint development experience, generally this is the domain of a programmer. Visual Studio and any other development tools

Conclusion

Hopefully the above information will prove useful when deciding what path to take with customisation of your SharePoint project. If you have a large project that requires a fair bit of custom work, try and get the most out of SharePoint before you start using SharePoint Designer or Visual Studio... it is amazing what a little bit of planning and architecture can do! Anywhere from 60% - 80% of a large project can be completed without even opening SPD or VS.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


System Administration Tools for SharePoint

A list of things I use to keep on top of SharePoint and its day to day running.

To follow on from my Development Tools for SharePoint post, I thought I would throw together a list of things I use to keep on top of SharePoint for its day to day running and making sure it is going to be able to cope after an install/upgrade.

Tool's Name Description
STSADM This would be the tool that I use the most when administering SharePoint.
STSADM is the command line utility that allows you to do any configuration/install/migration/anything task that you need to perform on your deployment. STSADM is more powerful than the Web UI and can perform some tasks that the Web UI can't.
Want to schedule a nightly SP back up? Using the STSADM command in a batch file attached to a scheduled task will give you that functionality!
A really good source for all the STSADM commands is Jose Barreto's blog on all the operations and parameters for STSADM
stsadmWin This was suggested in another post of mine, and I have had to add this to the list of tools I use to manage SP. STSADM is cool, this makes it a lot cooler! It is a must for any SP admin!
SharePoint Capacity Planning Tool This isn't a tool for monitoring a SharePoint deployment, but it is fantastic for planning a deployment and as such is a must in the tool kit! MSFT have done a good job on this tool and is something you should run if there is ever a company expansion or a shift in the way you use SP.
Best Practices Analyzer for SharePoint Where would we be without best practice's? This tool runs over your farm, applies best practice rules and produces a report giving you a heads up on where to improve the performance of your deployment. There is more information about the BPA on the SharePoint Team's blog.
SharePoint SUSHI

SUSHI = SharePoint Utility with a Smart, Helpful Interface

SUSHI is a powerful, user-friendly SharePoint application enabling you to accomplish common SharePoint administrative and development tasks. You can think of SUSHI as a Swiss army knife for SharePoint.

Microsoft SQL Server Manager I use this to "take care" of the SharePoint Databases. I use MSSM to manage the size of the database's for the various sites in an given farm.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SharePoint Tip: Creating Multiple Sub-Sites with STSADM

Using STSADM to create multiple copies of one site!

In this post I will go cover the creation of a site using the STSADM tool. If you want to clone a few sites and re-create several copies of them this is the easiest way to do it. This is really handy if you have a base Project Management or Team Site that you want to use for a few different areas of your business!

STSADM Export - Exporting the base site

The first step of the process is to create a "template" for us to re-use when creating the copies. To do this we use the STSADM -o export command. Below is the syntax to do this. As always, I put this into a batch file so I have to change the directory to the 12 hive so I can run STSADM.

   1: cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin 
   2: REM Export the base site to a folder on the file system
   3: stsadm -o export -url http://yoursite/demosite/ -filename c:\SiteBase\ -includeusersecurity -versions 4 -nofilecompression -quiet 

Creating the Site and Importing the base template

The next part of the process is to create a base site and then import the "template" we exported above.

Note: Make sure you use the same site template for the createweb command as you used to create the base template! not doing so will cause an error and the import process will not work.

Below is the syntax to create the site and import the exported "template".

   1: cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin
   2: REM Create a site base
   3: stsadm -o createweb -url http://yoursite/NewSite -title "Demo Site Name" -sitetemplate STS#0 
   4: REM Import the template we exported 
   5: stsadm -o import -url http://yoursite/NewSite -filename c:\SiteBase\ -includeusersecurity -nofilecompression -quiet 

Now that we have this we can reproduce it to create multiple instances of the same site!

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


10 Reasons why SharePoint Designer is cool!

10 reasons why you should take another look at SharePoint Designer!

Microsoft Office SharePoint Designer It seems every time I talk to another developer about SharePoint, the second I mention SharePoint Designer (SPD) I get a sideways look and told "I won't use FrontPage". First off, Expression blend is FrontPage; SharePoint Designer is a tool to modify and enhance SharePoint. Hopefully reading the rest of this post will motivate you to install it (or open it) and give it a good ole' fashion thrashing... not too hard, it has a tenancy to break every now and then...

The list below isn't wholly features of SPD, it includes spin-offs that have come in handy for myself and others using it.

I have ordered this list from what I think are its great features, to the best features... in terms of how it helps me when tinkering with SharePoint.

 

1. Let Technical BA's and Power Users do their stuff

I wasn't sure whether to put this in the number one position or ten, but it made it to one... I am developer, I enjoy chunking through code and not doing workflow and page modifications that don't include at least one line of VB. Getting a technical analyst trained up in SPD will save a lot of time for everyone. For example, say a client asks for modifications in a workshop, the analyst can do these on the fly, fantastic! This tool is aimed at those sort of power users, so let them go for it!

2. The DataView Web Part

This is my favourite feature of SPD. It takes all of two minutes to get a DataView Web Part on your page and linked up to a data source. Creating custom views and filtering information from around the site is simple using this feature. If a project manager has ever asked you to give them a summary of all their outstanding tasks across all their projects, then the DataView Web Part will help a lot!

Dataview Web Parts use XSLT to render the data. Looking back at point one, there are some things BA's can't do, one of those is tweaking the XSLT... the DataView Web Part offers an extension (ddwrt namespace) that helps a bit, but there is always something that will need some customisation.

3. ASPX Page Editing

Have you ever tried to edit SharePoint ASPX pages in Visual Studio? If you need to make changes to the look and feel of a page, then SPD is the only tool to use. If you are creating a feature, you wouldn't use SPD to create the sites/lists etc. but to modify existing pages, SPD is great! Another advantage of SPD over Visual Studio is the preview... Visual Studio doesn't give you a preview of the page when it is up on the site, SPD does. In saying that, you can copy the ASPX code from VS and paste it into SPD to see how it looks.

4. Branding SharePoint SitesSharePoint Designer Server Controls

This isn't a feature as such, but it is something that is near impossible without SPD. Modifying your "companyPage.master" is simple in SPD, it gives you a great preview, all the controls SharePoint controls in a menu (see image) ready to drag on and use.

Editing your corporate style sheet and seeing the results straight away is another bonus of SPD. Doing it the hard way would mean changing it in an editor of choice, uploading it to the 12 hive, refreshing the APP pool and then the browser... SPD seems a lot easier!

5. Workflow Designer

As I said in point one, getting some of the workflows completed by a BA will help the progress of the project to no end. Of course, there are limitations to the sort of things the SPD workflow designer can do, anything that needs some custom coding will have to go to the developers. All in all the workflow designer in SPD is a great tool for getting a workflow out and working!

6. SP DatasourceData From a SharePoint Web Service

Out of the top five, but only just! This is an easy way to connect to any number of data sources, not just SharePoint.

A few Examples:

  • SharePoint Lists
  • SharePoint Libraries
  • Other Databases
  • XML Files
  • Linked sources
  • BDC (If you are running the enterprise version of MOSS,
    see my post on the differences between WSS and MOSS for details)
  • Web Services (SharePoint or Other), see the image for an example of output data

One of the really cool data sources is the Linked sources data source. The can pull together any number of other data sources and give you a sing source, great for roll ups from multiple sites.

SP Datasource can be used by a DataView Web Part OR be dragged onto your page as a normal ASP.NET data source and consumed by any of the standard ASP.NET controls. For example, if you wanted a drop-down list that looks to an active issues list: connect to that list, filter the list showing only active and drag the data source onto the page, that easy!

7. Custom List Forms

Much like the SP Datasource, this is something that is a must for anyone checking out SPD to have a look at. If you want to customise any list, survey, etc. within SharePoint, you will need to use this feature. This is a great thing if you want to add some additional information to a list form, change the way titles SharePoint Designer Folder Listare displayed, or generally mess with a form.

8. Site Connectivity

Using SPD to connect to a SharePoint site opens up a whole bunch of interesting places you wouldn't have known about unless you went for a hunt through the database and 12 hive. Opening a site in SPD shows all the master page and css files that give the site its look and feel (see the image to the left). You can view all the sites and lists within the folder list.

9. Client Application

The fact that SPD is a client application that can connect to SharePoint is great! There is no need to install a virtual server to do development work, it sits on a normal PC and connects to the deployment without issue.

10. Import/Export

And finally in the tenth position the ability to export and import sites to either a SharePoint site template or a Personal Web Package. Makes it very easy to move something from a development environment to testing, without having to create a whole bunch of XML and config files. This feature is great for moving something like a Wiki from one site to another, without losing the links!

 

Hopefully that gives you enough to break out the Office disk and put SharePoint Designer on your machine! If you have any comments or other reasons why SharePoint Designer is a cool product, please submit a comment!

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SharePoint Tip: Upgrading a SharePoint (SP0) Content Database to SP1

Moving a SharePoint content database from SP0 to a deployment with SP1

If you have installed SharePoint (SP0) and you want to move a content database to a deployment running SP1 without upgrading the whole farm, read on!

First off, create a blank team site (Central Administration > Application Management > Create or extend Web application) and then follow the steps below.

When you attempt to attach the database through the central admin web interface, you might get hit with the following error:

Attaching this database requires upgrade, which could time out the browser session.  You must use the STSADM command 'addcontentdb' to attach this database.

To get around this, do what the error says...

  1. RDP to your SharePoint server
  2. Open the Command Prompt (Start > Run >CMD)
  3. Paste the following line into the prompt "cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin", this will take you to the 12 Hive
  4. Type the following command:
    stsadm -o addcontentdb -url http://SiteName -databasename WSS_Content_DATABASENAME -databaseserver DOMAIN\DATABASESERVER
  5. Hit enter, and all going to plan you will get: Operation completed successfully

To make sure, go to Central Administration > Application Management > Content Databases and it should be there. Take the origional database (the one created when you created the site) offline and make sure this one is the only one online. Navigate to your site and again, make sure it is all there!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5