Drupal Core News: Decoupled Menus Survey Analysis

Planet Drupal - Fri, 2021/04/02 - 12:37pm
OVERVIEW/SUMMARY

The goal of this survey was to better understand the preferences of organisations and individuals who are already building decoupled applications in order to help inform the decisions we make going forward. The survey was executed using Survey Monkey and was promoted primarily via existing Drupal developer channels. The survey ran for 2 weeks, and received a total of 133 responses.

Below are some of our initial findings from looking at the results. And we anticipate coming back to this data later to help better understand the needs of existing decoupled application developers.

You can learn more about the Decoupled Menus Initiative, and come say hi on Slack in #decoupled-menus-initiative.

ANALYSIS

Q1: How many years have you been building decoupled applications?


Caption: Question 1 - Graph showing count of Responses


Caption: Question 1 - Table showing count of responses

These results show a significant amount of users in the 1-3 year range, this is somewhat expected given how the growth of frameworks like Vue, React, has accelerated in the past few years. A notable amount of users have been building decoupled sites for longer than 3 years, perhaps a sign that we have almost 30% of our responses being early adopters?

Q2: Which CMSs do you use?


Caption: Question 2 - Graph showing CMS usage


Caption: Question 2 - Table showing CMS usage responses

The overwhelming number of responses are Drupal users. This was a multiple choice question, and there were only 9 respondents who did not list Drupal. Given how the survey was marketed largely to our existing networks this isn’t surprising. It is worth remembering, however, that these results are going to be heavily skewed towards the thoughts of existing Drupal users.

In the future we need to find more ways to engage with users outside the Drupal bubble if we want to learn what is required to make Drupal an attractive platform for them.

Q3: Which JS frameworks do you use?


Caption: Question 3 - Graph showing which JS frameworks are being used


Caption: Question 3 - Table showing which JS frameworks are being used

It is clear that React is certainly favored among out participants, with Vue being a fairly close second. Other frameworks do not have a lot of representation. These results indicate that we should make efforts to ensure that we cater to both React and Vue users, with other frameworks being secondary concerns in terms of support?

According to the 2020 State of JS survey 80% of JavaScript developers use React, and 49% use Vue. That’s a much larger difference than what we see in our data. And maybe indicates that there’s a stronger attraction to Vue amongst Drupal users than in the general JS world. Which may be worth noting when making decisions using these numbers. Also, Angular has 56% usage, higher than Vue, in the State of JS survey but only 17% amongst Drupal users.

The Next/Nuxt frameworks are used by ~30% of React/Vue developers. This is something we should be aware of. And at least ensure that our solutions are compatible with these tools with minimal fuss.

Q4: Which JS (nodejs) tooling do you use?
 


Caption: Question 4 - Graph showing which JS (nodejs) tooling are being used


Caption: Question 4 - Table showing which JS (nodejs) tooling are being used

NPM is the most widely used nodejs tool which isn’t too shocking. We didn’t have an option for Yarn, but it was written in the other response 10 times. It is probably safe to say that a majority of our user base still prefer to use NPM as their package manager. Webpack and Gulp use should not be ignored as it looks like these are the two most prevalent node build tools.

This lines up with the broader JavaScript ecosystem where the State of JS data indicates that both NPM and Webpack are nearly ubiquitous among JavaScript developers.

One thing this data doesn’t tell us is what tooling people *want* to use. And it may be worth trying to dig into that more. Especially if the goal is to be an attractive platform for developers. We should be aware of both what tools are most common, but also what tools people prefer.

Q5: Which API technologies do you use?


Caption: Question 5: Graph showing which API technologies are being used


Caption: Question 5: Table showing which API technologies are being used

A healthy mix of API technologies are being used here, but again it may be worth noting that a lot of our Drupal users are using JSON:API by necessity as it is the primary way Drupal is used as a REST API. We shouldn’t ignore that over 50% of respondents are using GraphQL, this may or may not be in the context of Drupal, but it does signify that there may be a desire to use this for retrieving decoupled data?

Q6: Which data fields or properties do you believe are essential to render a menu component?


Caption: Question 6 - Table showing responses of which data fields or properties are essential to render a menu component

A surprising result here is that the Active Trail is not a priority to our users. Menu Hierarchy and Multilingual being the most important means that we need to ensure that we are able to cleanly deliver the menu tree data, along with appropriate translation data.

Q7: What is the best experience you have had when working with menu responses?

This was an open-ended question and received 42 write in answers.

There was some interest in Gatsby. Some narratives included:

A recent menu integration with Gatsby worked well - we accessed menu data via gatsby-source-Drupal and then exported these components using webpack along with their data. This allowed us to use the exact same React footer in pages rendered by Drupal and Pages rendered by Gatsby.

