Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 23 hours 39 min ago

Drupal Association blog: Adding a Little Color

20 June 2018 - 8:12am

You may have noticed today that we have added a little color to our Drupal Association logo on social media. The changed logo will be around until the end of June, which is traditionally Pride Month.

The Drupal Association is an educational non-profit and does not advocate policy. I personally wanted to make this happen simply to say thank you to everyone at the Drupal Association who have made this LGBTQIA woman feel extraordinarily welcome and empowered this year.

For all LGBTQIA people and their allies, I’d also like to take the opportunity to draw their attention to the Drupal Rainbow Group on groups.drupal.org.

Could we, as a community, do more for Pride Month next year? Let me know - and let’s organise ourselves in the Drupal Rainbow Group.

Rachel

Categories: Drupal

Drupal blog: Increasing Drupal contributions from underrepresented groups

20 June 2018 - 8:10am

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

For the past two years, I've published the Who sponsors Drupal development report. The primary goal of the report is to share contribution data to encourage more individuals and organizations to contribute code to Drupal on Drupal.org. However, the report also highlights areas where our community can and should do better.

In 2017, the reported data showed that only 6 percent of recorded code contributions were made by contributors that identify as female. After a conversation in the Drupal Diversity & Inclusion Slack channel about the report, it became clear that many people were concerned about this discrepancy. Inspired by this conversation, Tara King started the Drupal Diversity and Inclusion Contribution Team to understand how the Drupal community could better include women and underrepresented groups to increase code and community contributions.

I recently spoke with Tara to learn more about the Drupal Diversity and Inclusion Contribution Team. I quickly discovered that Tara's leadership exemplifies various Drupal Values and Principles; especially Principle 3 (Foster a learning environment), Principle 5 (Everyone has something to contribute) and Principle 6 (Choose to lead). Inspired by Tara's work, I wanted to spotlight what the DDI Contribution Team has accomplished so far, in addition to how the team is looking to help grow diversity and inclusion in the future.

A mentorship program to help underrepresented groups

Supporting diversity and inclusion within Drupal is essential to the health and success of the project. The people who work on Drupal should reflect the diversity of people who use and work with the software. This includes building better representation across gender, race, sexuality, disability, economic status, nationality, faith, technical experience, and more. Unfortunately, underrepresented groups often lack community connections, time for contribution, resources or programs that foster inclusion, which introduce barriers to entry.

The mission of the Drupal Diversity & Inclusion Contribution Team is to increase contributions from underrepresented groups. To accomplish this goal, the DDI Contribution Team recruits team members from diverse backgrounds and underrepresented groups, and provides support and mentorship to help them contribute to Drupal. Each mentee is matched with a mentor in the Drupal community, who can provide expertise and advice on contribution goals and professional development. To date, the DDI Contribution Team supports over 20 active members.

What I loved most in my conversation with Tara is the various examples of growth she gave. For example, Angela McMahon is a full-time Drupal developer at Iowa State. Angela been working with her mentor, Caroline Boyden, on the External Link Module. Due to her participation with the DDI Contribution Team, Angela has now been credited on 4 fixed issues in the past year.

Improving the reporting around diversity and inclusion

In addition to mentoring, another primary area of focus of the DDI Contribution Team is to improve reporting surrounding diversity and inclusion. For example, in partnership with the Drupal Association and the Open Demographics Project, the DDI Contribution Team is working to implement best practices for data collection and privacy surrounding gender demographics. During the mentored code sprints at DrupalCon Nashville, the DDI Contribution Team built the Gender Field Module, which we hope to deploy on Drupal.org.

The development of the Gender Field Module is exciting, as it establishes a system to improve reporting on diversity demographics. I would love to use this data in future iterations of the 'Who sponsors Drupal development' report, because it would allow us to better measure progress on improving Drupal's diversity and inclusion against community goals.

One person can make a difference

What I love about the story of the DDI Contribution Team is that it demonstrates how one person can make a significant impact on the Drupal project. The DDI Contribution Team has grown from Tara's passion and curiosity to see what would happen if she challenged the status quo. Not only has Tara gotten to see one of her own community goals blossom, but she now also leads a team of mentors and mentees and is a co-maintainer of the Drupal 8 version of the Gender Field Module. Last but not least, she is building a great example for how other Open Source projects can increase contributions from underrepresented groups.

How you can get involved

If you are interested in getting involved with the DDI Contribution Team, there are a number of ways you can participate:

  • Support the DDI Contribution Team as a mentor, or consider recommending the program to prospective mentees. Join #ddi-contrib-team on Drupal Slack to meet the team and get started.
  • In an effort to deliberately recruit teams from spaces where people of diverse backgrounds collaborate, the DDI Contribution Team is looking to partner with Outreachy, an organization that provides paid internships for underrepresented groups to learn Free and Open Source Software and skills. If you would be interested in supporting a Drupal internship for an Outreachy candidate, reach out to Tara King to learn how you can make a financial contribution.
  • One of the long term goals of the DDI Contribution Team is to increase the number of underrepresented people in leadership positions, such as initiative lead, module maintainer, or core maintainer. If you know of open positions, consider understanding how you can work with the DDI Contribution Team to fulfill this goal.

I want to extend a special thanks to Tara King for sharing her story, and for making an important contribution to the Drupal project. Growing diversity and inclusion is something everyone in the Drupal community is responsible for, and I believe that everyone has something to contribute. Congratulations to the entire DDI Contribution Team.

Categories: Drupal

Vardot: Moving from Sharepoint to Drupal 8

20 June 2018 - 3:10am
Ahmed Jarrar June 20, 2018

SharePoint is Microsoft’s entry in the crowded Content Management Systems (CMS) market. As a Microsoft product, SharePoint is tightly integrated with Windows and the .NET framework. It has enjoyed considerable success in the intranet world, but as a public-facing enterprise website builder, not so much.

The first part of this post discusses the migration of corporate websites from SharePoint to Drupal 8. The second part addresses the role that SharePoint can play post-migration, in a co-existing relationship between SharePoint and Drupal.

 

Migration Benefits

 

For organizations that currently deploy SharePoint as a CMS over a public-facing enterprise website, migrating to Drupal have the following benefits.

  1. Improved Customizations.
    While SharePoint is bloated with out-of-the-box features, customizing it to satisfy unique enterprise requirements has proven to be difficult. In particular, the customization of the look-and-feel of the website for corporate branding purposes (“theming”) takes considerable effort.

    Drupal, on the other hand, provides a core out-of-the-box framework which you can enhance with the help of its many contributed modules in order to satisfy your specific functional and branding requirements.

 

  1. Cost Effectiveness.

SharePoint has 2 broad-based pricing options: Online and Server. SharePoint Online is the cloud-based version which targets intranet or portal use only. SharePoint Server is the on-premises version for hosting your enterprise website. A SharePoint Server solution requires that you pay software license fees, not just for SharePoint itself, but also for the Microsoft technology stack including Windows Server, SQL Server, as well as Visual Studio which you use for coding.

In contrast, Drupal is open-source with no license fee for the core as well as contributed modules. In addition, Drupal can be deployed on the free and open-source technology stack, highlighted by the Linux operating system and mySQL database. You can also develop PHP-based Drupal solutions using free PHP Integrated Development Environments (IDEs) such as Eclipse.

 

  1. Fast-to-market Innovation.
    One of Drupal’s competitive advantages over proprietary CMS vendors is its vibrant and diverse user community. The community functions as an excellent brain trust and source of both feature and technology innovation. In addition to regional meetups, social media, and online forums, Drupal marketers and developers alike come together annually in DrupalCon, the main event for product planning, networking, collaboration, and training. To bring innovative features to market quicker, Drupal 8 delivers minor feature releases every six months in addition to the monthly bug fixes.

 

