7. Interfaces should always have the suffix "Interface".
In the The Webel «!wrapper» @Components and «!analysis» @Interfaces recipe, interfaces are instead prefixed with a capital I followed by a CamelCase name like ICamelCase. This has many advantages:
- The 'I' acts like the Interface icon in UML and makes for much easier and more compact diagramming.
- It saves a massive amount of typing !
- It makes it much easier to prompt in IDEs and UML tools like MagicDraw UML on Interface elements, by just prompting on the 'I'. How on earth is one supposed to prompt on a suffix "Interface" ?
It has clearly been conceived by people who are likely not frequent graphical UML users, and are perhaps even relatively new to object-orientation. In modern IDE's like NetBeans or Eclipse and when using graphical UML support it is already perfectly clear whether something is an interface or not, one does not need to spell it out painfully with the word Interface. The UML-friendly OOE = Object Oriented Examples = One Of Each module will never, under any circumstances, adopt the verbose "Interface" suffix convention.
If you are likewise opposed to this convention, please join the debate at: Drupal.org: Object-oriented code (naming conventions): Please relax the verbose Drupal "Interface" suffix convention !
© Copyright 2001 - 2016 Webel IT Australia (ABN: 67 677 268 579). All rights reserved (except as specified below).
PHP code examples from Webel IT Australia on this site are distributed under the GNU General Public License.
Excludes text and code snippets from Drupal.org quoted for educational purposes.
Drupal’s online documentation is © 2000-2014 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0.
PHP code from Drupal.org is distributed under the GNU General Public License.
Drupal® is a registered trademark of Dries Buytaert.
Text quoted from Wikipedia for educational purposes is made available under the Creative Commons Attribution-ShareAlike License.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Site developed by Webel IT Australia.