Coding best practices: Difference between revisions

Content deleted Content added
m Added link to software
Line 399:
 
=== Deployment ===
{{Main|
{{Main|Software deployment|Deployment environment}}
Deployment is the final stage of releasing an application for users. Some best practices are:<ref>{{Cite web|url=https://dzone.com/articles/7-application-deployment-best|title=7 Application Deployment Best Practices - DZoneDone DevOpsDevops|website=dzone.com}}</ref><ref>{{Cite web|url=https://lwn.net/Articles/562333/|title=The seven deadly sins of software deployment [LWN.net]|website=lwn.net}}</ref>
# Keep the installation structure simple: Files and directories should be kept to a minimum. Don’t install anything that’s never going to be used.
# Keep only what is needed: The [[software configuration management]] activities must make sure this is enforced. Unused resources (old or failed versions of files, source code, interfaces, etc.) must be archived somewhere else to keep newer builds lean.
Line 406:
# Adopt a multi-stage strategy: Depending on the size of the project, sometimes more deployments are needed.<ref>blog.fortrabbit.com/multi-stage-deployment-for-website-development</ref>
# Have a roll back strategy: There must be a way to roll-back to a previous (working) version.
# Rely on automation for repeatable processes: There's far too much room for human error, deployments should not be manual. Use a tool that is native to each operating system or, use a scripting language for cross-platform deployments.<ref>{{Cite magazine|url=https://www.wired.com/insights/2013/04/why-30-of-app-deployments-fail/|title=Why 30% of App Deployments Failfail|firstFirst=Victor|last=Cruz|magazine=Wired|date=April 3, 2013|via=www.wired.com}}</ref><ref>{{cite web| url = http://emphaticsolutions.com/2009/09/06/the-rules-of-software-deployment.html| url-status = dead| archive-url = https://web.archive.org/web/20100513054900/http://emphaticsolutions.com/2009/09/06/the-rules-of-software-deployment.html| archive-date = 2010-05-13| title = The rules of software deployment}} </ref>
# Re-create the real deployment environment: Consider everything (routers, firewalls, web servers, web browsers, file systems, etc.)
# Do not change deployment procedures and scripts on-the-fly and, document such changes: Wait for a new iteration and record such changes appropriately.