Newsfeeds

WhatsApp Number Field

New Drupal Modules - 7 December 2018 - 5:33am

Under Development

Categories: Drupal

OpenSense Labs: Google Will Never Tell You About These Best Drupal Practices

Planet Drupal - 7 December 2018 - 5:00am
Google Will Never Tell You About These Best Drupal Practices Akshita Fri, 12/07/2018 - 18:30

In this blog, we will talk about the best practices which will help you enhance your user experience from good to better and how Drupal 8 can be a game changer in this quest. 

Often we have heard how Drupal is not for beginners. While setting up a Drupal website has become a lot easier with Drupal 8.6, a good website is not just about setting up some web pages under a single domain name. 

Google processes over 3.5 billion searches per day. A stale site, which is not usable or loads very slow and you risk leaving your potential customers frustrated and reflects poorly on your business. While maintenance should never be out of the plan, investing in some good practices can result in the longevity of your website and business alike.  


Here are some of the best Drupal web development practices to ensure your website is as much providing a great user experience as it helps you rank your content on Google page 1. 

8 Best Drupal Practices

Creativity isn’t alone when it comes to considering, there are many other factors which can influence your reputation in the online market. 

Drupal’s Architecture

A healthy architecture will not only ensure the demands of different stakeholders is met, but also that the site remains robust for future initiatives as well. 

Make your architecture robust. 

On a basic level, your content structures must include all the fields and content types. A clean content architecture not only helps ensure good performance but a great user experience, and easier maintenance too. 

Although a well-maintained website is critical, you can’t do much if the base is full of errors. 

Less is always more. 

In your development plan choose limited content types and fields so as not to confuse your content creators. Drupal is a powerful tool for displaying content in different formats, languages, and screens. 

Configuration plays an important role in architecture. 

In simple words, configuration is the collection of settings of how the default site functions for the admin as against the popular notion of the placement of content on the website. It includes site name, the content types and fields, taxonomy vocabularies, views and so on.

You can also check out this video by Pantheon on Drupal 8 architectural practices.

Site configuration data in Drupal is consistent, everything from the list of enabled modules, content types, taxonomy vocabularies, fields, and views can be done easily. 

Your approach must be flexible. 

In the basic level, you must use a new entity type for different types of data. In case of similar data types, use bundles for a single entity type. However, for modules, they are designed to work with Nodes, and not other entity types. 

Using nodes is easy, as it allows to create a new content type through the admin interface without much coding against the case of creating entities which require coding. As a developer, your approach should be flexible. 

Bonus tip: Don’t make configuration changes on a live site without testing them locally.

Check the Codes

We all know how good coding helps improve quality and get better results. Basics should be to start with simple codes. Remember, it is always difficult to modify complicated codes in the future. Thus, you should keep your coding simple for the longer run.

Drupal coding standards are version-independent and "always-current". All new codes follow the current standards, regardless of (core) version. In case you want to update existing code for the current standards, always create separate and dedicated issues and patches instead of squeezing into unrelated patches.

Remember to use US English standards for spellings in your code, which means it will be "color" not "colour".

Here are the top 6 coding practices by Drupal.org:

  1. Use an indent of 2 spaces, with no tabs and the lines, should have no trailing whitespace at the end.
     
  2. All binary operators (operators that come between two values), such as +, -, =, !=, ==, >, etc. should have space before and after the operator, for readability.
     
  3. Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls. Control structures include - if, for, while, switch, etc.
     
  4. All lines of code should not be longer than 80 characters. Lines containing longer function names, function/class definitions, variable declarations, etc are allowed to exceed 80 characters. Conditions should not be wrapped into multiple lines.
     
  5. Arrays should be formatted using short array syntax with a space separating each element (after the comma).
     
  6. When unconditionally including a class file, use require_once(). When conditionally including a class file, use include_once(). In either case, it will ensure that class files are included only once.

