Drupal

OpenSense Labs: Scrum Framework: Agile Solution for Drupal Development

Planet Drupal - 24 July 2018 - 6:21am
Scrum Framework: Agile Solution for Drupal Development Shankar Tue, 07/24/2018 - 18:51

It is that time of an era where everything ranging from software projects to online purchases is expected to be delivered to us swiftly. Continuous delivery is the latest fad which has made it possible to perpetually adapt software in line with user feedback, shifts in the market, and alterations to business strategy. Scrum framework comes with a powerful set of principles and practices that help perpetuate continuous deliveries in business enterprises.

In an earlier blog, we traversed the agile development methodology and its amazing benefits for project management. Scrum is one of the most popular of the agile approaches. Not only the software industries, where the origins of scrum lay, but a truckload of filmmakers, educational institutions, and a growing number of manufacturing companies have started adopting agile processes.

How can scrum framework be a big boost to the development of Drupal-based projects? Let’s find out.

Origins of Scrum

The term ‘Scrum’ has its origins in the 1985 article The New New Product Development Game by Hirotaka Takeuchi and Ikujiro Nonaka which was published in the Havard Business Review. In 1995, Jeff Sutherland and Ken Schwaber jointly presented a paper, “The Scrum Development Process” at Object-Oriented Programming, Systems, Languages and Applications (OOPSLA) conference.

"Scrum is a power-packed set of principles and practices that assist with the project development"

Subsequently, with the formation of the Agile Alliance and the Scrum Alliance, it paved the way for the establishment of Scrum.org in 2009 for further improvements.                                                                             

What is Scrum?

 

Scrum, an agile process, is a simple and amazingly power-packed set of principles and practices that assist teams with the project development. It lets you deliver products in short cycles, enables super feedbacks, aids in ceaseless betterments and rapid adaptation to alterations.

Scrum framework allows people to address intricate adaptive challenges and deliver top-of-the-line products while maintaining productivity and creativity.
 
It is the obverse of a huge set of interlaced mandatory components. It executes the scientific method of empiricism and supersedes a programmed algorithmic approach with a heuristic one to encounter volatility and solves intricate problems.

What are the basics of Scrum? Source: Scrum.orgUsage

Initially, it was developed to developing and governing products. Starting in the early 1990s, it has been heavily used worldwide to:

  • Identify the product capabilities, technologies and the market feasibility through an extensive research
  • Build products and release them frequently numerous times a day
  • Build and sustain cloud(online, safe, on-demand) and other operational environments for product use
  • Sustain and revitalise products

It has been used to build almost everything ranging from embedded software and networks of interacting function to marketing and governing the operation of business enterprises.

With its reputation for iterative and incremental knowledge transfer, it is now widely used for products, services and the governance of the parent organisation.

Theory

Scrum adheres to empirical process control theory or empiricism and the three most important aspects that help in the implementation of empiricism are:

  • Transparency: Significant aspects of the process are defined by a standard benchmark so that it is visible to whomsoever responsible for the outcome.
  • Inspection: Scrum artefacts and the progress status towards the sprint goal should be assiduously inspected by skilled inspectors. Also, too much of inspection should not get in the way of the work.
  • Adaptation: To minimise any sort of deviation if one or more aspects of the process go beyond the scope of acceptable limits, adjustments should be done as quickly as possible.
Team

Scrum team is composed of a Product Owner, the Development Team and a Scrum Master.

  • Product Owner is the sole person taking care of the management of the Product Backlog.
  • Development Team delivers a potentially releasable increment of a ‘Done’ product after a sprint ends.
  • Scrum Master helps everyone on the team understand the Scrum theory, practices, rules and values.
Values such as openness, respect, courage, commitment, and focus are assimilated and lived by the Scrum Team to build trust for everyone. Events

Events involved in the Scrum are time-boxed events to get the maximum duration for each of them thereby ensuring regularity.

  • A Sprint is a time-box event that involves one month or less during which a ‘Done’, usable, and a potentially releasable product is created. After a Sprint ends, the new one is initiated immediately.
  • A Sprint can be aborted by the Product Owner before the Sprint time-box is over if the Sprint Goal becomes superannuated.
  • Sprint planning involves the work that is needed to be performed in the Sprint. It goes to a maximum of eight hours for a one-month Sprint.
  • The Sprint Goal is the set of objectives framed for the Sprint which has to be met through the implementation of Product Backlog.
  • The Daily Scrum is held every day of the Sprint which is a 15-minute time-boxed event for the Development Team so that they can plan their work for the next 24 hours.
  • A Sprint Review allows the Scrum Team and the stakeholders to collaborate on what was done in the Sprint. This is done at the end of the Sprint to review the Increment and adapt the Product Backlog if required. This is at most a four-hour meeting for one-month Sprints which is lesser for shorter Sprints.
  • The Sprint Retrospective is a phase where the Team inspects itself and creates a plan for betterments that can be incorporated during the next Sprint. This is done after Sprint Review and involves at the most a three-hour meeting for one-month Sprints.
Artefacts

