Custom SharePoint Solutions with HTML and JavaScript For SharePoint 2013 and SharePoint Online - Brandon Atkinson.pdf
(
12805 KB
)
Pobierz
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Author �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xiii
About the Technical Reviewer �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½xv
Introduction �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½xvii
■
Chapter 1: Setting Up Your Environment �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
1
■
Chapter 2: Introduction to SharePoint Front-End Solutions �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
23
■
Chapter 3: Content Editor and Script Editor Web Parts �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
37
■
Chapter 4: Building Custom Web Parts Using HTML and JavaScript �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
49
■
Chapter 5: Using JSLink to Style List Web Parts �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
79
■
Chapter 6: Content Search Web Part and Display Templates�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
105
■
Chapter 7: Working with SharePoint’s Built-in JavaScript Functions
and Properties �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
133
■
Chapter 8: Working with the JavaScript Object Model �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
141
■
Chapter 9: Working with the REST API �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
185
Index �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
227
v
Introduction
SharePoint has come a very long way over the years. Development in SharePoint has had just as long a
journey, often much more bumpy. There are still many highly skilled developers who would rather chew
their own arm off than become a SharePoint developer! However, SharePoint is not going anywhere
anytime soon, and with the popularity of Office 365 and SharePoint Online growing every day, developers
will find themselves being asked to create custom solutions more often. In the past this would have meant
installing SharePoint on your PC, learning new APIs that were unfamiliar, getting up to speed on deployment
processes, and more. You could easily look at those hurdles and become frustrated, which is common.
Luckily, with SharePoint 2013 and SharePoint Online you have more options.
Starting with SharePoint 2013, Microsoft greatly enhanced what could be done in the browser with
JavaScript. This included a brand-new REST API and an expanded set of JavaScript libraries utilizing the
JavaScript Object Model, or JSOM for short. These were originally built for use with Apps for SharePoint,
which is a new development model in SharePoint 2013. Apps allow you to write code that targets SharePoint
and then deploy it somewhere else. You could write custom solutions and deploy them to the cloud, and
your end users would never know the difference. This was great because it gave developers more freedom
and kept custom code off the SharePoint servers.
While JSOM and the REST API are great for Apps, there usage does not need to end there. These tools
can easily be consumed via JavaScript running in the browser. This opens a whole new world of development
possibilities to not only seasoned professional developers, but also the power users who know HTML and
JavaScript. This means that end users who are comfortable using HTML and JavaScript can begin building
some of their own solutions. Even better, with a very small learning curve, developers can utilize a skillset
that they already know. Gone are the days of being limited to building custom solutions in Visual Studio
and C#; now you have the option to build robust solutions that run directly in the browser!
This book will explore some of the various ways that you can utilize out-of-the-box components and
custom code to build solutions for SharePoint. By the time you finish, you will have created many custom
web parts that you probably thought were only in the realm of professional developers using expensive and
complicated tools. If you are a developer, you’ll see that SharePoint development is no longer something
overly complicated and to be avoided. No matter your station, I hope that you will come out the other side
with the confidence and knowledge to begin building your own custom solutions in SharePoint.
xvii
Chapter 1
Setting Up Your Environment
Setting up your environment properly will give you all the tools needed to build your custom solutions.
A lot of what you will need is already built into SharePoint and is ready to use. However, you will also want to
download and install some extra tools that will make your life easier. These tools include:
•
•
•
•
•
•
SharePoint Online Developer Site
SharePoint Designer
Visual Studio Express
Various browsers and developer tools
jQuery
Implementing jQuery in your SharePoint environment
If this list looks daunting, don’t be concerned. In this chapter we’ll explore each of the items in detail
to get you familiar with them and what they are used for. In addition, we’ll take a look at creating your own
SharePoint Online environment to use as a development area and show you how to implement jQuery in
that environment.
If you’ve been developing SharePoint solutions already and even just doing web development, you’ll
most likely already have these installed. This chapter will be geared more toward the business user or those
newer to front-end development. So if you’re a seasoned developer, you can skim this chapter to ensure you
have everything you need. No matter who you are, at the end of this chapter you will be fully prepared to
start the journey of building custom solutions in SharePoint!
SharePoint Online Developer Site
It goes without saying that being able to build custom SharePoint solutions is a wasted skill without somewhere
to build them! Some of you will already have an environment to use for development. This may be a SharePoint
Online environment that your business uses for their intranet, or perhaps a SharePoint 2013 on-premise
environment. It may be that you’re looking to learn SharePoint development for the first time and you have
nowhere to work. In any case, you have plenty of options available to you and we’ll explore those here.
■
Note
The options explored in this section will focus on SharePoint Online and Office 365. If you have
SharePoint installed on-premises, you can easily create a new site to work in. Even if you have SharePoint at your
fingertips at work, you may still want your own environment to work in so that the options here will still apply.
1
Plik z chomika:
jonedave3
Inne pliki z tego folderu:
C - Herbert Schildt.epub
(22892 KB)
C Programming - Program Design Including Data Structures.pdf
(25696 KB)
C Game Development By Example 2019.pdf
(8527 KB)
C# 7 and .NET Core 2.0 Blueprints - Dirk Strauss & Jas Rademeyer.pdf
(38123 KB)
C 14 Quick Syntax Reference (2nd Edition) - Mikael Olsson.pdf
(907 KB)
Inne foldery tego chomika:
@other-lang
@packed
0
1
2-1
Zgłoś jeśli
naruszono regulamin