[development] How could everyone win and get Views in Drupal 8?

Larry Garfield larry at garfieldtech.com
Wed Aug 12 05:47:14 UTC 2009


It's not even close to that simple.  Views is a lot more than "just a query 
builder".

The query builder in Drupal 7's database layer is strictly a tool for building 
up an SQL query dynamically rather than as a literal string.  That's extremely 
powerful and lets us do a lot of nifty stuff, but that's only a small fraction 
of what Views does.  While Views will, hopefully, be able to leverage the core 
query builder for its Drupal 7 version (that was a design goal from the 
beginning, although vetting the success of that is still in progress), that in 
no way replaces the rest of Views.

Really, as of Views 2 the connection to SQL per se is rather tenuous.  A View 
is a collection of field and filter handlers that inject "stuff" into a query 
object, then the query runs, then each of those handlers gets a chance to 
render the bits of the result that it wants to.  (That's something of an over-
simplification, but that's the general idea.)  What that "stuff" is is entirely 
up to the handlers, and the rendering is also greatly affected by the style and 
display plugins.  There's work going on to allow the same framework to support 
non-SQL query objects, which is just plain sexy.  Of course, at that point the 
new database layer in D7 wouldn't be of any use at all since the query being 
built is not SQL to begin with.

On Tuesday 11 August 2009 11:29:11 am Earl Dunovant wrote:
> Views is an query builder, and there's going to be an query builder in
> D7...couldn't views pretty much work out to a consistent UI for that?
>
> On Tue, Aug 11, 2009 at 11:56 AM, Naheem Zaffar<naheemzaffar at gmail.com> wrote:
> > Talking as someone who has not used views extensively, has views really
> > changed that greatly within versions?
> >
> > Going by the numbers alone, Views 1.x was for Drupal 5, Views 2.x is for
> > Drupal 6. Maybe I am wrong but I would assume that the changes from 2.0
> > to 2.5 the current release do not impact on the underlying infrastructure
> > all that much?
> >
> > And this is with a "freak" core lifecycle of two years which I assume
> > will not remain the norm.
> >
> > 2009/8/10 Cameron Eagans
> >
> >> Why would you want views in core?
> >>
> >> You put views in core and it is frozen. Nobody can do anything with it
> >> (as far as changing it: adding new features, reworking existing code,
> >> etc). As a contrib module, the Views maintainers can decide how they
> >> want to run the release process for Views, and I personally would like
> >> to keep it that way -- it allows for a LOT more flexibility and a much
> >> faster development lifecycle.
> >>
> >> Plus, core is already weighing in at around 9.5 MB. Adding another 4.5
> >> MB of code to maintain doesn't seem like a good idea to me.

-- 
Larry Garfield
larry at garfieldtech.com


More information about the development mailing list