Views for Developers; An Architectural Overview

Views is an immensely powerful and extensible system. It can be used to solve a wide range of problems and present many different types of displays; More than what most people realise, even after working with Views for considerable time. This session will demonstrate some advanced but poorly-understood features of Views, such as grouping, "count" and "group by" queries, summary views, non-standard pagers and attached-views. This session will cover an architectural overview of Views 3's classes, and how to extend it's object-oriented code to present data in alternate formats ("Display" or "View" in MVC-speak), allow views to understand and filter data in a specific way ("Controller" in MVC-speak) and to access alternate data sources ("Model" in MVC-speak). A demonstration of extending views in code will follow. Attendees should be familiar with building and editing Views, although it is not necessary they consider themselves "advanced" in this area. It is also assumed that attendees are familiar with object-oriented terminology and the OO concepts of objects, classes and inheritance. This session is inspired by Larry Garfield's "Views for Developers" and "Views to the next level" sessions at past DrupalCons and Drupal camps. Here are the slides.

Speakers

Time slot: 
Thursday 10:45am-11:45am
Track: 
Coding and development
Experience level: 
Advanced
Questions answered by this session: 
What can Views do "out of the box" that I thought I needed custom code for?
How is Views' code structured and what is it's general architecture?
Where and how can I find detail about Views' APIs, classes and other code?
How can I extend Views for my website/app/custom data source?
What are the major differences between Views 2, Views 3 for D6 and Views 3 for D7?

Comments

To me at least exposing new tables to views is fairly straightfoward. Stlye plugins no t so much.

This session definitely fills a gap in Views information. I can't believe the api.drupal.org documentation isn't promoted on the project page ! The session is a bit disapointing on the dev side, but a really huge bunch of useful stuff here. Congratulations. Thanks a lot.

Great presentation. Really clear slides and sequencing. Bevan's a great presenter! I'm glad it was recorded!

There is now Views 3 for Drupal 6 this can be used as an intermediate step before upgrading to drupal 7

Colorado mountains