Introduction

Microsoft SharePoint is one of the biggest productivity frameworks released by Microsoft during the last 10 years. SharePoint 2013 is just one more step of a fabulous journey (that began in 2001) in the world of business productivity, collaboration, knowledge sharing, search technologies, enterprise social networking, and web content management.

From a developer’s perspective, SharePoint is a rich set of tools, classes, libraries, and controls that are useful for building custom solutions and apps focused on making business collaboration and enterprise social networking possible.

This book is an organized reference that provides the support that you need as you develop real and concrete SharePoint solutions and apps, taking advantage of the main libraries and tools offered by the product. This book covers the key topics in the field of developing on SharePoint, targeting both junior and intermediate programmers who want to improve their knowledge of SharePoint.

Beyond the explanatory content, each chapter includes clear examples and downloadable sample projects that you can explore for yourself.

Who should read this book

This book exists to help existing Microsoft .NET developers understand the architecture and core topics of SharePoint 2013 while building Internet, intranet, and extranet sites, as well as developing custom solutions and SharePoint apps.

Although most readers likely will have no prior experience with SharePoint 2013, the book is also useful for those familiar with earlier versions of SharePoint and are interested in getting up to date on the newest features.

Assumptions

This book expects that you have at least a minimal understanding of .NET development and object-oriented programming concepts. Moreover, to develop SharePoint solutions, you need to have a solid knowledge of ASP.NET and related technologies, such as Simple Object Access Protocol (SOAP), Microsoft Windows Communication Foundation (WCF), and web services. Although you can extend and customize SharePoint with most (if not all) .NET language platforms, this book includes examples in C# only. If you are not familiar with this language, you might consider reading Microsoft Visual C# 2012 Step by Step, by John Sharp (Microsoft Press, 2013).

With a heavy focus on web development and server-side technologies, this book assumes that you have a basic understanding of web platforms, application servers, and scalable software architectures. Some of the topics covered in this book require a robust knowledge of .NET Framework 4.x, and WCF in particular.

Who should not read this book

This book does not target IT professionals who are seeking information on how to deploy, configure, and maintain a SharePoint farm. However, some discussion about deployment is given throughout the book for the sake of completeness. Similarly, this book does not cover topics concerning site branding or public-facing Internet sites.

Organization of this book

This book is divided into six parts, each of which focuses on a different aspect or technology within SharePoint 2013.

Part I, “Getting started,” provides a quick overview of SharePoint 2013 and its data foundations, with a focus on using the technology as shipped, but not yet extending it with custom code.

Part II, “Developing SharePoint solutions,” focuses on the core libraries for developing solutions on the server side using the SharePoint Server Object Model and the new LINQ to SharePoint provider. It also focuses on developing for the client side, using the various flavors of the SharePoint Client Object Model and SOAP services. This part of the book is full of examples and code excerpts, and you can use it as a concrete reference for everyday solutions.

Part III, “Developing SharePoint apps,” covers how to develop SharePoint apps, which are some of the most interesting new features of SharePoint 2013 from a developer perspective. You will find a step-by-step guide about how to create various kinds of apps, as well as information about the new Representational State Transfer (REST) APIs introduced with SharePoint 2013 for consuming SharePoint from external apps. Moreover, you will learn how to develop remote event receivers to create apps capable of reacting to events happening in SharePoint.

Part IV, “Extending SharePoint,” provides deep coverage of the various techniques and extensibility points available for customizing and extending the native SharePoint environment. Four chapters full of realistic examples will help you learn how to create Web Parts, custom pages, and web templates. You will also learn how to take advantage of Business Connectivity Services (BCS) to consume external data sources.

Part V, “Developing workflows,” delves into workflow development. It starts with a brief introduction of Windows Workflow Foundation (WF) 4.0 and the new workflow architecture in SharePoint 2013, moving to workflows designed with SharePoint Designer 2013 or developed with Microsoft Visual Studio 2012. This part ends with more advanced topics, such as workflow forms, custom activities, and workflow management services.

Part VI, “Security infrastructure,” examines the security infrastructure of SharePoint from an architectural viewpoint, covering topics like authentication, authorization, and the claims-based approach, and delves into identity federation and custom claims-based scenarios. You will learn how to federate SharePoint 2013 with Windows Azure Access Control Services (ACS) and with a custom self-developed identity provider.