Artefacts defined by Scrum represent work or value and is designed to maximise transparency such that everyone is on the same page when it comes to the understanding of the artefact.

  • Product backlog refers to the ordered list of everything that is required to be included in the product. It happens to be the prime source of requirements for any alterations to be made to the product. The Product Owner handles the content, availability and ordering of the Product Backlog. The total work that is remaining to be done to attain a goal can be summed at any point in time. The Product Owner monitors the progress towards the goals and this information is made transparent to all stakeholders.
  • The Sprint Backlog is the collection of Product Backlog items chosen for the Sprint in addition to the plan of delivering the product Increment and realising the Sprint Goal. The Development Team tracks the total work remaining at least for every Daily Scrum to forecast the likelihood of attaining the Sprint Goal.
  • The Increment is the summation of all the Product Backlog items that are completed during a Sprint and the value of all the increments that were completed in the previous sprints.
  • Artefact Transparency is an important component where the decisions to optimise value and control the risks involved are made. These decisions are made on the basis of the perceived state of the artefacts.
How can Drupal development be improved with Scrum framework?

Drupal Community has been very active and has shown a huge interest in this prime source of agility in the Drupal development.

A DrupalCon Vienna session in 2017 presented a Scrum master story where they talked about how their company hacked their way into agility. With a couple of weeks of preparations, they pulled off a Hackathon of a complete week and all the non-ICT (Information and Communication Technologies) teams joined in.

Their development department formed 3 Scrum teams and started working with the Scrum framework with the help of an Agile Coach to improve their project management. Not only did the development team benefitted from the incorporation of Scrum values but the non-technical teams extracted a lot of merits as well.

With the use of hackathons, they achieved a discernible transformation from an old-fashioned department centred company to a more holistic organisation with roles instead of functions in addition to multi-disciplinary teams. Thus, agility was brought to the way they functioned in this continuously transforming digital arena.

Another session at a DrupalCon Baltimore session in 2017 delineated an agency’s transition to scrum for their project development needs. For managing a project, the agency used to sit down with the clients at the project kickoff and laid down the roadmap. This involved every other specification with a day-long discovery workshop. And then, they would wade into the design and building process.

To improve this kind of development process, the Scrum-based agile workflow was adopted. This helped them to work on several projects simultaneously without burning out developers thereby resulting in a timely and quality code.

Implementation of Scrum eliminated the logjam of a single technical lead, specified everything at the inception of a project, brought clients and developers together, and enhanced the precision of work estimations.

The highlights of Scrum adoption in their agency include:

  • Kept the team organised, focussed and motivated while engrossed on several projects at the same time.
  • Helped in managing shifting workloads without having any repercussions on project delivery or spoiling team happiness.
  • Involved the Product Owner in the live instances of the project development process
  • Divided the work into Epics, Stories, Tasks etc.
  • Estimated with much more accuracy
  • Could run efficient retrospectives with a distributed team
  • Scheduled BOFs (Birds of a feather session) so that attendees could share their experiences of Scrum adoption in their own teams.
Case study

The Scrum.org team wanted to redesign their website and needed a partner who can adhere to Scrum’s three most important pillars - transparency, inspection and adaptation - and follow the agile approach i.e. Scrum.

  Challenges

Existing website of Scrum.org was not equipped with the right technology and strategy to facilitate their growth as an organisation. A redressal was needed to build a modern and future-friendly website. Following aspects were needed to be incorporated:

  • Modern technology
  • Responsive web design
  • Search engine friendliness
  • Scalability
  • Sleek design
  • The unified site-wide value proposition

Moreover, they wanted to:

  • Adhere to the Scrum framework
  • Form a single, inter-organisational team that includes members within their organisation as well as the digital agency who is helping them.
  • Adapt and innovate while figuring out the logistics of the new style of client-agency teamwork
How did it work?

The website of Scrum.org was redesigned using Drupal 8 and it proved rewarding. Drupal 8, proved to be the perfect platform that provides the flexibility and scalability as the site continues to grow. Drupal 8’s out-of-the-box responsive web design features and seamless integrations resulted in the unified and sophisticated site.

Website traffic was an important part of their strategy. Through automated SEO features, not only search engine rankings were improved, but the administrators who are unfamiliar with SEO could still create search-engine friendly pages.

Moreover, the Scrum framework improved the efficacy of the project delivery. Through the formation of Scrum Team in both the organisations with the Product Owner residing inside Scrum.org, Scrum Master located in the digital agency, and the development team present in both the organisations, unprecedented transparency and efficiency was witnessed.

Within a month of starting the project, which is a Sprint in Scrum, Scrum.org had a working homepage.

Conclusion

Project management and continuous delivery are an integral part of business enterprises. Leveraging the best of Scrum framework and Drupal’s robust features, web development can be streamlined to a great extent.

We provide Drupal development services with that being our strong suit and have been doing this since our birth as a company. Drop in a mail at hello@opensenselabs.com to for smart software delivery using Drupal and Scrum framework.

blog banner blog image Agile development methodology Agile process Project management Drupal development Scrum framework Scrum Blog Type Articles Is it a good read ? On
Categories: Drupal

Amazee Labs: Our second webinar is around the corner!

Planet Drupal - 24 July 2018 - 4:16am
Our second webinar is around the corner!

We're very excited to share some details with you about our next Amazee Webinar where we'll discuss atomic design in Drupal with GraphQL & Twig.

Anli de Jager Tue, 07/24/2018 - 13:16

