SharePoint development environment

Microsoft spent a great deal of time during the release of Visual Studio 2010 and SharePoint 2010 creating first class tools, which integrate well and ensure that the build debug release cycle is as frictionless as possible. What this means for developers is that we have a single centralized location for SharePoint development.

When installing Visual Studio 2010, the default option is the Full Install. This installation option includes everything that you need to develop everything from Windows Applications in C++ to MVC Web Applications in C#. If you choose to install Visual Studio 2010 using the Custom installation option, be sure that the option for Microsoft SharePoint Developer Tools is checked (as shown in the following screenshot). This option gives you the tools to create, customize, and extend SharePoint sites.

SharePoint development environment

Although SharePoint can now be installed on Windows Vista SP1 and Windows 7 for development, most professional SharePoint developers strongly recommend not doing so. The main reason, and a truly valid one, is that when developing for SharePoint we will want to have a development environment that matches the production environment. If the production environment is two frontend web servers and one database server, we should duplicate this environment in our development environment.

However, this book focuses on the development of SharePoint websites for Windows Phone 7. Today, the Windows Phone 7 developer tools will not install on Windows Server 2008. Also, the Windows Phone 7 emulator will not run within a Hyper-V guest operating system. As a result of this, for this one aspect of SharePoint development running a Windows Vista SP1 or Windows 7, development environment is a good idea.

Note

Instructions for installing SharePoint on Windows Vista SP1 or Windows 7 can be found at the following URL:

http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx

The basic steps for installing the development environment are as follows:

  1. Install Windows Vista SP1 x64 or Windows 7 x64
  2. Install the Prerequisites for SharePoint 2010
  3. Install SharePoint 2010
  4. Install Visual Studio 2010 Professional or higher
  5. Install the Microsoft SharePoint 2010 SDK
  6. Install the Microsoft Windows Phone 7 Developer Tools

After installing SharePoint 2010 SDK, a new folder will appear in the Microsoft SDKs folder of the Start menu. This folder contains an HTML Welcome Guide, as well as a compiled help file containing the SDK Documentation. This documentation is very valuable to new developers in SharePoint.

The Windows Phone 7 Developer Tools will install the Windows Phone 7 emulator. Starting up the emulator will show only Internet Explorer Mobile installed on the phone. This book, with the exception of Chapter 1, was written using this emulator. There may be some differences between the emulator and the actual phones and as such, be sure to test all the sites developed with actual devices.

Chapters 3, 4, 5, and 6 will use this single server setup, but Chapter 7 will require using an authentication mechanism that doesn't work in Windows 7. For Chapter 7, having a separate Windows Server 2008 R2 development environment with SharePoint 2010 installed will be required. Having this setup will also help in these early chapters too, but remember that the Windows Phone 7 development tools will not run on Windows Server.

Visual Studio 2010 SharePoint project types

Visual Studio 2010 has the following 12 built-in projects for working with SharePoint 2010 sites:

  1. Empty SharePoint Project
  2. Visual Web Part
  3. Sequential Workflow
  4. State Machine Workflow
  5. Business Data Connectivity Model
  6. Event Receiver
  7. List Definition
  8. Content Type
  9. Module
  10. Site Definition
  11. Import Reusable Workflow
  12. Import SharePoint Solution Package

SharePoint root

The development activities that we will perform on SharePoint will require knowledge of the file system structure. Once SharePoint has been installed, the SharePoint root folder can be found on the file system at the following location:

<System Drive>:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14

This is where we find the default files for the site. When we add a Mapped Folder from Visual Studio (as depicted in the following screenshot) this is where it maps to. Mapped folders are commonly used folders in SharePoint, such as images and layouts. As these folders are so deep in the folder structure, this Visual Studio ability to add a mapped folder is a shortcut to the actual folder. When we deploy a SharePoint solution, the package manager deploys the files to the correct folder in the file system. As we develop applications for SharePoint, there will be detailed instructions for adding these folders where appropriate.

SharePoint root

The SharePoint root is important because within this folder is the very important TEMPLATESLAYOUTSMOBILE folder. This folder is where all of the mobile view files are housed, that the SharePoint team has developed to optimize for mobile viewing. A complete SharePoint Server 2010 installation has 43 items in this folder, which includes a web.config file in addition to 42 ASPX files.

The SharePoint team has developed these mobile page views to optimize for mobile viewing. Keep in mind that the primary goal of mobile browsing is to get the phone information and get out. Windows Phone 7 users are busy and on a cellular network, they don't have time to wait for fancy background images to download, and to adjust to multiple fonts is too much overhead.

At the time of writing, Windows Phone 7 is not recognized as a mobile device and the sites are displayed as their desktop versions. Adding an entry to the browser definition file was reviewed in Chapter 2, and by the time this book is in your hands, there should be an update to SharePoint that will include Windows Phone 7 in the default browser definition file.

For this book, we will assume that Windows Phone 7 will be treated like a mobile device in SharePoint.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.62.168