Finding your best starting point in this book

The different sections of this book cover a wide range of technologies associated with SharePoint. Depending on your needs and your existing understanding of the SharePoint platform, you might wish to focus on specific areas of the book. Use Table 1 to determine how best to proceed.

Table 1. Where to start

If you are

Follow these steps

New to SharePoint development or an ASP.NET developer

Focus on Part I, Part II, Part III, and Part IV, or read through the entire book in written order.

Familiar with earlier releases of SharePoint

Briefly skim Part I; Chapter 3 in Part II; and Part III if you need a refresher on the core concepts. Then read about the new app model in Chapter 8 in Part III; and be sure to read Part V and Part VI.

Interested primarily in developing workflows

Read Part II; Chapter 9 in Part III; and Part V.

Interested primarily in developing SharePoint apps

Read Part I; Chapter 3 and Chapter 4 in Part II; and Part III.

Most of the book’s chapters include hands-on samples that let you try out the concepts you’ve learned. No matter which sections you choose to focus on, be sure to download and install the sample applications on your system.

Conventions and features in this book

This book presents information using conventions designed to make the information readable and easy to follow.

  • In most cases, the book includes exercises for Microsoft Visual C# programmers.

  • Boxed elements with labels such as “Note” provide additional information or alternative methods for completing a task successfully.

  • Language keywords (apart from code blocks) appear in italic font.

  • A vertical bar between two or more menu items (for example, File | Close) means that you should select the first menu or menu item, then the next, and so on.

System requirements

You will need the following hardware and software to complete the practice examples in this book:

  • Windows 7 (x86 and x64), Windows 8 (x86 and x64), Windows Server 2008 R2 (x64), or Windows Server 2012 (x64)

  • Microsoft Visual Studio 2012 (Ultimate, Premium, or Professional)

  • Microsoft Office Developer Tools for Visual Studio 2012

  • A valid Microsoft Office 365 developer subscription

  • A computer that has a 1.6 GHz or faster processor (2 GHz recommended)

  • 1 GB (32-bit) or 2 GB (64-bit) RAM (add more RAM if running SharePoint on-premises in virtual machines)

  • 10 GB of available hard disk space

  • 5400 RPM hard disk drive

  • DirectX 9–capable video card running at a resolution of 1024×768 or higher

  • DVD-ROM drive (if installing Visual Studio from DVD)

  • Internet connection to download software and chapter examples

To run an on-premises SharePoint farm, you will need the following:

  • Windows Server 2008 R2 Service Pack 1 (SP1) (x64) or Windows Server 2012 (x64)

  • SQL Server 2008 R2 SP1 (x64) or SQL Server 2012 (x64)

  • A computer that has at least a 64-bit four-core processor

  • A minimum of 8 GB RAM (16GB RAM recommended)

  • 80 GB of available hard disk space

Depending on your Windows configuration, you might require local administrator rights to install or configure Visual Studio 2012, SQL Server 2008/2012, and SharePoint 2013 products.

Code samples

You can download the code samples for this book from the following page:

http://aka.ms/SP2013DevRef/files

