Hello! Welcome to my blog section “SharePoint 2010 Apps for n00bs”. This mini-section is all about building SharePoint apps obviously but the bigger point is to highlight where SharePoint can be used to build your generic app with faster & better than traditional development frameworks. Given I’m assuming no experience with SharePoint previously I’m starting at the very beginning – something even one’s Grandma could follow, if she were that way inclined.
Most of SharePoint apps are designed for a web interface but it’s ultimately just an apps platform; one that can be extended into mobile, rich-client apps, or you can use SharePoint to just build web-service end-points. My focus in this is going to be web-based apps and as I said we’re going to start very basic (oh so basic) with objects created manually by hand and build up from there. No custom-code; no complex solutions – the idea just for now is to build a simple application using as many major parts of SharePoint as possible to get an understanding of what the platform is good at doing, then to look at automating some of it all later. A bit like how you can build a SQL database in a nice GUI, or you can generate your own scripts to do the same – for now we’re living in shiny GUI land.
So What do SharePoint?
We have 4 major focus areas we’re going to start with to demonstrate building apps in SharePoint. In this blog there are blogs & video-blogs for:
- Storing and listing our data.
- Reporting on and analysing our data.
- Forms for manipulating our data.
- Workflows to automate our data changes and drive system events.
Pretty much any system of any type needs all four of these activities; my idea is to show you how SharePoint does them in its own unique & awesome way. At the end of all the workshops/demos we’ll have a basic system that provides some functionality you would otherwise have to write by hand, except it’ll take us no more than 30 minutes. And that my friends is why SharePoint rocks – because you can build this stuff very quickly if you have to. Sure it’ll be rough at the beginning but some very shiny sites run SharePoint – perhaps none more so than http://www.ferrari.com as just one example but just for now we’re covering the basic building-blocks – later we’ll look at making Ferrari-type systems in SharePoint too.
But Why Build on SharePoint?
There are lot’s of reasons; speed of development is one, but my favourite would probably be that the programmer doesn’t need to be a system admin too. Your code is the same on 1 server as 100 – good programmers tend to make rubbish system admins and visa versa (I’m generalising of course), so it’s good to keep the two camps separate if possible and SharePoint does that nicely.
Genius code & content reuse is another, but that’s for another day.
As this is a series for “n00bs” (newbies/new people) we’ll going to do everything by hand. Later we’ll look at automating all of these and how it’s possible to reuse functionality in SharePoint in very cool ways that set it apart from other app-building frameworks. We’re looking at stuff that’s just using the SharePoint foundation framework principally – if you want to try this out you can either get SharePoint 2010 Foundation for free (not everything we do here will work in the freebie version), or get yourself a SharePoint online account for “proper SharePoint”.
Example Application (The Pet Shop)
For all of these demos we’re going to be building a very simple application. Let’s pretend we have a friend that has a pet store and we had the genius idea of automating his paper-based sale tracking system. So anyway, for a first version it needs to do the following:
- Keep track of inventory in the store – food, actual pets, etc.
- As above, but for sales too.
- Show basic report of what has sold the best.
- Automate stock-control.
- Not look & feel terrible.
This is very basic indeed, which is perfect for this series. For the time-being, a sale just consists of entering a person’s name & email-address + quantity into a basic table that relates to an item.
Anyway, the result needs to be that our friend could run his pet-shop better with a SharePoint cat-themed application even a n00b could build. Do not underestimate the power of learning with cats.
To get started let’s have an idea what it would take to build our pet-store with normal programming languages. Remember, SharePoint isn’t looking to replace these but just in some scenarios it’s quicker/better and that’s what this is all about. There are some situations where SharePoint would be a nightmare to use over some other languages but for some stuff it’s a breeze to do in SharePoint land.
Building in Bespoke
If we were to hack this out in ASP.Net for example, this application specification would imply the following development work:
- Storage in a database.
- Code to save & load from it DB.
- Custom written forms to interact with the data.
- Reporting tools – either implement existing or write bespoke.
The data structure would look something like this (with ID fields, created & last-edited dates too):
This isn’t much, but certainly this is not an insubstantial amount of coding to do would it be done in ASP.Net or PHP or whatever is your programming language/framework of choice. Here’s how the application would be built if it were bespoke; the textbook N-tiered application setup, just like they taught you at college:
Building in SharePoint
Building this same model in SharePoint however is much easier – it’s all there with the toys baked into SharePoint 2010:
Click on each subject to learn how to do it, although if you’re really new to this you might want to start with “lists”.