Monday 17 January 2011

Timesheet solution for SharePoint 2010 - Part 2 UI

Problem: Using the database design from Part 1, I need to create the UI for users to submit timesheets.  The screen to capture the users timesheet looks like this:

Related posts in this series:
Part 1 - Design & data storage
Part 2 - Building the UI(This blog post)
Part 3 - Installation Steps 
Part 4 - Final Part

Part 2 Continued...

Initial Hypothesis:  Create 4 connect web parts to allow users to submit their timesheets weekly.  Also allow site collection administrators to submit timesheets for users.  The web parts will also allow administrators to approve or reject the timesheet.
Resolution: Create 4 connected web parts to display user timesheets on a page.  Use the dialog framework to add and edit tasks.  The ability to add a new task is done in another web part on a separate page.  The edit task allows users to edit or delete and existing task, this is another custom web part place on a separate page within the site collection.

Create a web parts to perform basic administration options.  I have create 3 administration web parts within Visual studio to allow administrators to update key timesheet information such as adding new client or projects or assigning people to a project.

Reporting for the timesheet can be created using either: Reporting Services and integrated into SharePoint, BCS to query data, or custom web parts.
Part 1 - Design & data storage
Part 2 - Building the UI (This blog post)
Part 3 - Installation Steps 
Part 4 - Final Part

Timesheet solution for SharePoint 2010 - Part 1

Part 1 - Design & data storage (This blog post)
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part

Problem:  A common requirement on Intranets is to have a timesheet template on SharePoint.  There are solution for company timesheets.  I wanted to build a timesheet application that was scalable, reportable and friendly for SharePoint. 

Initial Hypothesis:  There are timesheet solutions for SharePoint and most are portable to SharePoint 2010.  Often the timesheet solutions integrate with Outlook as well.  If you have outlook this is often the best solution as users seem to accept Outlook based solutions fairly easily.

I came across http://www.pointbeyond.com/, there timesheet solution was built for WSS3/MOSS, this looks like a solid solution based on SQL Server so their is no real reliance on SharePoint lists however, SharePoint surfaces the timesheets, administration and reporting requirements.  I have not implement the solution but it appears solid and expandable.

In WSS3 I think it would be very difficult to build a detailed timesheet application based on SharePoint lists due to the list size issue and the list relationship complexity required for a timesheet application.

Resolution:  I want a SharePoint Foundations solution that can be used on all SharePoint 2010 farms that can capture and administer timesheets for a business.  SPMetal has greatly improved application development when using SharePoint lists to store data in SP2010 however, due to the number of relational lists and the support for transactional CRUD operations I believe it is better to use SQL Server and store the data in relational tables.  Custom connected web parts will allow users to enter their weekly timesheets.  The solution allows for the use of BCS and External Content Type (ECT) in SP2010 for administration and reporting.

The data access technology choice is between Linq to SQL and using the Entity framework 4.0.  As SharePoint 2010 supports .NET 3.5, a separate Visual studio project/business layer would be required.  Additionally my take on these 2 competing Data access technologies is, if it's simple then use Linq to SQL, if it's complex and could change down the line use the entity framework.  I choose to use LINQ to SharePoint as I am using 7 tables to store all my timesheet task related data.  Below is the Entity Relationship Diagram (ERD) for the timesheet application.


Part 1 - Design & data storage (This blog post)
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part

More Info:
Updated: 25/02/2011 Laura Rogers wrote this article on the time card that is useful.
http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=113







Tuesday 11 January 2011

Microsoft Certified Professional Developer

I have been working on 2 CodePlex projects over the Christmas break.  I have been meaning to do the SharePoint 2010 exams for the last 6 months but with project deadlines this is the 1st chance I have really had.  I managed to pass the 70-573 & 70-576 this week.  They were actually quiet fun especially the 70-576 exam that was far more challenging.

I found the 70-573 (Application developer) exam much easier as the answers are more cut and dry whereas the architecture exam is fluffy in that multiple answers would work and I tend to lean towards the areas I would use to implement a solution, my method may not be optimal so i think i got stuck there a bit.  I found some of the terminology/wording confusing but overall they are good examinations of SharePoint knowledge.

Blog post after the 70-667 SP2010 Configuration exam blog post

Friday 7 January 2011

