[development] Views - a tool for developers?

Sean Robertson seanr at ngpsoftware.com
Wed Nov 21 15:02:36 UTC 2007

I'd strongly recommend the views module, as that enables you to combine 
your tables with data provided by other modules.  For example, my 
Forward module exposes it's statistics to views, so you could create a 
list of nodes with your modules fields sorted by the number of forwards, 
for example.  Also, if you ever intend to release your modules to the 
community, they'll be much more useful to other people if they are views 

Ryan Courtnage ☠ wrote:
> Hi all,
> We're developing an application with Drupal that requires that we
> create several custom modules.  Our modules use forms built with FAPI
> (not using CCK).
> Now we are at the point where we need to start presenting lists of our
> custom content in various forms.  Teaser lists, title-only lists in
> blocks, among others.  For creating these lists, we have 2 options:
> direct use of db_query or use the Views module.
> I can understand how Views is an indespensible module, especially for
> site admins building node-types with CCK. However, I'm a developer and
> have intimate knowledge of how Drupal's tables relate to eachother in
> our implementation.
> So here is my question.  Should we be making the effort to expose our
> custom modules' fields to Views, and then generate lists we want with
> the Views module?  Or should we just roll our own queries?  Is the
> primary benefit of Views to make query building easy for site admins?
> Is it the only benefit?  What do you do for your custom Drupal
> projects?
> TIA,
> Ryan

Sean Robertson
Web Developer
NGP Software, Inc.
seanr at ngpsoftware.com
(202) 686-9330

More information about the development mailing list