Appvity Blog

Home of the SharePoint mobility topics

How to Programmatically Create an InfoPath Form from an InfoPath XSN Template

By Phong Dang posted June 24, 2013 05:26 | 1 Comments

By Phong Dang posted June 24, 2013 05:26 | 1 Comments

Let's say you design an InfoPath form and upload the associated form template into the SharePoint Central Administration site. What would you do if you wanted to create a new item in the Form Library based on this template? For example, I have a Form Library with the Project Information form and InfoPath template (Project Information.xsn) uploaded in the Central Administration site. These features are activated on the SharePoint site. I will create a new program that shows how to programmatically create an InfoPath form from an InfoPath XSN template. First, I create a new solution and name it Appvity.InfoPathFormSoln.  Next, I add two reference assemblies: Microsoft.Office.InfoPath.dll and Microsoft.Office.InfoPath.Server.dll, in order to use the InfoPath API.   Next, I add a new feature, Appvity.InfoPath, and set up the required information. Note: I do not want to activate this feature automatically so I set the Active On Default option to false. Next, I add a new event receiver for this feature. I do want to activate this feature, as my form library will update the InfoPath form and content type. Before implementing code for this event receiver, I create a new page, FormXmlParser.aspx. This page will help me read the Project Information.xsn template and generate it to template.xml. Note: Project Informaion.xsn is a cab file so you must extract the content before you can modify it. There are many methods to extract this file (such as: http://www.codeproject.com/Articles/15397/Cabinet-File-CAB-Compression-and-Extraction), but those methods do not work in SharePoint. Thus, I create an ASP.Net page. On this page, there is an instance of an XmlFormView control. An XmlFormView is an InfoPath Forms Services control that hosts an InfoPath form on any ASP.Net page (as long as you're running it in SharePoint). You can also host the XSN template, which is what this code will do. Note: Note the use of the OpenFileFromPackage method in the Initialize event handler. That is a method that will extract the template.xml file (or any other file) from the XSN. The template.xml file is a "blank" form used to create a new instance of an InfoPath form from a template. Next, to make sure this page works correctly, you want to deploy this project to a SharePoint server and browse this page: Back to event receiver class, I implement the FeatureActivated event. Now, you need to activate the Project Information content type in the form library and get the absolute path of the InfoPath template from the root web and then point it to your custom web page in the code and download the xml. After that, do whatever you want with the xml, and place it in a form library. public override void FeatureActivated(SPFeatureReceiverProperties properties) { try { string listName = "ProjectInformation"; string strContentType = "Project Information"; SPWeb web = properties.Feature.Parent as SPWeb; SPList formLibrary = null; try { formLibrary = web.GetList(web.Url + "/" + listName); } catch { } if (formLibrary != null) { SPContentType contentType = web.AvailableContentTypes.OfType<SPContentType>().Where(ct => ct.Name.Equals(strContentType)).FirstOrDefault(); if (contentType != null) { SPContentType infoPath = formLibrary.ContentTypes.OfType<SPContentType>().Where(c => c.Name.Equals(contentType.Name)).FirstOrDefault(); if (infoPath == null) { contentType = formLibrary.ContentTypes.Add(contentType); SPFolder rootFolder = formLibrary.RootFolder; //Add the content type back IList<SPContentType> ctList = rootFolder.ContentTypeOrder; ctList.Add(formLibrary.ContentTypes[strContentType]); rootFolder.UniqueContentTypeOrder = ctList; rootFolder.Update(); formLibrary.Update(); } else { contentType = infoPath; } } string templateUrl = contentType.DocumentTemplateUrl; SPFolder forms = web.GetFolder(web.Url + "/" + listName); if (forms != null) { WebClient client = new WebClient(); client.Credentials = CredentialCache.DefaultCredentials; if (templateUrl.LastIndexOf("/") != -1) { templateUrl = templateUrl.Substring(templateUrl.LastIndexOf("/")); templateUrl = "/FormServerTemplates" + templateUrl; } string fileInfoPath = web.Site.Url + templateUrl; Stream stream = client.OpenRead(web.Url + "/_layouts/Appvity.InfoPathForm/FormXmlParser.aspx?Url=" + fileInfoPath); StreamReader reader = new StreamReader(stream); string formXml = reader.ReadToEnd(); try { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(formXml); UpdateInfoPathForm(xmlDoc); Stream outStream = new MemoryStream(); xmlDoc.Save(outStream); SPFile file = forms.Files.Add(formLibrary.Title + ".xml", outStream, true); SPListItem item = formLibrary.Items[file.UniqueId]; item["TemplateUrl"] = fileInfoPath; item.Update(); forms.Update(); } catch { } } } } catch { } } Everything is ready. Let’s deploy the solution in our site and enjoy the results.        Downloading the file demo : Appvity.InfoPathFormSoln.rar (91.82 kb).

How to Configure and Publish InfoPath to SharePoint 2013

By Hieu Bui posted June 16, 2013 00:19 | 13 Comments

By Hieu Bui posted June 16, 2013 00:19 | 13 Comments

We can use InfoPath to easily customize a list with a design environment for designing and publishing form via commonly used Windows controls such as check boxes, text boxes, command buttons and option buttons. In this post, I would like to show how to configure and publish InfoPath Form to SharePoint 2013. [More]

How to Create a New SharePoint Site from the Existing One

By Phong Dang posted June 4, 2013 22:24 | 2 Comments

By Phong Dang posted June 4, 2013 22:24 | 2 Comments

When you work with SharePoint, you can easily create a new site from a predefined template. One day, a customer tells you, “I want to create a new site from an existing site, which was created without a template”. If you are a developer, how do you accomplish this? There are many solutions to this problem. I choose one involving backing up and restoring in SharePoint. First, I export my customer’s site to a shared folder, and then import it back to the SharePoint site. After that, I change the name of the new site. Now I have a new site that has the same structure as the original one. To complete these steps, I use SharePoint Object Model: SPExport and SPImport. Using a simple web part, I will show you how to create a new site from an existing site. [More]

Table of Contents: SharePoint 2013 Books

By Lam Le posted June 1, 2013 11:50 | 0 Comments

By Lam Le posted June 1, 2013 11:50 | 0 Comments

Having worked in SharePoint over the past eight years, one of the key indicators I have always watched to gauge the maturity of the market is the number of books that were published about SharePoint.  It's pretty amazing to compare the number of titles between SharePoint 2003, 2007 and 2010 releases.  Judging by the numbers of books to be released on SharePoint 2013, I think the market is still growing at a healthy rate. I always admire the authors who spend months to share what they know about the platform.  I'm sure it is mostly a labor of love, as I doubt that they actually make any real money. I think we have owned at least a few copies of every single SharePoint book published, even when we started to purchased electronic versions to read on the Kindle. With so many SharePoint books, I got into the habit of creating a Table of Contents for every book that we own.  Most of the time, I use these books as reference materials (sorry Google and Bing), but a simple question like "How do My Sites actually works?" could take a while to search through all the books for the relevant chapters.  Safari Books Online does provide a good search engine, though in many instances I just want to see if a book has a chapter on "My Sites". As I start to create another TOC for SharePoint 2013 books, I thought would I share and hope some of you might find it to be useful. An old fashion Ctrl-F will do the trick.  We will keep this up-to-date, and maybe even provide a spreadsheet format someday... Beginning SharePoint 2013 Development Microsoft SharePoint 2013 App Development PowerShell™ for SharePoint 2013 How-To Professional SharePoint 2013 Development   Beginning SharePoint 2013 Development By: Steve Fox, Chris Johnson, Donovan Follette Publisher: Wiley Pub. Date: February 2013 Print ISBN-13: 978-1-1184-9584-1 Pages in Print Edition: 202 PART I: GETTING STARTED WITH SHAREPOINT 2013 CHAPTER 1: INTRODUCTION TO SHAREPOINT 2013 Getting to Know SharePoint 4 Defining SharePoint by Function 5 Defining SharePoint by User 5 Introducing the User Interface 6 Introducing the Structure 8 Addressing the Needs of the Developer 9 Extending SharePoint 2013 10 Breaking It Down for Developers 12 SharePoint 2013: The Platform 15 SharePoint Installation Types 16 SharePoint 2013 Capabilities 18 Site Collections and Sites 20 SharePoint 2013 APIs 24 SharePoint Central Administration 26 Application Management 27 Monitoring 28 Security 28 General Application Settings 28 System Settings 28 Backup and Restore 29 Upgrade and Migration 29 Configuration Wizard 29 Apps 29 Summary 29 Recommended Reading 31 CHAPTER 2: OVERVIEW OF THE SHAREPOINT 2013 APP MODEL SharePoint 2013 App Model 33 Apps for Office 34 Apps for SharePoint 35 Moving to the Cloud 37 Understanding the Three Apps for SharePoint Deployment Models 38 SharePoint-Hosted 38 Autohosted 44 Provider-Hosted 49 Summary 52 Recommended Reading 53 CHAPTER 3: DEVELOPER TOOLING FOR SHAREPOINT 2013 SharePoint Development Across Developer Segments 56 Web-Based Development in SharePoint 57 Site Settings 58 Developing SharePoint Applications Using SharePoint Designer 65 Developing SharePoint Applications Using Napa 69 Developing SharePoint Applications Using Visual Studio 2012 74 Other Tools for SharePoint Development 82 Developing with Expression Blend 83 Debugging Using Fiddler 85 Summary 85 Recommended Reading 87 CHAPTER 4: UNDERSTANDING YOUR DEVELOPMENT OPTIONS Application and Solution Types 90 Common Developer Tasks 93 Creating Web Parts 93 Creating SharePoint-Hosted Apps 101 Working with SharePoint Data 106 Creating Cloud-hosted Apps 109 Creating Event Receivers 109 Creating ASPX Pages 112 Creating Master Pages 114 Summary 116 Recommended Reading 117 CHAPTER 5: OVERVIEW OF WINDOWS AZURE FOR SHAREPOINT Defining the Cloud 120 Defining Windows Azure 121 Windows Azure Platform 122 Data Layer 123 Services Layer 123 Integration Layer 123 Developing Windows Azure Applications 124 SharePoint and Windows Azure 133 Understanding SharePoint Cloud-Hosted Apps and Windows Azure 134 Creating a Simple Autohosted SharePoint App 136 Summary 146 Recommended Reading 147 PART II: FUNDAMENTAL SHAREPOINT 2013 DEVELOPMENT BUILDING BLOCKS CHAPTER 6: DEVELOPING, INTEGRATING, AND BUILDING APPLICATIONS IN SHAREPOINT 2013 Development Models Available in SharePoint 2013 152 Application Integration Options in SharePoint 2013 153 User Interface Integration 154 Events and Logic Integration 166 Data Integration 168 Summary 171 Recommended Reading 173 CHAPTER 7: PACKAGING AND DEPLOYING SHAREPOINT 2013 APPS Anatomy of an App 176 Manifest and Assets 178 SharePoint Solution Package 179 Web Deploy Package 180 Database Package 181 Packaging and Publishing an App 182 Packaging an App 182 Private Publishing in an App Catalog 183 Deploying an App 184 SharePoint-Hosted App Deployment 185 Provider-Hosted App Deployment 188 Autohosted App Deployment 196 Summary 199 Recommended Reading 200 CHAPTER 8: DISTRIBUTING SHAREPOINT 2013 APPS Publishing Apps in the SharePoint Store 203 Creating a Client ID and Secret 204 Pricing and Licensing Apps 206 Submitting Apps 208 Getting Apps Validated 211 Application Life Cycle 212 Using Seller Dashboard Metrics 213 Upgrading Apps 214 Summary 216 Recommended Reading 217 CHAPTER 9: OVERVIEW OF THE CLIENT-SIDE OBJECT MODEL AND REST APIS Introducing Remote APIs in SharePoint 2013 220 Client-Side Object Model (CSOM) Basics 221 Managed Code (.NET) 222 Setup 223 Querying 224 JavaScript 228 Setup 229 Querying 230 Security and Cross-Domain Calls 236 Windows Phone 237 Setup 238 Querying 239 REST and OData 241 Getting Started with REST and OData 242 Filtering and Selecting 244 Creating, Updating, and Deleting 246 Client-Side Object Model API Coverage 250 Summary 252 Recommended Reading 253 CHAPTER 10: OVERVIEW OF OAUTH IN SHAREPOINT 2013 Introduction to OAuth 256 OAuth in SharePoint 2013 257 Creating and Managing Application Identities 258 Application Authentication 263 App and User Context in API Calls 266 Managing Tokens in Your Application 266 Application Authorization 269 Requesting Permissions Dynamically 271 App-Only Policy 271 On-Premises App Authentication with S2S 272 Summary 275 Recommended Reading 276   Microsoft SharePoint 2013 App Development By: Scot Hillier; Ted Pattison Publisher: Microsoft Press Pub. Date: January 24, 2013 Print ISBN-13: 978-0-7356-7498-1 Pages in Print Edition: 202 Introduction Who this book is for Organization of this book Prerelease software Code samples Support & feedback 1. Introducing SharePoint Apps Understanding the new SharePoint app model Understanding SharePoint app model architecture Packaging and distributing apps Conclusion 2. Client-side Programming Introducing JavaScript for SharePoint developers Introducing jQuery for SharePoint developers Working with the CSOM Working with the REST API Conclusion 3. SharePoint App Security Reviewing the concepts of authentication and authorization Understanding SharePoint 2013 authentication Managing app permissions Establishing app identity by using OAuth Establishing app identity by using S2S trusts Conclusion 4. Developing SharePoint Apps Understanding app patterns Using the chrome control Calling across domains Going beyond the basics Conclusion Index About the Authors PowerShell™ for SharePoint 2013 How-To By: Steven Mann Publisher: Sams Pub. Date: February 25, 2013 Print ISBN-10: 0-672-33691-X Web ISBN-10: 0-13-339228-7 Pages in Print Edition: 304 Title Page Table of Contents About the Author Acknowledgments We Want to Hear from You! Reader Services Introduction Overview of This Book How to Benefit from This Book How to Continue Expanding Your Knowledge Chapter 1. SharePoint 2013 Management Shell How Do I Run PowerShell? How Do I Make PowerShell Aware of SharePoint? What Is the SharePoint 2013 Management Shell? What Is the SharePoint 2013 Management Shell Loading? Chapter 2. PowerShell Basics What Is a Cmdlet? How Can I See the Possible Verbs for a Noun Command? What Is a Parameter? What Is a Switch Parameter? How Can I See the Possible Parameters for a Cmdlet? What Does F3 Do? What Does F7 Do? What Are Console Commands? Path Environment Variable Running Unsigned Scripts Disabling the Confirmation Prompt Generating Inline Credentials Referencing an Assembly Chapter 3. SharePoint Installation and Configuration Prepare the Microsoft SharePoint Installation Module Install SharePoint Unattended Install Without a Product Key in the Configuration File Configure a New SharePoint Farm Join a Server to the SharePoint Farm Create a New Web Application Create a New Site Collection Create a New Subsite Chapter 4. Farm Management Review Farm Configuration Values Set the Farm Configuration Values Refresh Installed Products Change the Port of Central Admin Change the Farm Passphrase Retrieve the System Accounts Retrieve Managed Accounts Rename a Server on the Farm Display the Configured Managed Paths Create a New Managed Path Remove a Managed Path Merge Log Files End the Current Log File Review SharePoint Designer Settings Configure SharePoint Designer Settings Review Workflow Configuration Settings Modify Workflow Configuration Settings Display Available Timer Jobs on the Farm Get a Specific Timer Job Enable a Timer Job Disable a Timer Job Start a Timer Job Set the Schedule for a Timer Job Chapter 5. Web Application Management Display Available Web Applications on the Farm Get a Specific Web Application Remove a Web Application Create a New Web Application Configure Web Application Settings Extend a Web Application Create an Alternate Access-Mapping URL Display All Alternate Access Mappings Get a Specific Alternate URL Entry Change the Zone of an Alternate Access Mapping Remove an Alternate Access Mapping Chapter 6. Service Application Management Install Service Applications Display Available Service Applications on the Farm Get a Specific Service Application Configure IIS Settings for a Service Application Share a Service Application Remove a Service Application Display Service Instances on a Server Get a Specific Service Instance Start a Service Instance Stop a Service Instance Ancillary Cmdlets for Service Applications Chapter 7. SharePoint Database Management Display All SharePoint Databases Get a Specific Database Create a New Content Database Display All Content Databases for a Web Application Detach a Content Database from a Web Application Attach a Content Database to a Web Application Delete a Content Database Create a New Configuration Database Delete a Configuration Database Back Up a Configuration Database Restore a Configuration Database Back Up the SharePoint Farm Restore the SharePoint Farm Back Up a Site Collection Restore a Site Collection Chapter 8. Site Management Display All Available Site Collections on the Farm Display Available Site Collections in a Web Application Display Available Site Collections in a Content Database Get a Specific Site Collection Remove a Site Collection Create a Site Collection Set the Lock State of a Site Collection Set the Storage Limits on a Site Collection Create a Site Under a Site Collection Display All Subsites Within a Site Collection Get a Specific Subsite (Web) Remove a Subsite (Web) from a Site Collection Modify the Subsite (Web) URL Move a Site Collection to a Different Content Database Move All Site Collections from One Content Database to Another Display All Deleted Site Collections Display Deleted Site Collections in a Content Database Get a Specific Deleted Site Collection Remove a Deleted Site Collection Restore a Deleted Site Collection Configure Information Rights Management (IRM) Settings Chapter 9. Solutions and Features Add a Solution to the SharePoint Farm Display Available Solutions on the Farm Get a Specific Solution Deploy a Solution to a Web Application Retract a Solution Upgrade a Deployed Solution Remove a Solution from the SharePoint Farm Add a Sandboxed Solution to a Site Collection Display Available Sandboxed Solutions in a Site Collection Get a Specific Sandboxed Solution Activate a Sandboxed Solution Deactivate a Sandboxed Solution Upgrade a Deployed Sandboxed Solution Remove a Sandboxed Solution from a Site Collection Display Available Features Get a Specific Feature Activate a Feature Deactivate a Feature Install a Feature in SharePoint Uninstall a Feature from SharePoint Export Installed Farm Solutions Chapter 10. Content Deployment Create a New Deployment Path Display Deployment Paths Configured on the Farm Get a Specific Content Deployment Path Remove a Content Deployment Path Create a New Deployment Job Display Deployment Jobs Configured on the Farm Get a Specific Content Deployment Job Remove a Content Deployment Job Start a Content Deployment Job Modify Content Deployment Configurations Chapter 11. User Licensing Display User Licensing Status Enable User Licensing Enforcement Disable User Licensing Enforcement Display Available User Licenses Create a New License Mapping Add a New License Mapping Display All License Mappings Remove a License Mapping Chapter 12. InfoPath Forms Services Browser-Enabled Form Templates Throttle Data Connection Timeouts Throttle the Data Connection Response Size Modify Authentication Settings Configure Session State Enable View State Verify and Upload a Form Template Upload Multiple Form Templates at Once Activate or Deactivate a Form to or from a Site Collection Remove a Form from InfoPath Form Services Quiesce a Form from InfoPath Form Services Enable the Web Service Proxy Export Forms Services Administration Files Import Forms Services Administration Files Chapter 13. Enterprise Search Display the Enterprise Search Service Information Display Enterprise Search Service Instances Get a Specific Enterprise Search Service Instance Configure the Crawl Account for Enterprise Search Configure the Enterprise Search Service Performance Level Display Enterprise Search Service Applications Get a Specific Enterprise Search Service Application Create a Custom Metadata Category Display Available Metadata Categories Get a Specific Metadata Category Create a Custom Metadata Crawled Property Display Available Crawled Properties Get a Specific Metadata Crawled Property Create a Custom Metadata-Managed Property Display Available Managed Properties Get a Specific Metadata-Managed Property Create a Metadata Mapping Use Advanced Cmdlets for Search Chapter 14. Profile Service Get the Identity of the Profile Service Application Get a Specific Profile Service Application Instance Configure Settings on the Profile Service Application Remove Old Comments Remove Old Ratings Remove Old Tags Update the Profile Photo Store Refresh the Feed Cache Refresh a Specific User's Feed Cache Use Advanced Cmdlets for the Profile Service Chapter 15. Business Data Connectivity Service Get the Identity of the BCS Service Application Get a Specific BCS Service Application Instance Configure the BCS Database Get a BCS Metadata Object Import a BCS Model Export a BCS Model Set the Entity Notification Web Get the Entity Notification Web Create an OData Connection Get an OData Connection Update an OData Connection Chapter 16. Secure Store Service Get the Identity of the Secure Store Service Application Get a Specific Secure Store Service Application Instance Enable Auditing for the Secure Store Service Configure the Secure Store Database Generate a New Master Key Refresh the Encryption Key Create Application Fields Create a Target Application Create a New Application Entry Chapter 17. Metadata Service Get the Identity of the Metadata Service Application Get a Specific Metadata Service Application Instance Configure the Metadata Service Accounts Configure the Term Store Database Configure the Content Type Hub Get the Identity of the Metadata Service Application Proxy Get a Specific Metadata Service Application Proxy Instance Configure the Metadata Service Connection Options Chapter 18. Session State and State Service Enable Session State Disable Session State Display Session State Information Configure the Timeout of the Session State Display State Service Applications Configured on the Farm Get a Specific State Service Application Rename a State Service Application Perform State Service Database Operations Chapter 19. Work Management Service Get the Identity of the Work Management Service Application Get a Specific Work Management Service Application Instance Configure the Refresh Threshold Configure the Search Query Threshold Configure the User Synchronization Per Server Get the Identity of the Work Management Service Application Proxy Get a Specific Work Management Service Application Proxy Instance Chapter 20. Machine Translation Service Get the Identity of the Machine Translation Service Application Get a Specific Machine Translation Service Application Instance Get the Identity of the Machine Translation Service Proxy Get a Specific Machine Translation Service Application Proxy Instance Configure the Translation Processes Configure Translations Throughput Configure Enabled Document File Extensions for Translation Modify Database Information Modify Translation Timeouts Modify the Maximum Translation Attempts Modify the Recycle Threshold Chapter 21. Excel Services Create a Trusted File Location Display All Trusted File Locations Get a Specific Trusted File Location Remove a Trusted File Location Create a Trusted Data Connection Library Display All Trusted Data Connection Libraries Get a Specific Trusted Data Connection Library Remove a Trusted Data Connection Library Create a New Safe Data Provider Display All Safe Data Providers Get a Specific Safe Data Provider Remove a Safe Data Provider Create a Blocked File Type Display All Blocked File Types Get a Specific Blocked File Type Remove a Blocked File Type Create a User-Defined Function Reference Display All User-Defined Function References Get a Specific User-Defined Function Reference Remove a User-Defined Function Reference Modify Excel Services Objects Chapter 22. PerformancePoint Services Configure the Unattended Service Account Display the Unattended Service Account Create a Trusted Content Location Create a Trusted Data Source Location Display All Trusted Content Locations Display All Trusted DataSource Locations Display Details of Trusted Locations Get a Specific Trusted Location Remove a Trusted Location Configure PerformancePoint Services to Enforce Trusted Locations Configure PerformancePoint Services Application Settings Chapter 23. Access Services Configure the Application Log Size Configure the Cache Timeout Modify the Maximum Columns in a Query Modify the Maximum Calculated Columns in a Query Configure the Maximum Order By Clauses Configure the Maximum Number of Rows in a Query Configure the Maximum Number of Records in an Access Table Configure the Maximum Number of Sources in a Query Enable and Disable the Use of Outer Joins Allow or Restrict Nonremotable Queries Throttle Access Services Memory Utilization Throttle Session Memory Utilization Configure User Sessions Limit Template Sizes Modify Access Services Databases Chapter 24. Visio Graphics Services Configure the Unattended Service Account Create a New Safe Data Provider Display All Safe Data Providers Get a Specific Safe Data Provider Remove a Safe Data Provider Setting the Description of a Data Provider Configuring Visio Performance Settings Chapter 25. Word Automation Services Configure the Conversion Processes Configure Conversion Throughput Configure Supported Document Formats for Conversion Modify Database Information Modify Job Monitoring Modify Conversion Timeouts Modify the Maximum Conversion Attempts Modify the Maximum Memory Usage Disable Word 97–2003 Document Scanning Disable Embedded Fonts in Conversions Modify the Recycle Threshold Chapter 26. Office Web Apps Create a New WOPI Binding in SharePoint Review Current SharePoint WOPI Bindings Configure the Default Action for an Application Remove WOPI Bindings from SharePoint Configure the WOPI SharePoint Zone Disable Certain WOPI Actions Resolve Invalid Proof Signature Appendix A. stsadm Versus SharePoint PowerShell Appendix B. Upgrade and Migration Test-SPContentDatabase Upgrade-SPContentDatabase Upgrade-SPFarm Test-SPSite Repair-SPSite Upgrade-SPSite Additional Upgrade Cmdlets Appendix C. Enterprise Search Reference Administrative Crawling Metadata Miscellaneous Querying Service Application Topology Appendix D. App Management Service Reference App Settings and Configuration Denied Endpoint Management Installation and Provisioning of Apps Marketplace Management Service Application Index Professional SharePoint 2013 Development By: Reza Alirezaei, Brendon Schwartz, Matt Ranlett, Scot Hillier, Brian Wilson, Jeff Fried, Paul Swider Publisher: Wiley Pub. Date: March 2013 ISBN: 978-1-1184-9582-7 Pages in Print Edition: 816 CHAPTER 1: ARCHITECTURAL OVERVIEW OF SHAREPOINT 2013 1 What's New from an Architectural Perspective? 2 On-Premise Server Farm Architecture 3 Web Server Tier 4 Application Server Tier 4 Database Server Tier 4 Small or Single-Tier Topology 4 Medium or Two-Tier Topology 5 Large or Three-Tier Topology 5 Geographically Distributed Topology 6 Service Application Architecture 6 Service Application Model 6 Available Service Applications 8 Service Application Life Cycle 11 Multitenancy Hosting Architecture 21 Site Subscriptions 22 Service Application Partitioning 22 Tenant Administration 26 Feature Packs 27 Search Architecture 27 Crawl and Content Processing Components 28 Analytics Processing Component 28 Index and Query Processing 29 Search Administration Component 30 Multi-Purpose (with Search) Medium-Sized Search Farm Topology Example 30 SQL Server Database Architecture 32 Database Topologies 32 SharePoint 2013 Databases 35 Cloud-Hosted Architectures 38 Security Features 39 Identity Features 39 Administration Model 40 Summary 41 CHAPTER 2: WHAT'S NEW IN SHAREPOINT 2013 Introduction to SharePoint 2013 43 Deployment Scenarios 44 On-Premise Deployment 44 Office 365 Deployment 44 Hosted Deployment 44 Hybrid Deployment 44 Packaging Scenarios 45 Full-Trust Farm Solution 45 Partial-Trust Sandboxed Solution 45 Apps for SharePoint 45 The Programming Model 45 The Evolution of SharePoint Programming 46 Challenges with CSOM in SharePoint 2010 47 Challenges with Server-Side Code 47 The New Programming Model 48 The App Model 51 SharePoint-Hosted Apps 51 Provider-Hosted Apps 52 Azure Auto-Hosted Apps 52 Apps or Solutions — Which Way to Go? 53 The App Security Model 55 Remote Events 58 Reporting Services 2012 Data Alerts 59 Events in External Lists 60 Remote Event Receivers 60 The Security Model in Remote Events 61 Workflows 63 Challenges with Workflows in SharePoint 2010 63 Workfl ow Architecture in SharePoint 2013 64 Building Your Workflow Development Environment 66 SharePoint Designer 2013 Workfl ows 69 Using Workflows in Apps 71 Enterprise Content Management 71 Site Policies 71 Managed Meta Data 73 Web Content Management 74 The Structural Publishing Model 75 The Dynamic Publishing Model 75 Taxonomy-Driven Navigation 75 Term-Driven Publishing Pages 76 Cross-Site Publishing 77 Hostname Site Collections 79 Multilingual Features 80 The Content by Search Web Part 81 Design Manager 81 Mobile Support 82 Image Rendition 83 App-Driven Publishing Sites 84 Search 84 Search Schema 84 Search Navigation 84 Result Sources 85 Display Templates 86 Result Types 86 Query Rules 87 Continuous Crawl 88 Putting It All Together 88 Query Languages 89 Exporting and Importing Search Settings 90 Search-Driven Solutions 90 BCS 91 OData Connector 92 BCS Powered Apps 92 CSOM and REST Interface 93 Summary 94 CHAPTER 3: DEVELOPER TOOLS FOR SHAREPOINT 2013 Customization Options with SharePoint 96 OOB Developer Experience 97 Understanding the User Interface for Customization 98 Understanding SharePoint Designer 2013 102 New Features in SharePoint Designer 102 Navigating the User Interface 105 Understanding Visual Studio 2012 Tools 106 Starting a New SharePoint 2013 Project 107 Visual Studio Integrated List and Content Type Support 108 SharePoint Connections in Server Explorer 109 Solution Explorer Integration 109 Mapped Folders 110 Applications for SharePoint 110 SharePoint Solutions (Classic Solution) 114 Setting Up Your Development Environment 120 Development Environment 120 Local Development Environment 121 Troubleshooting with Debugging 123 F5 Debugging 123 Debugging Using the Developer Dashboard 126 Debugging Using SharePoint Logs 127 Debugging Silverlight Code 127 Other Useful Tools for Debugging and Testing 128 Summary 129 CHAPTER 4: APPLICATION LIFECYCLE MANAGEMENT IN SHAREPOINT 2013 Getting Started with Application Lifecycle Management 132 Three Application Lifecycle Management Perspectives 132 Application Lifecycle Management Tools 134 Understanding Key Development Tools 135 Understanding the SharePoint 2013 Development Models 136 Planning your Customization Model and Release Packaging Approach 139 Customization Models 139 Release Packaging Approach 142 Planning your Key Development Phases and Release Model 146 Key Development Phases 146 Release Models 149 Planning Your Upgrade and Patching Approach 154 Upgrading Solutions and Features 154 Patching Your SharePoint 2013 Environment 155 Planning Your SharePoint Team Environments 156 Environments for Large Projects 156 Identifying the Environments Your Developers Require 157 Identifying the Environments Your Testers Require 163 Managing SharePoint 2013 Development Teams 163 Selecting Software Development Methodology 164 Setting Up Development Standards and Best Practices 165 Managing, Tracking, and Recording Key Design Decisions 166 Planning for Regular Code Reviews 166 Large Project Considerations 167 Large Project Life-Cycle Models 167 Decentralized Development Teams 169 Off shore Teams 169 Managing SharePoint 2013 Testing Teams 171 Setting Up a Testing Strategy 171 Unit Testing 172 Automated Builds and Integration Testing 172 Test Case Planning 174 Performance Testing 175 Functional Testing 177 User Acceptance Testing 177 Defect Tracking 178 Other Testing Considerations 178 Summary 179 CHAPTER 5: INTRODUCING WINDOWS AZURE AND SHAREPOINT 2013 INTEGRATION Moving to the Cloud 181 What Is the Cloud? 182 Why Companies Care 184 Why Developers Care 185 Cautions for Cloud Adopters 186 Introducing Windows Azure 188 Execution Models 189 Mobile Services 189 High-Performance Computing 190 Marketplace 190 Data Management 190 Business Analytics 190 Media 191 Networking 191 Caching 191 Messaging 192 Identity 192 SharePoint and Microsoft's Cloud Off erings 192 SaaS Licensing for SharePoint 193 PaaS Licensing for SharePoint 194 Integration Models 195 Summary 198 CHAPTER 6: GETTING STARTED WITH DEVELOPING APPS IN SHAREPOINT 2013 Architectural Overview of SharePoint Apps 201 Programming Model Overview 202 Comparing Apps and Solutions 203 Hosting Options 204 Examining an App 205 Adding an App 207 Developing Your First App 208 Client-Side Object Model 212 CSOM Improvements over SharePoint 2010 214 RESTful SharePoint 2013 216 Developing Externally Hosted Apps 218 High-Trust Apps for Single Server Development Environments 219 Developing a Provider-Hosted App 221 Developing an Azure Auto-hosted App 224 Summary 229 CHAPTER 7: FURTHER DEVELOPING APPS IN SHAREPOINT 2013 Developing Your App User Experience 231 Developing an Embeddable App or App Part 236 Developing a Custom Action App 239 App Design Guidelines 242 Developing Your App Packaging 242 Developing Your App Deployment 244 Publishing to the Offi ce Store 244 Publishing to an App Catalog 245 Developing for App Upgradeability 245 Updating SharePoint Apps 246 App Migration 246 Additional Considerations for Apps Developers 247 Key Recommendations 247 Decision Criteria for Cloud-hosted Apps Versus SharePoint-hosted Apps 248 Decision Criteria for Developing Apps Versus Farm Solutions 248 Decision Criteria for Developing Provider-hosted Versus Azure-hosted Apps 252 Summary 252 CHAPTER 8: DEVELOPING SOCIAL APPLICATIONS IN SHAREPOINT 2013 New and Improved Social Features in SharePoint 2013 254 New User Experience 254 Multiple Supported Browsers 255 Rich Text Editor 256 Enterprise Social Networking 256 Sharing Content 257 Enticing User Contributions with Blogs, Wikis, and Discussions 258 Socializing Categorization and Feedback 259 Enterprise Taxonomy 261 Traditionally Social User-Generated Content Experiences 261 Wikis Everywhere 261 Blogs 262 Communities 263 Community Site Template 265 Discussions 266 Reputation 267 Gifted Badges 268 Best Replies Used with Question and Answer 269 Members Page 269 My Sites in Depth 269 User Profi le 270 My Site Document Libraries and SkyDrive Pro 271 Following Content and People 272 Newsfeed in Depth 272 Microblogs 273 Activity Feed 275 Programming with the Social API 275 Summary 277 CHAPTER 9: BUILDING SEARCH-BASED APPLICATIONS IN SHAREPOINT 2013 Search Architecture and Extensibility 280 New Search Architecture 280 Implications of the New Search Architecture 281 Extensibility Points for Search 282 Top Customization Scenarios 283 Search Drives Applications 283 Out-of-the-box Search Applications 284 Search-driven Web Content Management 285 Social Features — Driven by Search 286 e-Discovery — Driven by Search 286 Working at the UX Layer 288 Components of the Search Center 288 Search Web Parts 289 The Content Search Web Part 290 Result Types and Display Templates 291 Working with Managed Properties 295 The Hover Panel 297 Summary — Using Result Types and Display Templates 298 Working with Queries 298 Query Processing 299 Links with Predefined Queries 301 Using REST and CSOM to Query Search 301 Search Query Syntax 303 Query Builder 307 Query Rules 308 Summary – Working with Queries 312 Working with Content 312 Content Capture – Crawling and Connectors 312 Security Trimming 320 Customizing Content Enrichment 322 Working with Federation and Result Sources 327 Summary — Working with Content 331 Tailoring Relevance 332 Managing Relevance via Queries and Content 332 Rank Profiles 334 Tying It All Together 336 Building Quick Search Verticals 336 Building Custom Search-based Applications 336 Combining Search with Other Workloads 338 Summary: Building Search-based Applications in SharePoint 338 CHAPTER 10: WEB CONTENT MANAGEMENT Taxonomy and the Information Architect 342 Administration 343 Site Navigation 344 Page Creation 346 Search-Driven Publishing 347 Catalogs for Site Publishing 348 Cross-Site Collection Publishing 349 Create and Edit Content 350 Ribbon Enhancements 350 Publishing Field Controls 351 Image Renditions 353 Dynamically Displaying Content 355 Content by Search Web Part 355 Search-Driven Web Parts 356 Access Content Programmatically 357 Server-Side API 357 Client-Side Object Model (CSOM) 359 REST CSOM 359 Branding Sites 360 Master Pages 360 Page Layouts 360 Composed Looks 361 Custom Branding in Expression Web 363 Design Manager 366 Using Device Channels for Mobile Experiences and Device Targeting 366 Working with Design Files and Assets 368 Converting HTML Master Pages 369 Snippet Gallery 370 Package for Deployment 374 Usage Analytics 374 Architecture and Improvements 375 Using Usage Events in Code 375 Extending Usage Events 376 Multilingual Support 377 Summary 378 CHAPTER 11: USING INFOPATH WITH SHAREPOINT 2013 Introducing the Training Management Application 380 Creating the Sample List 380 Customizing SharePoint List Forms 381 Customizing SharePoint List Forms 381 InfoPath Controls 383 Creating Business Logic with Rules and Views 384 Publishing List Forms 388 Designing InfoPath Form Templates 390 What Is a Form Library? 391 Designing Your Form Template 392 Querying SharePoint Lists in Forms 397 Querying REST Web Services 399 Submit Behavior 402 Form Programming 403 Publishing InfoPath Forms 411 Form Security 414 Sandboxing Your Forms 414 Form Anatomy 415 Working with the Form XML in Code 419 Tools for Form Developers 427 The Rule Inspector 427 The Design Checker 428 InfoPath JavaScript Tool 429 Summary 430 CHAPTER 12: ENTERPRISE DOCUMENT MANAGEMENT The Document Management Mindset 432 ECM Features 432 Expanded ECM Object Model 436 Getting the Most from the Document Center 437 Visual Studio and the Document Center 439 Content Routing 439 Managing the Content Organizer 439 Using Document Libraries in the Document Center 443 Meta-Data Navigation and Filtering 444 Visual Studio and Document Libraries 446 Records Management 448 Record Identification 449 Auditing and Reporting 450 Records Management API 451 Declaring and Undeclaring Records 451 Creating Organizer Rules 453 eDiscovery and Compliance 457 eDiscovery Center Site Template 457 eDiscovery in SharePoint 2013 458 Create Compliance with SharePoint 2013 461 Retention Schedules 465 Content Management Interoperability Services (CMIS) 470 Summary 471 CHAPTER 13: INTRODUCING BUSINESS CONNECTIVITY SERVICES Introducing Business Connectivity Services 474 Creating Simple BCS Solutions 476 Creating Simple O365 Solutions 479 Understanding BCS Architecture 480 Understanding Connectors 480 Understanding Business Data Connectivity 481 Understanding the Secure Store Service 485 Understanding Package Deployment 487 Understanding App Architecture 488 Working with BDC Metadata Models 489 Working with External Data Sources 490 Connecting with the SQL Server Connector 491 Connecting with the WCF Service Connector 495 Creating Methods 498 Implementing Method Stereotypes 499 Creating Methods for Databases 502 Creating Methods for Web Services 508 Defining Associations 509 Working with External Lists 513 Creating Custom List Actions 513 Creating Custom Forms 513 Summary 514 CHAPTER 14: ADVANCED BUSINESS CONNECTIVITY SERVICES 515 Creating .NET Assembly Connectors 515 Understanding the Project Tooling 516 Walking Through the Development Process 517 Packaging Considerations 532 Enabling Search Support 533 Working with the BDC Server Runtime Object Model 536 Connecting to the Metadata Catalog 537 Retrieving Model Elements 538 Executing Operations 539 Using ECTs in SharePoint Apps 546 Understanding App-Level ECTs 546 Understanding the BCS Client Object Model 548 Summary 549 CHAPTER 15: WORKFLOW DEVELOPMENT IN SHAREPOINT 2013 551 Introducing Core Workflow Concepts 552 What Is a Workflow? 552 Workflow Activities 553 Workflow Actions 555 Workflow Forms 556 Workflow Tasks 559 Workflow History 559 Workflow Flow Control Templates 560 Workflow Scopes 562 Workflow Associations and Subscriptions 563 Workflow Event Listeners 564 Workflow Visualization 565 Workflow Authorization 566 Understanding the Workflow Platform Architecture in SharePoint 2013 567 Understanding Key Workflow Development Tools 568 Visio Professional 2013 569 SharePoint Designer 2013 570 Visual Studio 2012 572 Setting Up the Development Prerequisites 573 Creating Your Workfl ow and SharePoint Development Environment 573 Installing the Workfl ow Manager 574 Installing Your Development Tools 574 Modeling a Workfl ow Using Visio 2013 575 Developing Workfl ows Using SharePoint Designer 2013 577 Setting Up the Site and List Prerequisites 577 Importing the Visio Workflow Diagram 578 Creating the Vacation Request List Workflow 579 Publishing the Workflow 588 Developing Custom Workflow Activities and Actions Using Visual Studio 2012 589 Creating a Custom Declarative Activity and Action 590 Developing a Custom Code Activity and Action 594 Developing Workfl ows Using Visual Studio 2012 595 Key Development Considerations 597 SharePoint 2010 versus SharePoint 2013 Workflow 597 Declarative Versus Programmatic Workflows 597 Considering Where Workflows Execute 597 Determining Whether to Convert SharePoint 2010 Workflows to SharePoint 2013 Workflows 598 SharePoint Designer versus Visual Studio 2012 598 Deciding Between Sequential Versus State Machine Workflow 599 Summary 599 CHAPTER 16: INTEGRATING REPORTING SERVICES The History 601 Introducing SSRS 2012 602 Authoring Tools 603 Configuring the BI Center 606 Building and Deploying Reports 607 Authoring Reports 607 Laying Out Your Report 609 Data Visualizations 610 Tablix 612 Publishing Your Report to SharePoint 612 Publishing Report Parts 615 Report Viewer Web Part 616 Limitations 617 Connectable Report Viewer Web Part 617 ATOM Data Feeds 618 Reporting Services Data Alert 619 Open with Report Builder 3.0 620 Caching and Snapshots 620 Stored Credentials 622 Managing Parameters 623 Planning 624 Caching Your Report 625 Managing Cache Refresh Plans 626 Snapshots 626 Diff erences Between Caching and Snapshots 628 Reporting on SharePoint Data 629 Creating a Sample List 630 Building the Report 630 Querying Large Lists 631 Multiple Zones 632 Anonymous Access to Reports 632 Reporting Services Execution Account 633 Summary 634 CHAPTER 17: DEVELOPING EXCEL APPLICATIONS IN SHAREPOINT 2013 What's New 637 Updates to the Client 637 Customization Enhancements 637 New Enhancements to Excel Service APIs 637 Dashboards and Excel Mashups 637 Excel Interactive View (Excel Everywhere) 639 Excel 641 Flash Fill 641 Web Service Functions 642 Excel Web Apps 643 Excel Apps for Offi ce 643 Excel Task Pane Apps 644 Excel Content Apps 645 Excel Services 647 Excel Services Architecture 647 Excel Services Data Access 647 REST API 653 Excel Services Web Access 660 JavaScript Object Model (JSOM) 660 User Defi ned Functions (UDF) 665 SOAP Web Services 669 Summary 670 CHAPTER 18: PERFORMANCEPOINT DASHBOARDS Business Intelligence 671 History 672 SharePoint 2013 Business Intelligence Components 674 Important BI Terms and Concepts 678 The Business Intelligence Center 680 Introducing PerformancePoint 2013 682 PerformancePoint Services Architecture 682 Changes in PerformancePoint 2013 684 Using PerformancePoint 2013 686 Configuring PerformancePoint Services 686 Using the AdventureWorks Sample Databases 686 Creating a Dashboard 691 What Else Is in the Box? 702 Extending PerformancePoint 707 Extensibility Targets in PerformancePoint 2013 707 Custom Data Sources 709 Custom Reports, Filters, and Transformations 716 Deploying Customizations 717 Summary 718 CHAPTER 19: DEVELOPING APPLICATIONS WITH ACCESS Access 2013 722 Exploring Access 2013 723 Access Services 727 On-Premise Architecture 728 Hosted Architecture 729 Upgrade Considerations 729 Database Components 729 Building an Application with Access Services 736 Prerequisites 736 Creating an Access Web App 742 Deploying Access Applications 750 Summary 751 APPENDIX: ADDITIONAL HELP AND RESOURCES 753 INDEX 755
  • Contact Us
  • You can reach us at:
Copyright © Appvity 2015. All Rights Reserved.