The notion of atomic design systems has made its way to Drupal quite some time ago. Tools like Patternlab and Fractal are part of our everyday workflow, but their integration with Drupal's theme system still offers challenges.

Our speaker, Philipp Melab, will take the lead and make sure that we take an in-depth look at this, and in this webinar, we will build upon the first chapter and leverage the power of GraphQL to build a clearly structured and really decoupled component library. 

Date: Friday, 24 August 2018

Time: 4-5pm CEST

Below is a screencast of our previous webinar to give you a good understanding of what to expect in our second edition end of August.

Categories: Drupal

Odoo API

New Drupal Modules - 24 July 2018 - 1:24am

The Odoo API module provides Odoo CRM integration using XMLRPC.

Categories: Drupal

Tandem's Drupal Blog: Writing a Custom Drupal 8 Module Upgrade Path

Planet Drupal - 23 July 2018 - 5:00pm
July 24, 2018 There are a few occasions where a contrib module may not have an upgrade path written yet in Drupal 8. It is a fairly easy and straight forward task to create these to win all your migration efforts. Migrating The Workflow Module We have a client that utilizes Drupal in a unique way. They use Drupal as a proposal management system...
Categories: Drupal

Aegir Dispatch: Back Your Stack

Planet Drupal - 23 July 2018 - 5:00pm
The Open Collective project has started a nice initiative called BackYourStack. Their original angle is to look at code from a dependency manager and derive on which libraries you’re building. Their first code is for npm, hopelyfully more is soon to come. But I’d like to extend that to the Aegir community to better understand what we are using. See https://backyourstack.com/ Like Aegir they try to work out in the open … anyone can help on https://github.
Categories: Drupal

Drupal Association blog: Moving Promote Drupal Initiative forward

Planet Drupal - 23 July 2018 - 4:37pm

In April 2018 at DrupalCon Nashville, Dries and Megan Sanicki announced the launch of an initiative to help promote Drupal in the market. This initiative will support agencies world-wide with marketing and sales support that unifies the Drupal brand and provides standardized materials that can be customized to each user's needs.

It was stated in early communications that while we are fundraising for $100,000 we would begin work on this initiative when we hit $75,000 and are able to hire staff to help support the Drupal Association in this organizing effort. We’ve hit that mark - $76,000 as of July 2018 - and are now actively hiring to backfill the communications team work as Director of Marketing, Rebecca Pilcher (that’s me!) shifts focus to work on the initiative to promote Drupal.

Purpose

One of the Drupal Association 2018 goals is to grow adoption of Drupal. The audience for Drupal is broad and varied, depending on what part of the world you talk to. So are the decision makers choosing to adopt Drupal, as well as the people and agencies selling Drupal services.

Our enterprise market competition has deep pockets for product marketing and heavy sales support. Even our mid-market open source competition’s marketing is heavily backed by corporate funding.

So how can the Drupal Association help grow adoption of the product, across such a diverse market, with our limited budget? It won’t be easy, and it won’t be perfect for everyone, but an ideal outcome will create a source for standardized Drupal materials and stories that the world-wide community can use in their own regions to promote Drupal to new audiences and grow adoption.

To that end, this initiative will be focused on creating materials targeted to the decision makers that choose to adopt Drupal for their business.

Kicking things off

As it was originally conceived and outlined by Megan and Dries, the Promote Drupal Initiative is:

This volunteer-based initiative will globally orchestrate a compelling and consistent message into the marketplace, helping business decision makers and influencers fall in love with Drupal. We will empower agencies, local Drupal Associations, Drupal.org, and other channels with the marketing and evaluator resources needed to promote Drupal and help organizations quickly see why Drupal is the right choice for them.

This initiative has four phases:

Phase 1: Update Drupal's brand and strategic messaging to connect with new decision makers and influencers

Phase 2: Provide sales and marketing materials that everyone can use (and translate!)

Phase 3: Coordinate PR campaigns

Phase 4: Create "marketing campaigns in a box" to support localized ad and industry event marketing

This fundraising campaign will support Phase 1 & 2.

At the end of May 2018 Drupal Association Marketing Director, Rebecca Pilcher (again - that’s me) held a brainstorm meeting with a handful of business-marketing leaders from different sectors of the Drupal community and around the globe. We discussed needs of the Drupal business community and desired outcomes of a limited-term Drupal marketing initiative and outlined some of the following:

  • Community support and resource needs
  • Range of objectives
  • Ideal outcomes - what does a win look like
  • Possible solutions

Many community members have stepped forward to volunteer time and energy towards this initiative - one of our biggest questions was “how to organize, so that we are using everyone’s strengths in the best way possible”. We think we’ve come up with a creative solution, and have outlined it in the Phase I plans below.

Phase I

July - mid-September 2018

Phase I includes planning and creating the infrastructure needed to carry out the initiative, as well as creating an updated brand book with strategic messaging to connect with new decision makers and influencers.

Specifically, in this phase we will work on several key tasks:

  1. Creating Drupal brand book
  2. Building an open source marketing infrastructure for collaborative projects - and governance to guide its use.
    • Will include a mechanism for sharing completed projects on Drupal.org for Drupal agencies to use - organized by purpose, audience, other important demographics.
    • Outline clear governance for participation and contribution
  3. Distributing press releases as they come up - sharing finished releases with international regional associations for translating and sharing in their own communities.
  4. Redesigning the submission process and template for case studies and how they are selected to be turned into Drupal business case studies, as general Drupal brand collateral.