You can use Coder for coding standards validation without loading Drupal. 

Infrastructure

Infrastructure covers the stack your website lives on, including the server, the database, and any software layers, such as Varnish or Memcached, which ensure your visitors have a snappy experience. Planning the infrastructure from the start and developing in the same environment can greatly reduce variables and risk at launch time.

Having reliable multiple environment configurations and a solid disaster recovery plan shouldn’t be left to last-minute decisions. When it is, mistakes start arising. Here are a few tips to avoid the most common errors.

Best Practice:
  • Size your stack correctly, not too large, not too small. This can ensure you’re economically prepared for anything.
     
  • Bottlenecks can arise from the hardware or from processes hogging memory.
     
  • Check logs for errors and prepare for growth and spikes. Your stack is only as fast as the slowest component. Focus your efforts there; you’ll probably find low hanging fruit.
     
  • In terms of security, it’s crucial to configure to protect from internal attacks as well as external attacks
Optimize the Frontend

The frontend is more than just theming. 

While the features and their functioning depends on the backend, the usability and aesthetics depend on how well the frontend is taken care of. 

Performance of the website is shouldered equally between both.

“..powerful, adaptable, accessible, clear, concise, natural.”

Quickly brushing up the basics, here’re the best Drupal frontend practices: 

  1. Define component elements (sub-objects) using their own classes. This is to avoid relying on markup structure and overly-generic class names, prefixing them with the component’s name followed by two underscores. 
     
  2. Thoroughly exercise and test your site and resolve any PHP errors that are displayed during theming development.
     
  3. Use a stable administrative theme during development.
     
  4. Use DRY CSS and group reusable CSS properties together. Name these groups logically. 
     
  5. Name components using design semantics. HTML elements already impart semantics on the content and machines cannot derive content-level semantics from class names.
     
  6. In order to reduce the load on the frontend performance of your website:
     
    • Minify JavaScript, CSS, and HTML
    • Aggregate JavaScript and CSS
    • Enable gzip compression
    • Use lazy loading for site assets
    • Keep Inline background images under ~4KB in size
    • Remove unused CSS
    • Use efficient CSS selectors
    • Download 3rd party scripts asynchronously
       
  7. Use SASS to keep your responsive design more organized
Test, Error. Repeat. QA is Important

It is very important to keep the quality of your website an utmost priority before you move on to other technical stuff. While this might feel like a lot of work for your lot to do, it can make an actual difference. A review by your peers (is a must) will help you get an additional idea of how things look and should work.

Successful regression testing gives you the much-needed confidence.

It is also very important that you keep an eye on previous things while adding new stuff. The testing framework PHP unit is inbuilt in Drupal 8. By setting up the testing environment, websites can be tested easily (as samples of test cases which have been written by the community are already available).

Drupal has a very active community support. With almost 1,00,000 active developers who write test cases (which are later merged into Drupal) and submit solutions. With this, you can say that Drupal is quick in providing you with solutions to your problems.

Aim for Google Page 1. Don’t Forget the SEO 

75% of users don’t even click past the first page! 

Starting with the search, it is very important that the user gets the best results in her first search. Now, as a user, you must have tried different keywords in an attempt to connect to the content of your website. Here comes the art (and science) of SEO. 
Drupal offers a suite of SEO modules. However merely deploying the modules isn’t enough, it is important to configure and enable them as well. 

The SEO best practices include: 

  1. Using Robots.txt, so the right pages and information is indexed. 
     
  2. Ability to customize page titles and metadata. Also, it should be capable of automatically populating these respective fields as per SEO norms and best practices. 
     
  3. Navigational drop-down menus are crucial internal link structures, silently contributing to search engine optimization. They establish relevancy and hierarchy across your website to help search engines index them in from the beginning of time. It should also provide easy customization of navigation menus.
     
  4. URL aliasing must be enabled with Pathauto as it ensures the search engine understands what the webpage implies. 
Security Practices

