SlideShare une entreprise Scribd logo
1  sur  58
Getting the most out of Views 2.0 Jay Callicott September 19, 2009 Drupal Camp Atlanta
Introduction: Session Outline Introduction to Views 2.0 Why views? Advantages of using views over database queries Db query vs Views side by side comparison Theme-centric vs Logic-centric approaches to view creation A case study on 2 main strategies for creating views Views 2.0 Wrap Up & Q&A
Introduction: Informal Poll How many beginner Drupal developers? Advanced? How many non-developers? How many here came to the conference for kicking the tires of Drupal? Training?
Introduction: Intended Audience Beginner to advanced developers The material is more advanced but I will try to not lose beginners Business Guys (Managers/Owners/CIOs) wanting to learn the power of Drupal
Introduction: Who Am I? Jay Callicott Mediacurrent web developer Drupal developer since 4.6 Started using Drupal in a part-time business I started several years ago Developed web applications for the state of Arkansas before this job Expert in PHP/mySQL and Drupal as well worked with Drupal versions: 4.6 / 4.7 / 5 / now 6
Introduction: What are views? Views are a critical feature of Drupal As big as CCK, robust theming layer, modular framework *Will be rolled into Drupal 7.0 core *Edit, this is not correct – I think I got confused with CCK? Views are for building arbitrary lists of content. Not unlike “lists” in Sharepoint, other CMS’s might have similar concepts Views can be blocks, pages, embedded Views can pull any type of Drupal content (nodes/users/etc) and do some amazing things all from the UI!
Introduction: Why did I create this session? This session is more me 1 year ago. Intended for someone who has used Drupal, even beginner-level who is trying to get a grasp of Views 2.0 Or for Drupal 5 developers getting a handle on the transition of Views 1.0 to 2.0 Views 2.0 can look intimidating at first
Why views? Advantages of using views over database queries The usual alternative to views is the quick db query Fetch results in module, spit out html Absolute control! Tempting if you are used to custom coding Fine for quick? Or is it? As requirements grow, code grows and maintenance becomes a problem Views can do simple and can grow as requirements grow Views are extremely flexible and scalable
Views vsdb_query comparison chart
More Views vsdb_query comparison chart
Db query vs Views – side by side comparison We will go screen by screen First create a module using custom db query Second create a view that does the same thing
Enabling the module…
Enabling the block…
Viola! Recent Stories Block v1
Recent Stories Block v2
Let’s Add a Subtitle! (Using CCK)
Need phpMyAdmin to analyze CCK
My first attempt = MySQL error
Recent Stories Block v3 – We’re done!
First screen
Add a filter…
Add a filter step 2
Add a limit (3)
Add a sort…
Add a sort step 2
Add style…
Add subtitle…
Add subtitle step 2
Add title link…
Add title link step 2
We’re done! Time to save.
Live preview!
Enable the recent stories block…
We’re done!
Theme-centric vs logic-centric approach to view creation Methodology is critical Especially with large projects Views 2.0 methodology approaches: look & feel or logic Documentation covers nuts & bolts, not strategy Views 1.0 didn’t have this problem Each list was usually it’s own view With 2.0 you can combine lists together
Theme-centric – aka look & feel Simple list Add displays for recent articles, recommended articles, popular, gear items, species All displays get rolled up into 1 view Image list Image on left Title, additional fields on the right Featured item 1 content item from a content type, big image, more fields, etc.
Logic-centric methodology Recent articles Add displays for species articles, gear articles / add displays for blocks / pages Most popular Add displays for species / gear / hunting / etc Related articles Gear, hunting articles that have a certain taxonomy term passed in through an argument E.g. you pass in ‘deer’, ‘fish’, whatever and get articles that have that term
Comparing the 2 approaches Both approaches sound reasonable My experience building around look & feel is much more maintainable and is more sustainable Logic approach can lead to much frustration
Comparing Approaches: L&F Sharing templates is easier Look is the same/similar you should share CSS Won’t have to branch off .tpl templates for different content
Comparing Approaches: Logic Maybe share templates What if the logic is similar but the look is different? Some displays might be pages, some blocks You could be forced to create a bunch of templates Template explosion can occur!
More on Logic regarding templates and CSS You have a recent articles block and a popular articles block across 2 views. Both have same look = similar .tpls and duplicated efforts Bloated CSS Views have different ids/classes (will show example later) Template Duplication Similar templates are created Template customization gets duplicated Maintenance becomes a nightmare
Comparing Approaches: L&F v. Logic Look & Feel You will override fields and some filters All the styles will be the same = consistency Logic You often override more here than in look & feel approach Maybe styles and filters and fields Views become very hard to maintain!
A Case Study on 2 Approaches
Guns admin view list…
Guns short teaser admin edit…
Guns short teaser admin edit #2…
Gun short teaser image CSS…
Petersen’s Hunting…
Hunting view admin screen…
Hunting Recommended Article CSS…
Wrap-up Covered basics of views, in detail why we should use them over custom code Showed side-by-side how creating a view over code is often preferred Covered 2 main approaches or strategies when creating views and the implications of these 2 main approaches Displayed a real-world scenario and explained implications for each strategy
Q&A Can views do ‘X/Y/Z’? Your specific business problem, can views help? General questions about Drupal? Mediacurrent? Got more questions later? Jay.callicott@mediacurrent.com or twitter http://twitter.com/drupalninja Thanks for coming!

Contenu connexe

En vedette

The Secret Decoder Ring: Translating Client-Speak Into Drupal Requirements
The Secret Decoder Ring: Translating Client-Speak Into Drupal RequirementsThe Secret Decoder Ring: Translating Client-Speak Into Drupal Requirements
The Secret Decoder Ring: Translating Client-Speak Into Drupal RequirementsMediacurrent
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Mediacurrent
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentMediacurrent
 
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011Mediacurrent
 
How a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your WebsiteHow a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your WebsiteMediacurrent
 

En vedette (6)

The Secret Decoder Ring: Translating Client-Speak Into Drupal Requirements
The Secret Decoder Ring: Translating Client-Speak Into Drupal RequirementsThe Secret Decoder Ring: Translating Client-Speak Into Drupal Requirements
The Secret Decoder Ring: Translating Client-Speak Into Drupal Requirements
 
Beginning Drush
Beginning DrushBeginning Drush
Beginning Drush
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
 
How a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your WebsiteHow a Content Delivery Network Can Help Speed Up Your Website
How a Content Delivery Network Can Help Speed Up Your Website
 

Similaire à Jay Callicott Drupal Views 2.0 Presentation

Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slidesNeil Perlin
 
Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slidesNeil Perlin
 
Drupal 6x Installation
Drupal 6x Installation Drupal 6x Installation
Drupal 6x Installation Micky Metts
 
Single sourcing to the max
Single sourcing to the maxSingle sourcing to the max
Single sourcing to the maxNeil Perlin
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with DrupalRachel Vacek
 
What's new in VisibleThread 2.14
What's new in VisibleThread 2.14 What's new in VisibleThread 2.14
What's new in VisibleThread 2.14 VisibleThread
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueAlexandre Israël
 
Contributing to Drupal
Contributing to DrupalContributing to Drupal
Contributing to DrupalChris Skene
 
Hello Drupal!
Hello Drupal!Hello Drupal!
Hello Drupal!Acquia
 
Design Manager 2013
Design Manager 2013  Design Manager 2013
Design Manager 2013 GSoft
 
Learn reactjs, how to code with example and general understanding thinkwik
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwikHetaxi patel
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 
[DCTPE2011] Drupal 7 的Fields/Views 運用
[DCTPE2011] Drupal 7 的Fields/Views 運用[DCTPE2011] Drupal 7 的Fields/Views 運用
[DCTPE2011] Drupal 7 的Fields/Views 運用Drupal Taiwan
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerFITC
 
A Gentle Introduction to Drupal's Views API
A Gentle Introduction to Drupal's Views APIA Gentle Introduction to Drupal's Views API
A Gentle Introduction to Drupal's Views APIDan Muzyka
 
Build Your Site with Views
Build Your Site with ViewsBuild Your Site with Views
Build Your Site with ViewsPeter Dowling
 
Visualizing Content with Display Suite
Visualizing Content with Display SuiteVisualizing Content with Display Suite
Visualizing Content with Display SuiteMatthias Vandermaesen
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practicesmeghsweet
 

Similaire à Jay Callicott Drupal Views 2.0 Presentation (20)

Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slides
 
Topic based and structured authoring - slides
Topic based and structured authoring - slidesTopic based and structured authoring - slides
Topic based and structured authoring - slides
 
Drupal 6x Installation
Drupal 6x Installation Drupal 6x Installation
Drupal 6x Installation
 
Single sourcing to the max
Single sourcing to the maxSingle sourcing to the max
Single sourcing to the max
 
Getting Started with Drupal
Getting Started with DrupalGetting Started with Drupal
Getting Started with Drupal
 