As part of a separate Drupal Association initiative, we are planning a redesign of drupal.org/community. The redesign will do several things, but specific to this initiative it will better reflect ways (outside of code) community members can support Drupal and highlight drupal.org/community/marketing as part of that. drupal.org/community/marketing will include work done in sub-point 2 above.

Let me elaborate below on those deliverable points from above.

Brand book

With the help of volunteers, we will create a Drupal Brand Book. A brand book generally includes the following:

  • Brand introduction: what is Drupal?
  • Logo use guidelines
  • Color palette
  • Fonts
  • Tone, voice and style for copywriting
  • Key messages/value proposition and selling points
    • By persona
    • By industry

The brand book will act as the backbone for all of the marketing and sales materials developed through the larger initiative, and will be a resource for all community members and agencies - to better align Drupal messaging and marketing, for a stronger overall market presence.

Completion goal: mid-September

Open Source Marketing Infrastructure

Creating marketing materials for a world-wide brand is no small feat. We see the need for many different types of materials, and have volunteers offering time and energy to create a good portion of what's needed. But how do we organize all of it?

In much the same way Drupal code contributions are made through issue queues and commits, we will create a system for marketers and business members in the community to organize and participate in their own form of issue queue and project management for marketing materials.

Borrowing some organizational ideas from WordPress, we’ll create a space for people to submit the materials they need, and for others to create those materials - from writing and design, to case studies and sales sheets. This space will include a mechanism for sharing completed projects on Drupal.org for Drupal agencies to use - organized by purpose, audience, other important demographics.

During Phase I of the Promote Drupal Initiative, we’ll build out this space and organize the systems for it to run smoothly. Part of that means, defining clear governance for participation and contribution, so that everyone knows how things work, and understands the expectations attached.

Completion goal: mid-September

Press and media

Press releases and media were not originally part of the Phase I scope. However, based on resources that have been volunteered, we will begin to put out press releases that tell valuable stories as they become available beginning immediately and ongoing through the end of the year. We will also share releases with international regional associations for translating and sharing in their own communities.

Valuable story angles that would be considered for publishing on through our press wire, might include:

  • Prestigious awards won by Drupal projects
  • Strong brand stories that use Drupal to shift their market
  • Innovative partnerships that spotlight how Drupal stands out in the market.

This work will be ongoing.

Case Study submissions

Very soon Drupal Association will redesign the submission process and template for case studies shared through Drupal.org. The goal will be to more easily identify which Drupal community technical case studies could be easily turned into meaningful Drupal business case studies - for sharing with the broader Drupal community as general Drupal case studies with standard look and feel as outlined by the upcoming Brand Book.

Completion goal: mid-August 2018

Phase II

Beginning Sept 2018 - ongoing

Provide sales and marketing materials that everyone can use (and translate!)

Once the infrastructure for Drupal open source marketing is set up, we’ll begin recruiting community members - many who have already self-identified as ready to help - to participate in regular sprint calls and collateral planning. Within this ongoing phase of the initiative we will:

  1. Set a roadmap for the most needed marketing and sales materials in the community
    1. Branded assets
    2. Templates - sales support materials, agency co-branded case studies
    3. How-to’s
    4. Case Studies, Success Stories, use cases
    5. Maybe even videos depending on who volunteers!
  2. Begin implementing that roadmap through the online community interface
  3. Continue pushing press releases and media recognition
Audience

To ensure this initiative starts with focus and purpose, we have identified specific personas as the key targets for our initial work.

  • Marketing decision makers. While a few different personas might contribute to the decision to adopt Drupal, the most underserved in our community’s current work and materials, is the marketing decision maker. They are increasingly becoming the position with the budgetary discretion to choose an enterprise CMS, and our work will begin by creating materials with this decider in mind.
  • Sales materials to support Drupal Agency sales teams. We have heard from many in the community that generally branded Drupal sales materials would be incredibly helpful. To increase the reach and impact of the sales materials being used by Drupal agencies, we will unify the brand (through the brand book) and streamline efforts so that agencies can take advantage of centralized work, rather than each agency often duplicating efforts.
Drupal.org/community (not part of this initiative, but associated)

Drupal.org/community is a valuable asset that can serve many purposes. Future (yet-to-be developed) sub-sections of it can be leveraged to better organize the work we’re planning on doing to promote Drupal in the coming year.

While the reorganization of Drupal.org/community is not part of this initiative, it is linked, and so we will share our goals specifically for the (forthcoming) sub-page that relates to promote drupal content and making business marketing connections.

We plan to incorporate the open source marketing infrastructure (issue queues, project management space, etc.) created into d.o/community/marketing to provide an easy to navigate 1-stop place for:

    • Contributing
    • Searching usable content
      • Branded assets
      • Templates: sales support materials, agency co-branded case studies
      • How-to’s for marketing Drupal
      • Case Studies, Success Stories, use cases
    • Downloading materials for use

Completion goal: to be determined by Community Liaison in the second half of 2018

Phase III

(not funded - details below are copy/pasted from past blog posts and are not currently being planned)

Coordinate PR campaigns

Phase IV

(not funded - details below are copy/pasted from past blog posts and are not currently being planned)

