Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
When I built my first website, I remember I had only a few files and a couple of folders in my development project. These were mostly single-page websites, everything was neat and quickly accessible. Later on, I started building websites with their own content management system (CMS), containing hundreds of files, from markup to scripts, libraries and stylesheets, to different sorts of media files, back-end services, and more. How do we organize and properly maintain larger projects?
At first, I had no clue how to structure an architecture that can adapt fluently to changes and future updates. I didnât yet understand how everything works, so I automatically thought that setting up a performant website was very complicated. In fact, the more I searched on the Internet, the more I was discouraged to move forward. I kept hearing about new frameworks and about new techniques, and tons of other methods that different web developers persisted that I should use as well. Instead of confirming what I thought is clean, simple, and right, I was confronted with many buzz words that I didnât yet understand or heard of. From my research, by reading quality books and well-curated articles, I noticed that I didnât know if what I choose would be the right decision, and I kept insisting with myself that I wasnât ready yetâââor so I thought. I was wrong.
The problem is that right or wrong doesnât exist in web development, it is not defined in some Internet âmasteryâ book. The core architecture and the development structure of every website can differ completely from one another, but the basic construction of a website is very simple and straightforward. Different web browsers and web servers work in their own unique ways, and your challenge will always be to keep testing your products against new updates that might affect your website on these platforms. Browser vendors, network protocols, and web serversâââas long as your website plays nicely around these three technologies, you can literally do whatever you want. At the same time, this doesnât mean that certain standards and methodologies do not exist. As years passed by, web developers have come up with a few methods and techniques that paved their way as the industry standard. This is because they make technical sense, and following these defined and robust methods can help you build a proper structure and an architecture that you can easily maintain and adapt.
In this chapter, weâll be looking at various ways web developers apply strategic methods to continue improving their web development workflow, and to easily keep their websites updatable and future maintainable. Setting up the right workflow is also very crucial to reach the best productive outcome, and whether we talk about the front-end presentation or the back-end services, everything starts from the local environment you set up on your personal computer. Thatâs what weâll start talking about first.
Creating a robust local environment
When you design and develop your website, you should always try to apply the same behavior on your local development environment to match that of the live web server you will use. This will range, for example, from the type of web server you choose (e.g. the Apache HTTP version) to the back-end language version that you have installed on both your remote server and your local computer. By using this method, you can heavily reduce the chance that something will go wrong once you publish your website live. Itâs usually also crucial that if the project is a long-term project, you keep notice that if some updates are done on the server, you apply the same updates on your local environment before you start any work. This lets you revisit the project several years later, apply certain updates or patches, and deploy to the live server resting assured that you donât break the live production.
Some web developers recommend that you install a virtual machine (VM) for every individual project on your computer, so that it behaves the same as your live server. While this is a powerful and versatile solution, the downside is that it will drain the resources of your host machineâââyour computer. My own preferred way of dealing with this was to always have a staging (testing ground) version of the website on the live server.
This means that if a project I worked on was running live on the URL âexample.comâ, I created a sub-domain with âtest.example.comâ, and I deployed the updates on the staging area first to make sure that nothing breaks. This can be in any other directory, as long as it runs on the same server environment. Personally, this gave me the right confidence to deploy any changes or updates on the live server, as from my experience, your local environment will never behave the exact same way, even if you think so.
If you keep this in mind from the very start, youâll be able to apply the right strategies, since the way you structure your website on your local environment will be the same way youâll have to maintain the structure of your production version running on your server. The simpler the structure of your local environment is, the easier it will be to maintain both. For now, keep in mind that you will always have two environments of the same development, one living on your local computer, and the other on the web server.
This article is a section taken from Chapter 4 of the eBook âMastering Web Developmentâ. If you would like to read more, you can also download the free Sample Chapter from the website here.
Thank you for reading!
I would really love to hear your comments and thoughtsâââcritics are always welcome around here too. Which are some of the best strategies you use to maintain a proper development workflow?
Until next time,
P.S. Follow me here or join my newsletter if you want to keep learning the crucial secrets of web development.
Previously from Owen Far:
How do we setup a proper development workflow? was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.