RBS Primer

Problem: Provide a quick overview of Remote Blob Storage (RBS).

Overview:  When uploading files into a document library or list, the data is stored in the content database, this consists of meta data and the binary blob.  All content database storage is done using SQL Server, the recommended maximum threshold for content databases is 200GB (they can be bigger depending on you IO speed on your SQL Server - this applies to SP2010 (pre SP1), MOSS had a recommended 100GB content db limit from MS) these binaries can make your content database big that results in expensive storage as the disks are usual RAID 10, backup operations can take a long time and speed of data access/write can slow down.
You can configure RBS on a per content database on your farm using 'storage providers'.  There are 3rd party suppliers that provide the storage and the 'storage provider' and they make claims of saving clients up to 90% of their content database size.  You can also store the blobs on files systems.  RBS is useful for medium and large farms, it can be applied retrospectively be setting up RBS on a content db and performing a backup and restore.  EBS was performed at a farm level whereas RBS is content database level.
RBS is only a good candidate if your content database has blobs, the blobs are individually bigger than 256KB and you content database is over 100GB.  RBS is more useful on really big content db's.  Content database size is bizaarly calculated by including the content db size plus the RBS storage.
Tip: RBS is similar to EBD in MOSS except it's applied at a content db level.
Tip: RBS requires SQL Server 2008 R2 (I'm not sure if SQL 2008 will work).  FILESTREAM needs to be activated on SLQ Server for RBS to work.
Tip: SP 2010 has a hard limit of 2GB per item, this is due to SQL server using the varbinary (max) column type for storage and IIS recommended max app pool sizing.  Changing to RBS will still enforce a maximium size of 2GB per file.
Tip: RBS is setup on the farm using PowerShell there is no CA UI interface.

What RBS gives you:
  1. Performant SharePoint farm - the most common bottle neck is SQL Server in SP2010 farms, by reducing the blobs being stored and retrieved within the content database you get better performance on your farm.
  2. Lower cost of disk storage - SQL is normally stores data on your SAN, these disks are expensive and usually RAID10.  Additionally, the backup/HA/mirroring/clustering will also be expensive disk space.  Using RBS moves all your storage to cheaper disk storage.  Furthermore, you normally use an external RBS supplier so if you RBS storage is growing you only pay for the current storage unlike in SQL you would need to have the space to provide for future growth.
  3. Faster DR - Your farm backup and recovery process will generally be faster but more complex.  As the content db's are smaller you can backup and recover quicker however you now have to ensure RBS data is part of your DR planning.
  4. Dead link data - you need to run RBS tools to delete data from RBS that has already been removed by SP2010.
Source: Srini Acharya & Burzin Patel - Externalising BLOB storage in SP2010 slide deck.  This slide shows the process of saving a document using RBS and SP2010.

Providers of RBS:
  • AvePoint
  • OpenText
  • EMC (EBS based I believe)
  • StoragePoint (Metalogix) EBS or RBS based.
More Info:
http://technet.microsoft.com/en-us/library/ff628254.aspx

Tuesday 4 January 2011

Developer dashboard custom scoped monitoring

Problem: You have poor performing code how do you identify the bottleneck.
Initial Hypothesis: Use the SPMonitoredScope to determine how long code takes to execute.
Resolution: Turn on the developer dashboard, deploy your custom code that includes monitored code.
Exampleusing Microsoft.SharePoint.Utilities 
using (new SPMonitoredScope(“My Scope Name”))
{
   doSomeWork();    //  Shows in the ULS and the Developer dashboard
}
Tip: You can't use SPMonitorScope in sandbox solution code.  If you try us 'SPMonitorScope' your VS project won't compile and you will get the error: 'Microsoft.SharePoint.Utilities.SPMonitoredScope' is inaccessible due to its protection level.

More Info:
Post explaining how to turn on the developer dashboard
MSDN about using SPMonitorScope (like stopwatch in .NET)

SharePoint 2010 Editions

Compare SharePoint 2010 Editions
SharePoint 2010 Development Stack Platform
Licencing SharePoint 2010

Themes and branding

Themes can be set programatically and allow for an easy method to change corporate colours.
Themes combined with master pages allow for a fast way to change pages and colours.  It is faster than the generally prefered method of altering the css
Theme's reference