I would say these brief bulleted points could serve as the basis for a very interesting discussion not as the end all and be all. I wonder why people seem to be so very touchy / take offense without getting into a discussion of the ramifications of these very general guidelines. They are very helpful to me as an intermediate drupalero. Tony
On Thu, Sep 20, 2012 at 9:18 AM, Steve Kessler skessler@denverdataman.comwrote:
I would agree with Patrick overall. This is a good blog post for someone but not *commandments* for the communities.
I was going to let someone else say this but it is also based somewhat on opinion. There are best practices and coding guidelines but not commandments.
On Thu, Sep 20, 2012 at 10:00 AM, Patrick Avella me@patrickavella.comwrote:
I'm not a fan of this list, and if someone tried to push that on me here I'd be visibly upset. Some of the bullet points are good, maybe even great but:
- No PHP nodes.
- No PHP blocks. (A sample block module is available.)
If I want to use PHP to insert a value into a link, I will, and see no problem with that. This is left up to the developer, not all PHP code needs to be in a module. PHP filter is part of core. When used responsibly there is no reason to not use it if it fits budget/time/needs.
- Minimize PHP in Views.
Depending on the scope of the project, this can't always be enforced. Sometimes it's a lost more efficient to shove a little bit of PHP in a view than to have to recreate the view (and lose its support) from scratch in a module.
- Use Features for content types and views; and for other things
that lend themselves thereto. Commit these to Git repository. I don't understand the love for features. It only supports "some" important modules, and needs a host of other modules (UUID, strongarm) before it starts to become actually useful. Bloat, bloat, bloat.
- CSS is your friend, use it before programmatic or theme styling
as much as possible. No one is going to not tell me to not use the theme system. If I need to rearrange elements or make theme level changes, I will do so, and will not be told otherwise.
- Links, including menus, should use relative URLs.
This makes no sense. All menu links in drupal are absolute (they start at the domain root). It's a guideline where I work to never use relative URLs for files because they are not easily moved to new locations.
But I knew I wouldn't like this list as soon as I saw the word "commandments". These guidelines sound like a lot of personal preference, and not a lot of realistic "in the fox hole" programming.
Thanks, Patrick Avella
On Thu, Sep 20, 2012 at 11:35 AM, Steve Kessler skessler@denverdataman.com wrote:
Changing . htaccess is required in many cases. That is not hacking
core.
I like to comment out core when editing . htaccess and then add my
changes
with a comment about what they are for.
-Steve
On Thu, Sep 20, 2012 at 9:29 AM, Franz Iberl f.iberl@amazonas-box.de wrote:
Am 20.09.12 17:17, schrieb Walt Daniels:
Unfortunately hacking core, in particular .htaccess, is not optional
on
some servers.
Adapting .htaccess I do not consider as hacking core.
Servus Franz -- [ Drupal support list | http://lists.drupal.org/ ]
-- Steve Kessler Owner and Lead Consultant Denver DataMan, LLC 303-587-4428
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Steve Kessler Owner and Lead Consultant Denver DataMan, LLC 303-587-4428
-- [ Drupal support list | http://lists.drupal.org/ ]