Some advice on best practice..
Is it better to use modules specific to a task even when another module that's needed anyway can achieve the same result?
Here is what I mean.. I currently have a site that uses "Login Destination" and "Rules".. "Rules" can do the same thing, redirecting users to a page on login.. So in this scenario and others like it would it be better to remove "Login Destination" and just create a rule to do what's needed?
TIA
Wipe_Out wrote:
Some advice on best practice..
Is it better to use modules specific to a task even when another module that's needed anyway can achieve the same result?
Here is what I mean.. I currently have a site that uses "Login Destination" and "Rules".. "Rules" can do the same thing, redirecting users to a page on login.. So in this scenario and others like it would it be better to remove "Login Destination" and just create a rule to do what's needed?
It's your choice. The more modules the greater the overhead and the longer it may take to execute a page request.
Short answer: It depends.
Long answer: Some modules provide functionality for one-off tasks (i.e. Login Destination) and other modules are toolkits that don't do anything immediately out-of-the-box but provide a framework for larger goals (i.e. Rules, CCK, Views, etc). Sometimes the former are a better choice because they are simple and lightweight; sometimes the latter are a better choice because they provide much richer functionality that will be used elsewhere. Depending on what sort of site you are building, either could work, you just have to make a decision about the larger architectural goals of the site.
In your example: if you feel like Rules are useful and you'll be using them elsewhere, you might as well use Rules for everything -- that way you know the functionality for things like redirects are all in one place.
Keep in mind: You can always refactor. We make the best decisions we can at the time in anticipation of what's next, but sometimes we have to make changes down the road due to changing requirements or new technology, or we just see a better way to do it for usability's sake. That's OK, and this exploration and refactoring is just part of the job. You'll be a better developer for knowing the advantages and disadvantages of the methods.
Carl Wiedemann Website design and development consulting carl.wiedemann@gmail.com | skype: c4rlww
In addition to what Carl said:
On 10/11/11 09:49 +0000, Wipe_Out wrote:
Some advice on best practice..
Is it better to use modules specific to a task even when another module that's needed anyway can achieve the same result?
i like to use as few modules as possible, because it reduceѕ the maintenance burden, makes upgrades easier (especially if you need to upgrade to a new drupal version in the distant future), less likely to be side effects (like incompatible modules) and can make the site run faster. So there have to be good reasons for me, to use an additional module, if what I want can be achived with existing frameworks.
Here is what I mean.. I currently have a site that uses "Login Destination" and "Rules".. "Rules" can do the same thing, redirecting users to a page on login.. So in this scenario and others like it would it be better to remove "Login Destination" and just create a rule to do what's needed?
If you need rules anyway and they do what you need, use rules.
regards Rolf
On 10 November 2011 12:32, Rolf Kutz rk@vzsze.de wrote:
In addition to what Carl said:
Thanks Carl and Rolf.. Great answers!!
Just confirmed my thought process was on the right track..
Thanks again..