481 Access Token, 125–126 Acquia Dev Desktop, 72 Admin UI And
Total Page:16
File Type:pdf, Size:1020Kb
Index A Angular CLI, 356 installation, 356 Access token, 125–126 API Blueprint, 449 Acquia Dev Desktop, 72 API design, 449 Admin UI and JavaScript Modernization API-first distributions, 269–281, 283 Initiative, 466–467 Contenta (see Contenta) advantages, decoupled Drupal, 45 Headless Lightning (see Headless content syndication, 45–46 Lightning) front-end developer experience, 47 Reservoir (see Reservoir) pipelined development, 48 variations, 269 separation of concerns, 46 API-first Drupal, 18 user-centered user API-first initiative, 18 experience, 46–47 API specifications, 449 Angular, 355, 466 Apple Watch, 470 AngularJS, 355 Application programming components, 358, 361, 363–364 interface (API), 15 dependency injection, 372 Asynchronous JavaScript and directives, 359, 365–369 XML (Ajax), 22–23 ngFor directive, 365 Atom, 28 ngIf directive, 367 Augmented reality (AR), 468 two-way data binding, 365 Authentication, 113 HttpClient, 375 basic authentication (see Basic observables, 375–376, 379 authentication) retrieving data from Drupal, cookie-based authentication 375–377, 379 (see Cookie-based authentication) reusable and nestable components, 358 OAuth2 Bearer Token authentication scaffolding, 356, 358 (see OAuth 2.0 Bearer token services, 370–372, 374–375 authentication) subscribe() method, 379 Authorization code grant, 121 subscribing to observables, 378–379 Authorization header, 115, 116 two-way data binding, 359–360 Axios, 285, 327, 329, 391 481 © Preston So 2018 P. So, Decoupled Drupal in Practice, https://doi.org/10.1007/978-1-4842-4072-4 INDEX B Surrogate-Keys header, 461 time-to-live (TTL), 463 Basic authentication, 113, 204 use cases, decoupled access tokens, 125–127 Drupal, 455–456 authorization header, 115, 116 personalization, 455 generating keys, 122 security, 455 grants, 121 VCL, 462 handling expired tokens, 128–129 X-Drupal-Cache-Tags header, 461 HTTP Basic protocol, 114 Cascading Style Sheets (CSS), 4 installation, 122 Chatbots, 7 scopes, 123 Client credentials grant, 121 scopes are permissions, 123 Client-side validation, 289, 446 session cookie, 117–119 Composer, 69 Simple OAuth installation (see Simple downloading Drupal and OAuth module) dependencies, 70–72 user roles, 123–125 installation, 69 BigPipe, 52 Conference Organizing Distribution Black box problem, 50 (COD), 269 Block placement, 472–473 Consumer Electronics Show (CES), 8 Bluetooth Low Energy (BLE), 8 Content AR and VR, 7–8 channels, 9 C conversational, 7 Cacheability metadata, 52 responsive web design (RWD), 5 Cache invalidation, 52 situational, 8–9 Cache tags, 52, 456–457 Contenta, 270, 303 Caching, 455, 458 Contenta.js, 308 cache indexing, 461 installation, 272–273 cache invalidation, 462–463 mission, 271 cache tags, 457 reference builds content delivery networks (CDNs), 457 contenta_angular, 303–304 hard purges, 463 contenta_ember, 304 incoherency, 459 contenta_react, 305–306 monolithic Drupal architectures, 455 contenta_vue_nuxt, 307 personalization, 455 contenta_angular, 303–304 purge requests, 462 Contenta ecosystem, 303 reverse proxies, 458, 460 contenta_ember, 304 soft purges, 463 Contenta.js, 308, 455 482 INDEX contenta_react, 305–306 X-CSRF-Token request Content as a service (CaaS), 19, 284 header, 145, 148 contenta_vue_nuxt, 307 CouchDB, 92–93, 203, 206 Content delivery networks (CDNs), 382, databases, 206 391, 432, 457–458, 460–462 documents, 206 purge APIs, 462 Cross-origin resource sharing (CORS), 77 Contentful, 284 configuration in Drupal, 77, 79 Content management system (CMS), 11 Cross-site content staging, 92 Content modeling, 168 Cross-site request forgery (CSRF), 145 Content staging, 91, 94, 96–97 Cross-site scripting (XSS) Content syndication, 45 attacks, 50 Contextual administration, 53 CSV Serialization module, 63 Contextual links, 50, 477 Custom modules, 419–420 Contextual tools, 53 .info.yml file, 419 Conversational content, 7 Cookie-based authentication, 116, 117 Cordova, 6 D Core REST, 73 Decoupled Blocks, 472–473 configuration, 74–76 Decoupled CMS architectures, 12–14 content entities Decoupled content management, 13, 19 creation, 148–150, 152 Decoupled Drupal, 29, 468 deletion, 158, 160 caching (see Caching) retrieval, 146–147 choosing architectures, 42 updating, 153, 157 definition, 29 DELETE requests, 158, 160 disadvantages (see disadvantages, GET requests, 146–147 decoupled Drupal) HTTP verbs (request methods), 144 Drupal as site and repository, 38–39 issuing HTTP requests, Drupal core flowchart for decision makers, 43 safe and unsafe methods, 144 fully decoupled Drupal, 31–32 serialization formats, 145 JavaScript developer experience, 471 X-CSRF-Token request performance (see also Caching), 435, 441 header, 145 preview, 471 modules, 73 progressive decoupling PATCH requests, 153, 157 (see Progressive decoupling) POST requests, 147, 152 pseudo-decoupled Drupal, 32–34 safe and unsafe methods, 144 security, 50 serialization formats, 145, 151 use cases, 40, 468 Views REST exports, 161 site-and-repository, 270, 468 483 INDEX Decoupled Router, 442 personas, 467 DELETE requests, 158 user experience, 465 core REST, 158, 160 Drupal 8, 82 JSON API, 200 cache tags, 457 Derived schemas, see Schemas cache tag system, 455–456 Devel module, 73, 185 Form API, 477 content generation, 73 plug-ins, 420 Devel Generate submodule, 73 Typed Data system, 446 Digital signage, 468 web services, 82 disadvantages, decoupled Drupal, 49 Drupal-aware decoupled Drupal, 32 additional point of failure, 49 Drupal Console, 420 lack of content workflows, 51 scaffolding custom modules, 420 lack of contextualized tools, 50 Drupal 8 core lack of layout and display entity access system, 67 management, 51 Hypertext Application Language (HAL) lack of security and input module, 68 sanitization, 50 OAuth module, 67 lack of system notifications, 51 serialize() and deserialize() need for accessibility and usability, 53 methods, 63 performance drawbacks, 52 web services, 82 Display Suite, 51 Drupal Deploy ecosystem, 91–92, 203 Distributed denial-of-service (DDoS) Drupal ecosystem, 81 attacks, 77 Drupal front end Document object model (DOM), 24 decoupled blocks, 471–473 Drupal, 12, 467 progressive decoupling, 471 administrative interface, 478 shared rendering, 474 community, 12 shared routing, 474 custom modules (see Custom modules) shared templating, 474 decoupling by design, 476–478 universal editing, 470 distributions, 269 Drupal iOS SDK, 299 editorial experience, 469 Drupalisms, 12 end-user experience, 469 Drupal-powered interface, 471 front end, 468 drupalSettings, 38 preprocess functions, 468 Drupal web services ecosystem, 81 shared routing, 475–476 dummy APIs, 449 installation profiles, 477 Dynamic HTML (DHTML), 4 new incongruity, 468 dynamic pages, 22 484 INDEX E Flux, 314 Flux architectural approach, 314 ECMAScript 6 (ES6), 27, 472 Fully decoupled Drupal, 31–32, 40 Electron, 28 Elm, 466 Ember, 399, 466 G adapters, 411–412 Generated API documentation, 449 customization, 413 Generated code, 452 JSONAPIAdapter, 411, 415 GET request, 146 components, 406–409 core REST, 146–147 ecosystem, 400–401 GraphQL, 239 JSONAPIAdapter, 412 JSON API, 184 launching a local server, 403 JSON-RPC, 432–433 models, 410–411 RELAXed Web Services, 207 retrieving data from Drupal, 412–413 Schemata module, 447 route handlers, 404, 412–413 Subrequests, 437 routes, 404–406 Views REST exports, 178 scaffolding, 401, 403 Graphical user interface (GUI), 14 templates, 403–404 GraphiQL, 108, 239 Ember CLI, 400 keyboard shortcuts, 240 installation, 401 GraphQL, 18, 98, 239 Ember Data, 400, 410 aliases, 243–244 ember-drupal-waterwheel, 300 condition groups, 256, 262–263 installation, 301 directives, 105–106 Ember FastBoot, 300, 401 filter operators, 255 Ember Inspector, 401 fragments, 103–105, 244 Entity Access system, 67 GET requests, 239 Entity Query API module, 285 limitations in typical RESTful Entity resolvers, 64 architectures, 98, 100 Expo CLI, 336 module, 107–108 installation, 336 motivations, 98, 100 Extensible Markup Language (XML), 15 mutations, 106–107, 263–264 permissions, 239 queries and mutations, 101 F retrieving entities, 239 Fielding constraints, 16–18 entity collections, 247–249 File Transfer Protocol (FTP), 4 entityLabel field, 240 Filtering entity collections, 255 entityOwner field, 243 485 INDEX GraphQL (cont.) Installation profiles, 477 filtering entity collections, 252 Internal Page Cache, 458 individual entities, 240 Internet of Things (IoT), 9 individual entities with Isomorphic JavaScript, see Universal relationships, 243 JavaScript sorting entity collections, 249, 251 J, K selection sets and fields, 101–103 JavaScript, 5, 23 variables, 105–106 JavaScript renaissance, 5–6 single-page applications (SPAs), 466 H universal JavaScript, 5 HAL+JSON format, 59 JavaScript Object Notation (JSON), 15 HAL+JSON normalization, 64 JavaScript renaissance, 23–24, 28 HAL module, 59 JavaScript-to-native frameworks, 6 HAL+JSON format, 59 jQuery, 24, 467 normalize() implementation, 64 JSON API, 18 Serialization API, 59 condition groups, 189 Handlebars, 403 creating resources, 195–198 Headless Lightning, 270, 279 DELETE requests, 200 installation, 280 deleting resources, 200 mission, 280 Drupal 8 implementation, 84 Headless software, 14 GET requests, 184 Hoodie, 97 JSON API, 200 HTTP Basic protocol, 114 module, 83, 88 authorization field, 114 module API HTTP/2 server push, 304 request headers and response Hydrant, see Waterwheel.js codes, 90–91 Hypermedia as the engine of application types, 89 state (HATEOAS), 17 URLs, 89–90 Hypertext Application pagination links and definitions, 186