Views 2 begun

Events happening in the community are now at Drupal community events on www.drupal.org.
merlinofchaos's picture

I've begun work on Views 2.

Due to the fact that all of the systems that Views relies on have undergone massive overhaul, and the API changes I want to do, this had turned out to basically be a ground up rewrite. THis is probably good as it will let me really get rid of some problems that are leftover from how I started this whole thing out, but of course it's going to take some time.

I'm moving toward more object orienting. This means methods. Whereas now we have one function with too many arguments, views_build_view, in Views 2 we're going to have $view->build() and $view->render(). And perhaps $view->execute() to cover both steps in something fairly easy. I've got load/save working with the new schema API. This is kind of a cool piece of code. Also note that by separating build from render, it'll become possible to insert a query, so long as it matches the data that Views is expecting.

Here are the core systems that need to be finished:

o The $view object itself. $view->load() and $view->save(). These are basically done.
o views_get_view (which can get a view from cache, database, and default views). This could also be view::get_view() but I suspect that factory methods are both not terribly appreciated by most around here, and aren't terribly exciting in PHP4 anyhow.
o Load/save Views API info (tables, arguments, defaults, etc) in the views cache. That's pretty much next.
o Put all of the information about views pages into hook_menu (this is an absurdly complicated piece of code these days).

Once those are finished, other work can go in parallel:

o Build a view
o Render a view -- This one's bigger than it sounds like, there's a lot here.
o Edit a view -- I hope this one sounds big. It's bigger than that. =)
o Translate old Views APIs for core into new Views APIs
o Export a view
o Update the theme wizard.
o Update views_rss

Comments

schema thoughts and caching

moshe weitzman's picture

A couple of thoughts

  • It is really easy for a View to disqualify itself from caching. I forget the specifics, but I ended up deciding that very few Views can be ached because you get disqualified when you use arguments or sorts or something like that. Maybe we can do away with the cache?
  • Perhaps for Views3 we can change how we do table/filter definitions. It would be really cool if we hook_schema_alter() them into the schema API, and not use own data structure. We can add 'notafield' stuff as needed too.

link to project?

cosmicdreams's picture

Has Views 2 hit the drupal.org project listing? I'd like to check out the code and take a look around.

Software Engineer @ The Nerdery

max_packet_size and Views2

bonobo's picture

I was wondering if Views2 will address this issue: http://drupal.org/node/121390

We are looking into ways of addressing this in the current version of views, as it seems that increasing the max_packet_size in the apache settings is a solution that just postpones, rather than solves, the problem.

If Views2 addresses this, then that could impact how we look to solve it now --

Thanks for any feedback --

Cheers,

Bill


FunnyMonkey
Tools for Teachers

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: