Drupal News

DrupalEasy: Introducing our online, hands-on, 2-hour Professional local development with DDEV workshop

Main Drupal Feed - Wed, 07/04/2018 - 13:49

We're happy to announce that we've partnered with the folks at DRUD Tech to create and deliver a live, online, hands-on workshop that will teach the basics of professional local Drupal development using DDEV-Local.

DDEV-Local is a Docker-based local development environment that is designed to get your projects up-and-running quickly on your local development machine. DDEV-Local can be used with Drupal 7 and 8 as well as WordPress and other content management systems.

One of the big advantages of using this type of local development environment (as opposed to an old-school WAMP/MAMP-type solution) is that DDEV helps to ensure that every member of the development teams is using the exact same development environment, increasing productivity and decreasing the chances of environment specific bugs. Furthermore, you'll find that getting team projects up-and-running on your local machine is super-fast!

If you've been reading our recent blog posts or listening to our podcast, then you probably already know that we've taken a keen interest in local development environments lately. 

In fact, we've been diving deep into local development environments for almost a full year now, as we're in the process of evolving our long-form training classes to teach and utilize a more professional local development environment solution. A couple of months ago, we decided to standardize our trainings on DDEV, and since then we've been talking with the DRUD Tech folks (the creators of DDEV) about putting together a workshop that will provide students what they need to get up-and-running with DDEV-Local.

Here's a quick overview of what this new workshop will cover:

  • What is DDEV? 
  • Installing DDEV-Local (Mac OS X and Windows 10 Pro)
  • Getting an existing project up-and-running in DDEV-Local
  • Everyday DDEV-Local commands and functionality
  • DDEV-Local integration with hosting providers  
  • Updating DDEV-Local
  • DDEV-Local Tips and Tricks
  • Getting help with DDEV-Local

The first workshop will take place on Wednesday, July 18, 2018, 1-3pm EDT, and the cost is $75. Following the completion of the workshop, you'll have access to the 20+ page curriculum PDF as well as more than 10 screencasts demonstrating installation and basic usage of DDEV-Local. 

Register today and start using a professional local development environment!

We’ll be running the workshop monthly, so If you can't make it on July 18, upcoming dates include: 

  • Wednesday, August 22, 2018, 10am-noon EDT
  • Wednesday, September 19, 2018, 9-11am EDT

Quotes on this page were shared by participants in our beta-test of the course


 

Evolving Web: How to Create a Custom Views Argument Plugin in Drupal 8

Main Drupal Feed - Wed, 07/04/2018 - 13:24

When you're building a site, it's standard to set up "pretty URLs". For example, we'd rather see /catalog/accessories than /taxonomy/term/18 and we'd rather see /about-us than /node/19. With Drupal, we use the Pathauto module to configure these types of standard content paths. But in some cases, there's no option to create a nice URL pattern, so we end up seeing those URLs.

This happens with Views that are filtered by a taxonomy term in the URL. The result is that you end up seeing taxonomy term IDs in the URL (e.g. catalog/19/search) rather than a pretty URL (e.g. catalog/accessories/search).

In this tutorial, I'll walk you through how to create a field that is used to make generate URLs for Views pages that take taxonomy terms as contextual arguments. Using this approach, a site editor will be able to configure what the URL path will look like.

Assumptions

It has been assumed that you know:

  • The basic concepts of Drupal 8.
  • How to configure fields.
  • How to configure a view with a contextual filter.
  • How to create a custom module in Drupal 8.
  • How to create a custom plugin in Drupal 8.
The solution

We're going to use the core taxonomy argument plugin (Drupal\taxonomy\Plugin\views\argument\Taxonomy) to help us fix this problem. The plugin takes a term ID from the URL and passes it to Views. We'll override the plugin so that it takes a string from the URL (slug), and then looks up the associated term ID. All the rest of the functionality we'll leave as is.

Step 1: Content and field configuration

