How to? Drupal developer toolkit Dennis Povshedny http://donetsk.drupal.ua
How to? Drupal developer toolkit <ul><li>Drupal Camp Donetsk </li></ul><ul><li>November 2011 </li></ul><ul><li>Dennis Povs...
Drupal developer toolkit <ul><li>Two major areas to discuss: </li></ul><ul><li>Technical tools </li></ul><ul><li>Organizat...
Technical tools <ul><li>The platform: *AMP </li></ul><ul><li>Developer sofware toolkit </li></ul>
LAMP / WAMP <ul><li>OS </li></ul><ul><li>Linux  / Windows /  Virtual Machine </li></ul>
LAMP / WAMP <ul><li>Webserver </li></ul><ul><li>Apache  / nginx / Microsoft IIS </li></ul><ul><li>Any Apache version is fi...
LAMP / WAMP <ul><li>Database </li></ul><ul><li>MySQL  / Postgres / SQLite </li></ul><ul><li>SQLite implementation is still...
Tune MySQL <ul><li>Adjust default MySQL 5.x settings </li></ul><ul><li>innodb_buffer_pool_size = 256M </li></ul><ul><li>in...
LAMP / WAMP
Tune PHP <ul><li>Tune PHP modules / settings </li></ul><ul><li>php5-gd, php5-xdebug, php5-pdo, </li></ul><ul><li>php5-mysq...
Development tools: debugging <ul><li>Use xdebug (default port: 9000) </li></ul><ul><li>Use the 'watchdog' function </li></...
'watchdog' function result <ul><li>http://example/admin/reports/dblog </li></ul>
<ul><li>Arrays, arrays, more arrays, nested arrays, ... </li></ul><ul><li>object(stdClass)[57] … public 'rdf_mapping' =>  ...
Need to run quick PHP snippet? <ul><li>Such things are nice:  http://ideone.com  (no Drupal there) </li></ul><ul><li>Howev...
Environment tools <ul><li>Version control system </li></ul><ul><li>Integrated development environment </li></ul><ul><li>Dr...
Version control system <ul><li>Git  / SVN / Mercurial </li></ul><ul><li>SVN – simple, centralized </li></ul><ul><li>Git – ...
Use IDE <ul><li>IDE </li></ul><ul><li>NetBeans  /  Eclipse  /  CodeLobster </li></ul><ul><li>Provides syntax highlighting,...
Environment tools <ul><li>Install several browsers for different user roles </li></ul><ul><li>or </li></ul><ul><li>use Mas...
Respect Drupal ecosystem <ul><li>Drupal directory structure </li></ul><ul><li>PHP/Drupal coding style </li></ul><ul><li>Do...
Location of custom code / themes <ul><li>Place all downloaded and handmade packages under </li></ul><ul><li>sites/all/modu...
Drupal ecosystem <ul><li>Follow the coding style. </li></ul><ul><li>Use correct variable_names, ClassNames,tab settings, c...
Respect Doxygen headers. <ul><li>That is the reason why do we have nice documentation out-of-box at  http://api.drupal.org...
BONUS TRACK: I NEED MORE!!
What's next? <ul><li>Nice FF plugins like Poster  https://addons.mozilla.org/en-US/firefox/addon/poster/ </li></ul><ul><li...
Useful links <ul><li>http://drupal.org/requirements </li></ul><ul><li>http://www.denwer.ru </li></ul><ul><li>http://drupal...
Thank you! <ul><li>Dennis Povshedny </li></ul><ul><li>Freelance IT expert </li></ul><ul><li>+38 096 2323346 </li></ul><ul>...
Upcoming SlideShare
Loading in...5
×

How to? Drupal developer toolkit. Dennis Povshedny.

681

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
681
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

How to? Drupal developer toolkit. Dennis Povshedny.

  1. 1. How to? Drupal developer toolkit Dennis Povshedny http://donetsk.drupal.ua
  2. 2. How to? Drupal developer toolkit <ul><li>Drupal Camp Donetsk </li></ul><ul><li>November 2011 </li></ul><ul><li>Dennis Povshedny </li></ul>
  3. 3. Drupal developer toolkit <ul><li>Two major areas to discuss: </li></ul><ul><li>Technical tools </li></ul><ul><li>Organizational hints </li></ul><ul><li>80% is a 'should' not a 'must' </li></ul>
  4. 4. Technical tools <ul><li>The platform: *AMP </li></ul><ul><li>Developer sofware toolkit </li></ul>
  5. 5. LAMP / WAMP <ul><li>OS </li></ul><ul><li>Linux / Windows / Virtual Machine </li></ul>
  6. 6. LAMP / WAMP <ul><li>Webserver </li></ul><ul><li>Apache / nginx / Microsoft IIS </li></ul><ul><li>Any Apache version is fine (1.3, 2.0, 2.2) . </li></ul><ul><li>Enable mod_rewrite . </li></ul>
  7. 7. LAMP / WAMP <ul><li>Database </li></ul><ul><li>MySQL / Postgres / SQLite </li></ul><ul><li>SQLite implementation is still weak; </li></ul><ul><li>Postgres users may have problem with some modules </li></ul>
  8. 8. Tune MySQL <ul><li>Adjust default MySQL 5.x settings </li></ul><ul><li>innodb_buffer_pool_size = 256M </li></ul><ul><li>innodb_flush_log_at_trx_commit=2 </li></ul><ul><li>innodb_flush_method=O_DIRECT </li></ul><ul><li>innodb_log_file_size = 128M </li></ul><ul><li>innodb_log_buffer_size = 4M </li></ul>
  9. 9. LAMP / WAMP
  10. 10. Tune PHP <ul><li>Tune PHP modules / settings </li></ul><ul><li>php5-gd, php5-xdebug, php5-pdo, </li></ul><ul><li>php5-mysql(i), php5-xml </li></ul><ul><li>memory_limit 128M (check) </li></ul><ul><li>register_global off </li></ul><ul><li>max_execution_time 30 </li></ul><ul><li>sendmail or module SMTP </li></ul>
  11. 11. Development tools: debugging <ul><li>Use xdebug (default port: 9000) </li></ul><ul><li>Use the 'watchdog' function </li></ul><ul><li>watchdog( 'Apache Solr', </li></ul><ul><li>'Adding @count documents.', </li></ul><ul><li>array('@count' => count($documents)) </li></ul><ul><li>); </li></ul>
  12. 12. 'watchdog' function result <ul><li>http://example/admin/reports/dblog </li></ul>
  13. 13. <ul><li>Arrays, arrays, more arrays, nested arrays, ... </li></ul><ul><li>object(stdClass)[57] … public 'rdf_mapping' => array 'rdftype' => array 0 => string 'sioc:UserAccount' (length=16) 'name' => array 'predicates' => array … 'homepage' => array 'predicates' => array … 'type' => string 'rel' (length=3) </li></ul><ul><li>Use dpm() function from the module 'devel' </li></ul>
  14. 14. Need to run quick PHP snippet? <ul><li>Such things are nice: http://ideone.com (no Drupal there) </li></ul><ul><li>However this is better: </li></ul><ul><li>http://example.local/devel/php </li></ul><ul><li>(by devel module, with Drupal stuff) </li></ul>
  15. 15. Environment tools <ul><li>Version control system </li></ul><ul><li>Integrated development environment </li></ul><ul><li>Drupal ecosystem </li></ul><ul><li>We're at 50% of slides! </li></ul>
  16. 16. Version control system <ul><li>Git / SVN / Mercurial </li></ul><ul><li>SVN – simple, centralized </li></ul><ul><li>Git – complicated, native for Drupal, powerful </li></ul><ul><li>Mercurial – in between </li></ul><ul><li>CVS – outdated! </li></ul><ul><li>Other: Bazaar, MS TFS (former VSS) </li></ul>
  17. 17. Use IDE <ul><li>IDE </li></ul><ul><li>NetBeans / Eclipse / CodeLobster </li></ul><ul><li>Provides syntax highlighting, autocompletion, integration with debugging and VCS. </li></ul>
  18. 18. Environment tools <ul><li>Install several browsers for different user roles </li></ul><ul><li>or </li></ul><ul><li>use Masquerade module </li></ul><ul><li>Often you'll need to see the site by different groups of users – administrators, anonymous users, registered users, etc . Several browsers is more preferable – this have other usage as well. </li></ul>
  19. 19. Respect Drupal ecosystem <ul><li>Drupal directory structure </li></ul><ul><li>PHP/Drupal coding style </li></ul><ul><li>Doxygen </li></ul>
  20. 20. Location of custom code / themes <ul><li>Place all downloaded and handmade packages under </li></ul><ul><li>sites/all/modules/ , sites/all/themes/ </li></ul><ul><li>Even better is to split </li></ul><ul><li>sites/all/modules/contrib/ </li></ul><ul><li>sites/all/modules/custom/ </li></ul>
  21. 21. Drupal ecosystem <ul><li>Follow the coding style. </li></ul><ul><li>Use correct variable_names, ClassNames,tab settings, comments. see </li></ul><ul><li>http://drupal.org/coding-standards </li></ul>
  22. 22. Respect Doxygen headers. <ul><li>That is the reason why do we have nice documentation out-of-box at http://api.drupal.org . </li></ul><ul><li>/** * Fetches a user object based on * an external authentication source. * * @param string $authname * The external authentication username. * * @return * A fully-loaded user object if the user * is found or FALSE if not found. */ function user_external_load($authname) { </li></ul>
  23. 23. BONUS TRACK: I NEED MORE!!
  24. 24. What's next? <ul><li>Nice FF plugins like Poster https://addons.mozilla.org/en-US/firefox/addon/poster/ </li></ul><ul><li>Firebug, extended integration http://drupal.org/project/drupalforfirebug </li></ul><ul><li>Drush – DRUpal Shell </li></ul><ul><li>TRAC/RedMine </li></ul><ul><li>PHP 5.2/PHP 5.3 on the same machine </li></ul><ul><li>APC/xCache/eAccelerator </li></ul><ul><li>Contribute! </li></ul><ul><li>Make session </li></ul>
  25. 25. Useful links <ul><li>http://drupal.org/requirements </li></ul><ul><li>http://www.denwer.ru </li></ul><ul><li>http://drupal.org/requirements </li></ul><ul><li>http://drupal.org/project/smtp </li></ul><ul><li>http://localhost/phpinfo.php :) </li></ul><ul><li>http://drupal.org/project/devel </li></ul><ul><li>http://drupal.org/project/coder </li></ul><ul><li>http://git-scm.com/ </li></ul><ul><li>http://drupal.org/project/masquerade </li></ul><ul><li>http://ideone.com </li></ul><ul><li>http://example.local/devel/php </li></ul><ul><li>http://drupal.org/coding-standards </li></ul><ul><li>http://api.drupal.org </li></ul><ul><li>http://drupal.org/project/drupalforfirebug </li></ul>
  26. 26. Thank you! <ul><li>Dennis Povshedny </li></ul><ul><li>Freelance IT expert </li></ul><ul><li>+38 096 2323346 </li></ul><ul><li>Skype: djdenikin </li></ul><ul><li>http://drupal.org/user/117896 </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×