Security is a vast area of expertise and it is quickly changing with time. While the list of do’s and don'ts is extensive and exhaustive to keep up with the threats, vulnerabilities and mitigation strategies, here are the best Drupal security practices to follow in order to keep up the health and security of your website. 

  1. Keep your core updated: A key practice, keeping the core updated will always be the first when listing healthy security practices. Always look out for core updates (include the minor releases as well). In all of its advisories, the Drupal Security Team asks for updating the core version of the system. 
     
  2. Use additional security module: When covering security, there is nothing as better than equipping yourself with more and more. To keep the walls up high, you can use the additional security modules like security kit, captcha, and paranoia. Drupal Security Review can be used as a checklist to test and check for many of the easy-to-make mistakes making your site vulnerable.  
  3. But use only security team approved modules: Your site probably uses a number of contributed modules, although that’s not an issue. Using the stable and approved modules is where the key lies. This is especially worth noting for contrib modules which are more susceptible to vulnerability. 

    Always look out for the green batch when downloading a contrib module. Rest, as the advisory reads, Use it at your own risk! 

  4. Keep Up your Backup:  As an administrator, you have to be prepared for all uninvited events.

Drupal’s open-source basics give it a possibility that it is updated frequently with more and better security modules. 

Maintenance Practices

The life cycle of a website begins from initial plans and extends to the end of the site. The site exists in three different phases: development, deployment, and maintenance. After the site is launched, your website lifecycle practices become critical to the success of changing and maintaining your site.

  • Keep your code under version control.
  • Maintain separate environments for the different stages of the site, and keep them up to date.
  • Restrict access to the production site for all but the most trusted users.
  • Review all logs periodically, including Apache, Drupal, and MySQL.
  • Review and assess your architecture periodically, and plan for the future.

At OpenSense Labs, we understand how important your website is to you. Reach out to us at hello@opensenselabs.com to get a holistic view on how to enhance your user experience.

blog banner blog image Drupal 8 Drupal practices Blog Type Articles Is it a good read ? Off
Categories: Drupal

Drudesk: Drupal Commerce 2.x features for your great Drupal 8 online store

Planet Drupal - 7 December 2018 - 4:44am

Online stores open unlimited opportunities with no geographical boundaries. Behind their lines of code are successful purchases, great profits, and happy customers. So online stores should be reliable, efficient, and attractive in everything — from product catalog to e-commerce checkout. An awesome choice for building an online store is Drupal 8, particularly with one of its greatest treasures — Drupal Commerce 2.x. Let’s explore Drupal Commerce 2.x features for your Drupal 8 online store in more detail.

Categories: Drupal

I Fix Drupal: Drupal 7 vs Drupal 8 - A Technical Comparison

Planet Drupal - 7 December 2018 - 4:40am
I don't find a lot of time to get on the tools these days and sometimes I miss getting into code. Recent projects have seen me focus on strategy, architecture, data and systems integration. Despite that I am comfortable describing myself as an expert in Drupal 7, having spent years giving the D7 codebase a forensic examination. However, despite Drupal 8.0.0 being released three years ago on November 19, 2015 I have not yet looked at a single line of code or even taken in a demo of its feature set. Today that changes. For starters I would like to see just how D8 differs from D7 when we start...
Categories: Drupal

Admin User Creation Using Drush

New Drupal Modules - 7 December 2018 - 4:30am

Here is a very quick and simple example of how to create an administrator on any drupal 7 website using drush command. This tweak is very useful when the client has provided a site for support but forgot or did not have the opportunity to create an admin account for you.So you don't need to hack in your code,just run a drush command will create an admin account for you.

Categories: Drupal

Block Editor

New Drupal Modules - 7 December 2018 - 1:18am

The new block editor for Drupal.

Categories: Drupal

Underscore Handle

New Drupal Modules - 7 December 2018 - 12:32am
INTRODUCTION

============
This Module prevents field machine name from ending (_) underscore. For example,
when you have brackets at the end of a label, e.g., "Address (2)",
you end up with a trailing "_" character — field_address_2_.

Perhaps, you simply want to validate field the machine name, especially when it
is ending with underscore or having two/more undersocre and it has been
truncated

Categories: Drupal

Whose Game Is It Anyway?

Gnome Stew - 7 December 2018 - 12:00am

It’s the tug of war between whose fun is most important.

Where’s the line between the game the players want to play and the game the GM wants to run? Is the GM bad if they’re getting upset that the players are completely ignoring their setting and plot? Are the players bad if they’re bored and uninterested in what the GM is presenting and they’re trying to pursue things that would be interesting to their character? Who does the game belong to — the GM or the players?

Think back on the favorite games that you’ve ever played or run. I know mine have always been a beautiful mix of the best of a GM’s prep and skill combined with players elevating the game in exciting and unexpected ways. 

Of course, the answer is ‘both’. If everyone at the table isn’t having fun, then something is wrong with the game. Now, the specifics of what’s wrong could be any number of things. Yes, it is possible the GM is being inflexible and railroading their players through a game that isn’t nearly as engaging or interesting as they thought it would be. And yes, it’s equally possible the players are being deliberately obtuse and disregarding the time and effort the GM put into prepping the game they’re playing. Over the years, I’ve seen both of these extremes happen but usually most examples fall somewhere in the middle.

As with most things, it’s not a black and white situation and the middle ground is super broad and very fuzzy. Think back on the favorite games that you’ve ever played or run. I know mine have always been a beautiful mix of the best of a GM’s prep and skill combined with players elevating the game in exciting and unexpected ways. Unless you’re one of those GM’s that craves absolute control or one of those players that craves pure chaos, your favorite games are probably also a similar mix of what both sides bring to the table.

On the GM’s Side…

A friend complained not too long ago that he was seeing a lot of advice in various RPG communities that was essentially telling GMs they should always just roll with whatever the players want to do, even if that completely disregards the setting or plot the GM had prepped for the game. Having talked to a fair number of GMs, I know how absolutely frustrating that advice is when you’re no longer having fun running games. While we are there to bring an entertaining game to the table, our fun shouldn’t be completely disregarded in favor of the players.

At the same time, if we’re not cognizant of the players’ expectations and running a game without their engagement in mind, we’re setting ourselves up for failure. No matter how awesome our ideas as GMs are, if they’re not offering the players an opportunity to add their own flavor and change the game world, we’re essentially asking them to just sit there and be an audience to our greatness. In addition, no matter how excited you are about a game or campaign idea, if the players you’re presenting it to are lukewarm on the idea you’re unlikely to get a very good game out of it. Not every game is meant for every group of players. If you want a high intrigue game of politics and mystery and your players just want to blow off some steam by cracking jokes and punching evil in the face, you’re both going to end up frustrated.

On the Player’s Side…

Tug-of-war might be fun, but fighting between the players and GM isn’t.

Players aren’t completely innocent in this equation. I’ve seen plenty of players who think messing around with the GM’s plan is the height of entertainment, so they go out of their way to screw up any perceived plot. This is always a little sad but funny when I run a Powered by the Apocalypse style game and mostly run improv style. There are also players who get wrapped up in their own ideas to the point that they’re trying to slam the square peg of their character into the round hole of the GM’s planned game. Players absolutely can make or break a game by their willingness to engage with what the GM is presenting.

Now, this isn’t to say players should just lay down and take it when a GM is running a bad game, and no one should feel forced to play a game they’re not interested in. There are times when a game is just bad and any fun you get out of it as a player is going to be what you make of it for yourself with the other players. Or, sometimes a GM’s logic behind their scenario fails and the players make the game go sideways through no ill intent on their part. If I am completely honest with myself, I’m a horrible player to have at the table when I’m not enjoying a game. My impatience is obvious and I don’t hesitate to call out things that are making the game less fun for everyone at the table. Diplomacy isn’t always my best skill.

It’s OUR Table…

What can we do to avoid this tug-of-war between GM’s and players? Neither the players nor the GM have a game if the other half of the equation isn’t there, so it’s in everyone’s best interest to figure this balance out.

GM’s:

  • Be clear with your players about what your expectations for the game are. Explaining the tone and principles of the game up front, regardless of whether you’re starting a campaign or running a one-shot, is going to help get everyone on the same page right at the beginning.
  • Give your players very explicit character creation guidelines and stick by them. Allow them the flexibility to create someone they’re going to enjoy playing, but don’t feel pressured to let a player build a character that won’t fit the game. You’ll regret it from the moment play starts.
  • Be flexible and learn how to think on your feet when your players aren’t engaging with things the way you expected. You can lead your players to a plot hook, but you can’t make them bite. Every GM makes an occasional misjudgment on what is interesting for the players, so we all learn to adjust when needed.

Players:

  • Don’t agree to play games you know aren’t your cup of tea. While I encourage everyone to stretch their horizons with new games, you know yourself best and will know when you’re not going to have fun with a game.
  • When you do agree to play a game, play the game the GM is bringing to the table. Find a way to balance a character you’ll enjoy with the setting and tone of the game. Talk with the GM and work out what you’re hoping to get out of the game with what they’re bringing to the table.
  • Remember that your fun at the table is dependent on the fun of everyone else at the table, including the GM. Figure out how to facilitate your own fun while drawing in the other players and even with the plot the GM is dangling in front of you. Do that and it will make you a player any GM wants at their table.

Ultimately, roleplaying games are a collaborative hobby.  Bring out the best in both the players and the GM and your game will be an amazing thing you and everyone else at the table will be talking about for a very long time.

What are your experiences with finding the balance between the GM’s fun and the player’s fun? I’d love to hear your stories.

Categories: Game Theory & Design

WeKnow: Improving Drupal and Gatsby Integration - The Gatsby Plugin

Planet Drupal - 7 December 2018 - 12:00am
Improving Drupal and Gatsby Integration - The Gatsby Plugin

On the first post of this series “Improving Drupal and Gatsby Integration - The Drupal Modules”. I introduced two contributed modules we wrote to simplify the Drupal usage while working with Gatsby. One of the modules mentioned was `tui_editor` a WYSIWYG markdown editor integration with the Toast UI Editor project. This module allows content editors to enter content as markdown, making easy to implement JSON-API endpoints that return markdown.

jmolivas Fri, 12/07/2018 - 08:00
Categories: Drupal

Smart read more link

New Drupal Modules - 6 December 2018 - 11:44pm

Drupal module that provides a dynamic read more link and body text.

It acts like the core Summary or Trimmed Text formatter, except that when its output is not the full body it adds a read more link. This makes it possible for the site builder to create a teaser style which only shows "Read more" when there is more to read.

This formatter is only suited to simple content types which have a single long text field. It's more of an proof of concept than a fully fledged module at the moment.

Categories: Drupal

Freelock : What's up on Nerd Mountain? Go Ahead Make Changes in Prod! We Got Your Back

Planet Drupal - 6 December 2018 - 4:34pm
What's up on Nerd Mountain? Go Ahead Make Changes in Prod! We Got Your Back Ben Weagraff Thu, 12/06/2018 - 17:34

Have you ever heard the one about the web developer who goes in to make one last change to the site at 4:45PM on a Friday afternoon? It is SUCH an easy fix--he can get it done and go home for the weekend with his head held high. Ah, what a relaxing weekend it will be! Cleaning out the gutters, hiking with the kids, and really just taking some "me time". As it turns out, that plug-in update was not well-architected. As a result, it impacted the structure of the site--and now all of the content is right-justified. WHAT JUST HAPPENED?

DevOps Drupal Planet Visual Regression Testing
Categories: Drupal

AMP Validator

New Drupal Modules - 6 December 2018 - 3:42pm

Provide tools for AMP validation.

Project is currently still in a very early stage of development!

Categories: Drupal

Drupal Association blog: Update on the Drupal Association Executive Search process

Planet Drupal - 6 December 2018 - 3:06pm

In September of this year I was privileged to be asked to serve as the Interim Executive Director for the Drupal Association, after Megan Sanicki's departure to her next adventure.

At that time, the Drupal Association board announced the formation of a search committee, to begin the process of finding the Drupal Association's next leader in earnest.

That search committee consists of the following members:

  • Adam Goodman (board chair)
  • Baddy Breidert (board member)
  • Dries Buytaert (project founder)
  • Tiffany Fariss (former board member)
  • Tim Lehnen (Interim ED)
  • Jacob Redding (board treasurer)

This search committee has engaged the services of Lehman Associates, an internationally recognized executive recruiting firm. Working closely with the executive search committee and the board as a whole, Lehman Associates has developed a position profile for the Drupal Association's next leader.

View the profile

Please feel free to share this position profile with individuals you believe would be good candidates for Drupal Association leadership. If you are interested in putting your own name forward, please use the contact information listed at the bottom of the profile.

Interested parties should submit their candidacy no later than January 15th, 2019.

The search committee is excited to work together with the Lehman team to develop our pool of candidates as we go into the new year!

Categories: Drupal

Black Ops 4's 'Battle Edition' offers only classic multiplayer and Blackout for $30

Social/Online Games - Gamasutra - 6 December 2018 - 1:16pm

Call of Duty: Black Ops 4, Treyarch†™s multiplayer-only Call of Duty game, is now offering a †˜Battle Edition†™ for $30 that only features two of the three game modes offered in the full game. ...

Categories: Game Theory & Design

Enabling ads in Street Fighter V boosts in-game currency rewards

Social/Online Games - Gamasutra - 6 December 2018 - 11:54am

All in all, Capcom says that optional ads will hit the game on December 11 and will "be displayed in several locations in-game to remind you about costumes, bundles, and the Capcom Pro Tour." ...

Categories: Game Theory & Design

Drupal Association blog: Summary of the December 5, 2018 Board Meeting

Planet Drupal - 6 December 2018 - 9:49am

On December 5, 2018, the Drupal Association Board met online for their regular Fall/Winter board meeting.

You can find the official meeting minutes and board packet on the Board Meeting Minutes and Materials page of the Drupal.org website.

Categories: Drupal

Tome Netlify

New Drupal Modules - 6 December 2018 - 7:56am

Tome Netlify provides integrations between Tome and Netlify, giving you the best static Drupal experience possible.

Installation

Tome Netlify depends on Tome's dev release, which includes APIs needed to handle redirects. When beta 2 is released, users can install that release.

Use

Tome Netlify provides the following features:

Categories: Drupal

PhpInsights

New Drupal Modules - 6 December 2018 - 7:04am

New Google PageSpeed Insights Drupal module - An easy-to-use API Wrapper for Googles PageSpeed Insights. The JSON response is mapped to objects for an headache-free usage.

The module is based on this PHP library.

Categories: Drupal

What you Give is What you Get: Environmental Storytelling in Games - by Caleb Compton

Gamasutra.com Blogs - 6 December 2018 - 7:02am
Games these days keep getting bigger, with larger open worlds, and more characters, quests and items than ever before. However, even with so much to do the worlds can feel empty. Environmental storytelling is one way to add depth and life to your game.
Categories: Game Theory & Design

Producer's First Steps - by Nick Guilliams

Gamasutra.com Blogs - 6 December 2018 - 7:01am
The overarching lesson that helped me understand how to be a better producer and team leader.
Categories: Game Theory & Design

Pages

Subscribe to As If Productions aggregator