Gatsby, with the `activeMenuClass` and `partiallyActive` features, makes it soooo easy to have an active menu and active trail.

We saw some interest in GraphQL, with responses like: 

On the backend we used the GraphQL Drupal module and declared a schema, following the documentation (https://drupal- graphql .gitbook.io/graphql/queries/menus) On the frontend, using Apollo we would just query the menu and then render that into a custom component.

Using the graphql Drupal module with Next.js. The only thing that we had to do was made a query by menu name to Drupal, the response was an array of items of type { link, label, children: [] }

Writing a custom GraphQL resolver for Drupal 9 that returns exactly what I need.

Which highlights that a handful of respondents have been reaching for GraphQL in order to provide a simple data -> frontend flow.

The answers to this question highlight that right now, in order to manage menus using Drupal in a decoupled scenario, people are invariably crafting their own solutions. That people have been able to make things work. And that at best the experience has been fine, and at worst it’s frustrating. People have used a range of approaches including; Using data available in the existing JSON:API output, custom GraphQL resolvers, putting the content of a menu into a custom block and consuming that block, using the jsonapi_menu_items module in contrib, and hard-coding menus into the front-end, and more.

This indicates that there is definite potential for standardization and providing a built-in solution so that people don’t have to reinvent the wheel with every new project. And, some people mentioned having already started work on their own reusable solutions to this problem.

Another common thread in these answers is that most people’s custom solutions involved creating the data in Drupal in some way (custom block entity, GraphQL resolver, jsonapi_menu_links) so that the front-end application could consume the entire menu in a single response that contained titles, links, and hierarchy. This desire to be able to construct a single menu object in the UI was also mentioned in answers where people talked about non-Drupal menu building experiences.

Netlify Menus, set a collection of type Menu, and edit the links. That's the easiest way. For Drupal is not a big deal but separated fragments have to be done in order to pull just those entities.

Q8: How do you use API data to build a Menu Component?


Caption: Question 8 - Table showing responses of how do you use API data to build a Menu Component

Early analysis of the results, we found this to be a trend which has held. This is quite surprising, given the bounty of available frameworks out there. But it perhaps illustrates either the challenging nature of adapting drupal menu data to a framework, or the demands of clients that need more flexibility than frameworks are able to provide?

Q9: What expectations do you have for Documentation, when working with a headless CMS?


Caption: Question 9 - Table showing responses of expectations for Documentation, when working with a headless CMS

We think that quality documentation will be an important part of improving the experience for JavaScript developers consuming data from Drupal APIs. And are already planning on making that a focal point of the work we do in this initiative. Based on the results we clearly need to make sure that code snippets and a getting started guide are part of whatever we create.

Based on the result of question 3, it seems that we should also attempt to provide these code snippets in both React and Vue variations.

Q10: Describe the biggest challenges you encounter when building a project with Decoupled/Headless CMS

This was an open ended question and received 63 responses.
What appears to stand out here are the words Drupal, data, menu, and routing. This probably indicates that the data and routing are challenges that we will want to make sure we address. Drupal and menu are terms that are probably used in a majority of responses without negative or positive context, per se. We could dive into some of the direct response texts in order to attain a better idea of the context in which these terms are being used.

CONCLUSION

The survey results indicate that people view code snippets, and a getting started guide, as a critical part of the documentation we produce. We should try and further define what awesome examples of these look like so we know what to aim for.

We’re aware that the results of this survey for the most part only reflect people who are already engaged with the Drupal community. Since part of this initiative’s goals are to help make Drupal a more attractive platform for JavaScript developers who are not already part of the Drupal community we’ll have to make sure and do the work of connecting with those people. It’s important that their voices are heard and that we don’t build solutions in an echo chamber.

File attachments:  Q1-image1.png Q1-image2.png Q2-image1.png Q2-image2.png Q3-image1.png Q3-image2.png Q4-image1.png Q4-image2.png Q5-image1.png Q5-image2.png Q6-image1.png Q8-image1.png Q9-image1.png
Categories:

hussainweb.me: My (updated) Drupal Story

Planet Drupal - Fri, 2021/04/02 - 5:49am
I thought for a while about what should be the first post in this series. Drupal is many things. It is a complex system used in a variety of ways ranging from small sites with few pages to rich information portals to even applications (yes, really). Then I thought of a recent tweet by webchick about Drupal's strength and seeing most of the replies talking about community. It is easy. Drupal is many things but nothing without its community. Therefore, it makes sense my first post is about the community, or at least my story in the community.
Categories:

hussainweb.me: Let the fest begin! #DrupalFest

Planet Drupal - Fri, 2021/04/02 - 4:44am
It has been 20 years since Drupal began its journey in a dorm room and reached enterprises. April 2021 is marked as the month of DrupalFest and many people are celebrating it in various ways. With everything going on, I didn't plan to do anything this month but I am now tempted to change my mind, and so I have.
Categories:

Lullabot: Lullabot Podcast: Inside Lullabot's Support & Maintenance Department

Planet Drupal - Fri, 2021/04/02 - 4:00am

Mike and Matt discuss various aspects of Lullabot's Support & Maintenance Department, and how it differs from Client Services, with Director, David Burns, and Project Manager, Cathy Theys.

Categories:

Drupal In the News: DrupalCon North America 2021: Keynote speakers making a positive impact in open source and beyond

Planet Drupal - Thu, 2021/04/01 - 6:03pm

This year’s keynotes highlight the power of the global Drupal community to make a difference in some of the most crucial issues of our time and the future of digital experiences.

PORTLAND, ORE. (PRWEB) APRIL 01, 2021

The Drupal Association is planning a blockbuster event for DrupalCon North America, the most widely attended Drupal event, 12-16 April from 15:00 - 19:00 UTC daily. This year’s all-virtual event brings together Drupal experts, enthusiasts, end-users, and the broader open source software community to connect, collaborate, and contribute to advancing Drupal - the world’s leading open source digital experience platform (DXP).

Heather Rocker, executive director of the Drupal Association states, “Our global community of developers, marketers, and business leaders come to DrupalCon to connect, learn about the experiences of their peers, and share their own expertise. DrupalCon participants also benefit from the opportunity to learn from our keynote and featured speakers. This year, those topics include the role of open source in schools to close the digital divide, the importance of allyship in developing diversity and inclusion, building successful mentorship for people of color in tech, and understanding digital rights as human rights.”

Featured keynotes will highlight inclusion, closing the digital divide, and the Drupal platform’s future.

Sheree Atcheson, Global Diversity, Equity & Inclusion Leader
Allyship—the key to unlocking the power of diversity
Monday, 12 April 16:10-16:40 UTC
Atcheson, an industry-leading voice on diversity and inclusion in tech, will talk about the importance of intersectional allyship in creating inclusive environments and technology. She’ll offer tips on how everyone in any role can actively consider, champion, and advocate for others in their work and be more inclusive in their day-to-day lives.

Atcheson has been named one of the UK’s Most Influential Women in Tech and has received multiple international awards for her work to advance diversity and inclusion in the tech industry.

Dries Buytaert, Founder, Drupal
Driesnote
Wednesday, 14 April 16:30-17:50 UTC
A much-anticipated highlight of DrupalCon, Buytaert, Drupal’s founder, will deliver his annual talk celebrating Drupal successes over the past year, outlining the state of the Drupal project now, and offering his thoughts on what’s next.

Buytaert is the original creator and project lead for Drupal, an open source platform used around the world to build websites and digital experiences, as well as co-founder and chief technology officer of Acquia, a venture-backed technology company.

Stuart Keroff, Social Studies and Technology Teacher, Aspen Academy
School needs open source, now more than ever
Friday, 16 April 18:20-18:50 UTC
Technology educator Stuart Keroff, founder of the first two middle school Linux clubs in Minnesota, has spent the last 10 years guiding middle school students to use open source as a tool to close the digital divide in education. He and his students will share how they used open source software to recycle computers for their fellow students during COVID-19 school closures.

To date, he and his students have provided over 600 Linux computers, helping students learn while also saving money for their schools.

Additional Featured Speakers Include (confirmed as of 31 March):
Byron Woodfork, senior software engineer, Segovia Technology
Heather Meeker, founding portfolio partner, OSS Capital
Nani Jansen Reventlow, director, Digital Freedom Fund
Nuritzi Sanchez, senior open source program manager, GitLab, Inc.

The global pandemic has increased pressures around work-life integration, so DrupalCon 2021 is built with flexibility in mind. Rocker added, “Each day is streamlined with 4 hours of live content, and the virtual setting allows easy participation in the featured keynotes, small group discussions, and interactive skill-building sessions most relevant to you”

How to register
DrupalCon North America 2021 will be held 12 - 16 April 2021, with events held daily from 15:00-19:00 UTC. Tickets are $245 per attendee and include full access to the higher education, healthcare, nonprofit, and government summits held throughout the month of April. Registration details, additional speaker and session information, and scholarship applications are available at https://events.drupal.org/northamerica2021

DrupalCon is brought to you by the Drupal Association in collaboration with a team of dedicated volunteers and sponsors, including Diamond Sponsors AcquiaPantheon, and Platform.sh.

About Drupal and the Drupal Association
Drupal is the open source digital experience platform utilized by millions of people and organizations around the world, made possible by a community of 100,000-plus contributors and equipping more than 1.3 million users with resources and support on Drupal.org. The Drupal Association is the nonprofit organization focused on accelerating Drupal, fostering the growth of the Drupal community, and supporting the project’s vision to create a safe, secure, and open web for everyone.

###

For more information contact Heather Rocker, heather@association.drupal.org

Categories:

ComputerMinds.co.uk: ComputerMinds are diversifying

Planet Drupal - Thu, 2021/04/01 - 10:24am

The last year has highlighted to us all how important it is for the global community to come together and solve problems. We rate ourselves highly at ComputerMinds, and figure it's time to share and stretch our abilities to the full. So I'm here on this special day to announce that we are branching out beyond just resolving bugs on websites, to fixing any kind of bugs in any problem space. There's so much market potential, we're really quite excited at the possibilities for bringing innovative solutions to the world!

Medical bugs

The ugliest bug of them all, COVID-19, has been such a terrible challenge for us all. We've been inspired by the countless heroes across the world who have stood up in the face of it, so we want to help too by putting our services to more significant tests than just Drupal websites. We have continued to serve our clients during the pandemic as well as we can so far, but now it's time for us to help with other kinds of bugs. We'll start with the common cold and flu, and work our way up to the bigger beasts. We believe in our approach and that our experience will propel us to find solutions. To help us with this, we'll team up with the best in the business with offices in Bristol and Coventry.

Pest control

Inspired by the wonderful pest control hawk that flies around our Coventry office, we will help fix your bug problem. Our Drupal experience has taught us to search for the root problems and to stop at nothing to go down debugging rabbit holes - so we are perfectly suited to this industry too. Unwanted animals and insects, beware! But we've also got a strong ethical heartbeat too - we always want to do things the right way, after all. We'll continue to work with existing partners to campaign for sustainable pest control, and against unnecessary culling.

Lifestyle bugs

Life coaching is a blossoming market. We believe too many rush ahead to give advice about making lifestyle changes, before pausing to eliminate 'bugs' in people's lives that hold them back. Too many web projects need rescuing because of the issues that hold them back - and these are often much deeper than mere software issues, but go down to 'people' problems. We're ready to bring our experience from these situations to help people become the best versions of themselves. We recognise that in some scenarios, people need to give themselves more slack in their expectations, whilst others need to the right pressures applied to improve performance. Sometimes proper recovery from major trauma must be prioritised; for others we are well-placed to encourage physical exercise for all the benefits and widened perspective it brings; for others laziness is the 'bug' we will identify and help clients overcome!

Engineering

We've already been solving problems in electrical engineering and patching up domestic engineering horror stories. We've worked with some genuine motor engineering history beneath us. So now we're opening up to offer our services to the great people of Bristol and Coventry. Our cities are well known for engineering feats, so we are keen to partner with the local firms that are facing bugs in their work. Our contribution towards the Coventry Motofest event demonstrates our passion for great engineering - the traditional kind, not just software engineering.

Software problems - not just Drupal

Drupal will always be our specialism, but the knowledge gained over the years from those projects gives us plenty of wisdom for any software project. We can already offer consulting for commerce websites built on other platforms. You probably already knew that we have great experience in building websites with GatsbyJS, and native mobile apps in other technologies. We are ready for you with all sorts of advice that can be applied to nearly any web project, whether that be advice on analytics, A/B testing solutions or development methodologies. But we're not limiting ourselves to the internet either any more - bugs will always be found in all kinds of software!

So what are you waiting for? Find out how we can help fix your bugs!

*/ /*-->*/
Categories:

Droptica: How to Manage URL Redirects in Drupal. The Redirect Module Overview

Planet Drupal - Thu, 2021/04/01 - 8:20am

One of the most annoying errors on websites are broken links, going nowhere or showing completely different content than expected. Neither Internet users nor Googlebot like them. The way to avoid incorrect links in Drupal is to use the Redirect module.

The redirects created by this module are extremely useful when there are changes being introduced to the URL structure of the website - both global ones and those caused by simple editing of individual content. Redirects ensure that the user will always find what they are looking for, even if the URL is no longer valid.

Dates

The module was first made available in 2006 by Moshe Weitzman in a very simplified form. The first alpha version was released in 2010, and a stable version was released for Drupal 8 in 2017. For several years Redirect has been developing much more dynamically, with the support of the Drupal.org community.

Popularity

Even the lack of a stable release for Drupal 7 didn’t discourage web developers from using the Redirect module. According to the official statistics, it’s currently used on over 260 thousand websites, 45% of which use Drupal 8.

Module's creators

The module is being looked after by three programmers:

The last few releases had a lot of support from other Drupal.org users. So far, over 110 people have contributed to the creation of the module.

Purpose of the module

The Redirect module is used to create URL redirects within Drupal. Thanks to it, you can redirect the user from one address within the website to another. Note that there is a big difference between a redirect and an alias.

  • An alias is the "user-friendly" URL of the content that you see in the address bar of a web browser. If you won't define an alias for a given subpage, it will have a default address like “/node/123” or “/ taxonomy/term/456”.
  • A redirect is a rule that's triggered when you reach a given URL address. The rule specifies the target address the user will be redirected to, the language for the redirect, and the type of HTTP code returned. The target webpage will only appear in the browser's address bar when there are no more redirects to be carried out.

The URL redirects are primarily used to improve the linking structure within a webpage. Redirect, however, has a few more interesting applications resulting from the fact that in the version for Drupal 8 it received some of the functionalities of the Global Redirect module. I’ll mention them later in this article.

Unboxing

You can download the Redirect module from the Drupal.org website. The recommended installation method is to use the Composer command:

composer require drupal/redirect

You can find the module settings panel by going to Configuration → Search and Metadata → URL Redirects.

Module's use

The main element of the module's configuration is the list of redirects:

To add a new redirect, select "+ Add redirect" and then fill in the necessary information, i.e. source address, target address, HTTP code and language.

It's good to explore the seven available HTTP codes. This is because they greatly affect the SEO. You will definitely need:

  • 301 Moved Permanently - the requested page has permanently changed its address. This is an important signal for search engines, which remove the previous page address from their resources and replace it with the new one.
  • 302 Found - the requested page is temporarily available under a different address. This code is useful in a situation where you test changing the linking structure on a webpage, but you want the change to be noted by search engine robots.

Other available codes are:

  • 300 Multiple Choices - there is more than one way to process the given query (rarely used, e.g. for processing different video formats).
  • 303 See Other - the response to the request is under a different address (used e.g. for POST requests).
  • 304 Not Modified - information for the browser that the webpage hasn’t changed since the last visit and it can be loaded from the cache.
  • 305 Use Proxy - the requested webpage is only accessible via proxy.
  • 307 Temporary Redirect - same as 302, but with the assumption that the HTTP method can't be changed.
Additional options

When you've mastered creating URL redirects, check the "Settings" tab. You'll find there two important options that will help you achieve better results with Google.

  • Automatically create redirects when URL aliases are changed - be sure to select this setting. It'll help you keep the webpage clean in the case of changes to internal linking. When you modify any alias on a webpage, a redirect from the old address to the new one will be automatically created.
  • Enforce clean and canonical URLs - this is the option that convinces many developers to choose the Redirect module. It redirects the user to the canonical address of the given webpage, so that they won't stay under a working address like "/node/123". This setting was available in Drupal 7 through the Global Redirect module.
Hooks and integrations

The module provides the following hooks:

  • hook_redirect_load() - launched when loading an array with redirects, allows you to add new items to it,
  • hook_redirect_load_by_source_alter() - used to modify redirections for a given source address,
  • hook_redirect_prepare() - changes the form of a given redirection in the module's administration panel,
  • hook_redirect_alter() - allows you to change the settings of a redirect just before it is triggered.

In addition, the Redirect works with the Pathauto module. It's a very harmonious tandem for managing creating redirects when changing page aliases.

Summary

The ease of creating and handling redirects is an important feature of a professional CMS. The Redirect module does this very well. It’s a stable solution that has been developed over the years. I recommend using it in any Drupal development project.

Categories:

Promet Source: WCAG 3.0: What’s New and What’s Next?

Planet Drupal - Wed, 2021/03/31 - 10:25pm
The Web Content Accessibility Guidelines (WCAG) are a series of specifications developed and maintained by the World Wide Web Consortium (W3C) for the purpose of ensuring that websites are accessible for people who have disabilities. Due to technological advances and evolving perspectives on web accessibility challenges that individuals disabilities face, the WCAG is regularly being updated and revised. The current version of WCAG 2.2 was issued on Nov. 30, 2020, and the WCAG 2 Series is coming to an end with a new WCAG 3.0 under development.  
Categories:

Tag1 Consulting: How to Grow, Support, and Fund your Open Source Project - with Dries Buytaert - Pt. 1

Planet Drupal - Wed, 2021/03/31 - 7:44pm

Dries Buytaert’s name is known to everyone in the Drupal community. As the originator of the project, project lead, and co-founder of Acquia, Dries has been a pivotal person in the success of Drupal. During this interview, you’ll learn more about some of the accomplishments, accidents, and purposeful decisions that have made Drupal what it is today. While Drupal is an open source project, based in code, many of the things that have made it the CMS that powers 1 out of every 30 websites, are not the code - they’re also the marketing that convinces new users to try Drupal, and the people who make up the community and own necessary portions of the project. As part of our series of talks with Open Source Leaders, Tag1 Consulting’s Managing Director Michael Meyers, VP of Software Engineering Fabian Franz, and Yjs founder Kevin Jahns talk with Dries about the origins of Drupal, and how it grew as a project and a community. We’ll also tie back to our Tag1 looks back on 20 years of Drupal experiences 20 years of Drupal series to talk about how community members can be critical to the growth and adoption of an open source...

Read more lynette@tag1co… Wed, 03/31/2021 - 12:28
Categories:

Drupal Association blog: Statement from Drupal Association board regarding the Free Software Foundation (FSF)

Planet Drupal - Tue, 2021/03/30 - 10:01pm

The Drupal community is clear about our Values and Principles. Our community promotes behaviors and decisions that support diversity, equity, and inclusion and reduce hatred, oppression, and violence. We believe that safety is an important component of dignity and respect, and we encourage behaviors that keep our community members safe.

Adhering to these values is at the core of ensuring a vibrant and successful open source software community. The Drupal Association will re-evaluate our relationships with any organization that demonstrates they don’t share our commitment to similar practices.

Further, Drupal relies on a well-governed Free Software Foundation (FSF) due to our use of the GNU General Public License (https://www.fsf.org/licensing). We share the concerns that the recent actions of the FSF Board undermine public confidence in its governance and threaten its ability to be an effective advocate for the free software movement. We encourage FSF to make the governance changes necessary to regain the trust of the broader community.

Categories:

Bounteous.com: Mini Case Study: An Iterative Approach to Decoupling Drupal

Planet Drupal - Tue, 2021/03/30 - 8:17pm
This blog outlines the iterative approach our Drupal team took to decouple Bounteous' existing Drupal site with Gatsby.
Categories:

BADCamp News: Join us April 8 at San Francisco Drupal User Group

Planet Drupal - Tue, 2021/03/30 - 4:43pm
Join us April 8 at San Francisco Drupal User Group Tue, 03/30/2021 - 12:00 volkswagenchick Tue, 03/30/2021 - 07:43

Join the San Francisco Drupal User Group (SFDUG) virtually to network, co-work and socialize with fellow Drupal users.

We opened our April 8 meetup to folks who had sessions accepted at DrupalCon and wanted some space to practice and get feedback. We have 5 speakers lined up with a variety of topics.

Drupal Planet
Categories:

Mediacurrent: Introducing Rain Layout Builder

Planet Drupal - Tue, 2021/03/30 - 4:27pm

The best open source distribution for Drupal just got better! The latest version of Rain University and Rain CMS now ship with Layout Builder pre-configured to make page building faster and easier. So how does it work? Check out below!

Editing Layouts

Now, when you navigate to any page with layout builder enabled you can edit the layout by clicking on the “Layout tab” under Tasks. Alternatively, you can click on the same tab while editing a page.


Rain CMS homepage

 

Rearranging Blocks

With layout builder you have an instant preview of any blocks added to the page. That being said, it’s usually easier to move blocks around with preview turned off. Drupal provides a checkbox that makes it simple to toggle preview on or off.

 

Rearranging blocks in Rain CMS

Adding Blocks

To add a block to the page click the “Add block” link in any section. Rain CMS ships with 15 block types out of the box that you can easily drop onto the page. Each component has a preview wireframe and label to help the author understand the look and function of each component. 


Adding blocks in Rain CMS


Layout Controls

One of the big benefits of Layout Builder is now you have more control over the layout of a page. Editors can easily add new sections with various layouts where blocks can be placed. Layouts can be customized per project.

Adding sections in Rain CMS
 


Rain University CMS

The Mediacurrent team has also updated our RainU CMS to ship with Layout Builder. Same great experience, but tailored specifically for universities.

Rain University homepage layout

 

Want to Know More?

For developers, you can download and install Rain CMS with Layout Builder using our Drupal project template: https://bitbucket.org/mediacurrent/drupal-project/src/9.x/. Setup and installation remain the same, with detailed instructions provided in the project README file.

We are also happy to demo Rain University or Rain CMS for organizations interested in partnering with Mediacurrent for your next redesign project. To schedule a free demo, please visit our contact page or chat with us right now (see bottom right corner of the page). 

Categories:

Jacob Rockowitz: To Drupal or not to Drupal… I am against paid modules but for paid contributors and profitable organizations.

Planet Drupal - Tue, 2021/03/30 - 2:55pm

For the past two months, I have openly discussed my career-changing decision, to Drupal or not to Drupal. My employment with my current organization remains stable for the foreseeable future, but they will no longer be using Drupal in a year. My open discussion has led to some interesting thoughts, feedback, assumptions, and an overwhelming amount of appreciation for the work I have contributed to Drupal, and the understanding that I can no longer continue to contribute to Drupal in my “free-time.”

Not surprisingly, my posts triggered some discussion about possibly monetizing some aspects of the Webform modules. I need to state that…

The best way to clarify my stance on “paid” modules is to define what I feel a module is in the Drupal community.

What is a module?

I use the term “module” in this post, but I am talking about any collection or package of code in the Drupal community that accomplishes a task. A package of code in the Drupal community can be anything from module, theme and could even be a complex patch.

What is a collaboration?

Our “tasks” are not simply developing modules or themes in the Drupal community but the whole “kit and caboodle” around the software and community. The Webform module’s success as we know it would not exist without people’s feedback, testing, documentation, and general contributions. Likewise, the Webform module wouldn’t exist without Drupal core’s Form API. The hosting and testing infrastructure that the Drupal Association provides for the Webform module is part of this collaboration. The community-run events help inspire people to get involved. A Drupal module, like Webform, is a massive collaboration. We are all linked and interdependent on each other to produce something massive.

What is freedom?

Society would be nowhere without the ability to share our ideas and collaborate. People with great ideas...Read More

Categories:

Civic UK: Using our expertise for a better recovery

Planet Drupal - Tue, 2021/03/30 - 2:00pm
The United Kingdom may have left the ERASMUS+ Scheme, but our contributions are just getting started! As the pandemic comes to an end and we all enter a period of recovery, we’re proud to be able to say that we're leading nine new ERASMUS+ projects to help empower businesses, people, and learners.
Categories:

Specbee: Exposing Your API in Drupal 8 - A brief tutorial

Planet Drupal - Tue, 2021/03/30 - 1:25pm
Exposing Your API in Drupal 8 - A brief tutorial Sahana N 30 Mar, 2021 Top 10 best practices for designing a perfect UX for your mobile app

Drupal 8 brought about significant architectural changes offering modern techniques to build digital experiences. REST API was one of them and it came shipped in Drupal 8 core. A RESTful API is an API that conforms to the architectural style of REST (representational state transfer). It accesses and uses data via HTTP requests to GET, PUT, POST and DELETE data types. 

In this post, you will be learning more about exposing your API in Drupal 8.

HTTP methods used in REST API

GET : This method is used to read the data from server.
POST : This method is used to create data on a server.
PATCH : This method is used to update the data on the server.
DELETE : This method is used to delete the data from the server.

 

The above image describes how REST API requests and gives the response to a client. Initially the client sends the request using HTTP methods. REST API interacts with the database and sends the response in JSON or XML formats.

Now let’s see how it take place in Drupal.

Drupal Modules to Expose your API

Mentioned below are some Drupal core and contributed modules that can help in exposing your APIs in Drupal.

    1. HAL

The HAL module is specifically for JSON or XML, and it provides the serialization plugin.
    
    2. HTTP Basic Authentication

The HTTP basic authentication module provides an authentication plugin which allows us to control access to our API resources based on the HTTP method.

    3. RESTful Web Services

The RESTful web services module handles the resources plugin system as well as defining initial resource routes. A good example of resource plugin can be found in the DB log module which provides an API endpoint for watchdog entries.

Resource plugin is responsible for retrieving the data from the database.

    4. Serialization

The serialization module is responsible for deserializing and serializing request response data.
    
    5. REST UI

Rest UI is a helpful module which exposes our RESTful web services configuration via the admin UI. This way we can configure our API endpoints by editing the YML files.

REST Response - How It Works

 

This image describes the pipeline of the REST response.

According to the image, first the client sends a request, and the request goes to the request handler. The Request Handler is responsible for accepting the request.

The request handler interfaces with the REST module and is responsible for the requests. The requests are then sent to deserialize to normalize the data. 

Then deserialize sends to the request handler. The request handler matches the up the resource with the appropriate resource handler. 

Again, request is sent to the Resource plugin. The resource plugin takes the data from incoming request and retrieves the valid information from the database.

Then the resource plugin returns the data to the request handler and again acts with the serializer before sending as response.

How to configure the REST API in Drupal using Core Modules:

Here are 4 easy steps to configure REST API in Drupal using core modules:

Step 1: Initially, you need to install the core modules which are HAl, Http Basic Authentication, REST Web Services, and serialization module.

Step 2: Next, you need to download the REST UI module and you need to enable the module.

 

Step 3: Next, you need to configure the REST API endpoints as required. To configure, go to Configuration -> REST -> then click on edit of the content row.

 

Step 4: When you click on edit, you will get the edit window. Configure as required then save the configuration.

 

Example:

If you want to get the response of a particular node, you need to send the request using the postman app with URL - hostname/node/nodeid?_format=json. (If you don’t have the Postman app yet, you can either download it from here or get the web version.)

 

Drupal 8 allows developers to build APIs easily to allow content to be exposed to other softwares without writing any code. Using the modules (core and contrib) mentioned in the blog, you can easily build and expose your API in Drupal 8. Want to know how we make the best of Drupal to build compelling digital experiences? Talk to us today!

Drupal 8 Drupal Development Drupal Planet Drupal Tutorial Drupal Module Shefali ShettyApr 05, 2017 Subscribe For Our Newsletter And Stay Updated Subscribe

Leave us a Comment

  Shefali ShettyApr 05, 2017 Recent Posts Image Exposing Your API in Drupal 8 - A brief tutorial Image The Most Effective Methods to Overcome Software Vulnerabilities Image Building Micro-sites in Drupal using the Groups Module Want to extract the maximum out of Drupal? TALK TO US Featured Success Stories

A Drupal powered multi-site, multi-lingual platform to enable a unified user experience at SEMI.

link

Discover how our technology enabled UX Magazine to cater to their massive audience and launch outreach programs.

link

Discover how a Drupal powered internal portal encouraged the sellers at Flipkart to obtain the latest insights with respect to a particular domain.

link

Categories:

Tag1 Consulting: Decoupled Drupal: Past, Present, and Future - Part 2

Planet Drupal - Mon, 2021/03/29 - 3:03pm

Decoupled Drupal is now a fixture of the Drupal community and ecosystem, but it has roots in key software concepts like the separation of concerns. Today, decoupled Drupal is commonplace across the Drupal world, not only at the highest echelons of enterprise implementations of Drupal but also among smaller consultancies beginning to get their feet wet with headless CMS architecture.

Read more lynette@tag1co… Mon, 03/29/2021 - 06:03
Categories:

Brian Osborne: Introducing the Editoria11y Drupal module

Planet Drupal - Sun, 2021/03/28 - 4:01am

John Jameson, a digital accessibility developer and colleague of mine, has been working hard for months on a new accessibility module for Drupal module Editoria11y.

Categories:

Agiledrop.com Blog: Digital strategy for omnichannel digital experiences

Planet Drupal - Fri, 2021/03/26 - 11:12am

In this article, we discuss the key components of digital strategy in an omnichannel landscape and how to realize them.

READ MORE
Categories:

Morpht: Layout Paragraphs: A new way to manage Paragraphs

Planet Drupal - Fri, 2021/03/26 - 6:37am

It seems that with each passing year there is a new paradigm for how content can be arranged and organised in Drupal. Over the years a number of approaches have moved in and out of being in vogue: Panels, Displya Suite, IPE, Bricks and Paragraphs to name a few. Some change has been positive, providing leaps forward in flexibility or control. Other developments have not lived up to their promise.

In February 2021 I presented a new module, Layout Paragraphs, to the Sydney Meetup. The slides and video have been provided below. This presentation demonstrates Layout Paragraphs in action and how offers some advanced layout options for Paragraphs. Conceptually it is similar to Layout Builder in many respects, however, it performs its magic on the Node Edit page, integrating with the natural content editing environment for site editors.

 

Layout Paragraphs offers a new way forward for the following reasons:

  • Editing happens on node edit, rather than the layouts page. Better for editors.
  • Paragraphs can be placed into Layout regions to bring more flexibility to Paragraphs. This is similar to what Bricks was doing.
  • Nicer UI for Paragraph selection.
  • Nicer UI for Paragraph display - no need for Preview view mode any more.
A bit of history

It is worth reviewing a little history to see where Layout Paragraphs fits in. The presentation takes a look at some of the popular combinations over the years and gives them over all scores, weighted by functionality and editor experience. Here is a spoiler of what is covered in the video:

Recipe Year Score Pure template 2010 65 Display Suite 2010 58 Panelizer 2012 69 Panelizer and Paragraphs 2014 73 Panelizer and IPE 2016 39 Panelizer, Bricks and Paragraphs 2017 63 Layout Builder and Blocks 2018 70 Layout Builder and Paragraphs 2019 78 Layout Builder, Layout Paragraphs, Paragraphs 2021 81

 

The scores were calculated from a weighted average of various aspects of the techniques: flexibility, control, editor experience, etc. Watch the video for the details.

Conclusion

You can see that Layout Paragraphs is the latest in the line of approaches and that it is scoring quite well. A recioe based around Lout Builder, Layout Paragraphs and Paragraphs seems to work quite will. Layout Builder remains the domain of the sitebuilder, using it to define the basic layouts for the page. With Layout Paragraphs, a new set of simpler layouts can be used by the editor for their paragraphs.

I think that the approach holds a lot of promise moving forward and it is good enough for Morpht to be considering it as a standard part of our editor toolkit. All up we have found the module to be usable and a definite improvement on editor experience. We are adopting it into projects where we can.

Watch the video and let us know what you think in the comments below.

Watch the video

 

Categories: