@paul_tavares
JavaScript
API
Java
concatenate minify
Dojo Toolkit RequireJS
ScriptManJS
Wikipedia: https://en.wikipedia.org/wiki/Asynchronous_module_definition
// In the master page
<script type="text/javascript" data-
main="/_catalogs/masterpage/_ProjectRoot/js/ApplicationLoader.js"
src="http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.19/require.min.js"></script>
// Configure application components in common JavaScript
requirejs.config({
"baseUrl": MyProjectRoot + "/_catalogs/masterpage/MyMasterPage",
"paths": {
"jquery": (document.addEventListener) ?
['//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min', 'jquery-2.1.3.min'] :
['//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', 'jquery-1.11.1.min'],
"knockout": "//cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min",
"komapping":
"//cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.4.1/knockout.mapping.min",
"moment": "//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min",
"spservices":
"//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min",
…
});
});
// In a specific JavaScript file
define(["jquery", "knockout", "komapping", "moment", "spservices"], function($, ko,
komapping, moment) {
// Do things that require those modules, but only when they are all available
});
Also see: http://www.sptechcon.com/news/spservices-future-im-not-dead-yet
What do you want?
What do you struggle with?
What documentation holes do you see?
How can you help?
Email marc.anderson@sympraxisconsulting.com
Twitter @sympmarc
Blog http://sympmarc.com
SPServices http://spservices.codeplex.com
SPXSLT http://spxslt.codeplex.com
Books http://sympmarc.com/books
The Middle Tier Manifesto http://bit.ly/middletier

SPTechCon Boston 2015 - Whither SPServices?

  • 5.
  • 7.
    JavaScript API Java concatenate minify Dojo ToolkitRequireJS ScriptManJS Wikipedia: https://en.wikipedia.org/wiki/Asynchronous_module_definition
  • 8.
    // In themaster page <script type="text/javascript" data- main="/_catalogs/masterpage/_ProjectRoot/js/ApplicationLoader.js" src="http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.19/require.min.js"></script> // Configure application components in common JavaScript requirejs.config({ "baseUrl": MyProjectRoot + "/_catalogs/masterpage/MyMasterPage", "paths": { "jquery": (document.addEventListener) ? ['//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min', 'jquery-2.1.3.min'] : ['//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', 'jquery-1.11.1.min'], "knockout": "//cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min", "komapping": "//cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.4.1/knockout.mapping.min", "moment": "//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min", "spservices": "//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min", … }); }); // In a specific JavaScript file define(["jquery", "knockout", "komapping", "moment", "spservices"], function($, ko, komapping, moment) { // Do things that require those modules, but only when they are all available });
  • 11.
  • 12.
    What do youwant? What do you struggle with? What documentation holes do you see? How can you help?
  • 13.
    Email marc.anderson@sympraxisconsulting.com Twitter @sympmarc Bloghttp://sympmarc.com SPServices http://spservices.codeplex.com SPXSLT http://spxslt.codeplex.com Books http://sympmarc.com/books The Middle Tier Manifesto http://bit.ly/middletier