Create "marketing campaigns in a box" to support localized ad and industry event marketing.

What this initiative is not...

There have been a lot of really great ideas for moving this initiative forward. Many of them we’ve been very excited about - but they just don’t align with our current purpose or funding.

Just so we’re all on the same page, here are some items this initiative will not include:

  • Supporter lead generation. Lead generation is generally tied to Drupal Association revenue programs. This initiative is designed to support the global community.
  • DrupalCon lead generation. While DrupalCon may use some of the content created by this program to help promote the event - none of the funds from the promote Drupal initiative will be used to create lead generation programs for the event.
  • Public advertising/marketing campaigns. Well-funded, broad-reaching campaigns are effective at growing awareness and adoption. However this initiative does not have the funding to compete in widespread ad market. Additionally, each global region has specific needs and we believe the individual needs of each market are best served by providing valuable content to those market agencies/community members for use how they see fit.
A ‘Thank You’.

As we move into the implementation phase of this initiative, we want to be sure we say another “thank you” to all those who have helped make this possible. This includes partners, agencies, and individuals.

Thank you to those who donated. This would not exist without you. We ask you to visit our partner page and see all the names and logos. If you use any of the materials created by this initiative, and you see these people at events or in meetings, please be sure to thank them.

Thank you to those who advised us. We have a lot of ideas, but we couldn’t have sorted them all out without the help of the following people:

  • Michel van Velde, One Shoe
  • Josh Koenig, Pantheon
  • Scott Delea, Phase2
  • Ellie Fanning, Lullabot
  • Ricardo Osuna, FFW
  • Lynne Capozzi, Acquia
  • Paul Johnson, CTI Digital
  • Annie Miller, former Drupal Association Board member
Categories: Drupal

Dynamic Inject

New Drupal Modules - 23 July 2018 - 4:09pm

Dynamically injects content into the page. Content can be a block or a placeholder that can be replaced with the final content.
Any block that is available can be inserted, example: Views, Ads, etc.

How it works

It provides a context reaction which you can configure the CSS selector where you want to insert your block.
You can choose if the content should be injected before or after the element and the distance from top or bottom.

Categories: Drupal

Views Filter Clear

New Drupal Modules - 23 July 2018 - 3:57pm

The Views Filter Clear module allows 'Clear' links to be configured for individual exposed views filters. These links clear any submitted value from the view. They operate independently of one another. This is different from the Reset buttons available for exposed forms, which reset the entire form to its default
state.

Categories: Drupal

PreviousNext: Removing jQuery from your Drupal theme

Planet Drupal - 23 July 2018 - 3:25pm

In a previous article Using ES6 in your Drupal Components, we discussed writing our javascript using the modern ES6 methods and transpiling down for older browsers. It still used jQuery as an interim step to make the process of refactoring existing components a little easier. But let's go all the way now and pull out jQuery, leaving only modern, vanilla javascript.

by Rikki Bochow / 24 July 2018 Why should we do this?

jQuery was first introduced 12 years ago, with the intention of making javascript easier to write. It had support for older browsers baked into it and improved the developer experience a great deal. It also adds 87KB to a page.

Today, modern vanilla javascript looks so much like jQuery! It’s support in the evergreen browsers is great and it’s so much nicer to write than it was 12 years ago. There are still some things that jQuery wins on but in the world of javascript frameworks, understanding the foundation on which they are built makes learning them so much easier.

And those older browsers? We don’t need jQuery for that either. You can support older browsers with a couple of polyfills. The polyfills I needed for the examples in this post only amounted to a 2KB file.

Drupal 8 and jQuery

One of the selling points of Drupal 8 (for us front-enders at least) was that jQuery would be optional for a theme. You choose to add it as a dependency. A lot of work has gone into rewriting core JS to remove the reliance on jQuery. There are still some sections of core that need work - Ajax related stuff is a big one. But even if you have a complex site which uses features that add jQuery in, it's still only going to be on the pages that need it. Plus we can help! Create issues and write patches for core or contrib modules that have a dependency on jQuery. 

So what does replacing jQuery look like?

In the Using ES6 blog post I had the following example for my header component.

// @file header.es6.js const headerDefaults = { breakpoint: 700, toggleClass: 'header__toggle', toggleClassActive: 'is-active' }; function header(options) { (($, this) => { const opts = $.extend({}, headerDefaults, options); return $(this).each((i, obj) => { const $header = $(obj); // do stuff with $header }); })(jQuery, this); } export { header as myHeader }

and..

// @file header.drupal.es6.js import { myHeader } from './header.es6'; (($, { behaviors }, { my_theme }) => { behaviors.header = {   attach(context) {     myHeader.call($('.header', context), {       breakpoint: my_theme.header.breakpoint     });   } }; })(jQuery, Drupal, drupalSettings);

So let’s pull out the jQuery…

// @file header.es6.js const headerDefaults = { breakpoint: 700, toggleClass: 'header__toggle', toggleClassActive: 'is-active' }; function header(options) { const opts = Object.assign({}, headerDefaults, options); const header = this; // do stuff with header. } export { header as myHeader }

and...

// @file header.drupal.es6.js import { myHeader } from './header.es6'; (({ behaviors }, { my_theme }) => { behaviors.header = { attach(context) { context.querySelectorAll('.header').forEach((obj) => { myHeader.call(obj, { breakpoint: my_theme.header.breakpoint, }); }); } }; })(Drupal, drupalSettings);

