Your SlideShare is downloading. ×
How to? Drupal developer toolkit. Dennis Povshedny.
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

How to? Drupal developer toolkit. Dennis Povshedny.

642
views

Published on

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×