The code sample ZIP file includes a child ZIP file for each chapter, which provides sample projects. In particular, you can find the following:

  • Ch-03-Data-Provisioning.zip. Includes a single Microsoft Visual Studio 2012 project, which provisions some data structures (content types and list definitions).

  • Ch-05-Server-Object-Model.zip. Includes a single Visual Studio 2012 project illustrating how to use the SharePoint Server Object Model.

  • Ch-06-LINQ-for-SharePoint.zip. Includes a single Visual Studio 2012 project showing how to use LINQ to SharePoint.

  • Ch-07-Client-Side-Technologies.zip. Provides four Visual Studio 2012 projects, which illustrate, respectively, how to work with the .NET Client-Side Object Model (CSOM), the JavaScript Object Model (JSOM), the Microsoft Silverlight Object Model, and the REST service.

  • Ch-08-SharePoint-Apps.zip. Comprises a set of SharePoint app projects that show how to create apps providing the various hosting models (SharePoint hosted, autohosted, and provider-hosted).

  • Ch-09-New-REST-API.zip. Illustrates how to use the new REST APIs through a sample SharePoint app project.

  • Ch-10-Remote-Event-Receivers.zip. Explains how to create remote event receivers by providing a single Visual Studio 2012 project of a SharePoint app.

  • Ch-11-Developing-Web-Parts.zip. Includes a couple of Visual Studio 2012 projects, which provide samples of basic web parts, as well as of advanced web parts.

  • Ch-12-Customizing-the-UI.zip. Includes a single Visual Studio 2012 project that provides many samples about how to create custom pages, custom ribbons, custom actions, and so on.

  • Ch-13-Web-Templates.zip. Provides samples about how to create a site definition, a site template, and a web template.

  • Ch-14-Business-Connectivity-Services.zip. Includes a Visual Studio 2012 project of a SharePoint app consuming a third-party OData service, a sample project of a custom BCS model, and a WCF service available for consuming via BCS.

  • Ch-15-WF45-Intro.zip. Provides a simple Visual Studio 2012 project that illustrates the basic capabilities of WF 4.5, aside from SharePoint 2013.

  • Ch-16-SP-Workflow-Fundamentals.zip. Includes basic samples of workflows for SharePoint 2013 created by using Microsoft SharePoint Designer 2013.

  • Ch-17-Workflow-Development.zip. Provides some Visual Studio 2012 projects that illustrate how to create basic workflows, workflows in SharePoint app, custom workflow forms, and custom tasks.

  • Ch-18-Advanced-Workflows.zip. Provides three Visual Studio 2012 projects illustrating how to create advanced workflows and custom actions, and how to consume the new workflow management services.

  • Ch-20-Claims-Fed-OAuth.zip. Includes a set of Visual Studio 2012 projects that show how to create a custom identity provider, as well as a custom claims provider.

You can use these sample projects as a reference for everyday needs, and you may find it useful copy code excerpts from these samples into your real solutions.

Acknowledgments

This book has been a long and time-consuming process for me. I have worked toward the completion of this project for about one year. However, a book is the result of the work of many people. Unfortunately, only the author has his or her name on the cover. This section is only partial compensation for the other individuals who helped out.

First, I would like to thank Microsoft Press, O’Reilly, and all the publishing people who contributed to this book project. Mainly, I’d like to thank Ben Ryan and Kenyon Brown, who—once again—trusted in me and gave me the opportunity to realize an idea I have believed in for a long time. Ken supported me through this book project for more than a year; he helped me focus on the content outline, and provided suggestions and guidelines to accomplish this task. Another person deserving a really big acknowledgment is Linda Laflamme, who assisted me along the whole project timeline, keeping me on track, reviewing my chapters, and providing thorough suggestions, feedback, and tips. From the copyediting team, I would like to thank Christopher Hearse and Damon Larson for their accurate work.

I would also like to thank Jussi Roine, one of the most brilliant SharePoint Microsoft Certified Masters (MCMs) that I know, for his accurate, smart, proactive, and great technical review. Jussi, you did a really great job—thank you very much, buddy! You deserve gallons of beer!

I will never stop thanking my mentor, Giovanni Librando. As usual, Giovanni provided me a wealth of ideas, feedback, and tips to achieve this goal.

I’d like to thank my parents and my original family for their support and presence during the last year and for having trusted me during my entire professional career.

Lastly, but most importantly, I want to thank my family—my wife, Paola; my son, Andrea; and my daughter, Marta—for their support, patience, and understanding during the last year. It has been a difficult and very busy year. You have supported me greatly, and you renounced spending many hours with me because of this book. I know I’ve asked a huge sacrifice of you, and I want to thank you for your support, trust, and understanding!

Errata & book support

We’ve made every effort to ensure the accuracy of this book and its companion content. Any errors that have been reported since this book was published are listed on our Microsoft Press site at http://www.oreilly.com:

http://aka.ms/SP2013DevRef/errata

If you find an error that is not already listed, you can report it to us through the same page.

If you need additional support, email Microsoft Press Book Support at .

Please note that product support for Microsoft software is not offered through the addresses above.

We want to hear from you

At Microsoft Press, your satisfaction is our top priority, and your feedback our most valuable asset. Please tell us what you think of this book at

http://www.microsoft.com/learning/booksurvey

The survey is short, and we read every one of your comments and ideas. Thanks in advance for your input!

Stay in touch

Let’s keep the conversation going! We’re on Twitter:

http://twitter.com/MicrosoftPress

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

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