What's new in VisibleThread 2.14
What's new in VisibleThread 2.14 What's new in VisibleThread 2.14
What's new in VisibleThread 2.14
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices Catalogue
 
Contributing to Drupal
Contributing to DrupalContributing to Drupal
Contributing to Drupal
 
Power Blackboarding AU16
Power Blackboarding AU16Power Blackboarding AU16
Power Blackboarding AU16
 
Hello Drupal!
Hello Drupal!Hello Drupal!
Hello Drupal!
 
Design Manager 2013
Design Manager 2013  Design Manager 2013
Design Manager 2013
 
Site Manager rocks!
Site Manager rocks!Site Manager rocks!
Site Manager rocks!
 
Learn reactjs, how to code with example and general understanding thinkwik
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwik
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
[DCTPE2011] Drupal 7 的Fields/Views 運用
[DCTPE2011] Drupal 7 的Fields/Views 運用[DCTPE2011] Drupal 7 的Fields/Views 運用
[DCTPE2011] Drupal 7 的Fields/Views 運用
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and Polymer
 
A Gentle Introduction to Drupal's Views API
A Gentle Introduction to Drupal's Views APIA Gentle Introduction to Drupal's Views API
A Gentle Introduction to Drupal's Views API
 
Build Your Site with Views
Build Your Site with ViewsBuild Your Site with Views
Build Your Site with Views
 
Visualizing Content with Display Suite
Visualizing Content with Display SuiteVisualizing Content with Display Suite
Visualizing Content with Display Suite
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
 

Plus de Mediacurrent

Penn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyPenn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyMediacurrent
 
Evolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdEvolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdMediacurrent
 
Penn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsPenn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsMediacurrent
 
Delivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdDelivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdMediacurrent
 
Content Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceContent Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceMediacurrent
 
Decoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldDecoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldMediacurrent
 
A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9Mediacurrent
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to KnowMediacurrent
 
Leveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsLeveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsMediacurrent
 
Reimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyReimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyMediacurrent
 
How to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalHow to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalMediacurrent
 
Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Mediacurrent
 
Managing Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesManaging Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesMediacurrent
 
Paragraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownParagraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownMediacurrent
 
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 MagMutual.com: On the JAMStack with Gatsby and Drupal 8 MagMutual.com: On the JAMStack with Gatsby and Drupal 8
MagMutual.com: On the JAMStack with Gatsby and Drupal 8Mediacurrent
 
Creating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalCreating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalMediacurrent
 
Level Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesLevel Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesMediacurrent
 
Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Mediacurrent
 
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesHow to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesMediacurrent
 
Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Mediacurrent
 

Plus de Mediacurrent (20)

Penn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyPenn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with Gatsby
 
Evolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdEvolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher Ed
 
Penn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsPenn State scales static Drupal to new heights
Penn State scales static Drupal to new heights
 
Delivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdDelivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher Ed
 
Content Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceContent Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your Audience
 
Decoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldDecoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real World
 
A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to Know
 
Leveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsLeveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web Projects
 
Reimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyReimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web Strategy
 
How to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalHow to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with Drupal
 
Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)
 
Managing Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesManaging Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 Websites
 
Paragraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownParagraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final Showdown
 
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 MagMutual.com: On the JAMStack with Gatsby and Drupal 8 MagMutual.com: On the JAMStack with Gatsby and Drupal 8
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 
Creating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalCreating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to Drupal
 
Level Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesLevel Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best Practices
 
Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9
 
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesHow to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
 
Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan
 