Migration Challenges

 

Drupal’s strength is its flexibility, power, and scalability. The challenges of migrating to Drupal usually revolve around the transfer of existing web assets from the old to the new system. The challenge is exacerbated when the website is big, with thousands or even tens of thousands of pages comprised of various content types, media, and users. More specifically, the migration challenges from SharePoint to Drupal are as follows:

 

  1. The export of HTML-formatted body contents.
    SharePoint allows you to export web pages to CSV or XML files. The problem with the  SharePoint export is that the output body sections are of plain text format: all HTML tags, as well as embedded image and URL links, are stripped. For a website of any meaningful size, manually re-inserting the formatting tags and links is simply not an option.

    The good news is that there is a program solution to extract the SharePoint contents with HTML intact. A programming script can be written to retrieve the body content from each web page via the SharePoint web service API. This requires coding skill but is very much feasible.
     

  2. The retention of SEO page ranking.
    The SEO ranking of existing web pages is a valuable enterprise asset that must be protected in the migration process. Failure to protect SEO assets may likely result in the decrease of internet traffic to the new website. Because the URL structure in Drupal and SharePoint are different, the migration process must include the setup of redirects from old URLs to new URLs, hence protecting their SEO value. Drupal handles redirects very well if the old URLs were migrated properly to Drupal.

 

 

  1. New skill sets required.
    Both SharePoint and Drupal are complex systems that require extensive product knowledge to reap full benefits. Migrating from SharePoint to Drupal entails that a whole new skill set must be acquired for the site-building team. If Drupal expertise is not readily available in-house, external professional help is needed. The challenge then becomes how to select qualified Drupal professionals to make the migration project a success.

    The fact that Drupal is built on the PHP open-source platform can be a double-edged sword. While the absence of license fee is undeniably a positive, the general availability of the technology makes it much harder to differentiate true professionals from mere PHP hackers. In seeking outside help, it is recommended to look for an organization that has full-cycle Drupal implementation experience from planning, design to development.
     

 

Migration Steps

 

The following is a high-level description of the steps needed to migrate your enterprise website from SharePoint to Drupal.

  1. Take inventory of current web content assets.
    Moving to a new CMS offers the organization the perfect opportunity to take stock of their current web contents, filter contents that are outdated or least viewed, and include only those assets that are worth moving to the new website.

  2. Design the structure of the new Drupal website.
    Drupal 8 offers a powerful content modeling and structuring modules and tools, which allows you to build flexible content types, host structured media from various sources, and organize web contents using organization-specific vocabularies. Now that you have taken inventory of your existing web pages, it is time to decide how the contents should be re-structured and re-categorized in the new website.

  3. Write SharePoint web services script to export legacy web pages to XML files.
    Automation is the key to extracting contents from SharePoint while keeping existing formatting information intact.

  4. Prepare Drupal test website.
    Set up Drupal 8 on a test machine, and configure Drupal as designed earlier. In addition, prepare the HTTP redirect module that will map the old SharePoint URLs to the new Drupal URLs.

  5. Import SharePoint XML files into your new Drupal website.
    Drupal 8 has a core module named Migrate which is a framework for importing web contents from another CMS. Migrate provides the underlying API for migrating configuration and content from any source to Drupal. You may need to extend the module to import content types that are not automatically imported. Make sure to import old URLs into their redirect rules to retain SEO page ranking.

  6. Review the new Drupal website and make the adjustment.
    Transferring data from a legacy website to a new website is a complicated and error-prone process. Now is the time to review the results, and make the adjustment to the export and the import scripts to eliminate any errors.

 

Drupal Coexisting with SharePoint

 

Many organizations are deeply entrenched in the Microsoft ecosystem, particularly in the areas of document management and collaboration. SharePoint is tightly integrated with Microsoft Office Suite with which internal users are typically well trained. For organizations that have invested heavily in SharePoint in both financial and social capital, simply discarding it for another (albeit more suitable) CMS for their enterprise CMS may be a difficult choice. The good news is that SharePoint can still play an important role in the enterprise’s IT infrastructure post-migration to Drupal.


Organizations can still leverage their prior investment by continuing to deploy its intranet portal using SharePoint. In this way, internal users can still use their existing Office tools and a familiar workflow for internal collaboration, communication, and document management. At the same time, the public-facing enterprise website is powered by Drupal with its broad range of powerful functionalities. By having the two systems working hand-in-hand, the organization reaps the maximum return on investment from SharePoint, while empowering the enterprise website with greater Drupal-based functionalities.

 

The challenges for the coexistence of Drupal and SharePoint are twofold. First, organizations must define a content strategy to avoid duplication of contents and maintenance efforts. Second, content feeds must be established from Drupal to SharePoint and vice versa.


 

 

 

Conclusion

Drupal 8 is a top-notch enterprise site building software platform. Organizations that have outgrown their existing non-Drupal CMS should consider migrating to Drupal 8. Migrating to Drupal 8 has its own unique challenges, including data migration and SEO retention. Vardot is an award-winning Drupal web solutions provider that can help you navigate through the process of migrating to Drupal. For more information, please contact Vardot.

Categories: Drupal

OpenSense Labs: Why are Gaming Companies and Communities Opting for Drupal?

20 June 2018 - 2:47am
Why are Gaming Companies and Communities Opting for Drupal? Akshita Wed, 06/20/2018 - 15:17 "In a virtual community we can go directly to the place where our favourite subjects are being discussed, then get acquainted with people who share our passions or who use words in a way we find attractive. Your chances of making friends are magnified by orders of magnitude over the old methods of finding a peer group."
- Howard Rheingold, The Virtual Community, 1994

Communities are important for the success of any multimedia information systems, today. Gaming is no exception, especially when it has become a part of our new media culture, entertaining people of all ages. The satisfaction of gaming community members can influence the success of a game and it is no secret why highest selling games have the largest communities. 


To keep up the community and the platform with the latest trends, features, and functionalities, it is important that you choose the right technology for your platform. Drupal is an easy choice. But why are gaming communities increasingly opting for Drupal as the platform of their choice? 

“The famous augmented reality game, Pokemon, managed to give an unprecedented swiftness, leading to Nintendo’s stock value increasing dramatically and achieving $470 million in revenue in just 80 days.” The Power Of Gaming: Why Gaming Industry Needs Community?

Not very often will we associate the word community with gaming. And yet, these community platforms are where the games really mature. In terms of engagement and shared values, a common cultural background plays an important role, which can be reflected by the spatiotemporal distribution of the gamers. 

What is a Gaming Community?

The community of gamers can be identified either as a whole or part of video game culture.
It comprises of people who play games and those are interested in watching and reading about it. 

Community support is important for both game development and community building. 

  • User Acquisition: A shared goal, interest provides the reason for being a part of the community. A community is what builds a game, and community is what drives the game beyond its niche success into the blockbuster — shaping the success of ROI for an engaged, excited community is off the charts.

    Intense interactions and strong ties are not only important for online multiplayer games, they enhance the intensity and user experience too.  

    Over 53% of US teenagers play online games with people they know in their offline lives (Pew Research, 2015). Community support allows integration of offline friend circles into online communities.  
     
  • User Retention: Gaming communities form a very crucial part in retaining the users as video games have grown into a subculture since their birth.

    Community services enhance competition within games, which builds up customer loyalty as a consequence. Games and gaming communities are strongly intertwined and experience permanent co-development. 

    Discussions on new features, problems they encounter at playing, advice about gaming strategies via forums is where the retention starts at. 

    The modern games provide direct in-game communication, which is not restricted to a simple message exchange, but also involves further service functionality. 

  • Improves Quality: Gaming communities are a place of intense interaction after all games are about shared experiences, rendered with extraordinarily interaction and ownership.  All successful games have communities. 
    And this where the changes come from. Remember the infamous Tracer butt controversy from 2016? Well, it was after the community chose to put their outrage did the gaming giant Blizzard Entertainment had to pull down the post to show the accurate representation of the values.
