[support] View vs. Module

Jamie Holly hovercrafter at earthlink.net
Fri Apr 18 22:00:14 UTC 2014


The list of reasons and that are enormous. A common one is that you get 
a view that does a horrible query and bogs down your database, so you 
decide to alter the query. Now you need a custom module for that, so why 
not go ahead and just do a custom module for whatever it is you're 
trying to produce?

I always weigh out the needs of the site I'm building and rather I need 
views or not. If they want something as simple as a couple latest nodes 
from X type in a block, then I'll just do a quick, custom module. Why 
put all the weight of views in there, for something I can do in a couple 
dozen lines of code? But if I detect that this is going to be a client 
that wants to constantly make changes and that, then I'll go ahead and 
throw views in there. Having said that, this part basically becomes moot 
in Drupal 8, since views is in core.

My best advice is look at the task at hand. If you're going to need a 
lot of custom views, then go ahead and use views. If you only need a 
couple of simple blocks, then Views is overkill, so long as you don't 
plan on changing things around a lot later. Of course if you do plan on 
changing things around, then you can covert your custom blocks to views 
relatively easy.

Jamie Holly
http://hollyit.net

On 4/18/2014 3:46 PM, Drupal wrote:
>
>> If the Views_UI module is not enabled, you won't see the menu item.
>
> You're right. Views_UI is not enabled. :-)
>
>
>
>
>> Using a module makes sense in some cases, Views in others.
>
> Could you please elaborate a little bit more about the "cases"? :-)
> What do you use and why? If you use both, when you use Views, when you 
> build a module?
>
>
>
>
>>
>>
>>     ------------------------------------------------------------------------
>>     *From:* Drupal <drupal at afan.net <mailto:drupal at afan.net>>
>>     **
>>     Hi to all,
>>     There is a website i nD7 handed over to me to continue to
>>     maintain. According what I saw in the admin area, looks  like the
>>     previous admin was using modules rather than views for blocks and
>>     pages.  What confused me is the view module is installed and
>>     activated but I can't see Views on the Structure page?!?
>>
>>     So, I would like to hear here (different) opinion about Vews vs
>>     modules.
>>     I found this, very helpful page
>>     https://drupal.org/node/904120 and this one
>>     https://drupal.org/node/242311 and I think I pretty got a
>>     picture, but I would like some more opinions.
>>
>> -- 
>> [ Drupal support list | http://lists.drupal.org/ ]
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20140418/da6c23a2/attachment-0001.html 


More information about the support mailing list