LATEST FROM OUR BLOG

Take your daily dose of (only) relevant news, useful tips and tricks and valuable how to's on using the latest web technologies shaping the digital landscape. We're here to do all the necessary information sifting for you, so you don't have to, to provide you with content that will help you anticipate the emerging trends about to influence the web.

Drupal Multisite Setup: Are There (Still) Any Valid Reasons to Use It? Should It Get Removed in Drupal 9.x?
Why would you still want to opt for a Drupal multisite setup? What strong reasons are there for using this Drupal 8 feature? I mean when there are so many other tempting options, as well:   you could use Git, for instance, and still have full control of all your different websites, via a single codebase you could go with a Composer workflow for managing your different websites   On one hand, everyone's talking about the savings you'd make — of both time and money — for keeping your “cluster” of websites properly updated. And yet, this convenience comes bundled with certain security risks that are far from negligible. Just think single point of failure... Now, to lend you a hand with solving your dilemma, let's go over the key Drupal multisite pros and cons. So that, depending on your:   developers' skill level current infrastructure  project budget hierarchy of priorities host capabilities multi-site infrastructure's specific needs   … you can decide for yourself whether a Drupal multisite setup does suit your situation or you'd better off with one of its valid alternatives. And whether you agree that it should eventually get removed from Drupal 9.x or not.   1. Drawbacks for Using the Multisite Feature/Arguments for Removing It Now, let us expose this built-in Drupal feature's main limitations. Those that might just make you think twice before using it:   there's no way to update the core of just one Drupal website from your setup; you're constrained to update them all at once, every single time   it becomes quite challenging to assign a team with working on one (or some) of your websites only   it's not as richly documented as other built-in features (especially if we consider its “age”)   it exposes your Drupal multisite setup to security vulnerabilities; it's enough for one website from the “cluster” to get corrupted (accidentally or intentionally) for all the other ones to get infected   reviewing code becomes a major challenge: you can't “get away with” writing code for one website only; instead, you'll need to rewrite code on all your websites included in the setup, to test it against all breakpoints and so on...   putting together test and state environments gets a bit more cumbersome   in order to efficiently manage such an infrastructure of websites strong technical skills are required; are there any command-line experts in your team?   having a single codebase for all your Drupal websites works fine if and only if they all use the same settings, same modules; if not, things get a bit... chaotic when, for instance, there's a security issue with one module, used on all your websites, that affects your entire ecosystem   also, since your shared database is made of a wide range of tables, when you need to migrate one site only, you'll have “the time of your life” trying to identify those tables that belong to some websites and those that they all share   2. Top 3 Reasons to Go With a Drupal Multisite Setup Now that we've taken stock of the main drawbacks for leveraging this Drupal feature, let's try to identify the main reasons for still using it:   A heavy-weighing reason is given by the time and money you'd save on updating your “cluster” of sites. With the right experience in using the command-line you can run the due updates in just one codebase and have them run across all your websites simultaneously   It's an approach that becomes particularly convenient if you need self-hosting for your setup (e.g. take the case of a university hosting all its different websites or a Drupal distribution provider...)   You'd be using less memory for OpCache and this benefit becomes particularly tempting if you're dealing with RAM constraints on your servers   3. In Conclusion... There still are solid reasons to opt for a Drupal multisite setup. Reasons that could easily turn into strong arguments for not having it removed in Drupal 9.x... But there are also equally strong reasons for getting discouraged by the idea of leveraging this age-old feature. And where do you add that from Docker to Composer and GIT, you're not running out of options for managing your “cluster” of websites. In the end, the decision depends on your situation, that's made of specific factors like budget, hosting capabilities, whether your websites are using the same modules, etc. The answer to your “Are there any valid reasons for using the Drupal multisite feature?” cannot be but:   “Yes there are, but counterbalanced by certain disadvantages to consider.”   Image by Arek Socha from Pixabay ... Read more
RADU SIMILEANU / Apr 03'2019
How to Build a Social Network with Drupal: The 5 Essential Modules You Will Need
Planning to build a social network with Drupal? A business community maybe? A team or department collaborating on an intranet or portal? Or a network grouping multiple registered users that should be able to create and edit their own content and share their knowledge? What are those key Drupal 8 modules that would help you get started? That would help you lay the groundwork... And there are lots of social networking apps in Drupal core and powerful third-party modules that you could leverage, but first, you need to set up your essential kit. To give you a hand with that, we've selected: 5 modules in Drupal 8, plus a Drupal distribution, that you'll need to start a perfectly functional social networking website, with all the must-have content management features and knowledge sharing tools.   Before You Get Started: A Few Things to Take Care Of First of all, let me guess the features on your must-have list:   articles groups photos user profiles groups forums   It should feature pages with dynamic content leveraging a fine-grained access system and social media hubs, right? Well, now that we've agreed on this, here are the preliminary steps to take before you get actually started, installing your key modules and so on:   configure your “Taxonomy” categories after you've installed the Forum module set up a custom content type for Blog posts  set up your thumbnail settings for the Article nodes create your key user roles (admin, content author, paid subscriptions) use the PathAuto module to define your URL path structure define your Article nodes' thumbnail settings and remember to upload an anchor image, as well   1. Panels   Panels and Views make a “power team” to rely on for setting up pages with dynamic content for your social networking site. What makes it a must-have module to add to your essential kit when you build a social network with Drupal?  It enables you to create custom layouts for multiple uses. You get to use it to set up your website's homepage, one featuring multiple Views blocks with dynamic content retrieved from forums, articles, blogs... Feel free to add a top slideshow image, to go for multiple-tiled stacked layout, including views from forum, blog and article posts... In short: the Panels module empowers you to get as creative as possible when setting up fine-tuned layouts for your landing pages displaying dynamic content.   2. Views Not only that it enables you to present content to your social network's registered users in pretty much any form you might think of — tables, lists, blocks, forum posts, galleries, reports, graphs — but it also:   enables you to display related content (e.g. display a list of the community members along with their pieces of content) enables you to use contextual filters   It'll turn out to be one of the handiest Drupal 8 modules in your toolbox when you need to create and display dynamic content from:   forums blocks blogs   Yet, maybe one of the most common use cases for the Views module on a social networking website is that of: Setting up a (Views) page listing all the article posts.   3. Blog Another module you'll most certainly want to add to your social networking website as it:   enables both single and multi-user blogs empowers authorized site members to maintain it   Speaking of which, blog entries can be either public or private for a specific user, depending on the role he/she's assigned with. And it's precisely that system of user roles and corresponding permissions set up on your website that will determine whether a member can:   access the “Create Content” link or not access a “My Blog” section or... not   You can further leverage this Blog module to add a “Recent blog posts” block to your webpages, in addition to the “Blogs” navigation link on your main navigation menu.   4. Profile, a Must-Have Module to Build a Social Network with Drupal You just can't imagine that you could build a social network with Drupal without a module enabling you to create registration page fields, now can you? Well, here it is: the Profile module. And here are its “superpowers”:   it enables configurable user profiles it enables expanded fields on the user registration page it provides social network members with two different links, one for their account settings, one for their user profiles it provides private profile fields (that only the admin and that specific user can access) it enables you to set up different profile types for different user roles with... different permissions granted    5. Group The sky is the limit in terms of what the Group module enables you to do when you build a social network with Drupal:   it powers pretty much any scenario you can think of, from subgroups to specific per-group behavior, to access permissions... it enables you to put together content collections on your website and grant access to it based on your user roles and permissions policy it enables you to easily add relevant metadata to define the group & content relationships on your site it enables you to control all your settings via a user-friendly admin UI; no need to write custom code to determine what each group is allowed and not allowed to do on your social network   Open Social I just couldn't help it... Even though this was supposed to be a roundup of those essential modules you'll need to build a social network with Drupal, I had to add this Drupal distribution, as well. Open Social is that out-of-the-box solution that you can leverage to get your online user community up and running in no time. An open source software with all the needed features and functionality already pre-built, so that you can enable members on your network to:   work together share knowledge organize events   Convenience at its best when you want to start a social networking website without worrying much about:   installing a whole collection of modules doing custom work in the “backstage”.    The END! This is the minimal kit you'll need to build your online community website with Drupal. Would you have added other essential modules to the list? ... Read more
RADU SIMILEANU / Mar 16'2019
Headless CMS vs Traditional CMS: Which One Is the Best Fit for Your Needs?
“Should I stay or should I go?” Should you stick to an all-too-familiar traditional CMS and “reap” the benefit of getting loads of much-needed functionality out-of-the-box? Or should you bid on flexibility, top speed, and versatility instead? In a headless CMS vs traditional CMS “debate”, which system best suits your specific needs? Now, let me try and “guess” some of the CMS requirements on your wishlist:   to have all the needed functionality “under the same hood” (a predefined theme, robust database, a user-friendly admin dashboard...) to be developer friendly to integrate easily and seamlessly with any modern JS front-end of your choice to “fuel” your website/app with high speed   Needless to add that: You can't have them all in one CMS, either traditional or headless. What you can actually do is:   set up a hierarchy with all your feature needs and requirements set it against each of these two types of CMSs' advantages and limitations    Just see which one of them “checks off” the most requirements on your list. Then, you'd have yourself a “winner”. So, let's do precisely that: A headless CMS vs traditional CMS comparison to help you determine which one's... a better fit for you.   1. Traditional CMS: Benefits and Challenges Everything in one place... That would be a concise, yet fully comprehensive definition for the traditional CMS. Just imagine a content management system that provides you with all the critical features and functionality, all the needed elements straight from the box:   a generic theme a dashboard for easily managing your own content a predefined database PHP code for retrieving the requested content from your database and serving it to the theme layout   The back-end and front-end, meaning the code, database, and the layout/design, are “under the same hood”, strongly coupled.  It's all there, pre-built, at hand... “Convenience” must be another word for “traditional CMS”.   Security & Performance: A Few Challenges to Consider  Getting all that critical functionality out-of-the-box does translate into... code. Lots and lots of code, lots and lots of files. Which also means lots and lots of potential vulnerabilities to be exploited. There could be an error in any of the files in that heavy load of files that you get. Or a query string parameter that could be turned into “free access” into your database... Therefore, the convenience of built-in functionality does come with its own security risks.  Also, whenever you make a “headless CMS vs traditional CMS” comparison, always be mindful of the maintenance aspect: Of the upgrading that you'll need to perform with every new security patch that gets released. Now, as regards the performance “pumped” into your traditional CMS-based website/application, just think: compiling files. That's right! Consider all those custom files, in addition to the pre-defined ones that you'll be provided with, that you'll pile up for... customizing your website.  All these files, all the new libraries that you'll want to integrate, will need to get compiled. Which can only mean:   more stress put on your server memory  copying code of functionalities that you might not even use a poor page loading time, with an impact on the user experience provided on your website   2. A Traditional CMS Is the Best Choice for You If... Now, you must be asking yourself: “How do I know if a traditional CMS is the best fit for my own use case?” My answer is: You go through the here listed “scenarios” and see if any of them matches your own.   you already have a team of PHP experts with hands-on experience working with a particular CMS (Drupal, WordPress...) it's a stand-alone website that you need; no other applications and tech stack that might depend on a CMS's provided functionality you're not opinionated on the technology that your website will get built on   3. Headless CMS: What Is an API-Based Website, More Precisely? “It's a CMS that gives you the flexibility and freedom to build your own front-end — Angular, Rails, Node.js-based, you name it — and integrate it with content management tools via an API." In short: your headless CMS can then serve raw content —  images, text values —  via an API, to a whole “ecosystem” of internet-connected devices: wearables, websites, mobile apps.  And it'll be those content-consuming devices' responsibility to provide the layout and design of the content delivered to the end-users. What's in it for you?   it dramatically streamlines the development cycle of your API-based website; you can get a new project up and running in no time there's no need to pile up lots and lots of files and the code of out-of-the-box functionalities that you might not even need if there's a particular service that you need — store form submissions or a weather forecast —  there's always a specific service with an API that you could integrate to have that particular content served on your website   A headless approach gives you the freedom to integrate exclusively the functionalities that you need into your website. Moreover, you still get a dashboard for easily managing your content. Your headless CMS will have got you covered on this. With no code being “forced” into your website/mobile app or need to perform a performance “routine” for this. You get it by default.   Security and Performance: Main Considerations In terms of security, a short sentence could sum all the advantages that you can “reap” from having an API-based website: There's no database... Therefore, there are no database vulnerabilities, no unknown gateway that a hacker could exploit.  Furthermore, in a “headless CMS vs traditional CMS” debate, it's important to outline that the first one doesn't call for an administration service.  Meaning that you get to configure all those components delivering content to your website as you're building it. Except for that, the rest of the dynamic content gets safely stored and managed in your headless CMS. “But can't anyone just query the service endpoints delivering content on my API-based website?” True. And yet, there are ways that you can secure those channels:   use double-authentication for sensitive content  be extra cautious when handling sensitive data; be mindful of the fact that anyone can query the JS implementation    Now, when it comes to performance, keep in mind that: It's just assets that your web server will provide. As for the content coming from all those third-party services that your headless CMS is connected with, it will get delivered... asynchronously. Now, considering that:   most of those endpoints are hosted in the cloud and highly flexible  the first response — the first static HTML file that gets served  — is instant you could go with a headless CMS that leverages a CDN for delivery in a traditional CMS scenario the website visitor has to wait until the server has finished ALL the transactions (so, there is a bit of waiting involved in there)   … you can't but conclude that in a “headless CMS vs traditional CMS” debate, the first one's way faster.   4. Use a Headless Approach If...   you already have your existing website built on a specific modern tech stack (Django, React, Node.js, Ruby on Rails) and you need to integrate it with a content management system, quick and easy you don't want your team to spend too much time “force-fitting” your existing tech stack into the traditional CMS's technology (React with... WordPress, for instance) you need your content to load quickly, but you don't want a heavy codebase, specific to traditional CMSs, as well you want full control over where and how your content gets displayed across the whole ecosystem of devices (tablets, phones, any device connected to the IoT...) you don't want to deal with all the hassle that traditional CMS-based websites involve: scaling, hosting, continuous maintenance    5. Headless CMS vs Traditional CMS: Final Countdown Now, if we are to sum it up, the two types of CMSs' pros and cons, here's what we'd get:   Traditional CMS It comes with a repository for your content, as well as a UI for editing it and a theme/app for displaying it to your website visitors. While being more resource-demanding than a headless CMS, it provides you with more built-in functionality.   Headless CMS It, too, provides you with a way to store content and an admin dashboard for managing it, but no front-end. No presentation layer for displaying it to the end user. Its main “luring” points?   it's faster it's more secure more cost-effective (no hosting costs) it helps you deliver a better user experience (you get to choose whatever modern JS framework you want for your website's/app's “storefront”)   It's true, though, that you don't get all that functionality, right out-of-the-box, as you do when you opt for a traditional CMS and that you still need to invest in building your front-end. In the end, in a “headless CMS vs traditional CMS” debate, it's:   your own functionality/feature needs your versatility requirements  the level of control that you wish to have over your CMS your development's team familiarity with a particular technology   … that will influence your final choice. Photo from Unsplash ... Read more
Silviu Serdaru / Mar 06'2019
What Are the Cannot-Live-Without Drupal Modules that Give Developers the Most Headaches? Top 4
Which of those Drupal modules that are crucial for almost any project make you want to just... pull your hair out?  For, let's face it, with all the “improving the developer experience” initiatives in Drupal 8:   BigPipe enabled by default the Layout Builder Public Media API and so on   … there still are modules of the “can't-live-without-type” that are well-known among Drupal 8 developers for the headaches that they cause. And their drawbacks, with a negative impact on the developer experience, go from:   lack of/poor interface to a bad UI for configuration to hard-to-read-code too much boilerplate code, verbosity to a discouragingly high learning curve for just some one-time operations   Now, we've conducted our research and come up with 4 of the commonly used Drupal modules that developers have a... love/hate relationship with:   1. Paragraphs, One of the Heavily Used Drupal Modules  It's one of the “rock star” modules in Drupal 8, a dream come true for content editors, yet, there are 2 issues that affect the developer experience:   the “different paragraphs for different translations” issue the deleted (or “orphaned”) paragraphs that seem to “never” leave the database for good   Developers are dreaming of a... better translation support for the Paragraphs module. And of that day when the deleted pieces of content with paragraphs data don't remain visible in their databases.   2. Views Here's another module with its own star on Drupal modules' “hall of fame” that...  well... is still causing developers a bit of frustration: You might want to write a query yourself, to provide a custom report. In short, to go beyond the simple Views lists or joins. It's then that the module starts to show its limitations. And things to get a bit more challenging than expected.  It all depends on how “sophisticated” your solution for setting up/modifying your custom query is and on the very structure of the Drupal data. Luckily, there's hope. One of the scheduled sessions for the DrupalCon Seattle 2019 promises to tackle precisely this issue: how to create big, custom reports in Drupal without getting your MySQL to... freeze.   3. Migrate  There are plenty of Drupal developers who find this module perfectly fit for small, simple website migration projects. And yet, they would also tell you that it's not so developer friendly when it comes to migrating heavier, more complex websites. Would you agree on this or not quite? 4. Rules  Another popular Drupal module, highly appreciated for its flexibility and robustness, yet some developers still have a thing or two against it: It doesn't enable them to add their own documentation: comments, naming etc. And the list could go on since there are plenty of developers frustrated with the core or with the Commerce Drupal module... The END! What do you think of this list of Drupal modules that give developers the most headaches? Would you have added other ones, as well? What modules do you find critical for your projects, yet... far from perfect to work with? ... Read more
Adriana Cacoveanu / Mar 01'2019
3 Types of Content Management Systems to Consider in 2019: Traditional CMS vs Headless CMS vs Static Site Generators
Kind of stuck here? One one hand, you have all those software development technologies that are gaining momentum these days —  API, serverless computing, microservices — while on the other hand, you have a bulky "wishlist" of functionalities and expectations from your future CMS.  So, what are those types of content management systems that will be relevant many years to come and that cover all your feature requirements? And your list of expectations from this "ideal" enterprise-ready content infrastructure sure isn't a short one:   to enable you to build content-centric apps quick and easy multi-languages support user role management a whole ecosystem of plugins inline content editing to be both user and developer friendly personalization based on visitors' search history to support business agility search functions in site   ... and so on. Now, we've done our research. We've weighed their pros and cons, their loads of pre-built features and plugins ecosystems, we've set them against their “rivaling” technologies and selected the 3 content management systems worth your attention in 2019:   But What Is a Content Management System (CMS)? A Brief Overview To put it simply: Everything that goes into your website's content —  from text to graphics — gets stored in a single system. This way, you get to manage your content — both written and graphical — from a single source. With no need for you to write code or to create new pages. Convenience at its best.   1. Traditional CMS, One of the Popular Types of Content Management Systems Take it as a... monolith. One containing and connecting the front-end and back-end of your website: both the database needed for your content and your website's presentation layer. Now, just turn back the hands of time and try to remember the before-the-CMS “era”. Then, you would update your HTML pages manually, upload them on the website via FTP and so on... Those were the “dark ages” of web development for any developer... By comparison, the very reason why content management systems — like Drupal, WordPress, Joomla — have grown so popular so quickly is precisely this empowerment that they've “tempted” us with: To have both the CMS and the website's design in one place; easy to manage, quick to update.   Main benefits:   your whole website database and front-end is served from a single storage system they provide you with whole collections of themes and templates to craft your own presentation layer quick and easy to manage all your content there are large, active communities backing you up   Main drawbacks:   they do call for developers with hands-on experienced working with that a specific CMS except for Drupal, with its heavy ecosystem of modules, content management systems generally don't scale well they require more resources —  both time and budget — for further maintenance and enhancement   A traditional CMS solution would fit:   a small business' website a website that you build... for yourself an enterprise-level website   … if and only if you do not need it to share content with other digital devices and platforms. You get to set up your website and have it running in no time, then manage every aspect of it from a single storage system. Note: although more often than not a traditional CMS is used to power a single website, many of these content infrastructures come with their own plugins that fit into multi-site scenarios or API access for sharing content with external apps.   2. Headless CMS (or API-First Pattern) The headless CMS “movement” has empowered non-developers to create and edit content without having to get tangled up in the build's complexities, as well. Or worrying about the content presentation layer: how it's going to get displayed and what external system will be “consuming” it. A brief definition would be: A headless CMS has no presentation layer. It deals exclusively with the content, that it serves, as APIs, to external clients. And it's those clients that will be fully responsible with the presentation layer. Speaking of which, let me give you the most common examples of external clients using APIs content:   static page application (SPA) client-side UI frameworks, like Vue.js or React a Drupal website, a native mobile app, an IoT device static site generators like Gatsby, Jekyll or Hugo   A traditional CMS vs headless CMS comparison in a few words would be: The first one's a “monolith” solution for both the front-end and the back-end, whereas the second one deals with content only. When opting for a headless CMS, one of the increasingly popular types of content management systems, you create/edit your website content and... that's it. It has no impact on the content presentation layer whatsoever. And this can only translate as “unmatched flexibility”: You can have your content displayed in as many ways and “consumed” by as many devices as possible.   Main benefits:   front-end developers will get to focus on the presentation layer only and worry less about how the content gets created/managed content's served, as APIs, to any device as a publisher, you get to focus on content only it's front-end agnostic: you're free to use the framework/tools of choice for displaying it/serving it to the end-user   Main drawbacks:   no content preview  you'd still need to develop your output: the CMS's “head”, the one “in charge” with displaying your content (whether it's a mobile app, a website, and so on) additional upfront overhead: you'd need to integrate the front-end “head” with your CMS   In short: the headless CMS fits any scenario where you'd need to publish content on multiple platforms, all at once.   3. Static Site Generators (Or Static Builders) Why are SSGs some of the future-proofed content management systems?  Because they're the ideal intermediary between:   a modular CMS solution a hand-coded HTML site   Now, if we are to briefly define it: A static site generator will enable you to decouple the build phase of your website from its hosting via an JAMstack architectural pattern. It takes in raw content and configures it (as JSON files, Markdown, YAML data structures), stores it in a “posts” or “content” folder and, templating an SSG engine (Hugo, Jekyll, Gatsby etc.), it generates a static HTML website with no need of a CMS. How? By transpiling content into JSON blobs for the front-end system to use. A front-end system that can be any modern front-end workflow. And that's the beauty and the main reason why static site generators still are, even after all these years, one of the most commonly used types of content management systems: They easily integrate with React, for instance, and enable you to work with modern front-end development paradigms such as componentization and code splitting.  They might be called “static”, yet since they're designed to integrate seamlessly with various front-end systems, they turn out to be surprisingly flexible and customizable.   Main benefits:   they're not specialized on a specific theme or database, so they can be easily adapted to a project's needs Jamstack sites generally rely on a content delivery network for managing requests, which removes all performance, scaling and security limitations  content and templates get version controlled with right out of the box (as opposed to the CMS-powered workflows) since it uses templates, an SSG-based website is a modular one   And, in addition to their current strengths, SSGs seem to be securing their position among the most popular types of content management systems of the future with their 2 emerging new features:   the improvement of their interface for non-developers (joining the “empower the non-technical user” movement that the headless CMS has embraced); a user-friendly GUI is sure to future-proof their popularity the integrated serverless functions; by connecting your JAMstack website with third-party services and APIs, you get to go beyond its static limitation and turbocharge it with dynamic functionality    To sum up: since they enable you to get your website up and running in no time and to easily integrate it with modern front-end frameworks like Vue and React, static site generators are those types of content management systems of the future. The END! What do you think now? Which one of these CMS solutions manages to check off most of the feature and functionality requirements on your wishlist? ... Read more
RADU SIMILEANU / Feb 26'2019
How to Send Richly Formatted HTML Emails in Drupal 8: Deliver the Experiences that Your Customers Expect in 2019
API first, responsive Bartik, headless and decoupled Drupal, Layout Builder, React admin UI... Drupal's evolved tremendously over these 18 years! Yet: the emails that we send out via its otherwise robust email sending system aren't different from those we used to send a... decade ago. And customers expect rich experiences outside your Drupal website or app. While website administrators expect to be enabled to easily manage, via the admin UI, their email content templates. So: how do you send HTML emails in Drupal 8? Without relying on external services, of course... And who could blame customers for expecting 2019-specific user experiences? Experiences that HTML-enabled emails deliver through their great features. Features that support Drupal editors' marketing efforts, as well:   traffic-driving hyperlinks; you get to link to your landing page right from the email visually attractive custom design; emails that look just like some... microsites all sorts of design details that reinforce your brand: buttons over cryptic links, responsive design, templated footers and headers web fonts QR codes  hierarchical display of content, that enhances readability and draws attention to key pieces of content and links in your email images and attachments tracking for monitoring opens   And speaking of admin and/or editors, the questions they ask themselves are: “How can I easily theme the emails to be sent out?” “How can I change their content templates right from the admin UI?” And these are the questions that I'll be answering to in this post. Here are your current options at hand — 3 useful Drupal 8 modules — for easily crafting and sending out HTML emails that appeal and engage.   1. The HTML Mail Module  It does exactly what you'd expect: It enables you to configure HTML emails from Drupal 8. It's the Drupal 7 go-to option whenever you want to go from plain text emails to HTML-formatted ones. A module available for Drupal 8 in alpha version. Furthermore, it integrates superbly with the Echo and the Mail MIME modules.   2. The Swift Mailer Module, The Best Way to Send HTML Emails in Drupal 8 Swift Mailer is the highly recommended method for configuring Drupal 8 to send out visually-arresting, HTML emails. Since you can't (yet) send them right out of the box with Drupal... The module stands out as the best option at hand with some heavy-weighing features:   it supports file attachments it supports inline images, as well it enables admins to send HTML (MIME) emails … to send them out via an SMTP server, the PHP-provided mail sending functionality or via a locally installed MTA agent   Note: you even get to use this module in tandem with Commerce to send out your HTML-enabled emails. There's even an initiative underway for replacing Drupal's deprecated core mail system with the Swift Mailer library. And now, here are the major configuration steps to take to... unleash and explore this module's capabilities:   first, set up the Swift Mailer message (/admin/config/swiftmailer/messages) settings to use HTML next, configure the Swift Mailer transport settings (/admin/config/swiftmailer/transport) to your transport method of choice  and finally, configure the core mail system settings to use this module for the formatter and the sender plugins   And if you're not yet 100% convinced that the Swift Mailer module is significantly superior to Drupal's default mail system, here are some more arguments:   it enables you to send... mixed emails: both plain text and HTML-enabled it provides HTML content types it supports various transport methods: Sendmail, PHP, SMTP (the current mail system supports but one method) it enables you to integrate key services with Drupal —  like Mandrill, SendGrid —  right out of the box it incorporates a pluggable system, allowing you to further extend its functionality   How about now? Are these strong enough arguments that Swit Mailer's the way to send HTML emails in Drupal 8?   3. The PHPMailer Module Another option for configuring Drupal 8 to send out HTML emails is the PHPMailer module. How does it perform compared to Swift Mailer?   It's not pluggable it's not as easily customizable as Swift Mailer  it's already embedded in the SMTP module (in fact, in Drupal 8 the default mail interface class is named “PHPMail” instead of DefaultMailSystem)   What features does it share with Swift Mailer?   it enables you to send out HTML-enabled emails with Drupal it enables you to add attachments to your emails it, too, enables you to send out mixed emails it, too, supports external SMTP servers   Moreover, you can extend its core functionality by integrating it with the Mime Mail component module (currently in alpha 2 version for Drupal 8).   4. The Mime Mail Component Module Briefly, just a few words about Mime Mail:   as already mentioned, it's a “component module”, that can be used for boosting other modules' functionality it enables you to send out HTML emails with Drupal: your mail would then incorporate a mime-encoded HTML message body it enables you to set up custom email templates: just go to your mimemail/theme directory, copy the mimemail-message.tpl.php file and paste it into your default theme's folder; this way, your email will take over your website's design style  any embedded graphics gets Mime-encoded, as well, and added as an attachment to your HTML email do some of your recipients prefer plain text over richly formatted HTML emails? Mime Mail enables you to switch your email content over to plain text to meet their specific preferences   The END! Now that you know your options, it's time to step out from the (too) long era of rudimentary, plain emails sent out with Drupal. ... and into the era of richly formatted HTML emails, that will:   enrich your customers' experiences enhance Drupal 8 site admins' experience ... Read more
Adriana Cacoveanu / Feb 06'2019
How to Decouple Drupal Commerce to Deliver Richer Shopping Cart Experiences: Useful Modules
Just imagine it: Drupal 8's robust features as a CMS, the flexible e-commerce functionality of the Drupal Commerce ecosystem and a JavaScript framework for the front-end! All in the same native mobile app! You can easily achieve this “combo” — a reliable content repository & a JS-based front-end providing a fantastic shopping cart experience — if you just... decouple Drupal Commerce. For why should you trade Drupal's battle-tested content authoring and administration tools for a more interactive user experience?  And why should you give up on your goal to deliver richer cart experiences just because Drupal 8 can't rival the JavaScript in terms of advanced native mobile app functionality?   push notifications complex shopping options enabling users to manage their own delivery times and places ... to configure various aspects of their orders and so on   Just leverage a decoupled Drupal Commerce strategy in your shopping app project and you can have both:   Drupal as your secure content service  the front-end framework of your choice “in charge” with the user experience    In this respect, these are the most useful Drupal tools at hand for implementing an API-based headless architecture:   1. Headless Commerce Comes Down to... … separating your commerce stack (back-end content handling area, data store etc.) from the user interface. Or the “head”, if you wish. The presentation layer would “retrieve” content from the back-end content storage area and is the one fully “responsible” with delivering fantastic user experience. This way, you're free to choose your own front-end tools. Now, why would you consider choosing a decoupled architecture for your e-commerce solution? The benefits are quite obvious and not at all negligible:   higher flexibility and scalability (that JS frameworks are “famous” for) freedom to customize your app to your liking (for every platform or/and device) richer, more interactive shopping experiences    2. Decoupled Drupal Commerce... Out of the Box? The Commerce Demo  Narrowing our focus down to... Drupal, to Drupal Commerce, more specifically, the question's still there: “How do I decouple Drupal Commerce?” Considering that:   there are specific challenges that such a decoupled front-end architecture poses Drupal solutions like Forms API and Views won't fit your specific (probably quite complex) design implementation requirements   Luckily, the Commerce Guys team has already faced and solved these challenges. First of all, they've put together the Commerce Demo project, a store providing default content to be “injected” into Drupal. Secondly, their attempt at integrating a design meant to support advanced functionality, for richer shopping cart experiences, resulted in 2 new modules:   Commerce Cart API Commerce Cart Flyout   More about them, here below...   3. Useful Modules to Decouple Drupal Commerce  Here's a collection of the most... relevant modules that you could use in your headless Drupal Commerce project:   3.1. The Commerce Cart API Module It's no less than a handy Drupal tool that enables you to custom build your shopping cart widget.    3.2. The Cart Flayout Module The go-to module when you need to ajaxify the “Add to cart” form in your shopping app. Basically, what it does is: Provide a sidebar that “flies out” once the user clicks the “Add to cart” button or the cart block. If I were to dive into details a bit, I'd add that the flyout enables users to:   view the products in their shopping carts remove all the items there update the quantity of a specific item   Should I add also that Cart Layout comes with no less than 9 different Twig templates, for various parts of the module? By leveraging Drupal's library management feature you can easily override these JS segments of the module. And not only that you get to customize it to suit your needs entirely, but:   it comes with a well structured JS logic it's built on top of Backbone   … which translates into an efficient models-views separation.   3.3. Commerce 2 Use Drupal Commerce 2 as the core structure of your e-commerce project. Being an ecosystem of Drupal 8 modules and “spoiling” you with unmatched extensibility via its APIs, Drupal Commerce empowers you to implement all kinds of headless commerce scenarios. It enables you to use Drupal as your content/data (user and order-related info) repository and to easily serve this content to your mobile app. To your end-users.   3.4. The Commerce Recurring Framework Module Some of its handy charging & billing features include:   configurable billing cycles configurable retries in case of payment declines both prepaid and postpaid billing systems   3.5 The JSON API & JSON API Extras Modules    Need to decouple Drupal Commerce, to enable a full REST API in JSON format?  It's as easy as... enabling a module (or 2 at most): the JSON API module. What it does is:   Expose the API so you can vizualize the data in JSON format.   And Drupal's built and perfectly adapted to support JSON API, which turns it into the go-to option when you need a back-end content repository for your headless shopping app. In addition to this module, feel free to enable JSON API Extras, as well. It comes particularly handy if you need to customize the generated API.  It allows you to:   override the name of your resources change their path...   You'll then have a specific place in your app's user interface where you can visualize your content paths. Once you have your data in JSON format, safely stored in your back-end content creation & moderation Drupal area, you're free to... serve it to your mobile shopping app!   The END! And these are some of the already tested tools and techniques to decouple Drupal Commerce so that you can deliver richer, more interactive cart experiences. Have you tried other modules/methods? Writing custom JavaScript code... maybe? ... Read more
RADU SIMILEANU / Feb 01'2019
The Drupal Quality Initiative: How Do You Know When Your Contributed Project Is Ready to Be Released? How Do You Assess Its Quality?
Let's say you've been working on this contributed project for a few months now. It has gone from Beta 1 to Beta 2 to Beta... Now, how long till its final release? How do you know when it's ready for the Drupal community to see and use? And this is precisely why the Drupal quality initiative was launched in the first place. So that can we finally have some sort of a checklist at hand to use whenever we need to assess our code's level of quality:   the standards that we should evaluate our contributed projects by  the specific elements that go into the quality of our projects, such as contributed Drupal modules a certain hierarchy of quality that we could rate our own projects by   And so on... For, let's admit it now: Except for our own personal methodologies for self-assessment, there's no standardized benchmark that could help us evaluate our contributed Drupal projects. There's no way of knowing for sure when our projects are 100% ready to go from beta to... full release. Now, here are the legitimate questions that this initiative brings forward, along with some of the suggested paths to take:   1. What Drupal-Specific Quality Metrics Should We Use to Evaluate Our Code? How do you know when your contributed project is efficient enough to... be used by other members of the Drupal community? You need some sort of criteria for measuring its level of quality, right?    2. The Drupal Quality Initiative: A Checklist for Project Quality Assessment And this is how the “Big Checklist” for Drupal modules has been put together. One outlining all those areas of a contributed Drupal project that you should carefully evaluate when assessing its quality. Areas such as:   team management documentation testing code design requirements DevOps   All those factors and Drupal-specific elements that go into the quality of a contributed project. 3. Introducing the Idea of a Multi-Leveled Quality Hierarchy What if we had multiple levels of quality to rate our Drupal projects? Imagine some sort of hierarchy of quality that would challenge us to keep improving the way we write code for Drupal. To keep growing as teams working with Drupal. Your project might be rated “level 1”, from a quality standpoint, on its first release. But it would still stand stand the chance to get a higher score for if you strove to meet all the other criteria on the checklist. 4. You'll Be Particularly Interested in The Drupal Quality Initiative If You're A...   Site builder, scanning through the pile of contributed Drupal modules in search of the ones that perfectly suit your project's specific needs Drupal contributor in need of some sort of checklist that would include all those standards of quality and best practices to help you assess your own code's value   5. What About Non-Drupal Software Projects? How Is Their Quality Assessed? In other words: how do other communities assess their projects' levels of quality? What metrics do they use? And here, the Drupal quality initiative's... initiator gives the “The Capability Maturity Level”, set up by the Software Engineering Institute, as an example. The process model highlights 5 levels of “maturity” that a project can reach throughout its different development phases.They range from:   the“initial chaos” to planning and collecting project requirements … all the way to continuous process improvement   Now, just imagine a similar multi-level evolutionary benchmark that we could use to assess our own Drupal projects' levels of... maturity.   6. A Few Quality Indicators and Suggested Tools And the whole Drupal Quality Initiative comes down to identifying the key endpoints for assessing a project's quality, right? Here are just some of the suggested questions to use during this evaluation process:   Is it easy to use? Does it perform the intended functions? Is it efficient enough? How many detected bugs are there per 1000 lines of code How secure is it?   Now, for giving the most accurate answers to these quality assessing questions, you'll need the right toolbox, right? All those powerful tools to help you:   check whether your code is spell checked monitor the status of specific operations check whether all strings use translation see whether your code has been properly formatted   The END! And this is just a brief overview of the Drupal Quality Initiative. What do you think now, does the suggested checklist stand the chance to turn into a standardized Drupal benchmark for assessing quality? How do you currently determine your contributed projects' value? ... Read more
Adriana Cacoveanu / Jan 25'2019
Progressively Decoupled Drupal: Moving Towards a Standard Workflow
Progressively decoupled Drupal has gone from concept to buzzword. Until recently, when we've started to witness sustained efforts being made to set up a standard workflow for implementing this architecture. New dedicated modules have been developed to fit those use cases where just a few particular blocks, affecting the website's overall performance, need to be decoupled. All while preserving Drupal's standard robust features. Features too famous among content editors and site builders to be sacrificed in the name of high speed and rich UX.  We've gradually shifted focus from “Why would I choose progressive decoupling over a headless CMS?” to: “How precisely do I implement the progressive approach into my own decoupled Drupal project? Is there a standardized process, based on a set of dedicated modules, that I can leverage?” And this is what I'll be focusing on in this post here. More precisely, on the efforts for standardizing the whole workflow: see Decoupled Blocks and the SPALP module!   1. Progressively Decoupled Drupal: Compromise or Viable Alternative to an All-In Transition? Is this approach nothing but a compromise between:   content editors — and all Drupal users working in the site assembly —  who depend on key features like content workflow, layout management, site preview, seamless administrative experience and front-end developers, who're “dying” to “inject” application-like interactivity and high-speed front-end technologies into certain portions of the Drupal web pages?   Progressively decoupling blocks in Drupal is, indeed, the best compromise you could get between:   your editorial team's “fear” of losing familiar Drupal features critical for their workflow front-end developers willing to experiment with new technologies promising top speed and richer user experiences   Developers get to leverage the JavaScript framework of their choice without interfering with the site assemblers' workflow. Flexibility at its best! But does being a viable compromise makes it also a worthy alternative to the fully decoupling option? It does. Specifically because:   it caters to all those who haven't been won over by the “headless CM movement”  it removes the risk of trading vital Drupal functionality for the benefits of a powerful front-end framework   In other words: For all those Drupal projects requiring that only certain components should be decoupled, an all-in transition would be simply... redundant and unnecessarily risky. For all those projects there's the progressively decoupled Drupal alternative.   2. Why Has this Approach to Decoupling Drupal Been So Unpopular? How come the progressively decoupled Drupal strategy gained so little traction? It seems that despite its drawbacks — the need to reinvent some of the lost “Drupal wheels” and its higher costs — the fully decoupled approach has been more popular. And there are 3 main causes for this, that Dries Buytaert identified and exposed in his blog post on “How to Decouple Drupal in 2018”:   progressive decoupling doesn't leverage server-side rendering via Node.js modern JavaScript cohabits with old-school PHP JavaScript's ascension is not going to stop any time soon; therefore, the risk of sacrificing some of Drupal's popular capabilities might still seem insignificant compared to the JS advantages at a front-end level   3. The SPALP Module: Towards a Standard Workflow for Implementing Progressive Decoupling Now, back to this blog post's main topic: Clear pieces of evidence that we're finally heading towards a standardized process for implementing this type of decoupled system.   And one such evidence is the SPALP module: Single Page Application Landing Page.  Here's a specific use case, so you can get an idea of its role in the entire workflow of a progressively decoupled Drupal project: Let's say that you need to integrate a couple of JavaScript-based one-page apps into your Drupal website. The CMS will continue to be “in charge” of the page rendering, access control routing and navigation, while the JS apps would be developed independently, outside of Drupal. How would you configure these JS apps as Drupal web pages? You'd use the SPALP module to configure each one of them so that:   you stay consistent and “joggle with” the same configuration every time you need to add a new app to your Drupal website you make its easy for your content team to manage this entire ecosystem of single-page JavaScript apps   “And how does this module work?” Here's the whole “back-stage” mechanism:   the SPALP module helps you to set up a new “app landing page" content type, the one providing the URL for the app about to be integrated each one of these applications must have its own module that would declare a dependency on SPALP, include its JSON configuration and define its library once a module meeting all these requirements is enabled, SPALP will create a landing page node for it, which will store the initial configuration the SPALP module will add the pre-defined library and a link to an endpoint serving JSON each time that node is viewed   Note: speaking of the efforts made to create a “Drupal way” of implementing this decoupled architecture, you might want to check out Decoupled Blocks, as well. It's designed to empower front-end developers to use the JS framework of their choice to develop individual custom blocks that would be later on integrated into Drupal. No Drupal API knowledge required! The END! What do you think: will the community continue their efforts to build a standard workflow for the progressively decoupled Drupal approach? Or will it remain a conceptual alternative to headless Drupal? ... Read more
Silviu Serdaru / Jan 23'2019