Why are Gaming Communities Opting for Drupal?

What does Drupal offer to the gaming communities that they are opting for it? Here is a list of why Drupal is the choice for the community platforms.

  • Decoupled Drupal for Intuitive Game Live UI Experiences

Much like physical sports, video games demand a certain standard of ability where the player can enjoy from the very moment the game is started. Regardless of whether there is an explicit tutorial, players must instantly intuit what to do, what the basic rules are, what is good, what is bad, and how to go about doing the various things that can be accomplished.

The more the realism your game offers to the gamer, the longer they would want to play. 

With the decoupled experience in Drupal, you can create an interactive experience for the gamers by utilizing your site to completely control the useful in-program applications. While the front end can easily be coupled with other technologies such as jQuery, JavaScript, Node.js, and React.js. The backend in turn shifts to become the system of record, but the interaction happens real-time in the browser, back-and-forth. 

The headless site advancement can possibly release the imaginative influence of the diversion with intense gaming experience which is faster, more natural, intuitive and responsive at the gamers’ end. The end result is smoother and faster games played live. 

  • Gameplay based customizations

Games allow players to perceive themselves in alternate ways in their imagined worlds. Player identification – with Avatar and Character – helps build the interest while also improving the gameplay experience and is important to maintain the identity in the possible communities as well. 
 

Avatars in the Leagues of Legend

An example of this could be the website of League of Legends – built on Drupal – which is a team-oriented strategy game where the goal is to work together and bring down the enemy nexus located in the middle of the game. 

Roles offered in the Leagues of Legend

Drupal has tools and services for building user profiles, fostering the creation of virtual sessions, allowing communication with third party serious games, and storing and processing the game analytics. This is important since it helps the gamer take the game more seriously and relate to it on a virtual level.

  • Scalability

Zynga – a leading developer of the world's most popular social games – website is built on Drupal. It claims to have 100 million monthly unique visitors, making it the largest online gaming destination on the web.

Scalability is Drupal’s middle name

Handling high volumes of visitors, content, and users is a tough job. But Drupal does it easily. As it is said, “scalability is Drupal’s middle name”. Some of the busiest sites across the world are built on Drupal. 

It is apt in handling sites that burst with humongous traffic, which means your gaming website can perform spectacularly even on the busiest of the days without breaking or bending. 

  • Multimedia support

Visit the famous StarWars The Old Republic (SWOTR) website and the background has video snippets playing from the game. Multimedia support is not new to the gaming industry. To keep the engagement high, you need to support multimedia features like scorecards, videos, photos, audios among others. 

Drupal is a highly versatile and customizable CMS. It has various modules available to support this need. The photo gallery module, media entity module, and easy to use templates to customize appearance are just a few from the list.   

Not just this the photo gallery module helps you customize images with templates, build you scorecards

  • Mobile Responsiveness

Video games have once again found themselves more widely played and accepted, thanks to the increasing smartphone reach. Add to it one more feature, your game needs to be device responsive too with easy and intuitive controls. 

Drupal 8 is device responsive out-of-the-box. Which means your content adjusts well from the big screen of your desktop to the little screen. Image size changes, menu items shift to drop-downs, other items are pushed around to make sense of content and size of the device. 

But games are not just about the squeezing to a different size thing. They need to offer the same experience as in the native web application without taking away the intuitive design. This can be sorted with the Hammer.js module in Drupal. Hammer.js helps you enhance the user experience by providing cross-browser support and taking away a lot of complexity when implementing touch and pointer gestures. Leveraging it in Drupal is easier than ever due to the Library API of Drupal 8.

  • Adding complex categories and catalogs

Gaming communities are a lot different from what the gaming websites offer. Since each game will have different sub-communities, it becomes a need to build those categories with design and category apt to the theme. 

Drupal provides a powerful taxonomy engine, allowing gaming companies to support intricate designs and complex categories and catalogs, without much ado. The flexibility of adding different types of products and content is ensured by content creation kit (CCK). CCK allows you to add custom fields to any of the content types using a web interface

  • Discussions, Reviews, and News

Communities are all about discussing what is happening or happened. Therefore one of the primary community needs is for a easy content creation with different content types. The more the types, higher the engagement, more the users will interact. Blogs, events, FAQs, news are all important.

Screengrab from League of Legends
  • Quick Search 

Communities are a busy place with a lot of activities happening at the same time. Content that might interest a user can get lost in the myriad of content. In Drupal, Solr is used to get more accuracy within less time. 

Drupal has Solr integrated for a quicker search. Solr is a highly reliable, scalable and fault tolerant search application which provides distributed indexing, replication, and load-balanced querying with a centralized configuration. 

  • E-commerce Solution

Integrating commerce with the website is an old practice and most gaming companies leverage this opportunity to boost their sales. Klei – an Independent game studio – chose Drupal to create a seamless shopping experience for both mobile and desktop users.

According to The Jibe, "Klei needed a site and store that was as easy for them to manage as it was for their customers to buy: easy sorting, featured items, promo-code inputs, simple searching, and clear calls-to-action."

After integrating the online store with Drupal the team can easily add new products and games on the fly while also managing the promotions and highlighting featured items easily.

DrupalCommerce and Commerce Kickstart are two of the most popular solution that Drupal offers. With easy payment gateway integration, your online transactions are secure with Drupal.

Drupal v/s Wordpress 2018 Building a Community website

Building an online community, a network of people with shared interests and goals with target niche audience to be part of it with easy usability and navigation. 

Example: Pinterest Community

Winner: Drupal 8 

Why? For an extensive user management in your community, it would require custom fields, different content types, scalability, varied user roles and permissions among the others - all of which are easy to build in Drupal 8. In case you need a simple to-do community with limited features and functionalities, then maybe Wordpress will work. But then that format would be closer to a blog, anyway.

Building a Gaming Website

These are the sites featuring direct online gaming with single or multiplayer and can include games of any type from the different genre. 

Example: Zynga

Winner: Drupal 8 (Clearly)

Why? While you might think of Drupal as a preconfigured PHP framework, it is vastly more suited to developing an online game than Wordpress is. Drupal is fast, mobile responsive and scalable. It can handle as content as much as you want, as many people as you can think of - without crashing. 

And as far as WordPress is concerned, why would you want to choose a software built from a blogging background to create a game?

Building a Basic Gaming related Website

These are the types devoted to the world and culture of computer gaming. Will includes gaming news, magazines, FAQs, and resources. 

Winner: WordPress

Why? Although Drupal 8 more suited to handle the content, WordPress has a slight edge here. All the types mentioned here are related to publishing. Being a blogging platform (niche) WP can suit the needs better since its out-of-the-box configuration comes closer to your goals. 

Although in case there are varied features added like user login, reviews, managing multimedia content, and discussions then, Drupal is clearly the hero. 

Building a Media-Streaming Website

These are the sites that offer audio/video streaming services, such as podcast, television and film, sports, music, among others.

Example: AXN 

Winner: Drupal 8

Why? Drupal 8 can handle multimedia content much more flexible than WordPress. While WordPress can excellently handle content that's primary text, Drupal 8 makes all types of a media a first-class citizen. 

With clear taxonomy and easier role management, coupled with faster-load time, it won’t bend or break when streaming content live. 

Summing Up