To make the example work, we need the following configuration to be in place (most of this you get out-of-the-box with Drupal, you'll just need to add the Slug field):

  • A taxonomy vocabulary named tags.
  • Tags should have the following field:
    • Field name: Slug
    • Machine name: field_slug
    • Type: Text (Plain)
    • Size: 32 characters
  • A content type named article.
  • Article should have the following field:
    • Field name: Tags
    • Machine name: field_tags
    • Type: Entity reference (to taxonomy terms from Tags)
    • Number of values: At least one

Configuring field slug on taxonomy term

Step 2: Create a custom module

Create a custom module called custom_views_argument. Declare a dependency on the views module in the .info.yml file.

Step 3: Implement hook_views_data_alter()

Reference: custom_views_argument.module

The hook_views_data_alter() hook tells Views about the various database tables, fields and the relevant plugins associated to them. We implement this hook to tell Drupal to include our custom argument plugin which we will create in the next step.

Step 4: Create a custom views argument plugin

Reference: CustomTaxonomySlug.php

Next we implement the CustomTaxonomySlug class with a proper annotation @ViewsArgument("custom_taxonomy_slug"). This tells the Views module that the class is a special class which implements a custom Views argument plugin. We extend the Drupal\taxonomy\Plugin\views\argument\Taxonomy class and override one important method CustomTaxonomySlug::setArgument().

public function setArgument($arg) { // If we are not dealing with the exception argument, example "all". if ($this->isException($arg)) { return parent::setArgument($arg); } // Convert slug to taxonomy term ID. $tid = is_numeric($arg) ? $arg : $this->convertSlugToTid($arg); $this->argument = (int) $tid; return $this->validateArgument($tid); }

All we do here is catch the argument from the URL and if it is a slug, we use a convertSlugToTid() method to retrieve the underlying taxonomy term ID. That is it! The rest of the things are handled by the taxonomy plugin.

Step 5: Create Demo Content

Now that everything is in place, we'll put our solution to the test. Start by creating some demo content. Create 2-3 articles and assign them some tags. The tags are created, however, they don't have a slug.

Once done, go to the Admin > Structure > Taxonomy > Tags page and edit the tags and give them nice URL slugs containing only English alphabet letters, numbers and dashes. For real projects, you might need to use a custom or contrib module to automatically generate slugs (see the machine_name module).

Step 6: Configure a View

Now we're all set! The last step is to create and configure a View which will put everything together.

  • Create a View of Content. You can name it Blog.
  • Create a page display and set it's URL to /blog/%.
  • Add a relationship to taxonomy terms referenced from field_tags.
    • We do this to be able to use the Slug field in a filter. 

Configure a relationship with taxonomy terms

  • Now, define a contextual filter for the Slug using the custom argument plugin which we created.
    • Click on the Add button for Contextual filters
    • Choose the Slug filter which we created. It should have the name we had defined in our plugin, i.e. Custom: Has taxonomy term with slug.
    • Optionally, specify a validation criteria for Taxonomy Term and specify the Tags vocabulary.

Configuring the custom views argument plugin for contextual filters

  • Save the view for the new configuration to take effect.

And we're done! If you visit the /blog/SLUG, you should see all the articles which have the taxonomy term associated to SLUG. Here, SLUG refers to the value you put in the Slug field for the tag. E.g. if you have a tag named Accessories and you wrote accessories in the Slug field, you should go the the URL /blog/accessories.

Next steps

If you're looking for hands-on training about how to develop Drupal modules, we offer professional Drupal training online and in-person. See the full Drupal 8 Module Development training curriculum for details.

+ more awesome articles by Evolving Web

OPTASY: These Are the 15 Best Drupal Security Modules Worth Installing on Your Website

Main Drupal Feed - Wed, 07/04/2018 - 13:22
These Are the 15 Best Drupal Security Modules Worth Installing on Your Website adriana.cacoveanu Wed, 07/04/2018 - 13:22

See? I'm a woman of my word as you can see: here I am now, as promised in my previous post on the most effective ways to secure a Drupal website, ready to run a “magnifying glass” over the best Drupal security modules. To pinpoint their main characteristics and most powerful features and thus to reveal why they've made it to this list.

And why you should put them at the top of your own Drupal security checklist.

So, shall we dig in?
 

1.  Login Security  

It's only but predictable that since the login page/form is the entry to your Drupal site, it is also the most vulnerable page there, as well.

Therefore, secure it!

Droptica: Droptica: How does the Droptica team continuously improve its work? See examples from our Sprint Retrospective meetings

Main Drupal Feed - Wed, 07/04/2018 - 11:07
Your development team constantly makes the same mistakes and does not improve the quality of its work. Are you familiar with this issue? If so, we have a solution for you and it’s really simple – it’s called Sprint Retrospective.  What is Sprint Retrospective? This is one of the meetings in the SCRUM methodology. The meeting takes place on a regular basis, at the end of each sprint. At Droptica, we hold a meeting once every two weeks. During the meeting, the development team analyses the previous sprints and deliberates about what can still be improved – how to eliminate errors and blockers, and how to speed up work.

PreviousNext: Decoupling the model from Drupal

Main Drupal Feed - Tue, 07/03/2018 - 23:17

Back in the Drupal 6 days, I built the BOM Weather Drupal module to pull down weather data from the Australian Bureau of Meteorology (BOM) site, and display it to users.

We recently had a requirement for this in a new Drupal 8 site, so decided to take a more modern approach.

by Kim Pepper / 4 July 2018 Not that kind of decoupled Drupal

We often hear the term Decoupled Drupal but I'm not talking about a Javascript front-end and Drupal Web Service API backend.

This kind of decoupling is removing the business logic away from Drupal concepts. Drupal then becomes a wrapper around the library to handle incoming web requests, configuration and display logic.

We can write the business logic as a standalone PHP package, with it's own domain models, and publish it to Packagist.org to be shared by both Drupal and non-Drupal projects.

The Bom Weather Library

We started by writing unit-testable code, that pulled in weather forecast data in an XML format, and produced a model in PHP classes that is much easier for consuming code to use. See the full BOM Weather code on GitHub 

For example:

$client = new BomClient($logger); $forecast = $client->getForecast('IDN10031'); $issueTime = $forecast->getIssueTime(); $regions = $forecast->getRegions(); $metros = $forecast->getMetropolitanAreas(); $locations = $forecast->getLocations(); foreach ($locations as $location) { $aac = $location->getAac(); $desc = $location->getDescription(); /** @var \BomWeather\Forecast\ForecastPeriod[] $periods */ $periods = $location->getForecastPeriods(); // Usually 7 days of forecast data. foreach ($periods as $period) { $date = $period->getStartTime(); $maxTemp = $period->getAirTempMaximum(); $precis = $period->getPrecis(); } }

The library takes care of fetching the data, and the idiosyncrasies of a fairly crufty API (no offence intended!).

Unit Testing

We can have very high test coverage with our model. We can test the integration with mock data, and ensure a large percentage of the code is tested. As we are using PHPUnit tests, they are lightning fast, and are automated as part of a Pull Request workflow on CircleCI.

Any consuming Drupal code can focus on testing just the Drupal integration, and not need to worry about the library code.

Dependency Management

As this is a library, we need to be very careful not to introduce too many runtime dependencies. Also any versions of those dependencies need to be more flexible than what you would normally use for a project. If you make your dependency versions too high they can introduce incompatibilities when used a project level. Consumers will simply not be able to add your library via composer.

We took a strategy with the BOM Weather library of having high-low automated testing via CircleCI. This means you test using both: 

composer update --prefer-lowest

and

composer update

The first will install the lowest possible versions of your dependencies as specified in your composer.json. The second will install the highest possible versions. 

This ensures your version constraints are set correctly and your code should work with any versions in between.

Conclusion

At PreviousNext, we have been using the decoupled model approach on our projects for the last few years, and can certainly say it leads to more robust, clean and testable code. We have had projects migrate from Drupal 7 to Drupal 8 and as the library code does not need to change, the effort has been much less.

If you are heading to Drupal Camp Singapore, make sure to see Eric Goodwin's session on Moving your logic out of Drupal.

Tagged Decoupled Logic, PHP Libraries, Composer, PHP Unit

Mediacurrent: Good People, Good Marketing: A Podcast Interview with Mediacurrent’s Dave Terry

Main Drupal Feed - Tue, 07/03/2018 - 19:31

What’s the greatest entrepreneurship lesson that Mediacurrent partner Dave Terry has learned?

In a recent guest spot on the Good People, Good Marketing podcast, Dave weighs in on the evolution of open source technology and shares his path to building a leading Drupal-based agency.

Interview Sound Bites 

Technology should be shared and free. 

 

Giving back to the Drupal community is embedded in Mediacurrent’s DNA. Dave explains why that’s so important.

Culture is about people and who we hire. I know a lot of companies say that, but it’s really about putting the processes behind how you identify the right people within the company.

 

A successful company culture attracts great talent while also managing accountability with a distributed team. Here, Dave shares the three tenets of culture at Mediacurrent.

Tune in

Listen to the complete podcast, Episode 47: Interview with Dave Terry, on the Sideways8 blog.

Related Content 
Why Should Companies Support Drupal? | Blog
Drupal Contrib: Why it's Important | Video
Creating a Culture of Giving in Your Organization | Blog
 

Dries Buytaert: Why large organizations are choosing to contribute to Drupal

Main Drupal Feed - Tue, 07/03/2018 - 19:27

During my DrupalCon Nashville keynote, I shared a brief video of Mike Lamb, the Senior Director of Architecture, Engineering & Development at Pfizer. Today, I wanted to share an extended version of my interview with Mike, where he explains why the development team at Pfizer has ingrained Open Source contribution into the way they work.


Mike had some really interesting and important things to share, including:

  1. Why Pfizer has chosen to standardize all of its sites on Drupal (from 0:00 to 03:19). Proprietary software isn't a match.
  2. Why Pfizer only works with agencies and vendors that contribute back to Drupal (from 03:19 to 06:25). Yes, you read that correctly; Pfizer requires that its agency partners contribute to Open Source!
  3. Why Pfizer doesn't fork Drupal modules (from 06:25 to 07:27). It's all about security.
  4. Why Pfizer decided to contribute to the Drupal 8's Workflow Initiative, and what they have learned from working with the Drupal community (from 07:27 to 10:06).
  5. How to convince a large organization (like Pfizer) to contribute back to Drupal (from 10:06 to 12:07).

Between Pfizer's direct contributions to Drupal (e.g. the Drupal 8 Workflow Initiative) and the mandate for its agency partners to contribute code back to Drupal, Pfizer's impact on the Drupal community is invaluable. It's measured in the millions of dollars per year. Just imagine what would happen to Drupal if ten other large organizations adopted Pfizer's contribution models?

Most organizations use Open Source, and don't think twice about it. However, we're starting to see more and more organizations not just use Open Source, but actively contribute to it. Open source offers organizations a completely different way of working, and fosters an innovation model that is not possible with proprietary solutions. Pfizer is a leading example of how organizations are starting to challenge the prevailing model and benefit from contributing to Open Source. Thanks for changing the status quo, Mike!

OSTraining: Use Case: How to Create a Contact Form in Drupal 8

Main Drupal Feed - Tue, 07/03/2018 - 05:06

One of OSTraining’s members asked how to create a web form with the Webform module.

The form must meet the following requirements:

  • The site has four regions to be contacted: NE, SE, NW, and SW.
  • Each region will have their own contact person/team.
  • The user must be able to select one or more of the regions to contact at the same time, using checkboxes.
  • All the submittions must be BCC-ed to the main administrator.
  • If needed, the site owner should be able to add one or more email recipients for each region.

In this tutorial, you will learn how to meet these user requirements using the Webform module.

Mediacurrent: Dropcast: Episode 38 - GovCon 2018

Main Drupal Feed - Mon, 07/02/2018 - 17:59

Recorded June 21st, 2018

This episode we welcome Jess Snyder who is on the planning committee for GovCon, coming up real soon in August, to talk about… GovCon.. Which is coming up real soon in August. We’ll cover some Drupal News, it looks like Bob has the Pro Project Pick this episode and Ryan will bring it to a close with The Final Bell.



Episode 38 Audio Download Link

Updates:Jess Snyder from WETA, DC talking about Govcon
  • What do you do at WETA?

  • What got you into Drupal

  • What got you involved in GovCon

  • Any notable keynotes / sessions you’re looking at?

  • ** Random questions **

Drupal News:Pro Project Pick:Events: (https://www.drupical.com/?type=drupalcon,regional)The Final Bell: (Ryan)

OPTASY: OPTASY Is a Gold-Level Sponsor of Drupal North Regional Summit 2018: Moving Drupal Forward!

Main Drupal Feed - Mon, 07/02/2018 - 13:50
OPTASY Is a Gold-Level Sponsor of Drupal North Regional Summit 2018: Moving Drupal Forward! adriana.cacoveanu Mon, 07/02/2018 - 13:50

Save the date(s): 10-12 August! And join us for a 3-day conference on building with Drupal, driving this open-source technology forward and strengthening & growing the community behind it: Drupal North Regional Summit 2018

Meet us at our exhibit booth at the Toronto Reference Library, to be more specific. We'll be right there, in the hallway, since OPTASY's a proud gold sponsor of the fourth edition of this annual event: 

The biggest annual summit in Canada focused on promoting Drupal. 
 

Why Would You Attend Drupal North Regional Summit 2018?

That's right: why would you pack your bags and get en route for Toronto's Reference Library when summer is at its peak and everyone's looking for a place in the sun?

OpenSense Labs: Integrating Digital Asset Management with Drupal

Main Drupal Feed - Mon, 07/02/2018 - 12:51
Integrating Digital Asset Management with Drupal Shankar Mon, 07/02/2018 - 18:21

Governance plays a pivotal role in the business workflow and is significant for the smooth functioning of an organisation which is expanding at a steadfast pace. In this digitised world of organised chaos, demand for agile marketing has resulted in the accretion of digital assets to such an extent that some of them seem superfluous. Digital Asset Management (DAM) and Drupal can come together to smartly strategise the way enterprises handle unimportant assets.

Drupal governs the content on the website whereas Digital Asset Management manages creation, assessment and approval of digital assets.

A superabundance of assets clog up our devices and blot out the productivity. Digital Asset Management can help enterprises in eclipsing outmoded asset management processes and take back control of their digital files. Therefore, it helps in optimising content processes and makes life much easier.

Decoding the Digital Asset Management

What is involved in digital asset management? DAM is a content management and branding automation system which uses the centralised mode of storing and governing voluminous digital files. It accredits enterprises to connect, control, and centralise both the local and the global access to digital files thereby ensuring that digital assets are accessible to everyone whenever they have the dire need of them.

Source: Cognizant

Grid, The Guardian’s image management system, is a very good example of an open source digital asset management system. Its team used pragmatic agile processes to build it quickly. It is now incorporated with its print workflow and is used for almost half of the images used in their digital content.


Does it ring a bell? Definitely! Content Management System (CMS) like Drupal also has its foundation in the provision of a centralised mode of content dissemination. So what’s the difference between CMS and DAM?

Difference between DAM and CMS

Content Management System and Digital Asset Management are two systems that work brilliantly with the digital content but are designed for different tasks.

Digital Asset Management Content Management System

Central repository for handling digital assets

The central system for governing content on the website

Example: Acquia DAM

Example: Drupal

In general, Content Management System, for example, Drupal, is the entire foundation for governing content on the website. The term ‘content’ means anything that is displayed on your site and not just blog posts which are managed by CMS.

In contrast, a Digital Asset Management manages more than just your website. It powers the entire sales and marketing organisation. It acts as the central repository for the approved assets. Moreover, it is the collaborative workflow engine between marketers and designers for the creation, assessment, and approval of those assets.

A Plethora of Benefits

With a superabundance of benefits, Digital Asset Management enhances productivity, improves brand consistency and boosts team collaboration.

Source: Webdam
  • Cuts business costs: It can improve your ROI through quicker creation, retrieval, and dissemination of company content. Do-it-yourself design templates for business cards, banner ads etc. cut both internal and external admin, design, and production costs.
     
  • Security: It provides collective security measures built around your data’s needs and adheres to strict digital rights management (DRM) guidelines. For instance, be it navigating outmoded sharing methods, or supporting teams to establish effective user access permissions, it maps the usage rights vis-à-vis your digital assets. Internal management of brand’s corporate identity: By paving the way for corporate identity guidelines and numerous on-brand digital assets, it offers secure global access to approve useable content.
     
  • Integration scope: It seamlessly integrates with your existing infrastructure. It helps you in improving project management, delegating resources and roles, optimising and targeting assets, and identifying top-performing content by working with CMS, customer relationship management (CRM) and several other marketing, sales and IT solutions.
     
  • Efficient file management: It eliminates the need to find and deliver assets via multiple locations thereby removing any costly errors and inefficiencies incurred through clumsy file management.
     
  • Time-Saving: It provides 24X7 access to company collateral from anywhere. Thus, it removes the need for time-intensive file searches and avoids the need for recreating missing assets.
Choosing the Best Digital Asset Management for your Business

So, how to strategise in order to choose the best Digital Asset Management? It is important that you understand your prerequisites before making the decision of selecting a Digital Asset Management. 

Understanding DAM capabilities

 

  • Repository: One of the first things that you need to consider is a core digital asset repository. A centralised asset repository should on the top of the priority list for efficacy in controlling and governing the assets.
     
  • Creation: Through workflow and collaboration tools,  can help with the creation of assets. If you have multiple departments or have agencies working together to create digital assets, it can make the process of creation of assets faster and makes its easier to assess and approve them. It also ensures that everyone uses the same transparent process. Workflow management tools pre-defines stages and roles so that you can know the status of every asset and their requirements instantly.
     
  • Consumption: It depends on people and systems to determine how these assets are being used. Your Digital Asset Management should be able to provide a way for employees to search for and download assets on their own.

Understanding your Goals

 

  • It should simplify the production of digital assets.
  • It should improve the quality, consistency, and on-brand of assets being created especially in the enterprises with global digital marketing teams.
     
  • It should be able to allow the organisation to keep a record of all the assets without leaving a question mark on where to add them or their approval status.
     
  • It should alleviate manual requests that are being made by the marketing team to provide specific files to several people and groups like logos, product images, campaign assets, sales collateral etc.
     
  • It must master your brand consistency.
     
  • It should decrease the time taken to integrate assets into digital marketing campaigns and user experiences.
Understanding your Users
  • Develop a list of stakeholders, people in your organisation, and even outside of your organisation who will be interacting with Digital Asset Management.
     
  • Stakeholders include digital marketers, designers, sales, partners, IT etc.
     
  • Understand what their access and roles are with the Digital Asset Management.
Understanding your Requirements
  • Get the feedback from each of your stakeholder groups. Know what are their most common challenges and build a list of requirements. Make sure to understand the use cases so that you can prioritise those requirements.
     
  • Digital Asset Management systems have the capability to fulfill the need of basic requirements of small teams to extremely intricate ones for sophisticated large teams. 

Keep a note of typical requirements of organisations utilising Digital Asset Management as mentioned in the tabular column below.

Requirement Description

Asset Approval

Processes required to create a new asset should be well managed

Asset Review

A collaborative asset review cycle for the people to add comments, markups, and feedback to asset proofs

Asset Access (Internal)

A portal for employees to search and download assets. Access control by region or department would be required

Asset Access (External)

A controlled asset access for the external users paving the way for secure sharing of assets with partners, contractors, agencies etc.

Branding guidelines

A self-serve access point to get the approved branding guidelines like product images, logos, color palettes etc.

Structured assets

Assets should be placed in the folders

Keywords/Tags

Assets should be assigned with keywords and tags

Customer fields

Custom metadata fields should be assigned to assets

Reports

There must be reporting and assessment on asset usage

Direct access for marketing system

There must be provision for utilising approved assets for creating web banners, blog posts, email marketing campaigns etc. directly from the Digital Asset Management

Understanding your Deployment Options

Deployment options for Digital Asset Management constitute on-premise, private cloud, and Software-as-as-Service (SaaS). To understand what works best for your business needs, let’s look at the merits and demerits of these deployment options.

On-Premise Private Cloud SaaS Merit
  • Flexibility in integration
  • Low costs
  • Data in cloud
  • Local performance
  • Data in cloud
  • Comparatively fast to implement
  • Great for heavy customisations
  • Accessibility
  • Low Cost
  • On-premise control of data
  • Lessens dependence on IT
  • Low risks involved
 
  • Moderate customisations possible
  • Great multi-location performance
 
  • Security/control
  • Resilience/failover
 
  • Somewhat scalable
  • Scalable
 
  • Very basic resilience/failover
  • Good integration scope
 
  • Quick implementation
  • Automatic upgrades
   
  • Least requirement of IT dependency
Demerit
  • Huge risks involved
  • Dependency on web
  • Dependency on web
  • Not cost effective
  • Usually, web hosting requires third parties
  • Very limited customisation
  • Not scalable
  • Responsible for maintenance and upgrades
  • Data off-premise
  • Very limited accessibility
  • Data off-premise
 
  • Responsible for upgrades and maintenance
   
  • Dependence on IT
   
  • Time-intensive during deployment
    Drupal modules for DAM Integration

Acquia DAM offers a centralised cloud repository to keep all creative assets systematised, tagged and searchable throughout the lifecycle of those assets. Its easy-to-use workflow and collaboration capability lets digital marketers and designers search, review, approve and publish assets faster


It allows seamless integration with Drupal 7 and Drupal 8 for delivering a wonderful digital experience by incorporating captivating rich-media assets for centralised management.

Media: Acquia DAM, Drupal module, helps in the integration of Drupal with Acquia DAM. The integration helps Drupal content editors to browse the Acquia DAM repository using their own credentials via an entity browser plugin. They can search by keyword in order to find the right assets for the usage. WYSIWYG editor allows content authors to add assets easily. The assets marked for the usage are copied to Drupal and are stored as Media Entity references thereby rendering image styles.

Through a cron job, these assets are kept in sync between Drupal and Acquia DAM. Updates made to the assets are automatically reflected in Drupal.

This module provides a media entity provider for importing asset metadata into fields on your entities. Users can view the metadata directly in the entity browser without having to import the assets. It also provides a usage report of an asset within Drupal.

Another very useful digital asset management solution is Bynder which is a cloud-based platform for digital marketing teams to create, find, and use digital content.

Bynder integration Drupal module aids in the integration of Drupal with Bynder thereby providing seamless access to asset bank on your website. Users can import assets from and upload assets to Bynder. Image styles imported from Bynder can be displayed to match the derivatives created.


A digital agency integrated Bynder with Drupal using modules like Entity Browser and Media Entity.

Media entity module made it possible to represent Bynder assets in Drupal without actually copying them over. Its powerful metadata API helped in exposing and using all the information about them in the context of a Drupal website. It offered a central management of assets and their full availability on sites which consume them.

Entity browser module helped in implementing a user-friendly interface for letting the users browse their Bynder assets from the editor’s node of their Drupal site.

DropzoneJS driven widget helped in uploading the right assets into the Bynder DAM directly from the Drupal site.

Case study

Vallabhbhai Jhaverbhai Patel aka Sardar Patel was India’s first Deputy Prime Minister and played a pivotal role in India’s freedom movement. The Sardar Patel website, built on Drupal 8 with the help of an agency, showcases information about him gathered from numerous libraries.

The digital assets of more than 2000 content records related to the man events in the life of Sardar Patel can be viewed in the Sardar Patel website.


Objectives

The main goal behind building a dedicated site was to access books, texts, videos, audios, and similar content about him in multiple languages. By gathering and standardising the available digital assets, everything about him would be present in an easily searchable form. This would, thus, help in preserving the history of India’s influential freedom struggle through digital content for the generations to come.

Drupal 8 to the rescue

The scalability of Drupal 8 helped in migrating 2000+ content from several different sources under a single umbrella.
It also lent a mobile-first user experience.
Drupal’s out-of-the-box capabilities for building a multilingual site helped in translating the content into multiple languages.
Moreover, being the most security focussed CMS, it turned out to be the best choice for the website.

Result

1 TB of data comprising of 1000 images, 800 textual content, numerous audio and video recordings were added as content in addition to keeping the site navigation simple and easy. Most importantly, importing of content in bulk was possible with Drupal 8 thereby streamlining the content migration process and saving a lot of time.

For easy access, the website content was sorted and arranged by the main events or themes in addition to the chronological order of events that transpired in his life.


The site has easy search capability with filter options enabled to zero in on a particular subject.

What the Future holds for DAM?

Mobile applications would be at the epicentre of Digital Asset Management in the coming years. Native applications offer a seamless user experience both online and offline. Connected directly to your asset bank, they provide a mobile marketing portal and interactive features that help in creating, handling, and using the digital content on the fly. No matter what is the location of the user and whether or not they are near their laptop or desktop, they can always work with assets.

Number of mobile phone users worldwide from 2015 to 2020 (in billions) from Statista

Artificial Intelligence technology is becoming more mainstream, affordable and accessible. Digital Asset Management can leverage the benefits of AI for automating processes and centralising tasks. Also, features like facial, location, and image recognition variables; geospatial technology, and deterministic reasoning capabilities will be the key to utilising AI.

Machine learning, as shown in this graph, would require 2 to 5 years for mainstream adoption from Gartner

Machine learning algorithms can be of great use for Digital Asset Management in the future. It can recommend assets for a particular channel or task within a campaign based on analytical data. This would help you in promptly selecting the best asset swiftly without wasting the time thinking over which video, image or banner will best serve your digital marketing pursuits.

Conclusion

With the rapid expansion of businesses, digital assets like images, videos and company documents are piling up to an unimaginable extent. It is imperative that a proper governance is incorporated to handle these increasing digitised assets. Drupal 8 can be a wonderful option to integrate Digital Asset Management to manage your organisation’s increasing online presence and its ever-growing digital assets.

Drupal development is our key service where we are excelling since our birth as a company. Ping us at hello@opensenselabs.com to instill the best asset management solution for your enterprise using Drupal 8.

blog banner blog image Digital Asset Management DAM Drupal Drupal 8 Digital Assets Acquia DAM Bynder Content Management System CMS Machine Learning Artificial Intelligence Mobile marketing User experience Sardar Patel website Agile development methodology Blog Type Articles Is it a good read ? On

Drupal Association blog: It's Time To Vote - Community Elections 2018

Main Drupal Feed - Mon, 07/02/2018 - 09:00

Voting is now open for the 2018 At-Large Board positions for the Drupal Association!  If you haven't yet, check out the candidate profiles including their short videos found on the profile pages. Get to know your candidates, and then get ready to vote.

Cast Your Vote!

How does voting work? Voting is open to all individuals who have a Drupal.org account by the time nominations open and who have logged in at least once in the past year.

To vote, you will rank candidates in order of your preference (1st, 2nd, 3rd, etc.). The results will be calculated using an "instant runoff" method. For an accessible explanation of how instant runoff vote tabulation works, see videos linked in this discussion.

Election voting will be held from 2 July, 2018 through 13 July, 2018. During this period, you can continue to review and comment on the candidate profiles.

Have questions? Please contact me: Rachel Lawson.

Gizra.com: Using JSON API with WebdriverIO Tests

Main Drupal Feed - Mon, 07/02/2018 - 04:00

In Drupal, you can write automated tests with different levels of complexity. If you need to test a single function, or method of a class, probably you will be fine with a unit test. When you need to interact with the database, you can create kernel tests. And finally, if you need access to the final HTML rendered by the browser, or play with some javascript, you can use functional tests or Javascript tests. You can read more about this in the Drupal.org documentation.

So far this is what Drupal provides out of the box. On top of that, you can use Behat or WebDriver tests. This types of tests are usually easier to write and are closer to the user needs. As a side point, they are usually slower than the previous methods.

The Problem.

In Gizra, we use WebdriverIO for most of our tests. This allow us to tests useful things that add value to our clients. But these sort of tests, where you only interact with the browser output, has some disadvantages.

Imagine you want to create an article and check that this node is unpublished by default. How do you check this? Remember you only have the browser output…

One possible way could be this: Login, visit the Article creation form, fill the fields, click submit, and then… Maybe search for some unpublished class in the html:

var assert = require('assert'); describe('create article', function() { it('should be possible to create articles, unpublished by default', function() { browser.loginAs('some user'); browser.url('http://example.com/node/add/article') browser.setValueSafe('#edit-title-0-value', 'My new article'); browser.setWysiwygValue('edit-body-0-value', 'My new article body text'); browser.click('#edit-submit'); browser.waitForVisible('.node-unpublished'); }); });

This is quite simple to understand, but it has some drawbacks.

For one, it depends on the theme to get the status of the node. You could take another approach and instead of looking for a .node-unpublished class, you could logout from the current session and then try to visit the url to look for an access denied legend.

Getting Low-Level Information from a Browser Test

So the problem boils down to this:

How can I get information about internal properties from a browser test?

The new age of decoupled Drupal brings an answer to this question. It could be a bit counterintuitive at first, therefore just try to see is fit for your project.

The idea is to use the new modules that expose Drupal internals, through json endpoints, and use javascript together with a high-level testing framework to get the info you need.

In Gizra we use WDIO tests write end-to-end tests. We have some articles about this topic. We also wrote about a new module called JsonAPI that exposes all the information you need to enrich your tests.

The previous test could be rewritten into a different test. By making use of the JsonAPI module, you can get the status of a specific node by parsing a JSON document:

var assert = require('assert'); describe('create article', function() { it('should be possible to create articles, unpublished by default', function() { browser.loginAs('some user'); browser.url('http://example.com/node/add/article') browser.setValueSafe('#edit-title-0-value', 'My unique title'); browser.setWysiwygValue('edit-body-0-value', 'My new article body text'); browser.click('#edit-submit'); // Use JSON api to get the internal data of a node. let query = '/jsonapi/node/article' += '?fields[node--article]=status' += '&filter[status]=0' += '&filter[node-title][condition][path]=title' += '&filter[node-title][condition][value]=My unique title' += '&filter[node-title][condition][operator]=CONTAINS' browser.url(query); browser.waitForVisible('body pre'); let json = JSON.parse(browser.getHTML('body pre', false)); assert.ok(json[0].id); assert.equals(false, json[0].attributes.content['status']); }); });

In case you skipped the code, don’t worry, it’s quite simple to understand, let’s analyze it:

1. Create the node as usual:

This is the same as before:

browser.url('http://example.com/node/add/article') browser.setValueSafe('#edit-title-0-value', 'My unique title'); browser.setWysiwygValue('edit-body-0-value', 'My new article body text'); browser.click('#edit-submit'); 2. Ask JsonAPI for the status of an article with a specific title:

Here you see the two parts of the request and the parsing of the data.

let query = '/jsonapi/node/article' += '?fields[node--article]=status' += '&filter[status]=0' += '&filter[node-title][condition][path]=title' += '&filter[node-title][condition][value]=My unique title' += '&filter[node-title][condition][operator]=CONTAINS' browser.url(query); 3. Make assertions based on the data:

Since JsonAPI exposes, well, json data, you can convert the json into a javascript object and then use the dot notation to access to a specific level.

This is how you can identify a section of a json document. browser.waitForVisible('body pre'); let json = JSON.parse(browser.getHTML('body pre', false)); assert.ok(json[0].id); assert.equals(false, json[0].attributes.content['status']); A Few Enhancements

As you can see, you can parse the output of a json request directly from the browser.

browser.url('/jsonapi/node/article'); browser.waitForVisible('body pre'); let json = JSON.parse(browser.getHTML('body pre', false));

The json object now contains the entire response from JsonAPI that you can use as part of your test.

There are some drawbacks of the previous approach. First, this only works for Chrome. That includes the Json response inside a XML document. This is the reason why you need to get the HTML from body pre.

The other problem is this somewhat cryptic section:

let query = '/jsonapi/node/article' += '?fields[node--article]=status' += '&filter[status]=0' += '&filter[node-title][condition][path]=title' += '&filter[node-title][condition][value]=My unique title' += '&filter[node-title][condition][operator]=CONTAINS'

The first problem can be fixed using a conditional to check which type of browser are you using to run the tests.

The second problem can be addressed using the d8-jsonapi-querystring package, that allows you to write an object that is automatically converted into a query string.

Other Use Cases

So far, we used JsonAPI to get information about a node. But there are other things that you can get from this API. Since all configurations are exposed, you could check if some role have some specific permission. To make tests shorter we skipped the describe and it sections.

browser.loginAs('some user'); let query = '/jsonapi/user_role/user_role' += '?filter[is_admin]=null' browser.url(query); browser.waitForVisible('body pre'); let json = JSON.parse(browser.getHTML('body pre', false)); json.forEach(function(role) { assert.ok(role.attributes.permissions.indexOf("bypass node access") == -1); });

Or if a field is available in some content type, but it is hidden to the end user:

browser.loginAs('some user'); let query = '/jsonapi/entity_form_display/entity_form_display?filter[bundle]=article' browser.url(query); browser.waitForVisible('body pre'); let json = JSON.parse(browser.getHTML('body pre', false)); assert.ok(json[0].attributes.hidden.field_country);

Or if some specific HTML tag is allowed in an input format:

let query = '/jsonapi/filter_format/filter_format?filter[format]=filtered_html' browser.url(query); browser.waitForVisible('body pre'); let json = JSON.parse(browser.getHTML('body pre', false)); let tag = '<drupal-entity data-*>'; assert.ok(json[0].attributes.filters.filter_html.settings.allowed_html.indexOf(tag) > -1);

As you can see, there are several use cases. The benefits of being able to explore the API by just clicking the different links sometimes make this much easier to write than a kernel test.

Just remember that this type of tests are a bit slower to run, since they require a full Drupal instance running. But if you have some continuous integration in place, it could be an interesting approach to try. At least for some specific tests.

We have found this quite useful, for example, to check that a node can be referenced by another in a reference field. To check this, you need the node ids of all the nodes created by the tests.

A tweet by @skyredwang could be accurate to close this post.

Remember how cool Views have been since Drupal 4.6? #JSONAPI module by @e0ipso is the new "Views".

— Jingsheng Wang (@skyredwang) January 9, 2018

Continue reading…

Wim Leers: Shipping the right thing

Main Drupal Feed - Sun, 07/01/2018 - 00:03

Two weeks ago, I stumbled upon a two-part blog post by Alex Russell, titled Effective Standards Work.

The first part (The Lay Of The Land) sets the stage. The second part (Threading the Needle) attempts to draw conclusions.

It’s worth reading if you’re interested in how Drupal is developed, or in how any consensus-driven open source project works (rather than the increasingly common “controlled by a single corporate entity” “open source”).

It’s written with empathy, modesty and honesty. It shows the struggle of somebody given the task and opportunity to help shape/improve the developer experience of many, but not necessarily the resources to make it happen. I’m grateful he posted it, because something like this is not easy to write nor publish — which he also says himself:

I’ve been drafting and re-drafting versions of this post for almost 4 years. In that time I’ve promised a dozen or more people that I had a post in process that talked about these issues, but for some of the reasons I cited at the beginning, it has never seemed a good time to hit “Publish”. To those folks, my apologies for the delay.

Parallels!

I hope you’ll find the incredibly many parallels with the open source Drupal ecosystem as fascinating as I did!

Below, I’ve picked out some of the most interesting statements and replaced only a few terms, and tadaaa! — it’s accurately describing observations in the Drupal world!

Go read those two blog posts first before reading my observations though! You’ll find some that I didn’t. Then come back here and see which ones I see, having been a Drupal contributor for >11 years and a paid full-time Drupal core contributor for >6.

Standards Theory

Design A new Drupal contrib module is the process of trying to address a problem with a new feature. Standardisation Moving a contributed module into Drupal core is the process of documenting consensus.

The process of feature design Drupal contrib module development is a messy, exciting exploration embarked upon from a place of trust and hope. It requires folks who have problems (web developers site builders) and the people who can solve them (browser engineers Drupal core/contrib developers) to have wide-ranging conversations.

The Forces at Play

Feature Drupal module design starts by exploring problems without knowing the answers, whereas participation in Working Groups Drupal core initiatives entails sifting a set of proposed solutions and integrating the best proposals competing Drupal modules. Late-stage iteration can happen there, but every change made without developer site builder feedback is dangerous — and Working Groups Drupal core initiatives aren’t set up to collect or prioritise it.

A sure way for a browser engineer Drupal core/contrib developer to attract kudos is to make existing content Drupal sites work better, thereby directly improving things for users site builders who choose your browser Drupal module.

Essential Ingredients
  • Participation by web developers site builders and browser engineers Drupal core/contrib developers: Nothing good happens without both groups at the table.
  • A venue outside a chartered Working Group Drupal core in which to design and iterate: Pre-determined outcomes rarely yield new insights and approaches. Long-term relationships of WG participants Drupal core developers can also be toxic to new ideas. Nobody takes their first tap-dancing lessons under Broadway’s big lights. Start small and nimble, build from there.
  • A path towards eventual standardisation stability & maintainability: Care must be taken to ensure that IP obligations API & data model stability can be met the future, even if the loose, early group isn’t concerned with a strict IP policy update path
  • Face-to-face deliberation: I’ve never witnessed early design work go well without in-person collaboration. At a minimum, it bootstraps the human relationships necessary to jointly explore alternatives.

    If you’ve never been to a functioning standards Drupal core meeting, it’s easy to imagine languid intellectual salons wherein brilliant ideas spring forth unbidden and perfect consensus is forged in a blinding flash. Nothing could be further from the real experience. Instead, the time available to cover updates and get into nuances of proposed changes can easily eat all of the scheduled time. And this is expensive time! Even when participants don’t have to travel to meet, high-profile groups Drupal core contributors are comically busy. Recall that the most in-demand members of the group Drupal core initiative (chairs Drupal core initiative coordinators, engineers from the most consequential firms Drupal agencies) are doing this as a part-time commitment. Standards work is time away from the day-job, so making the time and expense count matters.
Design → Iterate → Ship & Standardise

What I’ve learned over the past decade trying to evolving the web platform is a frustratingly short list given the amount of pain involved in extracting each insight:

  • Do early design work in small, invested groups
  • Design in the open, but away from the bright lights of the big stage
  • Iterate furiously early on because once it’s in the web Drupal core, it’s forever
  • Prioritize plausible interoperability; if an implementer says “that can’t work”, believe them!
  • Ship to a limited audience using experimental Drupal core modules as soon as possible to get feedback
  • Drive standards stabilization of experimental Drupal core modules with evidence and developer feedback from those iterations
  • Prioritise interop minimally viable APIs & evolvability over perfect specs APIs & data models; tests create compatibility stability as much or more than tight prose or perfect IDL APIs
  • Dot “i”s and cross “t”s; chartered Working Groups Drupal core initiatives and wide review many site builders trying experimental core modules are important ways to improve your design later in the game. These derive from our overriding goal: ship the right thing.

    So how can you shape the future of the platform as a web developer site builder?

The first thing to understand is that browser engineers Drupal core/contrib developers want to solve important problems, but they might not know which problems are worth their time. Making progress with implementers site builders is often a function of helping them understand the positive impact of solving a problem. They don’t feel it, so you may need to sell it!

Building this understanding is a social process. Available, objective evidence can be an important tool, but so are stories. Getting these in front of a sympathetic audience within a browser team of Drupal core committers or Drupal contrib module maintainers is perhaps harder.

It has gotten ever easier to stay engaged as designs experimental Drupal core modules iterate. After initial meetings, early designs are sketched up and frequently posted to GitHub Drupal.org issues where you can provide comments.

“Ship The Right Thing”

These relatively new opportunities for participation outside formal processes have been intentionally constructed to give developers and evidence a larger role in the design process.

There’s a meta-critique of formal standards processes in Drupal core and the defacto-exclusionary processes used to create them. This series didn’t deal in it deeply because doing so would require a long digression into the laws surrounding anti-trust and competition. Suffice to say, I have a deep personal interest in bringing more voices into developing the future of the web platform, and the changes to Chrome’s Drupal core’s approach to standards adding new modules discussed above have been made with an explicit eye towards broader diversity, inclusion, and a greater role for evidence.

I hope you enjoyed Alex’ blog posts as much as I did!

Larry Garfield: PHP: Use associative arrays basically never

Main Drupal Feed - Sat, 06/30/2018 - 20:59
PHP: Use associative arrays basically never

The other day I was working on some sample code to test out an idea that involved an object with an internal nested array. This is a pretty common pattern in PHP: You have some simple one-off internal data structure so you make an informal struct using PHP associative arrays. Maybe you document it in a docblock, or maybe you're a lazy jerk and you don't. (Fight me!) But really, who bothers with defining a class for something that simple?

But that got me wondering, is that common pattern really, you know, good? Are objects actually more expensive or harder to work with than arrays? Or, more to the point, is that true today on PHP 7 given all the optimizations that have happened over the years compared with the bad old days of PHP 4?

So like any good scientist I decided to test it: What I found will shock you!

Continue reading this post on Steemit

Larry 30 June 2018 - 4:59pm

[Online/Free]..Argentina vs France 2018 Live Stream Fifa World Cup

Drupal News Org - Sat, 06/30/2018 - 14:30

[Online/Free]..Argentina vs France 2018 Live Stream Fifa World Cup
-----------------------------------------------------
WATCH NOW:::> http://onlinetvguide.net/FIFA-2018/

FREE HERE:::> http://onlinetvguide.net/FIFA-2018/
-----------------------------------------------------
France vs Argentina LIVE World Cup 2018: Prediction how to watch
France vs Argentina LIVE World Cup 2018: Prediction how to watch online what time what channel team news betting odds  
France v Argentina Uruguay v Portugal
France v Argentina Live All you need to know about the  Live Reporting By Steve Sutcliffe All times
France vs Argentina Live Score FIFA World Cup 2018 Live Streaming

France vs Argentina Live Score FIFA World Cup 2018 Round of 16 Live Streaming: Catch Live Score and updates as France take
France vs Argentina live stream: Lineups Kickoff time TV listings how
Messi vs Umtiti and Dembélé!  France vs Argentina live stream: Lineups Kickoff time TV listings how to
Fifa World Cup 2018 France vs Argentina live score: When and Where
Fifa World Cup 2018 France vs Argentina live score: When and Where to watch on Business Standard The first match of
World Cup 2018: France v Argentina live blog teams scores lineup

France vs Argentina: Team News Live Stream TV Info for World Cup
France vs Argentina will kick off the knockout stages of the 2018 FIFA World Cup on Saturday when two of the favourites
Argentina vs France World Cup live stream info channel: 2018 World Cup's round of 16 begins on Saturday and it kicks off
Argentina vs France in Kazan with a spot in the

Drupal blog: Design 4 Drupal: The future of JavaScript in Drupal

Main Drupal Feed - Fri, 06/29/2018 - 14:59

This blog has been re-posted and edited with permission from Dries Buytaert's blog. Please leave your comments on the original post.

Today, I gave a keynote presentation at the 10th annual Design 4 Drupal conference at MIT. I talked about the past, present and future of JavaScript, and how this evolution reinforces Drupal's commitment to be API-first, not API-only. I also included behind-the-scene insights into the Drupal community's administration UI and JavaScript modernization initiative, and why this approach presents an exciting future for JavaScript in Drupal.

If you are interested in viewing my keynote, you can download a copy of my slides (256 MB).

Thank you to Design 4 Drupal for having me and happy 10th anniversary!

Drupixels: Progressive Web App (PWA) integration with Drupal

Main Drupal Feed - Fri, 06/29/2018 - 12:41
A Progressive Web App (PWA) is a web app that uses modern web capabilities to deliver an app-like experience to users by combining features offered by most modern browsers with the benefits of mobile experience. Integration of PWA with Drupal makes Drupal inherit the latest web technologies and harness devices capabilities.

Axelerant Blog: Axelerant At Drupal Developer Days Lisbon 2018

Main Drupal Feed - Fri, 06/29/2018 - 10:16


Drupal Developer Days brings together people who contribute to the progress of Drupal from around the world. There are code sprints, workshops, sessions, BoFs, after parties (and after-after parties) and more.

Dries Buytaert: Design 4 Drupal: The future of JavaScript in Drupal

Main Drupal Feed - Thu, 06/28/2018 - 23:44

Today, I gave a keynote presentation at the 10th annual Design 4 Drupal conference at MIT. I talked about the past, present and future of JavaScript, and how this evolution reinforces Drupal's commitment to be API-first, not API-only. I also included behind-the-scene insights into the Drupal community's administration UI and JavaScript modernization initiative, and why this approach presents an exciting future for JavaScript in Drupal.

If you are interested in viewing my keynote, you can download a copy of my slides (256 MB).

Thank you to Design 4 Drupal for having me and happy 10th anniversary!

Pages