Dernier

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Dernier (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Jay Callicott Drupal Views 2.0 Presentation

  • 1. Getting the most out of Views 2.0 Jay Callicott September 19, 2009 Drupal Camp Atlanta
  • 2. Introduction: Session Outline Introduction to Views 2.0 Why views? Advantages of using views over database queries Db query vs Views side by side comparison Theme-centric vs Logic-centric approaches to view creation A case study on 2 main strategies for creating views Views 2.0 Wrap Up & Q&A
  • 3. Introduction: Informal Poll How many beginner Drupal developers? Advanced? How many non-developers? How many here came to the conference for kicking the tires of Drupal? Training?
  • 4. Introduction: Intended Audience Beginner to advanced developers The material is more advanced but I will try to not lose beginners Business Guys (Managers/Owners/CIOs) wanting to learn the power of Drupal
  • 5. Introduction: Who Am I? Jay Callicott Mediacurrent web developer Drupal developer since 4.6 Started using Drupal in a part-time business I started several years ago Developed web applications for the state of Arkansas before this job Expert in PHP/mySQL and Drupal as well worked with Drupal versions: 4.6 / 4.7 / 5 / now 6
  • 6. Introduction: What are views? Views are a critical feature of Drupal As big as CCK, robust theming layer, modular framework *Will be rolled into Drupal 7.0 core *Edit, this is not correct – I think I got confused with CCK? Views are for building arbitrary lists of content. Not unlike “lists” in Sharepoint, other CMS’s might have similar concepts Views can be blocks, pages, embedded Views can pull any type of Drupal content (nodes/users/etc) and do some amazing things all from the UI!
  • 7. Introduction: Why did I create this session? This session is more me 1 year ago. Intended for someone who has used Drupal, even beginner-level who is trying to get a grasp of Views 2.0 Or for Drupal 5 developers getting a handle on the transition of Views 1.0 to 2.0 Views 2.0 can look intimidating at first
  • 8. Why views? Advantages of using views over database queries The usual alternative to views is the quick db query Fetch results in module, spit out html Absolute control! Tempting if you are used to custom coding Fine for quick? Or is it? As requirements grow, code grows and maintenance becomes a problem Views can do simple and can grow as requirements grow Views are extremely flexible and scalable
  • 10. More Views vsdb_query comparison chart
  • 11. Db query vs Views – side by side comparison We will go screen by screen First create a module using custom db query Second create a view that does the same thing
  • 12.
  • 16.
  • 18. Let’s Add a Subtitle! (Using CCK)
  • 19. Need phpMyAdmin to analyze CCK
  • 20.
  • 21. My first attempt = MySQL error
  • 22. Recent Stories Block v3 – We’re done!
  • 23.
  • 26. Add a filter step 2
  • 27. Add a limit (3)
  • 29. Add a sort step 2
  • 34. Add title link step 2
  • 35. We’re done! Time to save.
  • 37. Enable the recent stories block…
  • 39. Theme-centric vs logic-centric approach to view creation Methodology is critical Especially with large projects Views 2.0 methodology approaches: look & feel or logic Documentation covers nuts & bolts, not strategy Views 1.0 didn’t have this problem Each list was usually it’s own view With 2.0 you can combine lists together
  • 40. Theme-centric – aka look & feel Simple list Add displays for recent articles, recommended articles, popular, gear items, species All displays get rolled up into 1 view Image list Image on left Title, additional fields on the right Featured item 1 content item from a content type, big image, more fields, etc.
  • 41. Logic-centric methodology Recent articles Add displays for species articles, gear articles / add displays for blocks / pages Most popular Add displays for species / gear / hunting / etc Related articles Gear, hunting articles that have a certain taxonomy term passed in through an argument E.g. you pass in ‘deer’, ‘fish’, whatever and get articles that have that term
  • 42. Comparing the 2 approaches Both approaches sound reasonable My experience building around look & feel is much more maintainable and is more sustainable Logic approach can lead to much frustration
  • 43. Comparing Approaches: L&F Sharing templates is easier Look is the same/similar you should share CSS Won’t have to branch off .tpl templates for different content
  • 44. Comparing Approaches: Logic Maybe share templates What if the logic is similar but the look is different? Some displays might be pages, some blocks You could be forced to create a bunch of templates Template explosion can occur!
  • 45. More on Logic regarding templates and CSS You have a recent articles block and a popular articles block across 2 views. Both have same look = similar .tpls and duplicated efforts Bloated CSS Views have different ids/classes (will show example later) Template Duplication Similar templates are created Template customization gets duplicated Maintenance becomes a nightmare
  • 46. Comparing Approaches: L&F v. Logic Look & Feel You will override fields and some filters All the styles will be the same = consistency Logic You often override more here than in look & feel approach Maybe styles and filters and fields Views become very hard to maintain!
  • 47. A Case Study on 2 Approaches
  • 48.
  • 49. Guns admin view list…
  • 50. Guns short teaser admin edit…
  • 51. Guns short teaser admin edit #2…
  • 52. Gun short teaser image CSS…
  • 54.
  • 55. Hunting view admin screen…
  • 57. Wrap-up Covered basics of views, in detail why we should use them over custom code Showed side-by-side how creating a view over code is often preferred Covered 2 main approaches or strategies when creating views and the implications of these 2 main approaches Displayed a real-world scenario and explained implications for each strategy
  • 58. Q&A Can views do ‘X/Y/Z’? Your specific business problem, can views help? General questions about Drupal? Mediacurrent? Got more questions later? Jay.callicott@mediacurrent.com or twitter http://twitter.com/drupalninja Thanks for coming!