Community platforms have become an easy measure to the success of any game since they serve a combination of purposes varying from technical to human factors. Further community satisfaction measures need to be considered in order to improve the product model and quality in future. 

Drupal mostly serves the needs of the gaming industry, is should be a no-brainer when opting for it. Drop a mail at hello@opensenselabs.com to connect with us if you are building your gaming website or community platform.

blog banner blog image Gaming Community Community Drupal Blog Type Articles Is it a good read ? On
Categories: Drupal

Drop Guard: CeBit - we celebrated AppGuard’s MVP!

20 June 2018 - 1:45am
CeBit - we celebrated AppGuard’s MVP! We attended the CeBit 2018 in Hanover, Germany, for the first time last week! But this time we presented our newest extension of update automation management: AppGuard Besides Drop Guard for Drupal update automation, we also want to provide a SaaS for everyone who uses package and dependency managers like npm, Composer, Yarn, Bundler and more. And we couldn’t believe the great feedback! Drupal Drupal Planet Business Events Ann
Categories: Drupal

Dries Buytaert: Increasing Drupal contributions from underrepresented groups

19 June 2018 - 10:44am

For the past two years, I've published the Who sponsors Drupal development report. The primary goal of the report is to share contribution data to encourage more individuals and organizations to contribute code to Drupal on Drupal.org. However, the report also highlights areas where our community can and should do better.

In 2017, the reported data showed that only 6 percent of recorded code contributions were made by contributors that identify as female. After a conversation in the Drupal Diversity & Inclusion Slack channel about the report, it became clear that many people were concerned about this discrepancy. Inspired by this conversation, Tara King started the Drupal Diversity and Inclusion Contribution Team to understand how the Drupal community could better include women and underrepresented groups to increase code and community contributions.

I recently spoke with Tara to learn more about the Drupal Diversity and Inclusion Contribution Team. I quickly discovered that Tara's leadership exemplifies various Drupal Values and Principles; especially Principle 3 (Foster a learning environment), Principle 5 (Everyone has something to contribute) and Principle 6 (Choose to lead). Inspired by Tara's work, I wanted to spotlight what the DDI Contribution Team has accomplished so far, in addition to how the team is looking to help grow diversity and inclusion in the future.

A mentorship program to help underrepresented groups

Supporting diversity and inclusion within Drupal is essential to the health and success of the project. The people who work on Drupal should reflect the diversity of people who use and work with the software. This includes building better representation across gender, race, sexuality, disability, economic status, nationality, faith, technical experience, and more. Unfortunately, underrepresented groups often lack community connections, time for contribution, resources or programs that foster inclusion, which introduce barriers to entry.

The mission of the Drupal Diversity & Inclusion Contribution Team is to increase contributions from underrepresented groups. To accomplish this goal, the DDI Contribution Team recruits team members from diverse backgrounds and underrepresented groups, and provides support and mentorship to help them contribute to Drupal. Each mentee is matched with a mentor in the Drupal community, who can provide expertise and advice on contribution goals and professional development. To date, the DDI Contribution Team supports over 20 active members.

What I loved most in my conversation with Tara is the various examples of growth she gave. For example, Angela McMahon is a full-time Drupal developer at Iowa State. Angela been working with her mentor, Caroline Boyden, on the External Link Module. Due to her participation with the DDI Contribution Team, Angela has now been credited on 4 fixed issues in the past year.

Improving the reporting around diversity and inclusion

In addition to mentoring, another primary area of focus of the DDI Contribution Team is to improve reporting surrounding diversity and inclusion. For example, in partnership with the Drupal Association and the Open Demographics Project, the DDI Contribution Team is working to implement best practices for data collection and privacy surrounding gender demographics. During the mentored code sprints at DrupalCon Nashville, the DDI Contribution Team built the Gender Field Module, which we hope to deploy on Drupal.org.

The development of the Gender Field Module is exciting, as it establishes a system to improve reporting on diversity demographics. I would love to use this data in future iterations of the 'Who sponsors Drupal development' report, because it would allow us to better measure progress on improving Drupal's diversity and inclusion against community goals.

One person can make a difference

What I love about the story of the DDI Contribution Team is that it demonstrates how one person can make a significant impact on the Drupal project. The DDI Contribution Team has grown from Tara's passion and curiosity to see what would happen if she challenged the status quo. Not only has Tara gotten to see one of her own community goals blossom, but she now also leads a team of mentors and mentees and is a co-maintainer of the Drupal 8 version of the Gender Field Module. Last but not least, she is building a great example for how other Open Source projects can increase contributions from underrepresented groups.

How you can get involved

If you are interested in getting involved with the DDI Contribution Team, there are a number of ways you can participate:

  • Support the DDI Contribution Team as a mentor, or consider recommending the program to prospective mentees. Join #ddi-contrib-team on Drupal Slack to meet the team and get started.
  • In an effort to deliberately recruit teams from spaces where people of diverse backgrounds collaborate, the DDI Contribution Team is looking to partner with Outreachy, an organization that provides paid internships for underrepresented groups to learn Free and Open Source Software and skills. If you would be interested in supporting a Drupal internship for an Outreachy candidate, reach out to Tara King to learn how you can make a financial contribution.
  • One of the long term goals of the DDI Contribution Team is to increase the number of underrepresented people in leadership positions, such as initiative lead, module maintainer, or core maintainer. If you know of open positions, consider understanding how you can work with the DDI Contribution Team to fulfill this goal.

I want to extend a special thanks to Tara King for sharing her story, and for making an important contribution to the Drupal project. Growing diversity and inclusion is something everyone in the Drupal community is responsible for, and I believe that everyone has something to contribute. Congratulations to the entire DDI Contribution Team.

Categories: Drupal

Acro Media: Omnichannel: How We Did It For Real

19 June 2018 - 7:45am

Omnichannel generally means the shopping experience is unified and seamless whether you do it on your laptop, in store, through your phone, etc. The team at Acro Media set out to demonstrate just how easy it is to give your customers a true omnichannel experience using Drupal and Drupal Commerce.

The omnichannel setup

As part of our demo at DrupalCon in Nashville, we did a pseudo T-shirt pre-order. Before the conference, attendees could use our Urban Hipster eCommerce demo site to pre-order a Drupal Commerce shirt in their size. When they completed their pre-order, they got an order number to bring with them to our booth. 

People who didn't pre-order could also come to our booth and "purchase" (for free) a T-shirt using a self serve kiosk running the same demo site. 

So one side of the booth was the set up as the cashier/fulfillment area. The other side had the self-serve kiosk. We also had other laptops available so that we could bring up the admin interface as if we were a customer support person assisting a customer over the phone. The "support person" could find the customers order number or email address and fulfill the order. Easy peasy.

The whole time, our inventory of shirt sizes was counting down until the stock count hit 0. When our inventory reached 0 for a certain size, orders for that size could no longer be placed.

Why is this so amazing?

Some people were impressed but also a little puzzled, thinking that this sort of setup should just exist everywhere. Which it should, but it doesn't. With most retail stores, the online and in-store experiences are completely separate. They might as well be two different companies. If you buy something online and try to return it in store, it often can't happen. Loyalty points often don't transfer. The list goes on. Some places will let you buy online and pick up in store, but there might be a delay. They might say sure, you can pick it up in store, but not for 24 hours. In that case, you might as well just go to the store and find it yourself. Even knowing if an item is in stock can be tricky. The website might say there are three left, but that's just a snapshot from a certain point in time, and you don't know how often that gets updated. Maybe that was valid six hours ago, but that item has since sold out.

Why Drupal rocks

What makes Drupal so cool is that the point of sale and the Commerce module both use the same orders. A point of sale order is just a Drupal Commerce order. It has some specifics to the point of sale, but it can be loaded up in a regular interface. They use the same stock, the same products, everything. This is surprisingly rare. A lot of POS systems in particular are very antiquated. They date from pre-Internet times and have no concept of syncing up with things.

But we've created a true omnichannel experience. We've done it, and implemented it, and it's all open source and freely available. Anyone else could set up the same omnichannel setup that we did. We used a laptop, a cash drawer, a couple of iPads, nothing too fancy.

What's more, as the software matures, we're working on an even better demo with more smoothed out features, better integration, nicer interface, etc. Stay tuned.

More from Acro Media Let's talk omnichannel!

We're always happy to help you understand how you can deliver a true omnichannel experience for you customers. Contact us today to talk to one of our business development experts.

Categories: Drupal

Amazee Labs: Drupal HackCamp Bucharest

19 June 2018 - 5:29am
Drupal HackCamp Bucharest

Only a month has passed since DrupalCamp Transylvania, and already another Drupal Camp has come and gone in Romania. This time it was Drupal HackCamp, organised in the Romanian capital, Bucharest. It was a Drupal Camp with a very specific theme: Security.

 

Vasi Chindris Tue, 06/19/2018 - 14:29

Throughout the sessions presented at the Camp, one was able to find out what security issues Drupal had experienced in the past, how the Drupal Security team, as well as the Community in general, had dealt with them, what Drupal did to improve the security of the platforms that were developed using the CMS and what can (and should) be done to have a more secure application.

Since I first heard of it, a Camp focused on Drupal security sounded really interesting to me. This is the type of camp every Drupal developer should attend at least once in their career. Actually any web developer for that matter. As we know, security is a very important topic with regards to the web. Even for experienced developers, some things can be very tricky, as an application's security does not only depend on the code. It also depends on how the web server is configured or what kind of third-party libraries your code depends on. Additionally, it also depends on the libraries you are using in development, if they are used to pack or bundle your code, or if they end up touching your code in any other way.

One of the sessions which focused on how Drupal improved its security with each new version, was Peter Wolanin's - 10 Ways Drupal 8 Is More Secure.

In this session, Peter Wolanin first gave a brief introduction to the OWASP Top 10, a list with the top 10 critical security risks that affect a web application. This is not only Drupal related, it applies to any kind of application that is accessible via the web. Next, he pointed out 10 things Drupal 8 implemented that help the developer to avoid those security risks. Among the points he mentioned were, the autoescaping feature implemented in twig (so now everything which gets outputted by twig, is by default, escaped), the automatic CSRF tokens in the route definitions (making it easier for the developer to create links which are valid only for the current user session), the removal of the PHP input filter (which was very dangerous if misused), and the enforcement of trusted host patterns for requests (so that your application will respond only if requested via a host which you actually trust).

As previously mentioned, having a secure app doesn't guarantee that your Drupal is secure. Nowadays, there is a growing interest in having decoupled apps. This means you have a backend which is usually used for content management only (that can be a Drupal site) and a frontend, which is a modern js application, that can be implemented optionally, using a framework like React, Vue.js, and so on. But then you also need to use npm for installing the additional js libraries you need, webpack for creating the javascript bundles for your app, and babel for transpiling your javascript code. So suddenly you start to introduce a ton of other dependencies, which each depend on a lot of other packages. Alexandru Badiu did a presentation called, “JS and Security”, which covered some of those aspects.

So, you do the best you can to write secure code, try to evaluate the dependencies of your project, and make sure that they don't introduce critical security issues, but is that enough? There could still be several security issues which you’re unaware of, which will only be discovered while you are using the application. It would be awesome if we're able to do something to proactively protect us against common security risks.

Bastian Widmer (@dasrecht) presented a talk on this subject, entitled “How Open Source will help you to survive the next Drupalgeddon”, where he showed us a few tips that we can use in advance, in order to respond to potential security issues in future. Besides ensuring you do regular updates for all your app’s dependencies, you could also take some measures at the web server level. For example, only allow index.php to be executed, use a web application firewall or make sure that your operating system is configured properly.

Of course, there had to be a session about the last Drupalgeddon(s), at a Camp focusing on Security. The event’s keynote was by Jasper Mattsson, who actually discovered Drupalgeddon 2. He shared some tips with us on how to find security breaches. He said that there is no secret 'recipe' for that, but a good starting point, is to look for functions which output data, which can do multiple things, perhaps depending on how they are invoked (in which context or with which parameters) or which can trigger code execution.

There is one very important thing to keep in mind if you discover a security breach: do not post it on the regular Drupal issue queue. Instead, follow the instructions on how to report a security issue when you found one. The implications of reporting a security issue inside the regular Drupal issue queue can be very dangerous, as the attackers will then have plenty of time to create an attack until the issue is fixed.

Being in a city with such a rich history, we could certainly not miss the walking tour that the organisers had prepared for us on the Saturday afternoon. During the tour, we saw Bucharest’s most iconic buildings, which have survived all the great historical periods over the last 200 years - the monarchy, two world wars, communism and now democracy.

Drupal HackCamp Bucharest was a really great event, and I hope it takes place next year. It is of great value to all web developers, especially those at the beginning of their careers, as it prepares them for the dangers of the wild world wide web and equips them with the required knowledge to guard against any that may pop up along the way.

Categories: Drupal

ADCI Solutions: Drupal modules for a university website

19 June 2018 - 3:44am

A website for a university always needs a lot of functionality because of a heavy amount of data managed there. Here you will find the list of Drupal modules which allow you to add new features to any Drupal university website.

Check them out

Categories: Drupal

Appnovation Technologies: Content Creation: White Paper Wisdom

19 June 2018 - 12:00am
Content Creation: White Paper Wisdom For any online writer, the white paper is a valuable arrow in the content creation quiver. Depending on the subject matter structures necessarily differ, both in terms of the content itself as well as the overall construction of the material.  That said, writing a white paper is also subject to some fairly universal guidelines, many of which I...
Categories: Drupal

mark.ie: PatternLab: Your Clients Don't Need a Science Lesson

18 June 2018 - 1:24pm
PatternLab: Your Clients Don't Need a Science Lesson

Let's revisit my recent post and see if we can come up with more user-friendly names for PatternLab items.

markconroy Mon, 06/18/2018 - 21:24

My Approach to PatternLab recently got quite an amount of discussion on Slack and other places about PatternLab and naming conventions, especially the line "Clients do not want a science lesson". In that I set out my current naming convention like so:

  • Basic Elements
  • Site Blocks
  • Building Blocks
  • Content
  • Sample Pages

While generally appreciated, some people criticised it for being too Drupal-centred. What happens if your client doesn't want to use Drupal? What happens if you want to use the same PatternLab instance for an app on Android or iOS? Good questions, and they got me thinking more. A number of people on Slack recently have been asking about what naming conventions besides the atoms > molecules > organisms one people have been using.

I had a verrrrry long chat (over 3 hours) with some developers from outside of my work place to see what what naming convention(s) might make sense, be easy for clients to understand, and allow enough scale to be used outside of Drupal. Here's what we came up with:

  • Utilities
    • Items such as utility classes like .visually-hidden or .padding-top
  • Base
    • Items such as colours and fonts
  • Elements
    • Low level elements such as headings, paragraphs, basic lists
  • Components
    • High definition components such as a teaser view mode, an embedded video component, a list of teasers
  • Layouts
    • General layout classes for the different page designs - with sidebar, without sidebar, etc
  • Mock-ups
    • Rendered 'pages' or other UI interfaces
    • We shied away from 'Pages' here because not everything might be a page, such as a login screen on an iPhone app

