BADCamp 2012 -Beginner Best Practices

  • Published on
    27-May-2015

  • View
    1.061

  • Download
    1

Embed Size (px)

Transcript

  • 1. BADCamp 2012Beginner Best PracticesMeghan Sweet (@meghsweet)4 November, 2012

2. How do you learn Drupal? 3. Sometimes things arereally easy. 4. Sometimes things arereally hard. 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. 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. http://drupal.org/project/views/ 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. Local Development EnvironmentLocal EnvironmentDrushVersion Control such as GITBasics of the command line 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. The Drupal Way? 12. Site Development Plan Typical Drupal Site 13. A complex system that works isinvariably found to haveevolved from a simple systemthat worked...Galls Law 14. Build features zoomedin, then pull back and see how it all fits together. 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- Dont be afraid to talk to your clients 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. Feature DevelopmentIts essentially three steps, rinse and repeat.1) Build a content type2) Build a view3) Build a layout 18. Skew, The Frontend Engineers Misery 19. Slow Site? 20. Common Client-sidePerformance Pitfalls- Cache Settings- Image Optimization- Image File Subdirectories- CSS Images- Size of pages, libraries, CSS. 21. Theming!Where everything can be overridden. 22. There is no "best" theme. -@rupl 23. Where to startDevelop a theming strategyand find a theme to match- Starter themes- Base Themes- Responsive Theming- Click-to-Config 24. Control your layout throughconfigurationPanels, Panelizer, PanopolyContextOmegaDisplay Suite 25. Advancing ThemingIts all about OverridingConfiguration -> CSS -> PHP 26. You can give back to thecommunity. 27. Coding Standards-Dont 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, youll thank yourself later.- Participate in the issue queue and documentation. 28. Learn MoreBooksCamps and ConsTrainingIRCDocumentationSpirit of willingness, givingBlogs back and helping each otherVideosMeetups 29. Thank You!@meghsweet @chapter_three

Recommended

View more >