We’ve replaced $.extend with Object.assign for our default/overridable options. We use context.querySelectorAll('.header'') instead of $('.header', context) to find all instances of .header. We’ve also moved the .each((i, obj) => {}) to the .drupal file as .forEach((obj) => {}) to simplify our called function. Overall not very different at all!

We could go further and convert our functions to Classes, but if you're just getting started with ES6 there's nothing wrong with taking baby steps! Classes are just fancy functions, so upgrading to them in the future would be a great way to learn how they work.

Some other common things;

  • .querySelectorAll() works the same as .find()
  • .querySelector() is the same as .find().first()
  • .setAttribute(‘name’, ‘value’) replaces .attr(‘name’, ‘value’)
  • .getAttribute(‘name’) replaces .attr(‘name’)
  • .classList.add() and .classList.remove() replace .addClass() and .removeClass()
  • .addEventListener('click', (e) => {}) replaces .on('click', (e) => {})
  • .parentNode replaces .parent()
  • .children replaces .children()

You can also still use .focus(), .closest(), .remove(), .append() and .prepend(). Check out You Don't Need jQuery, it's a great resource, or just google “$.thing as vanilla js”.

Everything I’ve mentioned here that’s linked to the MDN web docs required a polyfill for IE, which is available on their respective docs page.

If you’re refactoring existing JS it’s also a good time to make sure you have some Nightwatch JS tests written to make sure you’re not breaking anything :)

Polyfills and Babel

Babel is the JS transpiler we use and it can provide the polyfills itself (babel-polyfill), but due to the nature of our component library based approach, Babel would transpile the polyfills needed for each component into that components JS file. If you bundle everything into one file then obviously this won’t be an issue. But once we start having a couple of different components JS loaded on a page, all with similar polyfills in them you can imagine the amount of duplication and wasted KB.

I prefer to just put the polyfills I need into one file and load it separately. It means have full control over the quality of my polyfills (since not all polyfills are created equally). I can easily make sure I’m only polyfilling what I really need. I can easily pull them out when no longer needed, and I’m only loading that polyfill file to browsers that need it;

js/polyfill.min.js : { attributes: { nomodule: true, defer: true } }

This line is from my themes libraries.yml file, where I'm telling Drupal about the polyfill file. If I pass the nomodule attribute in browsers who DO support ES6 modules will ignore this file, but browsers like IE load it. We're also deferring the file so it's loading after everything else.

I should point out Babel is still needed. We can't polyfill everything (like Classes or Arrow functions) and we can't Transpile everything either. We need both, at least until IE stops requiring support.

Tagged ES6, jQuery, JavaScript, Drupal 8
Categories: Drupal

Commerce Simple Stock

New Drupal Modules - 23 July 2018 - 2:23pm

The module implements a simple stock management for Drupal Commerce.

Usage:
- Add a field_stock to the variant type.

Features:
- Hide the add to cart form when stock is 0 and show "Out of stock".
- Prevent adding the product to cart when its not available.
- Prevent checking out order items when its not available.
- Decrease product variant stock when an order is placed.

Categories: Drupal

Boolean Single State Formatter

New Drupal Modules - 23 July 2018 - 1:45pm

This module provides an additional formatter to Boolean field, that provides display for only one state (on by default).

According to the value of the boolean field, the formatter may hide the output of the field. This is useful when you want to only have some text when the state is "on" and nothing displayed when "off".

Categories: Drupal

Axelerant Blog: Drupal Consulting: Partnerships & The Global Approach

Planet Drupal - 23 July 2018 - 12:56pm


Nobody likes a backseat driver.

Categories: Drupal

Drupal Association blog: DrupalCon Europe - a progress update...

Planet Drupal - 23 July 2018 - 8:49am

After enjoying the beautiful city of Vienna during DrupalCon Vienna in 2017, I’m now looking forward to experiencing the city of Darmstadt at the community-driven Drupal Europe conference in September. I’m absolutely sure it is going to be a great event and will do an amazing job of stepping in whilst the Drupal Association retools the future of DrupalCons around the World, especially Europe. I have my ticket - do you?

The European Drupal Community is extraordinarily vibrant. We have seen both wonderful Drupal Camps in fascinating locations and larger Drupal events, like Frontend United and Drupal Dev Days, attracting their largest ever attendances.

Creating a sustainable model for DrupalCon Europe continues to be an important goal for Drupal. A lot of progress and learnings have been made and we would like to share a progress report.

The sustainability of the Drupal project depends upon us bringing great events to all parts of the world in a way that does not place the project at financial risk. As you know, Megan, the Drupal Association Board, and staff created the licensing model for events to ensure that we can achieve this.

After creating the DrupalCon Licensing model with Bert Boerland, Baddý Breidert, Alex Burrows, Gábor Hojtsy, Janne Kalliola, Zsófi Major, and Stella Power, we published a call for proposals at the end of last year and a number of organisations stepped forward with proposals. Every one of those proposals showed great promise and left us in the enviable position of having to choose between a number of viable options.

