{"id":554,"date":"2014-11-19T06:59:49","date_gmt":"2014-11-19T06:59:49","guid":{"rendered":"http:\/\/webcircle.com.au\/blog\/?p=554"},"modified":"2024-06-28T09:13:14","modified_gmt":"2024-06-28T09:13:14","slug":"understanding-dos-donts-magento-web-development","status":"publish","type":"post","link":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/","title":{"rendered":"Understanding The Do\u2019s and Don\u2019ts of Magento Web Development"},"content":{"rendered":"\n<p>Magento is a boon, no doubt. Right from versatile content management to streamlined third-party integrations, it has almost everything that you, as the potential owner of an online store, can ask for. And apparently, all you need to do is to look for someone who knows <a href=\"https:\/\/webcircle.com.au\/magento-web-development.html\"><strong>Magento web development<\/strong><\/a> inside out, and can help you go viral with whatever it is that you offer. Or maybe not! Using this oh-so-great platform to your advantage calls for much more than simply hiring a web developer \u2013 it calls for a better understanding of what works and what doesn\u2019t!<\/p>\n\n\n\n<h2><strong>Do\u2019s<\/strong><\/h2>\n\n\n\n<p>Here\u2019s what a Magento website developer should ideally stick to:<\/p>\n\n\n\n<h3><strong>Keeping Overriding To a Minimum<\/strong><\/h3>\n\n\n\n<p>Given the fact that the developers have several tools at their disposal, including event listeners and helpers, they should preferably refrain from overriding the core classes, at least for the purpose of forming some of their own. Furthermore, if they can keep the overriding in check, they also do not risk engaging into the typical extension-third-party-add-on conflicts.<\/p>\n\n\n\n<h3><strong>Using the Better Alternative(s)<\/strong><\/h3>\n\n\n\n<p>If and when they need to schedule tasks, Magento developers must do so with the help of Cron jobs. It\u2019s a good practice to not to use <a href=\"http:\/\/en.wikipedia.org\/wiki\/Daemon_(computing)\">Daemons<\/a> for this purpose, and rather take advantage of the cron.php file. Similarly, when they are not sure whether to load multiple models separately or load them all at once using a single SQL query, it is highly recommended that they choose the latter, more so because the former is likely to slow down the code.<\/p>\n\n\n\n<h3><strong>Following the Protocols for Mobile Sites<\/strong><\/h3>\n\n\n\n<p>Mobile sites must be considered separate from their desktop counterparts, at least for the purpose of development. On that note, it is important that the developers:<\/p>\n\n\n\n<ul>\n<li>only use optimised templates<a href=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/1.jpg\"><img decoding=\"async\" loading=\"lazy\" width=\"603\" height=\"50\" class=\"aligncenter wp-image-555 size-full\" src=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/1.jpg\" alt=\"1\" srcset=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/1.jpg 603w, https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/1-300x24.jpg 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/a><\/li>\n<\/ul>\n\n\n\n<ul>\n<li>and incorporate images by following the relevant conventions<a href=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/2.jpg\"><img decoding=\"async\" loading=\"lazy\" width=\"570\" height=\"76\" class=\"aligncenter wp-image-556 size-full\" src=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/2.jpg\" alt=\"2\" srcset=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/2.jpg 570w, https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/2-300x40.jpg 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/li>\n<\/ul>\n\n\n\n<h3><strong>Minimising the Execution Time<\/strong><\/h3>\n\n\n\n<p>Time is money; the developers should try and save all they can. For instance, if they need a specific result set, they should not use \u201cfetchAll ()\u201d, unless it\u2019s absolutely necessary. Better still, if they resort to the fetch () method, they can easily cut down on the execution time. Likewise, when they need to count the size of an array, they have 2 options to choose from:<\/p>\n\n\n\n<ul>\n<li>Doing it on each iteration<\/li>\n<\/ul>\n\n\n\n<ul>\n<li>Doing it outside the loop<\/li>\n<\/ul>\n\n\n\n<p>The former can be a bit time-consuming, especially if the array contains quite a few items.<\/p>\n\n\n\n<h2><strong>Don\u2019ts<\/strong><\/h2>\n\n\n\n<p>These are some of the practices that are better avoided:<\/p>\n\n\n\n<h3><strong>Modifying the Core Files<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft is-resized\"><a href=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/3.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/3.jpg\" alt=\"Modifying the Core Files\" class=\"wp-image-557\" width=\"250\" height=\"180\"\/><\/a><\/figure><\/div>\n\n\n<p>When customising a Magento store to meet a client\u2019s individual requirements, many developers may be tempted to modify the core files. The question is: should they? NO! That\u2019s because modification may render these files useless at a later stage, when the client decides to migrate to a newer version of Magento. Instead, they should try and create a local copy of each of the core files, and then proceed with customisation.<\/p>\n\n\n\n<h3><strong>Keeping the Cache Enabled<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright is-resized\"><a href=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/4.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/4.jpg\" alt=\"Keeping the Cache Enabled\" class=\"wp-image-558\" width=\"310\" height=\"139\"\/><\/a><\/figure><\/div>\n\n\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Cache_(computing)\">Cache<\/a> is a two-edged sword, one that a good Magento website developer should always handle with care. Yes, the cache does come in handy, but only in the production environment. If and when it is left enabled during the development phase, the developer may have a hard time taking a second look at any of the updates done on the website. Chances are that the cached version will still be on display. So, it is better to disable the cache first:<\/p>\n\n\n\n<h3><strong>Retrieving Redundant Data<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft is-resized\"><a href=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/5.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/5.png\" alt=\"Retrieving Redundant Data\" class=\"wp-image-559\" width=\"221\" height=\"195\" srcset=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/5.png 468w, https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/5-300x264.png 300w\" sizes=\"(max-width: 221px) 100vw, 221px\" \/><\/a><\/figure><\/div>\n\n\n<p>Anybody who undertakes web development should play it safe, but that doesn\u2019t mean they should go ahead and retrieve an entire collection of data, even when they just need a couple of items. This can be a huge mistake, which can only be prevented if the Magento developer is smart enough to apply a limitation to the collection query.<\/p>\n\n\n\n<p>It is imperative for a Magento web developer to realise that every collection is a query, and that if there\u2019s one in a loop, it will eventually play spoilsport. Therefore, all such collections, i.e. the ones that are inside a loop, must be dealt with at the earliest, or they may slow down the website.<\/p>\n\n\n\n<h3><strong>Removing Generic Blocks<\/strong><\/h3>\n\n\n\n<p>A developer must understand that what \u201ccan\u201d be done may not always be the same as what \u201cshould\u201d be done. For instance, when using Magento, they can delete generic blocks from XML layouts, but that doesn\u2019t mean they should. Such blocks are of great use to third-party extensions, and if deleted, may interfere with their working.<\/p>\n\n\n\n<p>Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of web development, with Magento being no exception. A documented code is not only easy to work with, especially when faced with a problem, but also enables another <a href=\"https:\/\/webcircle.com.au\/magento-web-development.html\"><strong>Magento developer<\/strong><\/a> to take over, without any difficulty.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento is a boon, no doubt. Right from versatile content management to streamlined third-party integrations, it has almost everything that you, as the potential owner of an online store, can ask for. And apparently, all you need to do is to look for someone who knows Magento web development inside out, and can help you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3639,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[37,57,111],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Do\u2019s and Don\u2019ts of Magento Web Development<\/title>\n<meta name=\"description\" content=\"Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of Magento Web Development.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Do\u2019s and Don\u2019ts of Magento Web Development\" \/>\n<meta property=\"og:description\" content=\"Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of Magento Web Development.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Web Circle\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-19T06:59:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-28T09:13:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/Magento-Web-Development-dos-and-dont.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mr. Tanuj Rastogi\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mr. Tanuj Rastogi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/\",\"url\":\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/\",\"name\":\"Do\u2019s and Don\u2019ts of Magento Web Development\",\"isPartOf\":{\"@id\":\"https:\/\/webcircle.com.au\/blog\/#website\"},\"datePublished\":\"2014-11-19T06:59:49+00:00\",\"dateModified\":\"2024-06-28T09:13:14+00:00\",\"author\":{\"@id\":\"https:\/\/webcircle.com.au\/blog\/#\/schema\/person\/b4c7636d31a9e229812785911966dd57\"},\"description\":\"Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of Magento Web Development.\",\"breadcrumb\":{\"@id\":\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/#breadcrumb\"},\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webcircle.com.au\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding The Do\u2019s and Don\u2019ts of Magento Web Development\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webcircle.com.au\/blog\/#website\",\"url\":\"https:\/\/webcircle.com.au\/blog\/\",\"name\":\"Blog - Web Circle\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webcircle.com.au\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-AU\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/webcircle.com.au\/blog\/#\/schema\/person\/b4c7636d31a9e229812785911966dd57\",\"name\":\"Mr. Tanuj Rastogi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\/\/webcircle.com.au\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9fd812bc4bf39f3711dbe14c01d0e728?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9fd812bc4bf39f3711dbe14c01d0e728?s=96&d=mm&r=g\",\"caption\":\"Mr. Tanuj Rastogi\"},\"url\":\"https:\/\/webcircle.com.au\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Do\u2019s and Don\u2019ts of Magento Web Development","description":"Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of Magento Web Development.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/","og_locale":"en_US","og_type":"article","og_title":"Do\u2019s and Don\u2019ts of Magento Web Development","og_description":"Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of Magento Web Development.","og_url":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/","og_site_name":"Blog - Web Circle","article_published_time":"2014-11-19T06:59:49+00:00","article_modified_time":"2024-06-28T09:13:14+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/webcircle.com.au\/blog\/wp-content\/uploads\/2014\/11\/Magento-Web-Development-dos-and-dont.jpeg","type":"image\/jpeg"}],"author":"Mr. Tanuj Rastogi","twitter_misc":{"Written by":"Mr. Tanuj Rastogi","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/","url":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/","name":"Do\u2019s and Don\u2019ts of Magento Web Development","isPartOf":{"@id":"https:\/\/webcircle.com.au\/blog\/#website"},"datePublished":"2014-11-19T06:59:49+00:00","dateModified":"2024-06-28T09:13:14+00:00","author":{"@id":"https:\/\/webcircle.com.au\/blog\/#\/schema\/person\/b4c7636d31a9e229812785911966dd57"},"description":"Some dos and don\u2019ts, including documentation, must be paid heed to, while undertaking any sort of Magento Web Development.","breadcrumb":{"@id":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/#breadcrumb"},"inLanguage":"en-AU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webcircle.com.au\/blog\/magento-web-development\/understanding-dos-donts-magento-web-development\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webcircle.com.au\/blog\/"},{"@type":"ListItem","position":2,"name":"Understanding The Do\u2019s and Don\u2019ts of Magento Web Development"}]},{"@type":"WebSite","@id":"https:\/\/webcircle.com.au\/blog\/#website","url":"https:\/\/webcircle.com.au\/blog\/","name":"Blog - Web Circle","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webcircle.com.au\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-AU"},{"@type":"Person","@id":"https:\/\/webcircle.com.au\/blog\/#\/schema\/person\/b4c7636d31a9e229812785911966dd57","name":"Mr. Tanuj Rastogi","image":{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/webcircle.com.au\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9fd812bc4bf39f3711dbe14c01d0e728?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9fd812bc4bf39f3711dbe14c01d0e728?s=96&d=mm&r=g","caption":"Mr. Tanuj Rastogi"},"url":"https:\/\/webcircle.com.au\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/posts\/554"}],"collection":[{"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/comments?post=554"}],"version-history":[{"count":8,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/posts\/554\/revisions"}],"predecessor-version":[{"id":2153,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/posts\/554\/revisions\/2153"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/media\/3639"}],"wp:attachment":[{"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/media?parent=554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/categories?post=554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webcircle.com.au\/blog\/wp-json\/wp\/v2\/tags?post=554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}