I'm quite happy with those naming conventions and think I might start porting some of them to my work at Annertech. (Oh, and by the way, if you want to get really good Drupal developers to work on your website, we're available for hire - contact us!)

 

Categories: Drupal

Hook 42: Being Drupal Adjacent

18 June 2018 - 7:05am
What It Means to be Drupal Adjacent

One of the major objectives of Drupal 8 is the desire to “get off the island.” Drupal opened its doors to using and contributing to a broader ecosystem of projects instead of replicating functionality in Drupal. We now see tools like Twig and various Symfony components in Core. Contributed modules are also able to integrate projects and Software Development Kits (SDKs). For example, Password Strength, Digital Ocean, and Hubspot API integrate through Drupal’s native use of Composer. This philosophy helps those of us that more closely identify as “Drupal Adjacent.”

I consider being “Drupal Adjacent” as having some degree of experience in Drupal but maintaining expertise in a breadth of other technology. You are capable of leveraging Drupal’s strengths along with the strengths of other tools. Drupal Adjacent architects use “the right tool for the right job.” Drupal can serve as a bi-directional tool or framework in a broader architecture of systems and other tools can serve a discrete purpose.

As I consider myself Drupal Adjacent, I want to share my experience working in the Drupal community.

Categories: Drupal

Axelerant Blog: Enterprise Digital Transformation (DX) + Outsourcing

18 June 2018 - 6:05am

Can you outsource Digital Transformation (DX)?

Let's set this off in the right direction. What people think digital transformation is, often isn’t. Adopting the latest feature is not digital transformation, and neither is a basic migration or new functional enhancements made to a site.

Categories: Drupal

DrupalEasy: DrupalEasy Podcast 210 - Stefanie Gray - DKAN Open Data Platform

18 June 2018 - 4:26am

Direct .mp3 file download.

Stefanie Gray, (stefaniegray), Engineer and Open Data Specialist for CivicActions joins Mike Anello to discuss all things DKAN.

Interview DrupalEasy News News Sponsors
  • Drupal Aid - Drupal support and maintenance services. Get unlimited support, monthly maintenance, and unlimited small jobs starting at $99/mo.
  • WebEnabled.com - devPanel.
Follow us on Twitter Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Categories: Drupal

Drupal Europe: Community at Drupal Europe

18 June 2018 - 1:52am
Amazee labs @flickr

Drupal Europe brings a unique opportunity to connect, share and learn from the Drupal community and to talk about what holds us together. We grew to be the biggest open source community under the tagline “Come for the code and stay for the community” which we strive to uphold.

Join us on September 10–14, 2018 in Darmstadt, Germany to discuss and learn about growing and strengthening communities and the challenges that come with that.

Drupal has been a historic example of how Open Source communities can thrive and to maintain this leading position we need to learn from each other, include others and inspire everybody to be an active contributor. This might bring its challenges from time to time, so please come and share your stories, expertise and lessons learned with us. This is the only way to keep our community strong, diverse and open minded.

Who should attend?

You! This vertical topic will be the meeting place for everyone in Drupal and other communities.

Whether you want to organise events, you’re new to the community and want to know where you can get involved, or you want to share a success story from your community, you are welcome.

Target groups:

  • Members of the Drupal community
  • Other open source communities
  • Organisations and those interested in how communities work and prosper

Example talks:

  • Being Human
  • Challenges of contribution
  • Community help
  • Community retention
  • Growing leaders & influencers (by empowering, enabling and adding trust)
  • Growing the Drupal Community
  • Improving diversity
  • Mentorship, sponsorship and allies
  • Organizing events
  • Succession planning for organizers and leaders

As you’ve probably read in one of our previous blog posts, industry verticals are a new concept being introduced at Drupal Europe and replace the summits, which typically took place on Monday. At Drupal Europe. These industry verticals are integrated with the rest of the conference — same location, same ticket and provide more opportunities to learn and exchange within the industry verticals throughout three days.

Industry vertical icons by @sixeleven

Now is the perfect time to buy your ticket for Drupal Europe. Session submission is already open so please submit your sessions and encourage others who have great ideas.

Please help us to spread the word about this awesome conference. Our hashtag is #drupaleurope.

To recommend speakers or topics please get in touch at program@drupaleurope.org.

About Drupal Europe Conference

Drupal is one of the leading open source technologies empowering digital solutions in the government space around the world.

Drupal Europe 2018 brings over 2,000 creators, innovators, and users of digital technologies from all over Europe and the rest of the world together for three days of intense and inspiring interaction.

Location & Dates

Drupal Europe will be held in Darmstadtium in Darmstadt, Germany — which has a direct connection to Frankfurt International Airport. Drupal Europe will take place 10–14 September 2018 with Drupal contribution opportunities every day. Keynotes, sessions, workshops and BoFs will be from Tuesday to Thursday.

Categories: Drupal

Amazee Labs: So, you want to run a Drupal Camp. Here's what you should know.

18 June 2018 - 1:18am
So, you want to run a Drupal Camp. Here's what you should know.

I’ve been running events since college, for work and for fun, and for groups of 3 to 3,000. You’d think there’d be a difference, but the amount of energy it takes to run an event, surprisingly, is the same. It’s crazy how well these things scale.

Stephanie El-Hajj Mon, 06/18/2018 - 10:18

Regardless of size, an event planner goes through a very predictable flow from event conception to event end.

We started planning Texas Camp in September of 2017. Knowing we were going to organize the event again for 2018, we scrambled to finalize the venue and update the sticker. By the time BADCamp rolled around, we had shiny new Texas Camp stickers to distribute at the nation’s largest gathering of Drupal people - all potential camp attendees.  

Because we knew when companies do their budget planning, we were ready with a brand new sponsor prospectus by December. By the second week, a cheerful call to sponsor was in many Drupal company inboxes.  

We worked to get the bestie launched in January, so attendees could plan ahead and to get everyone excited. Let me tell you this when building a spankin’ new React + Drupal site, plan for extra time.

By the time we did launch in February, we had missed a few big camps, but still had plenty of time to get the word out on the call for sessions.

From February to April, we worked hard to get the word out about all the different ways people could get involved with camp. Sponsorship, speaking, volunteering, or simply just attending. Early-bird tickets were on sale and the sessions submissions were trickling in.

Texas Camp organizers attended DrupalCon Nashville and spread the good word of Texas Camp to anyone who would spare a few minutes. Those who promised to submit sessions were gifted a Texas Camp sticker, along with lavish promises of fame and glory.

Because we want Texas Camp to be known as an inclusive camp, we reached out to different groups, including the Drupal Diversity and Inclusion group, to help get the word out to a broader, and more diverse, audience. I’d like to think our efforts here helped us pick up more diverse speakers than we might have gotten through our usual channels.

At the end of April, the craziness began. Although I am a seasoned session selection overseer, this was my first time actively participating in the selection as a team. It’s not an easy task, not just considering the length of time it takes to read sessions!

We had a few mandates: no repeat speakers, diverse topics, variety in experience levels, and oh yeah, the selection was done fully blind to the presenter. All personally identifiable information (pronouns, speaker names, company names, etc) was all painstakingly struck from the submission pile.

At the end of the two-week selection process, the team gathered and made the final selection. Some speakers with multiple sessions had been ranked high enough to make the session cut, so the better of the two, or the session with most topical conflict with other highly ranked sessions, were made into backups.

After session selection, things started moving really fast. We had one week to confirm speakers and another week to make a schedule. Once that newsletter went out announcing the final schedule, the official countdown to Texas Camp had begun.

Week 4: Guess what you’ll need and order everything. This gives you enough time to re-order if anything goes wrong. It’s too early for real attendance numbers, so any amount you order is the best guess.

Week 3: Things will start to arrive. Your office will be filled with an insane number of soda flats and bizarre equipment. We had a silver 4-foot metal trough we had to explain on a few client calls. Speakers will begin canceling. New sponsors will appear out of the woodwork - which is a GREAT thing. Last minute sponsors allowed us to blow the budget on breakfast tacos!

Week 2: You’ve printed everything you can think to print and pray the sizes match and the colors turn out right. The final “Texas Camp is next week!” notice has gone out to attendees. Speakers are thoroughly annoyed at the number of reminders to RSVP we’ve sent.

Week 1: The blessed “eye of the storm”. The week before the event. It’s too late to do anything meaningful. All you can do is hope you’ve done enough ahead of time and remembered everything. Especially if the week of ends in a 3-day weekend for Memorial Day. An unexplained spike in registrations. It looks like we’ll hit 150!

The week of: It’s time for final inventory audits, calling and confirming with all the venues and updating catering counts with vendors. Always add more vegan meals than you have data for! Rally the organizing team and caravan the soda flats and registration supplies to the venue.

Make eye contact and remind each other that you can do it and that there will be coffee in the morning. Charge the iPads. Remember to print the special diet food tents for the morning.  

During camp: Have a stupid amount of fun. See people you haven’t seen in a year. Celebrate the CMS that drew us all together. So many people, at Texas Camp we nearly hit 200! Eat an inordinate amount of food. Watch some amazing talks. Sing karaoke.

After camp: Go home. Swear to never do it again. Take a vacation. Get a sunburn. Reconsider.

The week after camp: Begin researching venues for the next year.  

Categories: Drupal

PreviousNext: How to create and expose computed properties to the REST API in Drupal 8

17 June 2018 - 9:51pm

In Drupal 8.5.0, the "processed" property of text fields is available in REST which means that REST apps can render the HTML output of a textarea without worrying about the filter formats.

In this post, I will show you how you can add your own processed fields to be output via the REST API.

by Jibran Ijaz / 18 June 2018

The "processed" property mentioned above is what is known as a computed property on the textarea field.

The ability to make the computed properties available for the REST API like this can be very helpful. For example, when the user inputs the raw value and Drupal performs some complex logical operations on it before showing the output.

Drupal fieldable entities can also have computed properties and those properties can also be exposed via REST. I used the following solution to expose the data of an entity field which takes raw data from the users and perform some complex calculations on it.

First of all, we need to write hook_entity_bundle_field_info to add the property and because it is a computed field we don't need to implement hook_entity_field_storage_info.


<?php // my_module/my_module.module /** * @file * Module file for my_module. */ use Drupal\my_module\FieldStorageDefinition; use Drupal\my_module\Plugin\Field\MyComputedItemList /** * Implements hook_entity_bundle_field_info(). */ function my_module_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { $fields = []; // Add a property only to nodes of the 'my_bundle' bundle. if ($entity_type->id() === 'node' && $bundle === 'my_bundle') { // It is not a basefield so we need a custom field storage definition see // https://www.drupal.org/project/drupal/issues/2346347#comment-12206126 $fields['my_computed_property'] = FieldStorageDefinition::create('string') ->setLabel(t('My computed property')) ->setDescription(t('This is my computed property.')) ->setComputed(TRUE) ->setClass(MyComputedItemList::class) ->setReadOnly(FALSE) ->setInternal(FALSE) ->setDisplayOptions('view', [ 'label' => 'hidden', 'region' => 'hidden', 'weight' => -5, ]) ->setDisplayOptions('form', [ 'label' => 'hidden', 'region' => 'hidden', 'weight' => -5, ]) ->setTargetEntityTypeId($entity_type->id()) ->setTargetBundle($bundle) ->setName('my_computed_property') ->setDisplayConfigurable('form', FALSE) ->setDisplayConfigurable('view', FALSE); } return $fields; }

Then we need the MyComputedItemList class to perform some magic. This class will allow us to set the computed field value.


<?php // my_module/src/Plugin/Field/MyComputedItemList.php namespace Drupal\my_module\Plugin\Field; use Drupal\Core\Field\FieldItemList; use Drupal\Core\TypedData\ComputedItemListTrait; /** * My computed item list class. */ class MyComputedItemList extends FieldItemList { use ComputedItemListTrait; /** * {@inheritdoc} */ protected function computeValue() { $entity = $this->getEntity(); if ($entity->getEntityTypeId() !== 'node' || $entity->bundle() !== 'my_bundle' || $entity->my_some_other_field->isEmpty()) { return; } $some_string = some_magic($entity->my_some_other_field); $this->list[0] = $this->createItem(0, $some_string); }

The field we add is not a base field so we can't use \Drupal\Core\Field\BaseFieldDefinition. There is an open core issue to address that https://www.drupal.org/project/drupal/issues/2346347 but in tests there is a workaround using a copy of \Drupal\entity_test\FieldStorageDefinition:


<?php // my_module/src/FieldStorageDefinition.php namespace Drupal\my_module; use Drupal\Core\Field\BaseFieldDefinition; /** * A custom field storage definition class. * * For convenience we extend from BaseFieldDefinition although this should not * implement FieldDefinitionInterface. * * @todo Provide and make use of a proper FieldStorageDefinition class instead: * https://www.drupal.org/node/2280639. */ class FieldStorageDefinition extends BaseFieldDefinition { /** * {@inheritdoc} */ public function isBaseField() { return FALSE; } }

Last but not least we need to announce our property definition to the entity system so that it can keep track of it. As it is an existing bundle we can write an update hook. Otherwise, we'd need to implement hook_entity_bundle_create.


<?php // my_module/my_module.install /** * @file * Install file for my module. */ use Drupal\my_module\FieldStorageDefinition; use Drupal\my_module\Plugin\Field\MyComputedItemList; /** * Adds my computed property. */ function my_module_update_8001() { $fields['my_computed_property'] = FieldStorageDefinition::create('string') ->setLabel(t('My computed property')) ->setDescription(t('This is my computed property.')) ->setComputed(TRUE) ->setClass(MyComputedItemList::class) ->setReadOnly(FALSE) ->setInternal(FALSE) ->setDisplayOptions('view', [ 'label' => 'hidden', 'region' => 'hidden', 'weight' => -5, ]) ->setDisplayOptions('form', [ 'label' => 'hidden', 'region' => 'hidden', 'weight' => -5, ]) ->setTargetEntityTypeId('node') ->setTargetBundle('my_bundle') ->setName('my_computed_property') ->setDisplayConfigurable('form', FALSE) ->setDisplayConfigurable('view', FALSE); // Notify the storage about the new field. \Drupal::service('field_definition.listener')->onFieldDefinitionCreate($fields['my_computed_property']); }

The beauty of this solution is that I don't have to write a custom serializer to normalize the output. Drupal Typed Data API is doing all the heavy lifting.

Related Drupal core issues: Tagged jsonapi, REST, XML, JSON, hal_json, Normalizers
Categories: Drupal

Finalist Drupal Blog: Load testing in Drupal (part 1)

17 June 2018 - 3:00pm

So, we are building this great community portal for all the world to see. We thought about all aspects that would make this project a huge success. We are heavily in control. And finally the day has come: our portal hits the worldwide web. And so it seems, the website is well received! A little too well received. Soon traffic rates hit the ceiling. And so does our carefully configured web server. End of this little story. We’ve become the victim of our own success.

Performance testing is all about being prepared

OK, so perhaps this tale is a little bit over dramatized. Still, in my daily work I see this kind of misery happening a lot. To be honest… we tend to step into this pitfall as well from time to time. And we shouldn’t have to.

Testing the performance of your site means that you can actually prepare for large amounts of traffic on your site. You can be predictable.