It’s important that we create this licensing partnership with care so it is set up for success in 2019. We are taking the time needed to have all of the right conversations and testing financial assumptions before entering into anything. We are making good progress and working through summer on this initiative. Once a partnership is finalized, we will share the details with the community - hopefully at Drupal Europe.

The level of engagement around the licensing concept is very encouraging. It means great things for Europe as well as for all the many places around the world that will benefit greatly from hosting DrupalCon in their country, too.

In conclusion

A very quick recap:

Decide to change to the licensing model

Postpone DrupalCon Europe for one year

Develop the licensing model and contracts

Publish a call for proposals

Work with organisations to help them understand DrupalCon

Assess applications according to our model

Sign contracts with successful organisation

ongoing

Announce the winning proposal at Drupal Europe Provide support as they develop DrupalCon Europe Enjoy DrupalCon Europe in ...
Categories: Drupal

Xeno Media: What should you know about the Bitcoin Email Extortion Scam?

Planet Drupal - 23 July 2018 - 8:33am

Here’s the threat delivered to your email: They've infected your system with remote computer control malware. Pay a ransom in bitcoin or they’ll release evidence of you watching adult material. They show your password, or part of it, to prove their case.

Is this threat credible? No, it’s a scam. The bad guys got your information from a breach and are using it to shake you down. The evidence is manyfold:

It’s an untargeted, mass email scam

The scammers are not targeting specific individuals. Your inbox is one of thousands in a database. They’re only hoping to capitalize on panic and embarrassment to force some small number of people to pay the ransom. Their goal is making fast cash from the volume of people who give in, they’re not interested in running high effort blackmail. We know this because the content of the email is nearly identical in many, many reports.

Not only is there no concrete proof offered, the scammers actively dissuade the would-be victim from looking for evidence. There’s no mention of which adult website you had visited. Your full name often does not appear in the email. There are no images or videos of you attached or linked to.

No malware detected

The emails also claim to have installed malware through which they gathered this incriminating material - yet, malware scans reveal no threats. True, malware scanners vary in accuracy when it comes to more subtle infections. Software capable of remotely accessing your system is not one of those.

Nothing new under the sun

The history of this threat is also a clue to it being a scam. These reports have been floating around since the end of 2017. The nature of their threat, the amount of money they’re demanding and the method of ‘evidence’ collection has changed but it is essentially the same scam. A stranger threatens to reveal embarrassing information about you and will remain silent in exchange for a ransom.

So, what should you do?

You should not pay this ransom, but you should definitely see this as a big wake up call about your data security. This data was pulled from one of the many data breaches that’ve been popping up in the last several years. That means that your email and password has been compromised.

Next, act:

  • Whichever password appeared in the email: change it, everywhere and never use it again. You can check if your password has ever appeared in a breach. If it has, never use it again.

  • Adhere to good password practices when creating new passwords.

  • Run a malware scan on your system - (Malware Bytes)

  • Consider cloud-based password vaults like 1Password or LastPass.

    • If you only have to remember 1 master Password, you can make it as secure and strong as possible

  • Create long and high-strength passwords by forming a memorable phrase, then adding capitalization and punctuation.

    • It would take a computer running a brute force password cracker approximately 2 Sexdecillion years to crack "Iwaswanderingthroughthetulips1day!" -  that's a 2 followed by 96 zeros.

Concerned about keeping your website more secure? Learn about our on-going website maintenance services.

Categories: Drupal

External Data Source

New Drupal Modules - 23 July 2018 - 7:15am

The need of using external data source in Drupal in a context of a Microsevice architecture is increasing. So this module will allow you to create a new data source as a plugin that you can find it when you configure your field "external data source" field.
Back to wikipedia to explain why we use this module:

Categories: Drupal

Update worker

New Drupal Modules - 23 July 2018 - 5:10am

Provides a Drupal queue you can use to process a bunch of operations in an asynchronous way.

For example if you have 1 million items you want to query and do operations on, in an update hook, it would be better to do them async.

Just use this queue, and pass it a callback and some arguments, and you are good to go.

Categories: Drupal

OpenSense Labs: Breaking Down the Concept of Distributed Content Management System

Planet Drupal - 23 July 2018 - 5:04am
Breaking Down the Concept of Distributed Content Management System Akshita Mon, 07/23/2018 - 17:34

Advances in technologies have brought us to the situation where huge amounts of ever-flowing media content need to be routinely stored, encoded, and exchanged. Heading an organization – such as a multinational/regional media organization – with the complex content creation and publication needs while also keeping a track of the content can be a difficult task.

Networked storage and exchange of data allow content to be distributed across a network making the task of content management all but impossible to deal without a content management system.

Considering the popularity of Drupal as the CMS, in this article we will explore how Drupal can help in providing and managing the modern digital experience with a Distributed Content Management System. 

Understanding the Concept

To develop a better understanding of the distributed content management system, let’s understand with an example of a national daily which also publishes content in different regional languages. 

What is Distributed Content Management System?

Let’s call this media house - One India News. Further, it has 6 different regional websites. Similar to many media institutions, the website channels are split into multiple categories (let’s say 5) and each of those categories further houses a number of sub-sections.  

Some of the regional websites may only have 2 to 4 categories depending on the demand, but others may have upwards of 10 with each category having an editorial team of its own.  

And let’s not forget that each of those regional websites are handled by a number of different editors for each category and channel. Toss in the requisite assortment of vote cards, topic cards, photo collage - you can see how quickly the web presence gets complex!  

