BADCamp 2012 -Beginner Best Practices


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

BADCamp 2012 -Beginner Best Practices

  1. 1. BADCamp 2012Beginner Best PracticesMeghan Sweet (@meghsweet)4 November, 2012
  2. 2. How do you learn Drupal?
  3. 3. Sometimes things are really easy.
  4. 4. Sometimes things are really hard.
  5. 5. Leveraging Contributed ModulesStanding on the Shoulders of Giants- Assess the project page- Read the README file-Views, admin_menu, ctools, webform,wysiwyg, panels, context.
  6. 6. Where does Contributed code live?Put all contrib modules in ../sites/all/modules/OR../sites/all/modules/contribPut all custom modules in../sites/all/modules/customPut all themes in../sites/all/themes
  7. 7.
  8. 8. What do you need in your toolbox?HTML / CSS / Javascript / PHPA good code editorFirebug or Chrome InspectorDrupal CommunityYou can leverage a lot of skills you already have.
  9. 9. Local Development EnvironmentLocal EnvironmentDrushVersion Control such as GITBasics of the command line
  10. 10. Development WorkflowDevelopment Environment- Dev > Test > LiveWhere do your clients QA?Use Version control to push to production- great for rolling back changes- great for multi-developer environmentsCode vs Content- features moduleWorkflow to push to productionExclude the files directory from the repo, files are like data.
  11. 11. The “Drupal Way”?
  12. 12. Site Development Plan Typical Drupal Site
  13. 13. A complex system that works isinvariably found to haveevolved from a simple systemthat worked...Galls Law
  14. 14. Build features zoomedin, then pull back and see how it all fits together.
  15. 15. Write a development planForces you to think through your architectureand implications of decisionsMakes it a lot easier to build quickly- ex: graball your modules at once, understand contentand layout dependenciesBuild, then theme90% of the way there is often enough- Don’t be afraid to talk to your clients
  16. 16. Structure ContentBreak up your content into the pieces you wantcontrol over.Important in mobile theming- content firstConsider your admins and your visitors.Good content is user-centeredAdopt the cognitive frameworks of your users-ERIN KISSANE
  17. 17. Feature DevelopmentIts essentially three steps, rinse and repeat.1) Build a content type2) Build a view3) Build a layout
  18. 18. Skew, The Frontend Engineers Misery
  19. 19. Slow Site?
  20. 20. Common Client-sidePerformance Pitfalls- Cache Settings- Image Optimization- Image File Subdirectories- CSS Images- Size of pages, libraries, CSS.
  21. 21. Theming!Where everything can be overridden.
  22. 22. There is no "best" theme. -@rupl
  23. 23. Where to start Develop a theming strategy and find a theme to match- ‘Starter’ themes- Base Themes- Responsive Theming- Click-to-Config
  24. 24. Control your layout throughconfigurationPanels, Panelizer, PanopolyContextOmegaDisplay Suite
  25. 25. Advancing ThemingIts all about OverridingConfiguration -> CSS -> PHP
  26. 26. You can give back to the community.
  27. 27. Coding Standards-Don’t Hack Core! It may seems like a good idea now, but itsnot.- Indent of 2 spaces- No trailing white space- CSS properties in alphabetical order- Comment your code, you’ll thank yourself later.- Participate in the issue queue and documentation.
  28. 28. Learn MoreBooks Camps and ConsTraining IRCDocumentation Spirit of willingness, givingBlogs back and helping each otherVideosMeetups
  29. 29. Thank You!@meghsweet @chapter_three