Most of you have seen the videos about the reason for SharePoint, the concepts of storing and working with data. Now it’s time to start talking about SharePoint and how development works. After describing development concepts within this and the next video you are ready to implement SharePoint applications.
The concepts are split in 2 videos where this video describes SharePoint applications, APIs, tools and platforms. You will see that there is a big difference between ASP.NET and SharePoint which leads us to the second video showing the concepts of customizations and deployment.
Capabilities & Customizations
SharePoint already allows users to create new sites or to customize them with list and libraries, and to customize the site’s appearance and functionality. Anyway there is a need to extend SharePoint’s core capabilities even further to meet your companies’ business requirements. This can be the implementation of a process, accessing external data, branding the user interface or just working with data in a different way. You can use building blocks to create SharePoint applications. Building blocks are mentioned in different MSDN articles but the guy who nailed it down is Eric White. He wrote an excellent post creating structure in the variety of languages, frameworks, object models, and tools.
- SharePoint is installed on Windows Server 2008 SP2 or Windows Server 2008 R2. Windows 7 or Vista can be used for development but I will tell you more about that in a few minutes.
- It’s built on .NET Framework 3.5 and ASP.NET 3.5 with Service Pack 1.
- SharePoint uses Internet Information Services 7.0 or 7.5 and requires SQL Server 2005 SP3, SQL Server 2008 SP1 or SQL Server 2008 R2.
- With every SharePoint versions comes the ability to store content e.g. in lists or sites and to work with content using e.g. Web Parts.
- Additionally Service Applications provide more (complex) functionality like accessing external data using ‘Business Data Connectivity Services’
- The available Service Applications depend on the version of SharePoint. Only the Enterprise version includes all Service Applications like ‘Business Data Connectivity Services’, ‘Managed Metadata’ or ‘Access Services’.
If you want to extend the core capabilities of SharePoint you can use building blocks to create SharePoint Applications.
Please note that although SharePoint on-premise and SharePoint Online have concepts and functionality in common there are a few differences affecting development. You can use this guide to learn development for both scenarios but SharePoint Online requires a few tasks not mentioned in this training.
In every version of SharePoint there are basic building blocks like creating Web Parts, Columns and Lists or modifying the UI. In addition to that there are building blocks like extending the Business Connectivity Services or User Profiles which depends on the version of SharePoint.
For example you can create an application running on the server including new lists for storing data, Web Parts for adding functionality, features to change the UI and new templates for web content. You can also create a client application accessing list data which runs on a computer where SharePoint doesn’t need to be installed.
In general you want to automate a process, enhance someone’s work and make people more productive. In detail each building block includes programming tasks like reading lists and external content or updating sites.
SharePoint comes with a lot of capabilities and there is nearly no company using all the features available. Anyway there are business needs like integrating a custom process or branding the UI. Based on these developer scenarios you can use different building blocks to create SharePoint applications. In order to create SharePoint applications you can use different APIs and developer tools on different platforms. Even though this looks familiar to ASP.NET developers there are a lot of varieties in the development and deployment process. Because of that the difference between ASP.NET and SharePoint is the most important part of the video.
Content which is stored in SharePoint resides in Content Databases. You can extend SharePoint with Server Applications using the Server OM. They are required to run on a server where SharePoint is installed. SharePoint includes Web Services which can be used in Client Applications via SOAP or REST. It’s also possible to write your own Web Services extending the possibilities of the standard ones. Back with SharePoint 2007 this was the only way to implement applications which can run on a computer where SharePoint wasn’t installed.
- The Server OM offers the most extensive set of options but requires a machine with SharePoint 2010 to run.
- The Client OM has the most limited set of options for extending SharePoint 2010 but runs on machines without SharePoint 2010 and has a better performance compared to Web Services because of batch requests and because all operations are performed asynchronously.
- Web Services provide a fuller range of capabilities than the Client OM and is also usable on machines without SharePoint 2010 but lacks performance and functionality (exception handling) compared to the Client OM.
When it comes to SharePoint 2010 development a lot of frameworks, programming languages / techniques / conventions or markup languages are mentioned and it can be quiet difficult to find out where to start. In order to implement SharePoint applications and to use its APIs you need a few years of experience with the .NET Framework and ASP.NET. This includes its concepts as well as applications written in C# or Visual Basic. With these backgrounds you will be able to create SharePoint applications like Web Parts with some training. Having experience with LINQ can be helpful but isn’t required to start. First it’s important to understand the basics of SharePoint development and to be confident implementing basic applications like Web Parts. If you have a strong basic knowledge you can extend your skills depending on your interest or your employer’s requirements: You can deep dive into workflows, services or branding. Each of the building blocks for SharePoint 2010 keeps you busy for months... on its own.
So instead loosing focus it’s better to concentrate.
SharePoint 2010 can only be installed on the 64-bit version of Windows Server 2008, Windows 7 or Windows Vista. If you want to set up a production environment you need to use Windows Server together with SQL Server 2005 or 2008. If you want to create a development environment you can use Windows 7 or Vista but I don’t recommend it. First of all you want to have a development environment close to your customers’ environment so you will see infrastructure problems early. Second implementing for different customers with one Windows 7 environment will slow down your performance. And third SharePoint 2013 doesn’t support Windows 7 as a development environment.
If you have the choice use virtualization either on a dedicated server or (if you’re skilled) on your working computer / laptop. You can easily exchange virtual images with your colleagues or create and restore backups. If you virtualize your development environment you can’t use Virtual Server and Virtual PC since they don’t support 64bit guest operating systems. An alternative is Hyper-V or VMware.
Right now we know APIs, languages and platforms. There are also tools.
SharePoint offers 2 different tools to create customizations: Visual Studio 2010 and SharePoint Designer 2010.
SharePoint Developer Tools for Visual Studio 2010 - Back in the days where SharePoint 2007 was released there was a lack of tools you could use to develop solutions. With SharePoint 2010 we now have a robust set of tools including project templates and project item templates. As a developer you can implement any scenario you could imagine using code. You can create extensible, reusable solutions and utilize source code repositories. SharePoint development requires a lot of XML declarations and the Visual Studio tools hide them in the background for beginners while allowing advanced users to modify it. Furthermore they help to create solution packages (next presentation) which can be deployed to / retracted from SharePoint. SharePoint Developer Tools for Visual Studio 2010 are robust and should be used by a developer.
SharePoint Designer - SharePoint Designer 2010 is a free tool that allows you to create no code solutions including
- Customization of SharePoint sites and lists
- Creation and export of workflows
- Modeling of access to external data sources
You can rapidly create customizations but it’s limited because of using no code. SharePoint Designer should be used by advanced users since it can have implications e.g. on the deployment process of applications (solutions) or the migration process to the next version of SharePoint.
At this point we have APIs, languages, platforms and tools.
There is a difference between ASP.NET and SharePoint and it will have implications on how you develop customizations and how you deploy them.
Most of your time as a SharePoint developer you will extend its capabilities using the Server OM. The following slides and differences apply to server applications.
Right now SharePoint almost feels like a usual ASP.NET application including lots of functionality. There is a scalable environment with Web Servers and a SQL Server. But as mentioned earlier the SharePoint Developer Tools for Visual Studio 2010 are supporting a developer by hiding XML declarations and by deploying so called solutions to SharePoint. And that’s the point where most people struggle when learning SharePoint development.
Differences to ASP.NET
Although SharePoint is based on ASP.NET it does a lot of modifications to the ASP.NET request pipeline. We have configuration files stored at different locations applied one by one to the request. The request is then processed by HTTPHandler and HTTPModules doing authentication, building and sending the response or logging the request. There are a lot of reasons for SharePoint to modify the request pipeline… 3 are outlined below.
SharePoint stores many resources like content, configurations and templates inside a database and therefore not every request goes directly to the file system. So you need a step in the request pipeline handling this scenario.
ASP.NET modules only process ASP.NET related resource types like aspx files. SharePoint stores configuration and content files in a back-end SQL Server database to scale out the environment so SharePoint modules must allow processing any type of file (e.g. docx files). Storing configuration files inside an SQL Server database has an impact on the way a SharePoint application needs to be deployed to a SharePoint farm.
Within ASP.NET a developer creates Websites including a set of Web Parts and Controls. The server administrator puts the files on the Webserver and manages Internet Information Services (IIS). In larger organizations the database administrator creates or manages needed databases.
The administration of sites in SharePoint is not done by IT professionals since the process is abstracted and can be done using a browser. Power users, business unit managers or other people can manage sites. Because of that a more complex pattern of trust and permission control is required. In SharePoint users and authors can create ASPX pages with Web Parts and Controls. An administrator needs possibilities to limit the execution of code and therefore the request process needs modifications. It’s important to note that the SharePoint administrator also uses a Website called Central Administration to create databases and to manage IIS settings. It’s not done using SQL Server Management Studio or IIS Manager.
There are a lot of modifications done by SharePoint to the request pipeline and the 3 outlined are some of the important ones. Of course this has implications on your work as a developer.
But before you stop learning SharePoint this is easy.
These modifications have influence on the development and deployment of customizations.
- SharePoint content and configurations files are stored on the file system and in the databases. You need a way to figure out what belongs where.
- Right from the start there is a more complex environment including an Active Directory, SQL Server and several web servers.
- Authors can create, manage and delete sites or change functionality of a site.
- And everything you do as a developer has to be consistent across every server in the farm.
And here the SharePoint Developer Tools for Visual Studio 2010 help you to
- create solutions containing first all files of your implementation and second information where to put the files
- deploy the solution to SharePoint or retract it from SharePoint
- debug your solution
SharePoint has capabilities and a company has business needs. You can use building blocks to create applications meeting these needs. Therefor you have APIs, developer tools and platforms. The difference between ASP.NET and SharePoint impacts your work and leads us to the next video...
This presentation gave you an overview about SharePoint development while the next presentation will give you insights how customizations are put into solutions and features and how they are deployed to SharePoint.