If we really wanted this site to be a success, we might have had to prepare better for that success.

This is where performance testing comes in. We simply want to know how our website is performing once it hits higher traffic rates.

What are we testing anyway?

But what do we actually test? What about busy periods? Does the caching do its job? Or have we configured things incorrectly? And when we really tighten the screw, what will happen? Will it bring down our site? What about peak times, just after our project went viral? And are we fully utilizing the server capacity?

We use a load test to closely monitor the use of the site. This way we can make statements about the performance.

But… it comes down to the same problems anyway?

Without performance testing we can look at common causes that can give rise to performance problems. Wrongly deployed caching is obvious. And perhaps you simply load too much data on a page, stressing the database. If you are an experienced Drupal developer, there is a fair chance that guess right we can and sleep peacefully again. In many cases, the real problem is something you did not think of.

Performance tests

There are many different types of performance tests. We will discuss some.

Load testing

With a load test we mainly look at the expected load on the site. So: if we build an intranet, we want to know what happens when, for example, 60% of the company simultaneously uses the intranet intensively.

Stress testing

With stress testing we look more at deviant situations. An exceptional load. In the example of our fansite: we appear in the news and therefore suddenly have a multitude of visitors. Our example is of course exaggerated. It is difficult to anticipate an unexpected and absurdly high number of visitors. But what we do want to know: where is the border?

Endurance testing

With an endurance test, we test the site measured over a longer period, to investigate whether the site will perform worse over time, for example due to the increase of logged-in users or content.

Peak testing

With peak testing we mainly look at intensity peaks. In the example of the intranet you can think of a peak in the morning when everyone arrives at the office.

Load testing: 5 steps

Because we want to know if our site can handle the desired number of visitors, and we also want to know how far we can go, we focus on load and stress testing.

The steps are the following.

1. Analysis of any existing data

Simply retrieve from existing statistics, for example visitor numbers. This helps to create realistic scenarios in our test preparation. In the analysis we can fall back on tools such as Google Analytics. But … if the site is new, we have to make statements about traffic in a different way. Often the customer can share some insights about this. And you might be building a new version of the same site so you can still say a lot about expected visits.

2. Think of some scenarios

Make sure you will test with realistic scenarios. Prepare the test well! One scenario is not enough. We want to simulate that a large number of visitors, simultaneously, click on several pages, download documents, log in, send forms, etc. Therefore, make sure you have enough CPU on your machine to perform the tests. And … determine limit values ​​for the test, to assign a score to the performance.

APDEX

The APDEX may be of help here. The APDEX is an industry standard to make statements about satisfaction with performance based on tests. Actually, we can thus determine whether the performance meets the expectations! Response times alone do not say much. We can interpret this with the APDEX. The APDEX is a score based on satisfaction surrounding the performance. A lot of tools, such as New Relic and Jmeter, therefore use the APDEX.

The APDEX calculates a score based on measurements: Satisfying, Tolerating and Frustrating. We will apply a time aspect here, for example: Satisfying: 0-1.5 seconds; Tolerating: 1.5-6 seconds; Frustrating: 6 seconds or more.

  • Satisfying results count for 100% (this is great)
  • Tolerating results count for 50% (this is ok)
  • Frustrating results do not yield a score (this is not good)

And then it is time to do some calculations.

APDEX = Satisfied + (Tolerated / 2) / Total samples 3. Pick the right tool

Determine which tooling we can use to carry out the test. And, well ok, there is a lot to be found out there. Let’s try to highlight some.

  • AB - Apache Bench - What can we say, this is very easy. It proves some low level local testing is not that hard.
  • Gatling - A paid (and great) alternative for powerful open source tooling like JMeter. Check out this extensive comparison.
  • Locust: Define user behavior with Python code.
  • Siege - Similar to AB, but more extensive, useful to perform a quick load test.
  • Blazemeter - Simple characterization: a hosted version of Jmeter. Less simple characterization: testing on steroids. Offering A LOT when it comes to testing. Test from all over the world, very large numbers, hosted Selenium, Gatling, Locust and more…
  • Jmeter - Open source, many possibilities, the old, the proven solution. Still goin’ strong.

We should point out that Blazemeter stands out as a modern, versatile cloud test platform (not only load testing!).

Some pros: - Easy / quick boarding - Drupal (D7 + D8) stable module available - Important advantages with respect to JMeter: geography is not limited to your own local environment and processing is not limited to your own machine.

Yes, a con: It is a commercial solution, it will cost you money…

4. Carry out the test

In part 2 of this series we will actually carry out a test in Siege and Jmeter.

5. Analyze

After running the test we will analyze the results. Do we learn more about problems in our application? In part 3 of this series, we will look at profiling and analyzing.

Coming up in Load testing in Drupal (part 2):
  • Performing load tests to your Drupal application in Siege and JMeter.
Coming up in Load testing in Drupal (part 3):
  • Profiling and monitoring your Drupal application with XHProf / XHGui and New Relic.
Categories: Drupal

Ashday's Digital Ecosystem and Development Tips: Better Admin Interfaces with ReactJS and Drupal 8

15 June 2018 - 12:00pm

As you may or may not have noticed, we’re having a lot of fun over here at Ashday building Drupal sites with React. Check out our own site, for example. We are really digging this new direction for front-end and you can learn more about why we did it how we approached it in other articles, but here we are going to talk about how we approached the Drupal editorial experience, because honestly - we just didn’t find a lot of great resources out there discussing how this might be done well in a decoupled experience.

Categories: Drupal

Drupal blog: A plan for Drupal and Composer

15 June 2018 - 8:51am

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

At DrupalCon Nashville, we launched a strategic initiative to improve support for Composer in Drupal 8. To learn more, you can watch the recording of my DrupalCon Nashville keynote or read the Composer Initiative issue on Drupal.org.

While Composer isn't required when using Drupal core, many Drupal site builders use it as the preferred way of assembling websites (myself included). A growing number of contributed modules also require the use of Composer, which increases the need to make Composer easier to use with Drupal.

The first step of the Composer Initiative was to develop a plan to simplify Drupal's Composer experience. Since DrupalCon Nashville, Mixologic, Mile23, Bojanz, Webflo, and other Drupal community members have worked on this plan. I was excited to see that last week, they shared their proposal.

The first phase of the proposal is focused on a series of changes in the main Drupal core repository. The directory structure will remain the same, but it will include scripts, plugins, and embedded packages that enable the bundled Drupal product to be built from the core repository using Composer. This provides users who download Drupal from Drupal.org a clear path to manage their Drupal codebase with Composer if they choose.

I'm excited about this first step because it will establish a default, official approach for using Composer with Drupal. That makes using Composer more straightforward, less confusing, and could theoretically lower the bar for evaluators and newcomers who are familiar with other PHP frameworks. Making things easier for site builders is a very important goal; web development has become a difficult task, and removing complexity out of the process is crucial.

It's also worth noting that we are planning the Automatic Updates Initiative. We are exploring if an automated update system can be build on top of the Composer Initiative's work, and provide an abstraction layer for those that don't want to use Composer directly. I believe that could be truly game-changing for Drupal, as it would remove a great deal of complexity.

If you're interested in learning more about the Composer plan, or if you want to provide feedback on the proposal, I recommend you check out the Composer Initiative issue and comment 37 on that issue.

Implementing this plan will be a lot of work. How fast we execute these changes depends on how many people will help. There are a number of different third-party Composer related efforts, and my hope is to see many of them redirect their efforts to make Drupal's out-of-the-box Composer effort better. If you're interested in getting involved or sponsoring this work, let me know and I'd be happy to connect you with the right people!

Categories: Drupal

Pages