“Management of Distributed Content revolves around efficiency and control.”

At this scale, we’re likely dealing with multiple websites, all of which have requirements around content. This has now become the perfect usecase for Distributed Content Management!

 

Use Case 1: Publishing Workflows For Individual Websites

Consideration of a content approval workflow is a critical part of the content strategy for any organization that employs Distributed Content Management. For the main website of One India News, the strategy is simple. A central editorial team with defined roles and distributed content production would suffice.

Publishing workflows must be tailored not only to the media houses but to each channel and team that’s in charge of their regional website. Content to be published on the homepage of the website will likely require significantly more oversight than in the humor or offbeat channel. 

The Distributed Management of Content or The Management of Distributed Content

The Distributed Management of Content deals with the workflow involved in the content creation with a decentralized approach.

The Management of Distributed Content works around dealing with existing content from a variety of sources, involving input (from other websites/sources), output (to other websites) or both. 

By implementing Distributed Management of Content, organizations can eliminate the time and opportunity for error introduced when users enter content in multiple places. Unlike the first concept, the goals for Management of Distributed Content are generally around efficiency and control. 

Use Case 2: Sharing Content Out - Centralized Content On A Distributed Web Platform

Even the most decentralized media house have content that is centrally produced. In some cases, it may be easiest to just hyperlink to that content in its original location; however, consider, a news story of national importance published on the main website. That story may be reposted in its entirety in all the other regional websites. 

Copying and pasting become a less efficient option when the content is further distributed - more so when you consider the possibility of edits and possible unpublishing. 

Use Case 3: Sharing Content In - Decentralized Websites As Points Of Origin

Another interesting use case presents itself when we consider distributed websites as the starting point for content creation. Most media houses maintain a central calendar of events, such as festivals and political events. 

In a well-formed distributed content model, with an appropriate CMS like Drupal, the same metadata that allows visitors to filter events - audience, department, program - can be easily used to syndicate those events to various other websites.  

Unfortunately, the same level of consideration is not always given to everyone outside the subset team with appropriate permissions. 

Content managers who are generally empowered to manage their own content may not have the same access to do so, or, in cases where they do have permission, find themselves needing to enter content into an entirely different website system to get it published to their site. 

But why should this be the case?  By extending the same technologies that allow websites to receive events from a central calendar, we can enable content managers to publish events to the calendar from within the same website they usually manage. (The same content approval and publishing workflow considerations apply, of course.)

Centralized Content Management Distributed Content Management 
  • All content funnelled through one group
  • Small individual workgroups responsible for respective areas
  • Central rules and procedures to ensure rules are followed 
  • The responsibility of individual groups to oversee content quality
  • One person authority - who is responsible for the rules and implementation
  • Each group may have one or more lead approvers. Workgroups leads handle process and rules
  • Advantage -  Resulting process control without confusion
  • Advantage - Responsibility and the workload are distributed
  • Disadvantage - May result in a bottleneck
  • Disadvantage - Individual groups can interpret rules differently
Use Case 4: Multichannel Brand Content

Single-source content syndication also provides an opportunity for media companies like One media looking to promote their brand across multiple mediums. Many companies choose to employ standalone, all-in-one news providers such as ANI, rather than integrating a category for each of the news providers. 

This makes a tremendous amount of sense: these organization systems when merged with the own CMS can provide a number of compelling results such as quicker results and faster news publishing. 

By programmatically receiving the content from a content repository the organization can eliminate the risk of delayed news and lose the audience. 


Use Case 5: Content Delivery To Validated Audiences

In an attempt to decentralize content over the years, media organizations now allow users to add stories to the website. 

How they access, validate, identify the users is another key consideration for the company’s Distributed Content Management strategy. 

A common approach is to segregate guest editor content into different regional “portals” - websites that require editor to create accounts and login to see the information for their country or part of the world.  

To overcome the challenge of validating these accounts, companies often integrate with an Identity Provider (IdP) such as SAML 2.0 Single Sign On easy configuration & active support, in your Drupal website. 

At the far end of the Distributed Content Management spectrum are systems that need to publish consistent, controlled content to websites with no possibility for discrepancies across multiple sites.  

Drupal allows Distributed Content Management strategy to be applied to large volumes of content to facilitate efficient workflow. Specifically, the system allows different content and editors to be part of the same system without much replication. 

Finally, the modular design of the Drupal architecture allows both stand-alone and distributed realizations so that the system can be deployed in a variety of applications. Connect with us, drop a mail at hello@opensenselabs.com or tweet us @OpenSenseLabs. 

blog banner blog image Content Management System Distributed Management of Content Content sharing Decentralized Websites Drupal CMS Content Creation Content Marketing Distributed content management Blog Type Articles Is it a good read ? On
Categories: Drupal

Metatag Head Title

New Drupal Modules - 23 July 2018 - 5:00am

The metatag module provides a Page title meta tag which is used for both title and tags.

This simple module provides additional HEAD title metatag field which may be used to set tag independently.

Categories: Drupal

DROWL Layouts

New Drupal Modules - 23 July 2018 - 4:30am

Provides DROWL's default ZURB Foundation layouts. Shared with the community for other ZURB Foundation Druapl users.

Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal