Why Drupal is Rockstar?

50 %
50 %
Information about Why Drupal is Rockstar?
Technology

Published on February 21, 2014

Author: kirkstenvon

Source: slideshare.net

Description

This slide is focusing on the strength of Drupal and why it is suited for enterprise solution.

2014 DevOps Day – Philippines February 22, 2014 Microsoft Philippines 8th Floor, 6750 Ayala Ave., Makati City

{ Drupal } : Being a Rockstar Gerald Z. Villorente DevOps Engineer | Drupal Developer | Open-Source Enthusiast

Agenda: Agenda:  Community  Code  Deployment  Security  Performance  Flexibility  Documentation  Drush  Content Management

Community Drupal is one of the largest open-source community in the planet.

April 2013 April 2013

31,721 Developers

1,034,669 Active Users

Medium IRC, Stackoverflow, D.O forum, ...

Code Drupal is one of the largest open-source community in the planet.

PHP

Community Contributions

25,585 Modules

1,941 Themes

765 Distributions

2,540 Code commits Just this week.

5,420 Issue Comments Just this week.

Coding Standard The Drupal Coding Standards apply to code within Drupal and its contributed modules.

Indenting and Whitespace Use an indent of 2 spaces, with no tabs.

Operators All binary operators (operators that come between two values), such as +, -, =, !=, ==, >, etc. should have a space before and after the operator, for readability.

Casting Put a space between the (type) and the $variable in a cast: (int) $mynumber.

Control Structures Control structures include if, for, while, switch, etc. Note: Don't use "else if" -- always use elseif.

Alternate control statement syntax for templates In templates, the alternate control statement syntax using : instead of brackets is allowed.

Line length and wrapping  In general, all lines of code should not be longer than 80 chars.  Lines containing longer function names, function/class definitions, variable declarations, etc are allowed to exceed 80 chars.  Control structure conditions may exceed 80 chars, if they are simple to read and understand.  Conditions should not be wrapped into multiple lines.

Function Calls Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon.

Function Declarations Arguments with default values go at the end of the argument list.

Class Constructor Calls When calling class constructors with no arguments, always include parentheses. This is to maintain consistency with constructors that have arguments.

Arrays Arrays should be formatted with a space separating each element (after the comma), and spaces around the => key association operator.

String Concatenations Always use a space between the dot and the concatenated parts to improve readability.

PHP Code Tags Always use <?php to delimit PHP code, not the shorthand, <? .

Semicolons The PHP language requires semicolons at the end of most lines, but allows them to be omitted at the end of code blocks. Drupal coding standards require them, even at the end of code blocks.

Example URLs Use "example.com" for all example URLs, per RFC 2606.

Naming Conventions

Naming Conventions: Naming Conventions: Functions and variables Functions and variables should be named using lowercase, and words should be separated with an underscore. Functions should in addition have the grouping/module name as a prefix, to avoid name collisions between modules.

