¡ Lots of projects no one uses, and a few that some do § TL;DR https://github.com/dragonmantank ¡ Heavy Drupal Development for 2 years May 16th, 2013 php|tek 2013 2
or 7 ¡ Install and Ready to Go May 16th, 2013 php|tek 2013 6 Advantages Disadvantages ¡ Not built for multiple installs ¡ Can’t use for existing sites ¡ Only for Windows and Mac
separate work ¡ On Mac, only the /sites/all/ folder is writable § Even Sites you create are not writable ¡ Don’t put the entire stack in VC, just your work May 16th, 2013 php|tek 2013 8
Full server to run code ¡ Self contained and can be replicated ¡ Most modern machines can do VM Advantages Disadvantages ¡ Uses more resources ¡ Easier to break
your production setup. If you are running Redhat in production, set up an CentOS box ¡ Set up the document root for your web server to be the /vagrant folder (or sub folder, depending on your site layout). This way your site will run automatically. ¡ If you are running CentOS and Apache, disable SELinux so that Apache will use the /vagrant folder ¡ Don't use PHP 5.4 with Drupal 7 or lower ¡ Make sure APC, or some opcode cache, is installed ¡ Provide lots of RAM, at least 1GB May 16th, 2013 php|tek 2013 11
unit testing and functional testing ¡ Unit tests are done by extending DrupalUnitTestCase ¡ Functional tests are done by extending DrupalWebTestCase May 16th, 2013 php|tek 2013 16
very easily ¡ Debugging can be hard since extra output breaks the test runner, and since the DB is destroyed watchdog() is useless § You can use $this-‐>verbose(‘message’) or debug(‘message’) though May 16th, 2013 php|tek 2013 19
sql-‐dump -‐-‐result-‐file=/PATH/TO/dump.sql Back up the entire site to a tarball $ drush archive-‐dump default View watchdog entries $ drush watchdog-‐list Update Drupal and modules $ drush pm-‐update Download module $ drush pm-‐download [module_name] May 16th, 2013 php|tek 2013 21
move it ¡ No need to use a DB GUI ¡ Can do automatic local or remote backups ¡ Useful for moving databases from one server to another May 16th, 2013 php|tek 2013 23
§ Things like nodes can be clicked through to see their object structure ¡ Can auto-‐generate dummy content ¡ Better debugging output § dpm() and dvm() for pretty output § dpr(), kpr(), and dvr() will dump to the page header May 16th, 2013 php|tek 2013 24
of stuff in the DB and makes it exportable and portable via code ¡ Lot of stuff works out of the box, extra modules like UUID, boxes, and features_extra pick up the slack ¡ ftools makes updating features easy May 16th, 2013 php|tek 2013 25
run § Effectively turns your site into a static site (kind of) ¡ With block caching, not all blocks will cache. What and when to cache is up to the block May 16th, 2013 php|tek 2013 28
reducing the number of HTTP requests ¡ Will minify CSS, reducing some of the transmission size YOU have to make your modules take advantage of it, though May 16th, 2013 php|tek 2013 30
§ drupal_add_css() § Add the files to your .info file ¡ Don’t just add JS and CSS files via <script> and <style> tags in your theme May 16th, 2013 php|tek 2013 31