1. Trang chủ
  2. » Công Nghệ Thông Tin

Wrox Beginning SharePoint 2010 Development phần 2 docx

50 353 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 50
Dung lượng 3,31 MB

Nội dung

SharePoint Central Administration  19 In the world of SharePoint, data can mean many different things. For example, it might mean con- necting a Microsoft Access 2010 database to SharePoint by way of Access Data Services by creat- ing a database in Access and then publishing it to SharePoint. It might also mean interacting with SQL Server data, or interacting with service endpoints through BCS to integrate with LOB and non-Microsoft systems. Further, it might also mean leveraging SQL Server Reporting Services or PerformancePoint Server to bring enhanced BI into your solutions. And, lastly, the data might actu- ally come from a SharePoint list (where users manually enter the list data, and you programmati- cally code against it). Each of these examples will require different ways of interacting with data within SharePoint. However, each of them will have different implications for you. For example, you’ll find it very easy to create read/write SharePoint lists that connect to SQL Server using a connection string. However, you’ll need to think more deeply about authentication to an outside LOB system when connecting using the BCS. Also, you could leverage the SharePoint client object model or an out-of-the-box Web service to interact with SharePoint list data, so you’ll need to understand how you design your appli- cation to work with that data. You should be interested not only in how you connect to your data sources but also in how you interact with them. For example, in many cases, you will want to query data when you have created a connection to it from within your SharePoint site. This may mean creating SQL queries or, more optimally, it may mean leveraging LINQ in your applications. Because SharePoint 2010 has the capability to abstract objects such as list data into strongly typed data objects, you can use LINQ to query that data within your applications, making interacting and managing your data a much more efficient process. In a nutshell, those who are new to SharePoint will find a myriad of opportunities to select when interacting with data. And those who were familiar with SharePoint 2007 will be extremely happy to discover many advancements in SharePoint 2010. SHAREPOINT CENTRAL ADMINISTRATION While this is not a book on administration, this section provides a high-level introduction to the topic. As a developer, there may be cases where you want to leverage the capabilities built into SharePoint Central Administration. After you install SharePoint 2010, a separate site collection is created for your use in performing the different administrative functions that you might do on a daily basis. This site collection is called the Central Administration site. This site collection is run as its own Web application in IIS and is separate from the site collections you create. But it is still the central point of administration for your SharePoint site. All farm server administrators can access this site, and, much like your regular SharePoint sites, you can edit and customize the Central Administration site. Many of you who will develop for SharePoint 2010 will also be the person who administers certain aspects of your SharePoint site. For example, this might mean that you would have to install and configure SharePoint, understand how to upgrade some of your solutions from SharePoint 2007 to 2010, or even create new Web applications or sites using the Central Administration functions. And, while this book is not necessarily meant to be a comprehensive overview of SharePoint 2010 Central Administration, it does provide an introduction. 584637c01.indd 19 5/2/10 7:12:02 PM 20  CHAPTER 1 IntroductIon to SharePoInt 2010 With this in mind, Figure 1-15 shows the SharePoint 2010 Central Administration site that lists the core administration features. Within the Central Administration site, you can manage a number of activities, which are broken out into the following eight areas: Application management  Monitoring  Security  General application settings  System settings  Backup and restore  Upgrade and migration  Configuration wizards  FIGURE 115 SharePoint 2010 Central Administration Application Management Application Management is the place where you can, for example, create new Web applications and site collections, and, more generally, manage the services that are installed on your SharePoint site (for example, Excel Services or BCS) and manage your content database. (The content database stores SharePoint data, and is the reason why SharePoint takes a dependency on SQL Server upon instal- lation.) Using the application management options, you can accomplish tasks such as modifying the properties of the content database, activating features, creating new site collections, and so on. 584637c01.indd 20 5/2/10 7:12:02 PM SharePoint Central Administration  21 Monitoring Monitoring is the central place within Central Administration to manage reporting, monitoring, and the status of your SharePoint site. The Monitoring site is broken down into three areas: Health status  — Health status provides a place for you to manage the status of different ser- vices on your SharePoint server (such as Visio services or farm-level services). You can see which services are failing, for example, through reports that are surfaced here. Health status also enables you to define rules (such as the scheduling of application pool recycles). Timer jobs  — Timer jobs enable you to define specific jobs to run, and when to run them (such as search crawl log cleanup or audit log trimming jobs). Reporting  — Reporting provides you with a set of tools that enables you to create and man- age reports, run diagnostic logging, and view reports on various server-side activities. Security Security covers a number of areas, including the management of administrator accounts, the config- uration and management of service accounts, the management of password change settings and poli- cies, and the specification of authentication providers, trusted identity providers, antivirus settings, blocked file types, Web part security, self-service security, and secure token services. The security settings here supplement the security in the main browser UI, where users and site administrators can assess specific permissions that relate to users for their sites. General Application Settings The General Application Settings site is where you configure a number of general options for your SharePoint site collections and sites. For example, you’ll often find that you’ll want to have the capa- bility for your SharePoint site to send mail to users. You configure these options from within this part of the site. Also, in the context of WCM, you may want to manage a number of deployment and approval options (such as content deployment location and approvers of that content). You also manage that type of activity from within the General Application Settings. In general, think of this site as the generic settings for your SharePoint sites. System Settings Conversely to using the SharePoint site settings, you may also want to configure more server-centric settings such as farm-level or access features, or even manage the services (for example, Excel Services) that are available to users of the site collection. You manage these types of settings from within the System Settings site. Backup and Restore At some point, you may find that you must back up and restore your SharePoint site. The “Backup and Restore” features within Central Administration enable you to create and schedule regular 584637c01.indd 21 5/2/10 7:12:02 PM 22  CHAPTER 1 IntroductIon to SharePoInt 2010 backups for your SharePoint, perform ad hoc backups, restore from a previously backed-up SharePoint site, and so on. Essentially, this is your point of entry if you want to ensure that you have a failover plan for backing up a site. While you think you may never need this, there is sometimes the convergence of heightened per- missions settings with user error, which can result in new users deleting parts of a site by acci- dent — which may include something you’ve created as a developer. Upgrade and Migration At some point, you may find yourself wanting to upgrade from one version of SharePoint to another — for example, moving from SharePoint Standard to SharePoint Enterprise. This requires a license and a server-driven process to upgrade one version of SharePoint to another. You can do this type of action from within the “Upgrade and Migration” part of the Central Administration site. Note that you can also install service patches and check on installation and upgrade progress from within this part of the administration toolset. Configuration Wizards The Configuration Wizard is simply a step-by-step wizard that configures your SharePoint server for you. You should have seen this wizard when you first installed SharePoint. However, if you want to run it again after installation to change some of the configurations on your SharePoint server, you can do so. SUMMARY This chapter provided a first look at SharePoint — both for those who have never seen it and for those who are returning SharePoint developers — and answered the question of what it is and what the high-level architectural pieces and capabilities of SharePoint are. In this chapter, SharePoint was broadly defined as a business productivity platform for the enterprise and the Internet. More specifically, for the developer (and in the context of this book), this definition was recast as a platform that supports developer productivity, has extensive platform services, and can support multiple deployment options. One of the key takeaways from this chapter should be that SharePoint is a rich developer platform. There are an abundance of APIs, an object model, and a powerful set of services that can be lever- aged to create some very compelling applications. There is also a great set of tools that will support your efforts at evolving or improving your SharePoint development skills. In Chapter 2, you will begin to work through a number of exercises that cover installation, configu- ration, and development. 584637c01.indd 22 5/2/10 7:12:02 PM Summary  23 EXERCISES 1. Define what SharePoint is for both the end user and the developer. 2. What are the three ways in which you can look at SharePoint from a developer’s perspective? 3. What are some of the key developer features in SharePoint 2010? 4. What are some of the key administrative features in SharePoint 2010? 584637c01.indd 23 5/2/10 7:12:02 PM 24  CHAPTER 1 IntroductIon to SharePoInt 2010 WHAT YOU LEARNED IN THIS CHAPTER  ITEM DESCRIPTION SharePoint Business productivity platform for the enterprise and the Internet. SharePoint for the Developer SharePoint 2010 is about developer productivity, the availabil- ity of rich platform services, and the capability to manage and deploy your applications with maximum flexibility. SharePoint Foundation Core edition for SharePoint 2010. It ships as a free down- load. (This was called Windows SharePoint Services 3.0 in SharePoint 2007.) SharePoint Server 2010 Enterprise edition that is covered in this book, and will be referred to as SharePoint throughout the book. (This was called Microsoft Oce SharePoint Server (MOSS) in the 2007 release.) SharePoint Architecture SharePoint is built on ASP.NET and installs on a number of 64-bit Windows operating systems. SharePoint Online Hosted version of SharePoint that is managed by Microsoft for you in the cloud. SharePoint Central Administration The site collection that you use to administer your SharePoint site. RECOMMENDED READING There is a vast array of resources out there to get you started on developing for SharePoint 2010. Following are some key resources: MSDN SharePoint Developer Center at  http://msdn.microsoft.com/en-us/sharepoint/ default.aspx Channel 9 SharePoint Developer Learning Center at  http://channel9.msdn.com/learn/ courses/SharePoint2010Developer/ SharePoint 2010 SDK at  http://msdn.microsoft.com/en-us/library/ ee557253%28office.14%29.aspx 584637c01.indd 24 5/2/10 7:12:02 PM Getting Started with SharePoint 2010 Development WHAT YOU'LL LEARN IN THIS CHAPTER: Getting to know the core developer pillars in SharePoint 2010  (including tools, platform services, and deployment options) Becoming familiar with the primary tools to develop and deploy  SharePoint solutions Performing a number of installation, configuration, and simple devel-  opment tasks Understanding site-level security settings within SharePoint  In Chapter 1, you learned about some of the basics of SharePoint 2010, including what it is and some of the high-level features for developers. You also became familiar with some of the basic architectural concepts, as well as the overall look and feel of a SharePoint site — both the SharePoint site you would interact with on a daily basis and the Central Administration site. This chapter dives deeper into the developer features of SharePoint 2010, building on the discussion from Chapter 1. This chapter also walks you through some how-to examples that show you some basic Web-based actions, and then progresses into some more in-depth devel- opment samples. This chapter addresses some of the technical skills that you can expect to learn and hone as you get more involved with SharePoint development. Thus, the goals of this chapter are twofold: To get you more familiar and comfortable with some of the core developer features of  SharePoint To begin to show how you can programmatically interact with SharePoint  2 584637c02.indd 25 5/2/10 7:12:12 PM 26  CHAPTER 2 GettinG Started with SharePoint 2010 develoPment So, let’s jump in and get started by talking about some of the core developer features for SharePoint. CORE DEVELOPER FEATURES FOR SHAREPOINT 2010 As mentioned in Chapter 1, the major features for the SharePoint developer can be broken down into three main categories: Developer productivity  Rich platform services  Flexible deployment  These three areas, in turn, can be broken down into greater detail. By doing so, you’ll see that there exist a number of developer-centric features you can take advantage of. Developer Productivity For developer productivity, a significant advance for SharePoint 2010 is the tooling support that ships with Visual Studio 2010. Included with Visual Studio are a number of project-level templates and item-level templates that you can use to create and deploy a wide array of features and solutions to SharePoint. For example, Figure 2-1 shows the different templates available to you, which are described in the following list: Import SharePoint Solution Package  — This option imports a SharePoint Solution Package (a file with a .WSP extension), the standard way of building and deploying SharePoint solu- tions into your current project that can be redeployed into another SharePoint instance of your choice. State Machine Workflow  — This represents a workflow that is based on the system or appli- cation state and can be deployed to SharePoint. It leverages Windows Workflow and is a spe- cial template that enables automated deployment to SharePoint. Event Receiver  — This allows you to create server-side code that can be called and executed by a feature or solution. Event receivers are often created to respond to a user action (for example, when a user adds an item to a list, an event is triggered to update a log entry). Empty Project  — An empty SharePoint project can be used as a blank starting point for proj- ect development. You can add lists, Web parts, event receivers, and so on, to an empty proj- ect, and then deploy it to SharePoint. Module  — This provides a way to deploy a specific file to a SharePoint site. It allows for the bundling and provisioning of files for a feature. So, when the feature is activated, the files are deployed to the specified file location. Business Data Catalog Model  — This is used to create connections to line-of-business (LOB) systems. This is similar to what is created by SharePoint Designer 2010 (see Chapter 8), but Visual Studio uses a more code-centric approach for more advanced and complex connectiv- ity scenarios. 584637c02.indd 26 5/2/10 7:12:12 PM Core Developer Features for SharePoint 2010  27 Content Type  — A custom content type (for example, a template, document, list column, and so on) can be repurposed across SharePoint. Sequential Workflow  — This represents a workflow that works in a sequential manner through a set of activities and can be deployed to SharePoint. It also leverages Windows Workflow and is a specific template that enables automated deployment to SharePoint. List Definition  — This is used to define and deploy a list to a SharePoint site. For example, you can define fields or columns when you create the list definition. Import Reusable Workflow  — This is used to import a declarative workflow (only the XML part of the declarative workflow) that has been created by SharePoint Designer 2010, and converts it into a code workflow that a developer can then further customize. Site Definition  — This is used to define and deploy a site into a site collection. Your site can also contain elements such as lists or Web parts — items that are available from the Project Item templates. Visual Web part  — This is an ASP.NET-based Web part that you can use to build and deploy Web parts using drag-and-drop controls. You can then write ASP.NET event handlers for those controls. FIGURE 21 Visual Studio 2010 project templates 584637c02.indd 27 5/2/10 7:12:12 PM 28  CHAPTER 2 GettinG Started with SharePoint 2010 develoPment NOTE You can also add item-level templates after you create a Visual Studio project, but that will be examined in greater detail in Chapter 4. Of note is the fact that you can also extend Visual Studio 2010 SharePoint templates to create more custom project-level or item-level templates. For example, one interesting community example is the creation of a Visual Web part project template that can be deployed to SharePoint Online via a sandboxed solution. For your SharePoint development, you may find yourself using not only Visual Studio 2010 but also SharePoint Designer 2010, which is particularly useful for a number of key developer tasks (for example, building rules-based or declarative workflows, creating and editing master pages and page layouts, and creating connections to LOB systems via an ADO.NET or Web service connection). Figure 2-2 illustrates the new SharePoint Designer 2010 interface, and, in this particular instance, shows the creation of an external content type that maps data sources to a SharePoint list (which is called an external list). FIGURE 22 SharePoint Designer interface 584637c02.indd 28 5/2/10 7:12:12 PM [...]... into the SharePoint 20 10 584637c 02. indd 30 5 /2/ 10 7: 12: 13 PM Core Developer Features for SharePoint 20 10 ❘  31 folder hierarchy (now referred to as the SharePoint root), or you can deploy ASP.NET and WCF services to Internet Information Server (IIS) — you’ll see this in detail in Chapter 10 NOTE  ​n SharePoint 20 07, the server file system was often called the I SharePoint hive.” In SharePoint 20 10, ... ❘  37 Following is the baseline software you need to set up your development environment: ➤➤ A Windows 64-bit-compliant operating system (for example, Windows Server 20 08 R2 or Windows 7) ➤➤ SharePoint Foundation 20 10 and SharePoint Server 20 10 ➤➤ SharePoint Designer 20 10 ➤➤ Microsoft Office (Professional Plus) 20 10 ➤➤ Visual Studio 20 10 ➤➤ NET Framework 4.0 ➤➤ Microsoft Expression Blend (optional,... use, as shown in Figure 2- 12 Click the “Run the SharePoint Products and Technologies Configuration Wizard now” checkbox and click Close The Configuration Wizard is automatically invoked upon closing this dialog 584637c 02. indd 42 5 /2/ 10 7: 12: 14 PM Your Development Environment  ❘  43 Figure 2- 11  SharePoint 20 10 license terms Figure 2- 12 Configuration Wizard 6 7 584637c 02. indd 43 SharePoint works through... Figure 2- 4  shows the developer dashboard 584637c 02. indd 29 5 /2/ 10 7: 12: 12 PM 30  ❘  Chapter 2   Getting Started with SharePoint 20 10 Development Figure 2- 4  Developer dashboard There are other features that you’ll see throughout this book within the area of developer productivity But, from a high level, you can expect to see great opportunities to build your SharePoint applications using Visual Studio 20 10. .. familiar with SharePoint 20 10, let’s walk through a few exercises 584637c 02. indd 45 5 /2/ 10 7: 12: 14 PM 46  ❘  Chapter 2   Getting Started with SharePoint 20 10 Development Working with SharePoint Sites While this book is about development, you will want to learn some of the fundamental aspects of SharePoint administration Having some knowledge in this space will help you quite a bit in your development. .. model, this type of solution development will broaden the pipeline and really open up SharePoint development opportunities Figure 2- 6  shows the Solutions Gallery, where you upload and activate your custom solution 584637c 02. indd 33 5 /2/ 10 7: 12: 13 PM 34  ❘  Chapter 2   Getting Started with SharePoint 20 10 Development Figure 2- 6  Sandboxed Solutions Gallery Key Skills for the SharePoint Developer There... Windows 20 08 R2 (64 bit), you can use the Hyper-V Manager to manage and run your virtual machines The environment is a role you set up when configuring your Windows operating system For example, after you install Windows Server 20 08 R2, you can add the Hyper-V role through the Server Manager 584637c 02. indd 37 5 /2/ 10 7: 12: 13 PM 38  ❘  Chapter 2   Getting Started with SharePoint 20 10 Development Figure 2- 8 ... the resources available to the virtual image 584637c 02. indd 41 5 /2/ 10 7: 12: 14 PM 42 ❘  Chapter 2   Getting Started with SharePoint 20 10 Development Installing SharePoint Server 20 10 At this point, you should have successfully created and mounted a virtual machine, and you should have configured the network switch so that you can remote into your development environment You can continue to work with... Studio for your SharePoint 20 10 development NOTE  ​ hile Visual Studio 20 10 and SharePoint Designer 20 10 should be W treated as your primary ways of developing for SharePoint, the Expression Blend Suite also offers some value for the developer when building advanced user interfaces (UI) for SharePoint, such as a Silverlight-based UI Rich Platform Services In terms of rich platform services, SharePoint has... for SharePoint However, with SharePoint 20 10, you can now develop on a client OS like Windows 7 The flip side to this, though, is that SharePoint 20 10 requires a 64-bit machine on which to run Another developer-centric feature in SharePoint 20 10 is the developer dashboard, which provides statistics and reports about code that is executed against your SharePoint site Those who have coded against SharePoint . features in SharePoint 20 10? 4. What are some of the key administrative features in SharePoint 20 10? 584637c01.indd 23 5 /2/ 10 7: 12: 02 PM 24  CHAPTER 1 IntroductIon to SharePoInt 20 10 WHAT.  http://channel9.msdn.com/learn/ courses /SharePoint2 010Developer/ SharePoint 20 10 SDK at  http://msdn.microsoft.com/en-us/library/ ee55 725 3 %28 office.14 %29 .aspx 584637c01.indd 24 5 /2/ 10 7: 12: 02 PM Getting Started with SharePoint. handlers for those controls. FIGURE 2 1 Visual Studio 20 10 project templates 584637c 02. indd 27 5 /2/ 10 7: 12: 12 PM 28  CHAPTER 2 GettinG Started with SharePoint 20 10 develoPment NOTE You can also

Ngày đăng: 07/08/2014, 17:21

TỪ KHÓA LIÊN QUAN