Make views a required dependency and ditch non-views code?

dww - September 20, 2009 - 20:42
Project:Signup
Version:6.x-1.x-dev
Component:Views integration
Category:task
Priority:normal
Assigned:dww
Status:needs review
Description

I just ran a few queries against the d.o usage data:

SELECT count(t1.pid) FROM project_usage_day t1 INNER JOIN project_usage_day t2 ON t1.timestamp = t2.timestamp AND t1.site_key = t2.site_key AND t1.tid = t2.tid WHERE t1.pid = 29351 AND t2.pid = 38878 AND t1.tid = 87 AND t1.timestamp = 1253232000;

t1.pid == 29351 is signup
t2.pid == 38878 is views
t1.tid == D6 version

So, this query tells me how many sites reported to d.o that were using both signup and views:

+---------------+
| count(t1.pid) |
+---------------+
|          2272 |
+---------------+
1 row in set (1.39 sec)

In the same week, how many were using D6 signup at all:

SELECT count(pid) FROM project_usage_day WHERE pid = 29351 AND tid = 87 AND timestamp = 1253232000;
+------------+
| count(pid) |
+------------+
|       2481 |
+------------+
1 row in set (0.97 sec)

So, we've got 2272 / 2481 signup sites that use views, or 91.6%.

There's a *lot* of code in signup to provide (inflexible) fallbacks for various listings when views isn't enabled. It'd certainly make maintaining the code easier, and probably using the module more simple, if views was just a required dependency.

Thoughts?
-Derek

#1

dww - September 20, 2009 - 22:08

FYI: I started a poll about this on g.d.o in the "Event management systems" group: Should the signup module require the views module?...

#2

dww - September 22, 2009 - 07:37
Assigned to:Anonymous» dww
Status:active» needs review

On a whim, I wrote a patch to rip out all the non-views fallback code. Even with a DB update to fix a few variables, and edits to the documentation, the patch removes 491 lines and only adds 131. ;) This doesn't even count what we might win by converting admin/content/signup to a view over at #583196: Fix the admin/content/signup administration overview page to better handle signup limits and not suck so much ...

This is awfully tempting...

AttachmentSize
582986-2.signup_require_views.patch 35.34 KB

#3

dww - September 23, 2009 - 00:48

Oh, I should mention: unless you have VBO installed, this patch would entail a loss of some functionality at node/N/signups/admin. You need VBO if you want to be able to bulk cancel signups, etc. Of the 2481 sites using signup in the time period I'm querying, only 231 of them have VBO installed, so only about 9%. :( So, if we go this route, it might be worth a hook_requirements() check or something warning site admins to install VBO or check a checkbox to acknowledge they don't care or something...

#4

dww - September 27, 2009 - 02:49

Here's a perfect example of why the status quo sucks, and why I'd rather not spend any more time on the non-views case:

#589030: No 'Edit signup' link on the node/N/signups/admin tab

#5

dww - October 3, 2009 - 00:09

Here's another example of a related issue: #547758: exclude unpublished nodes from admin signup list

#6

dww - October 3, 2009 - 02:40
 
 

Drupal is a registered trademark of Dries Buytaert.