Skip to main content
Copy edited (e.g. ref. <http://en.wikipedia.org/wiki/Uniform_resource_locator>, <http://en.wikipedia.org/wiki/JQuery>, and <http://en.wikipedia.org/wiki/PHP>).
Source Link
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (jsJavaScript, cssCSS, and images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin urlURL articles/adminhtml_articles/index. Right admin urlURL admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the adminsadministrators.
  17. Do not add an other jsanother JavaScript framework (jqueryjQuery, MooTools, ..etc.) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time, use Chaos Monkey.
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use phpPHP short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites websites are built in English and the identification of texts to translate translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, MooTools, ...) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are built in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (JavaScript, CSS, and images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin URL articles/adminhtml_articles/index. Right admin URL admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the administrators.
  17. Do not add another JavaScript framework (jQuery, MooTools, etc.) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time, use Chaos Monkey.
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. Do not use PHP short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are built in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
Bounty Ended with 100 reputation awarded by sv3n
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
Source Link
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, MooTools, ...) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are built in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this questionthis question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, MooTools, ...) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are built in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, MooTools, ...) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are built in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
coreected spelling, fixed grammer
Source Link
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for nginxNginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, mootoolsMooTools, ...) if it's not necessary. Write you code in the prototype.
  18. Make you template htmlHTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website onto different environments.
  20. Test youyour extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are buildbuilt in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested onin what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, mootools, ...) if it's not necessary. Write you code in prototype.
  18. Make you template html W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website on different environments.
  20. Test you extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are build in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested on what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
  1. Always develop with error_reporting on.
  2. Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  3. If the extension is linked to a core functionality add the dependency in the declaration file <depends><Mage_Catalog /></depend>
  4. If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  5. Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  6. Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  7. Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_articles
  8. Put your static resources (js, css, images) in a similar folder as the template files easylife_articles/images/doh.png
  9. Attach a simple text file with how to uninstall the extension: What files need to be removed, what tables need to be dropped, what config settings need to be removed from core_config_data table.
  10. Do not write queries directly in models, blocks or helpers, use a resource model for that.
  11. Do not write queries using the table names directly Select * from sales_flat_order where .... Use a Zend_Select and transform the table names using ->getTable('sales/order').
  12. Use the base url to include js files in template. Wrong <script type="text/javascript" src="../js/some.js"></script>. Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
  13. Do not rewrite classes unless is necessary. Use observers and if it's not possible to use helper methods that receive as parameter and instance of a class that you wanted to override. Wrong: Override Mage_Catalog_Model_Product to add the method getProductArticles(). Right. In your helper add getProductArticles(Mage_Catalog_Model_Product $product)
  14. If you override classes put a list of them in a readme.txt file
  15. Use the default admin path for the admin section of your module. Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
  16. Add ACL for your admin sections. I may want to restrict access to some of the admins.
  17. Do not add an other js framework (jquery, MooTools, ...) if it's not necessary. Write you code in the prototype.
  18. Make you template HTML W3C valid (this is for OCD developers like myself).
  19. Do not put images in the media folder. Use skin. The media folder usually is not versioned and this makes it harder to move the website to different environments.
  20. Test your extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
  21. Test your extension with cache on and cache off.
  22. Avoid using uppercase letter in the module and class names. If not properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
  23. Dispatch events in your code to make it easier for developers to alter the functionality.
  24. Follow the same coding standards that Magento uses and comment your code.
  25. [Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
  26. Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all websites are built in English and the identification of texts to translate is time consuming.
  27. If you sell an extension offer at least basic support. Or at least answer the support e-mails you receive.
  28. Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time). (Inspired by this question)
  29. Develop with the log activated and from time to time take a look at the var/log/system.log file. The errors listed here are not shown even with developer mode on. If there is at least one error you end up with a large log file after a few months of running the extension.
  30. If your extension affects the checkout process or the orders in some way, make sure it works with multi-shipping, or if it shouldn't work with multi-shipping, make sure it doesn't affect it.
  31. Do not replace the default Admin Notification bar (or feed URL). If I'm interested in what you have to offer I will subscribe to your newsletter. Let me see what Magento has to say. It's more important to me.
  32. If you encrypt your code files with Ioncube (or something else)...well...I just hate you and I hope your business goes bankrupt
edited body
Source Link
sergio
  • 407
  • 5
  • 14
Loading
corrected spelling
Source Link
Loading
fixed typo in sentence: "the identification of texts to translate it's time consuming" to "the identification of texts to translate is time consuming"
Source Link
Darren Felton
  • 1.3k
  • 11
  • 18
Loading
Format improved
Source Link
Elavarasan
  • 888
  • 1
  • 11
  • 27
Loading
added 19 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 142 characters in body; Post Made Community Wiki
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
additional info
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 208 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
new line.
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 319 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
new suggestion
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 112 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 39 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
additional steps
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 102 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
added 2 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833
Loading