Jay Callicott Drupal Views 2.0 Presentation

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

3 comments

Comments 1 - 3 of 3 previous next Post a comment

  • + mediacurrent Dave Terry 2 months ago
    Node statistics I think is built in, I haven’t installed any additional views modules, the your default package. It should show up for you out of the box, thx -J
  • + siamtweet siamtweet 2 months ago
    On slide 50, I saw you used Node statistics. Does it come with a module or something? Do you have any recommend module for keeping node stat?? Thanks in advance
  • + siamtweet siamtweet 2 months ago
    Hey...Thanks!!! an example in your slide just reminded + showed me how easy to use View to something i want. LOL I almost write a module. :)
Post a comment
Embed Video
Edit your comment Cancel

1 Favorite

Jay Callicott Drupal Views 2.0 Presentation - Presentation Transcript

  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
  9. Views vsdb_query comparison chart
  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. Enabling the module…
  13. Enabling the block…
  14. Viola! Recent Stories Block v1
  15. Recent Stories Block v2
  16. Let’s Add a Subtitle! (Using CCK)
  17. Need phpMyAdmin to analyze CCK
  18. My first attempt = MySQL error
  19. Recent Stories Block v3 – We’re done!
  20. First screen
  21. Add a filter…
  22. Add a filter step 2
  23. Add a limit (3)
  24. Add a sort…
  25. Add a sort step 2
  26. Add style…
  27. Add subtitle…
  28. Add subtitle step 2
  29. Add title link…
  30. Add title link step 2
  31. We’re done! Time to save.
  32. Live preview!
  33. Enable the recent stories block…
  34. We’re done!
  35. 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
  36. 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.
  37. 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
  38. 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
  39. 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
  40. 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!
  41. 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
  42. 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!
  43. A Case Study on 2 Approaches
  44. Guns admin view list…
  45. Guns short teaser admin edit…
  46. Guns short teaser admin edit #2…
  47. Gun short teaser image CSS…
  48. Petersen’s Hunting…
  49. Hunting view admin screen…
  50. Hunting Recommended Article CSS…
  51. 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
  52. 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!

+ Dave TerryDave Terry, 2 months ago

custom

386 views, 1 favs, 0 embeds more stats

Introduction to Views 2.0
Why views?
Advantages of more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 386
    • 386 on SlideShare
    • 0 from embeds
  • Comments 3
  • Favorites 1
  • Downloads 12
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories

Tags