Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Secret Ingredients for A Better Web
How Not to Be Conned
by Your Drupal Vendor!
Secret Ingredients for A Better Web
http://dilbert.com/strips/comic/2002-03-27/
Secret Ingredients for A Better Web
•  SJ for short, Solihin Jinata is my full name
•  Co-founder of Pixel Onion
•  Started from Drupal 5
•  Drupal experience:
developer, site builder, solution architect, “part-time” themer
•  Drupal projects & clients:
Earth Hour, SMUv, SingTel, Scholastic, Oradan, I2R, NIE,
Stanley Black & Decker, PlugIn@Blk71, CapitaLand
v SMU site won Acquia Partner Site of the Year Awards for higher education category in 2013
About me
Secret Ingredients for A Better Web
Topic background
•  Recently we encountered more and more Drupal projects handed to
us in terrible conditions
•  Local community members have seen and heard Drupal sites having
more than their fair share of lousy implementation
•  Having lousy implementation is bad for whole Drupal industry, locally
and globally, as it damages Drupal reputation
•  While it is hard to agree on what it means to have the right Drupal
implementation, it is easier to spot bad Drupal site by simply
checking how it is themed, built and customised
•  Despite the title, this presentation aims to shed some lights to both
clients & vendors on how to execute acceptable Drupal projects,
focusing on asking the following 10 questions
Secret Ingredients for A Better Web
Here are 10 questions you can ask
yourself and/or your vendors
Secret Ingredients for A Better Web
1. What am I building?
Secret Ingredients for A Better Web
Simple site?
Secret Ingredients for A Better Web
Complex site?
Secret Ingredients for A Better Web
•  Static vs dynamic site
•  Closed vs membership site
•  Corporate vs commerce site
•  100 visitors vs >1,000,000 visitors per month
•  US$100 project vs >US$100,000 project
Any combination of the above may give you different
solutions: WordPress, Joomla, Drupal, Magento, Shopify,
or custom build with PHP framework. Or even other
languages: Python, Ruby, .NET, etc.
Know your scope
Secret Ingredients for A Better Web
•  Are you clear on what kind of site you want to build?
•  Does the vendor try to understand you and offer different
solutions or advices?
For the remaining slides, the context is:
building scalable and easily maintainable site for medium-large
organisations, while empowering laymen to do simple updates to
the site without breaking anything
Know your scope
Secret Ingredients for A Better Web
2. How is the project managed?
Secret Ingredients for A Better Web
•  Waterfall?? Agile!!!
•  Time constraint: deploying custom Drupal site within 1
week might be impossible
•  Tools
Pivotal Tracker, Basecamp, Asana, Redmine, Trello
•  Issue tracker
•  Frequent interaction and communication for project
updates
Project management
Secret Ingredients for A Better Web
3. Is the theme done the right way?
Secret Ingredients for A Better Web
Theming
Secret Ingredients for A Better Web
Theming
✖

 ✔
Secret Ingredients for A Better Web
•  MVC: separation of business logic and theming
•  Static sites are probably OK to hardcode? Dynamic sites
are BIG NO NO to hardcode
•  Theming using tons of .tpl.php?
Ø Advantage: version control
Ø Disadvantages: extremely difficult to visualise and
understand for non-developer, difficult to track how a
particular page is layout
Theming
Secret Ingredients for A Better Web
4. Is the site built to be future-proof?
Secret Ingredients for A Better Web
<h1>CURRENT COMPANIES</h1>
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
Site building
or
=
?
Secret Ingredients for A Better Web
<h1>CURRENT COMPANIES</h1>
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
Site building
or
=
?✖

 ✔
Secret Ingredients for A Better Web
•  Normally standard modules are used for extensibility:
Ø Core’s node, field API, taxonomy
Ø Views: why write SQL queries when we can point and click?
Ø Display suite
Ø Panels
Ø Context
Site building
Secret Ingredients for A Better Web
5. How about the high level
architecture?
Secret Ingredients for A Better Web
•  Usually there are more than 1 way to use Drupal to
achieve the same goal. How many ways does a vendor
know? Does a vendor know each pros & cons?
E.g. multisite is such a common requirement nowadays. The
following are alternative ways to achieve multisite: multi
machines/vhosts, multisite in sites folder, domain access,
organic group
•  Choice of modules and achieving requirement with least
# of modules
Architecture
Secret Ingredients for A Better Web
6. Is the site built with speed in mind?
Secret Ingredients for A Better Web
•  It is a humongous topic by itself
•  Various types of improvement/caching:
Ø Reverse proxy
Ø CDN
Ø Drupal caching (page/block/views/entity)
Ø Opcode caching (APC)
Ø DB query caching (memcache/redis)
Ø DB server optimisation
•  Some reference: http://goo.gl/YZZqM
Performance
Secret Ingredients for A Better Web
7. Do I need custom modules?
Secret Ingredients for A Better Web
•  Not everything needs to be custom built
•  One of the few reasons for choosing Drupal
Ø For business people: ~7,000 contributed modules
Ø Developers / hackers: great extensible core framework,
difficult to pick up at first, but little Computer Science
knowledge is required to do extensive customisation
à double edged sword that can render your site unscalable
•  Vendor can consider contributing patches instead of
creating new modules
“There’s a module for that!”
Secret Ingredients for A Better Web
8. Is the custom module developed with
Drupal coding standards?
Secret Ingredients for A Better Web
•  No hacking of core files or contrib modules!!
•  Have the vendor tried rules module instead?
•  Coding standards!! http://goo.gl/rTt5sx
For a non techie client, probably the easiest to observe. Your
site usually still works well with non-standard custom modules,
but you then wonder why the vendor doesn’t respect basic
Drupal coding standards.
Ø Indent of 2 spaces, not tab!
Ø No closing php tag ?>
Module development
Secret Ingredients for A Better Web
•  Are all db insertion and text rendering sanitised using
check_plain() or t() function?
•  You can install coder module to identify if the custom
modules are written to coding standard
•  You can install hacked module to identify if any core and
contrib modules are hacked
Module development
Secret Ingredients for A Better Web
9. How will future enhancements,
features, and maintenance be done?
Secret Ingredients for A Better Webhttp://atouchard.github.io/drupal-continuous-integration/
Secret Ingredients for A Better Web
•  For complex sites with many developers / vendors /
content populators, CI is a must
•  Simple sites will benefit, too
•  Complexity comes from the fact that <D7 database mixes
configuration and content, D8 aims to reduce or even
eliminate this complexity
Continuous Integration
Secret Ingredients for A Better Web
•  At least the following should be observed
Ø Version control with an agreed workflow
Ø Configuration management: the best so far is through
features module for D7, there is Configuration Management
Initiatives for D8 to make this much simpler
Ø Unit test of custom modules
•  More advanced topics
Ø Automatic build for creating staging server upon pull
request
Ø Automatic integration, functional test (behat)
Continuous Integration
Secret Ingredients for A Better Web
10. What’s my gut feel about this
vendor?
Secret Ingredients for A Better Web
Thank you!
sj at pixelonion.com

More Related Content

How Not to Be Conned by Your Drupal Vendor!

  • 1. Secret Ingredients for A Better Web How Not to Be Conned by Your Drupal Vendor!
  • 2. Secret Ingredients for A Better Web http://dilbert.com/strips/comic/2002-03-27/
  • 3. Secret Ingredients for A Better Web •  SJ for short, Solihin Jinata is my full name •  Co-founder of Pixel Onion •  Started from Drupal 5 •  Drupal experience: developer, site builder, solution architect, “part-time” themer •  Drupal projects & clients: Earth Hour, SMUv, SingTel, Scholastic, Oradan, I2R, NIE, Stanley Black & Decker, PlugIn@Blk71, CapitaLand v SMU site won Acquia Partner Site of the Year Awards for higher education category in 2013 About me
  • 4. Secret Ingredients for A Better Web Topic background •  Recently we encountered more and more Drupal projects handed to us in terrible conditions •  Local community members have seen and heard Drupal sites having more than their fair share of lousy implementation •  Having lousy implementation is bad for whole Drupal industry, locally and globally, as it damages Drupal reputation •  While it is hard to agree on what it means to have the right Drupal implementation, it is easier to spot bad Drupal site by simply checking how it is themed, built and customised •  Despite the title, this presentation aims to shed some lights to both clients & vendors on how to execute acceptable Drupal projects, focusing on asking the following 10 questions
  • 5. Secret Ingredients for A Better Web Here are 10 questions you can ask yourself and/or your vendors
  • 6. Secret Ingredients for A Better Web 1. What am I building?
  • 7. Secret Ingredients for A Better Web Simple site?
  • 8. Secret Ingredients for A Better Web Complex site?
  • 9. Secret Ingredients for A Better Web •  Static vs dynamic site •  Closed vs membership site •  Corporate vs commerce site •  100 visitors vs >1,000,000 visitors per month •  US$100 project vs >US$100,000 project Any combination of the above may give you different solutions: WordPress, Joomla, Drupal, Magento, Shopify, or custom build with PHP framework. Or even other languages: Python, Ruby, .NET, etc. Know your scope
  • 10. Secret Ingredients for A Better Web •  Are you clear on what kind of site you want to build? •  Does the vendor try to understand you and offer different solutions or advices? For the remaining slides, the context is: building scalable and easily maintainable site for medium-large organisations, while empowering laymen to do simple updates to the site without breaking anything Know your scope
  • 11. Secret Ingredients for A Better Web 2. How is the project managed?
  • 12. Secret Ingredients for A Better Web •  Waterfall?? Agile!!! •  Time constraint: deploying custom Drupal site within 1 week might be impossible •  Tools Pivotal Tracker, Basecamp, Asana, Redmine, Trello •  Issue tracker •  Frequent interaction and communication for project updates Project management
  • 13. Secret Ingredients for A Better Web 3. Is the theme done the right way?
  • 14. Secret Ingredients for A Better Web Theming
  • 15. Secret Ingredients for A Better Web Theming ✖ ✔
  • 16. Secret Ingredients for A Better Web •  MVC: separation of business logic and theming •  Static sites are probably OK to hardcode? Dynamic sites are BIG NO NO to hardcode •  Theming using tons of .tpl.php? Ø Advantage: version control Ø Disadvantages: extremely difficult to visualise and understand for non-developer, difficult to track how a particular page is layout Theming
  • 17. Secret Ingredients for A Better Web 4. Is the site built to be future-proof?
  • 18. Secret Ingredients for A Better Web <h1>CURRENT COMPANIES</h1> <ul> <li>item1</li> <li>item2</li> <li>item3</li> </ul> Site building or = ?
  • 19. Secret Ingredients for A Better Web <h1>CURRENT COMPANIES</h1> <ul> <li>item1</li> <li>item2</li> <li>item3</li> </ul> Site building or = ?✖ ✔
  • 20. Secret Ingredients for A Better Web •  Normally standard modules are used for extensibility: Ø Core’s node, field API, taxonomy Ø Views: why write SQL queries when we can point and click? Ø Display suite Ø Panels Ø Context Site building
  • 21. Secret Ingredients for A Better Web 5. How about the high level architecture?
  • 22. Secret Ingredients for A Better Web •  Usually there are more than 1 way to use Drupal to achieve the same goal. How many ways does a vendor know? Does a vendor know each pros & cons? E.g. multisite is such a common requirement nowadays. The following are alternative ways to achieve multisite: multi machines/vhosts, multisite in sites folder, domain access, organic group •  Choice of modules and achieving requirement with least # of modules Architecture
  • 23. Secret Ingredients for A Better Web 6. Is the site built with speed in mind?
  • 24. Secret Ingredients for A Better Web •  It is a humongous topic by itself •  Various types of improvement/caching: Ø Reverse proxy Ø CDN Ø Drupal caching (page/block/views/entity) Ø Opcode caching (APC) Ø DB query caching (memcache/redis) Ø DB server optimisation •  Some reference: http://goo.gl/YZZqM Performance
  • 25. Secret Ingredients for A Better Web 7. Do I need custom modules?
  • 26. Secret Ingredients for A Better Web •  Not everything needs to be custom built •  One of the few reasons for choosing Drupal Ø For business people: ~7,000 contributed modules Ø Developers / hackers: great extensible core framework, difficult to pick up at first, but little Computer Science knowledge is required to do extensive customisation à double edged sword that can render your site unscalable •  Vendor can consider contributing patches instead of creating new modules “There’s a module for that!”
  • 27. Secret Ingredients for A Better Web 8. Is the custom module developed with Drupal coding standards?
  • 28. Secret Ingredients for A Better Web •  No hacking of core files or contrib modules!! •  Have the vendor tried rules module instead? •  Coding standards!! http://goo.gl/rTt5sx For a non techie client, probably the easiest to observe. Your site usually still works well with non-standard custom modules, but you then wonder why the vendor doesn’t respect basic Drupal coding standards. Ø Indent of 2 spaces, not tab! Ø No closing php tag ?> Module development
  • 29. Secret Ingredients for A Better Web •  Are all db insertion and text rendering sanitised using check_plain() or t() function? •  You can install coder module to identify if the custom modules are written to coding standard •  You can install hacked module to identify if any core and contrib modules are hacked Module development
  • 30. Secret Ingredients for A Better Web 9. How will future enhancements, features, and maintenance be done?
  • 31. Secret Ingredients for A Better Webhttp://atouchard.github.io/drupal-continuous-integration/
  • 32. Secret Ingredients for A Better Web •  For complex sites with many developers / vendors / content populators, CI is a must •  Simple sites will benefit, too •  Complexity comes from the fact that <D7 database mixes configuration and content, D8 aims to reduce or even eliminate this complexity Continuous Integration
  • 33. Secret Ingredients for A Better Web •  At least the following should be observed Ø Version control with an agreed workflow Ø Configuration management: the best so far is through features module for D7, there is Configuration Management Initiatives for D8 to make this much simpler Ø Unit test of custom modules •  More advanced topics Ø Automatic build for creating staging server upon pull request Ø Automatic integration, functional test (behat) Continuous Integration
  • 34. Secret Ingredients for A Better Web 10. What’s my gut feel about this vendor?
  • 35. Secret Ingredients for A Better Web Thank you! sj at pixelonion.com