Naming Conventions: Naming Conventions: Persistent Variables Persistent variables (variables/settings defined using Drupal's variable_get()/variable_set() functions) should be named using all lowercase letters, and words should be separated with an underscore. They should use the grouping/module name as a prefix, to avoid name collisions between modules.

Naming Conventions: Naming Conventions: Constants  Constants should always be all-uppercase, with underscores to separate words. (This includes pre-defined PHP constants like TRUE, FALSE, and NULL.)  Module-defined constant names should also be prefixed by an uppercase spelling of the module that defines them.  In Drupal 8 and later, constants should be defined using the const PHP language keyword (instead of define()), because it is better for performance. Ex: <?php const CACHE_TEMPORARY = -1; ?>

Naming Conventions: Naming Conventions: Global Variables If you need to define global variables, their name should start with a single underscore followed by the module/theme name and another underscore.

Naming Conventions: Naming Conventions: Classes See - https://drupal.org/node/608152

Naming Conventions: Naming Conventions: File names All documentation files should have the file name extension ".txt" to make viewing them on Windows systems easier. Also, the file names for such files should be all-caps (e.g. README.txt instead of readme.txt) while the extension itself is all-lowercase (i.e. txt instead of TXT).

Helper Modules

Helper Modules: Helper Modules: Coder Using PHP_Codesniffer, Coder includes “Coder Review” module that can be use to check the Drupal coding standard of your custom modules, themes, css, and javascript.

Helper Modules: Helper Modules: Dreditor A browser plug-in for reviewing patches and more.

Helper Modules: Helper Modules: PAReview A set of scripts for reviewing project applications, which runs some coding tests.

Helper Modules: Helper Modules: PAReview A set of scripts for reviewing project applications, which runs some coding tests.

Helper Modules: Helper Modules: Grammar Parser Provides an automated way of rewriting code files in compliance with code standards.

I hate doing manual code review! Can I automate it? DLA!

DevOps Loves Automation If you're using version control, you can take advantage the “ hook” feature in automating all reviews. You can combine Bash/PHP/Perl/Python script, Drush, and Coder to do the job.

Deployment

Deployment: Deployment: Features Enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together satisfy a certain use-case.

Deployment: Deployment: Configuration Management Enables the ability to keep track of specific configurations on a Drupal site, provides the ability to move these configurations between different environments (local, dev, qa, prod), and also move configurations between completely different sites (migrate configurations) without the use of modules with all configuration being owned by the site.

Deployment: Deployment: hook_update_N() Perform a single update. Called by update.php or drush updb.

Security Drupal is one of the most secure open-source CMS/CMF project on the planet. Don't argue with me!

Security: Security: Roles and Permissions

Security: Security: Security Team  Perform analysis of core or contributed project code.  Resolve reported security issues in a Security Advisory.  Provide assistance for contributed module maintainers in resolving security issues.  Provide documentation on how to write secure code.  Provide documentation on securing your site.

Performance Good integration with Varnish, NginX, Memcache, etc

Caching

Caching: Caching: Memcache Git /ɡɪt/ is a distributed revision control and source code management (SCM) system with an emphasis on speed. - Wikipedia

Caching: Caching: Varnish Varnish is an HTTP accelerator designed for content-heavy dynamic web sites.

Caching: Caching: Boost Boost provides static page caching for Drupal enabling a very significant performance and scalability boost for sites that receive mostly anonymous traffic. For shared hosting this is your best option in terms of improving performance.

Caching: Caching: APC Opcode cache for PHP.

Flexibility

Flexibility: Flexibility: Hooks Internal Drupal callbacks.

Flexibility: Flexibility: API Application Programming Interface, a particular set of code and specs that software programs can follow to communicate with each other.

Flexibility: Flexibility: Plethora of Contributed Modules and Themes

Documentation

Drush The coolest CLI tool to manage your Drupal site.

Drush: Drush: Use in Deployment

Drush: Drush: Remote Management Site alias. Ex: drush @[SITE].[ENV] vset maintenance_mode 0 -y

Drush: Drush: Module Management

Drush: Drush: User Management

Drush: Drush: Role Management

Drush: Drush: DB Management

Drush: Drush: Backup

Drush: Drush: Clearing of Cache

Drush: Drush: Site Maintenance

Content Management

Content Management: Content Management: Taxonomy A powerful category system (taxonomy) that allows you to organize and tag content.

Content Management: Content Management: Content Types Article, News, Events, Listings, etc ...

Questions?

Thank You!

References: References: 1. http://drupal.org 2. http://drupal.stackexchange.com 3. https://drupal.org/community 4. https://drupal.org/coding-standards 5. https://drupal.org/developing/best-practices 6. http://stauffer.com/blog/2013/03/22/why-drupal-greatest-cms-earth 7. http://drush.ws 8. https://github.com/drush-ops/drush

Add a comment

Related presentations

Related pages

Why Drupal is Rockstar?, SlideSearchEngine.com

Information about Why Drupal is Rockstar? Technology. slide strength floor drupal. Published on February 21, 2014. Author: kirkstenvon. Source: slideshare.net.
Read more

Drupal | A CMS platform for great digital experiences

Drupal is a scalable, open platform for web content management and digital experiences. Drupal provides deep capabilities and endless flexibility on the web.
Read more

How to Theme Like A Rockstar | DrupalCon London 2011

How to Theme Like A Rockstar. Presented by . ... UX, Drupal stuff, functionality and content (read: ... Why custom markup is so important, ...
Read more

Drupal Rockstar (FT from Home!) | Ciplex | Drupal Groups

Employment type: Full time Telecommute: Allowed Ciplex is a 13 year, award-winning web marketing agency, that focuses on delivering goal-driven web design ...
Read more

Drupal Rockstar (FT from Home!) | Ciplex | Drupal Groups

Ciplex is a 13 year, award-winning web marketing agency, that focuses on delivering goal-driven web design and online marketing solutions to our clients.
Read more

Brainbender.org | Drupal.org

Get Ready for a new way to Drupal. Brainbender's Dev Team is changing ... Why Drupal was chosen: We choose Drupal because we are all ROCKSTAR WANNABE'S ...
Read more

Why is my Drupal site so slow? - Dan Kegel's Web Hostel

Why is my Drupal site so slow? There are a bazillion reasons why Drupal is slow, but the main one is because you weren't paying attention. You have to ...
Read more

Testimonial 3 | Drupal.com

Drupal is a scalable, open platform for web content management and digital experiences. Drupal provides deep capabilities and endless flexibility on the web.
Read more