What goes on in an automated development workflow?
I’m sure you’re wondering what is an automated development workflow. It’s so vague, yet somehow, it sounds so promising and interesting.
Let me fill you in.
An automated development workflow is a set of pre-programmed commands that helps you simplify the tasks you do on a daily basis.
The key here is to make your computer do mundane, boring and repetitive things so you don’t have to do them.
These tasks can be things like:
- Updating a file whenever it is changed so you don’t have to run a command to update it.
- Refreshing the browser automatically when needed so you don’t have to alt-tab and hit the refresh button manually.
- Letting you know what errors you made in your code so you don’t have to spend hours in frustration trying to find out what went wrong.
- Letting you write modular code (even HTML) so you don’t have to update that god damned navigation five times whenever something needs to change.
- Testing code whenever a developer merges the code to a central repository to make sure that everything works well. If it’s doesn’t, you’ll know it before any of your customers does, and you can make the necessary changes before they even know it.
- Optimizing your CSS, JavaScript, images and running every optimization you need to make sure your website is wicked fast.
- Deploying your website with a single command so you can remove the anxiety from being afraid that you’ll mess up the deployment process you can in place.
- … and many more
Of course, this list is not exhaustive. You can go crazy and think of solutions that’ll help you automate even difficult tasks.
Here’s one example: Running ONE command to build PDF, ePub and Mobi versions of a book out of markdown files.
Crazy, isn’t it? Well, you’ll be pleased to hear that PDF, ePub and Mobi versions of Automating Your Workflow are created using this task!
Ahem. I know it’s exciting. Hold on to that excitement for now.
We’re going to learn about a six-part framework that’ll help you understand the process that goes into an automated development workflow so you have some ideas on the tasks you can do.
The Six Part Framework
There are six parts in a workflow. (I call them phases). They are:
- Scaffolding
- Development
- Testing
- Integration
- Optimization
- Deployment
Let’s go through them one by one.
Scaffolding is the phase where you prepare your project for development. This is where you create a git repository, prepare your files and folders, download and update libraries, setup servers and databases and other tasks.
The aim of automating scaffolding is to find ways to speed things up so you can begin work on your project as soon as possible.
Development is the phase where you write code for your project or website. This is the phase where you spend most of your time on.
Here are some things that come to mind when we think of automating development.
- Reducing the number of keystrokes and clicks
- Writing less code
- Writing code that’s easier to understand
- Speeding up the installation of libraries
- Speeding up the debugging process
- Switch between development and production environments quickly
- etc…
Many tools have sprung up over the years to help you out with these things, and we’ll cover them in detail in Automating Your Workflow.
Testing is just a nicer term for checking. In this phase you want to check for three things:
- check if your code works
- check if your code is formatted properly
- check if the code you’ve just written breaks anything else on your site.
The first objective of checking (checking if your code works), is done in conjunction with the development phase. It’s the part where you alt-tab to your browser to see if everything is working correctly. Here, you’d want to make sure you do everything to speed up the debugging process.
The second and third objectives (checking if your code is formatted properly, and if your code breaks any old code), can be done programatically, and hence, can be automated. We will go into more detail in Automating Your Workflow.
Integration is the phase where code from different developers is merged into a central repository. This usually involves pushing repos and merging git branches together.
There may be a possibility where the site breaks when a developer checks in new code, which in turn brings about a lot of panic and potential loss of revenue. You’d want to prevent the site from breaking as much as possible.
One way to do this is to run pre-written functionality tests whenever a developer tries to merge their code into the central repository. This process is known as continuous integration (CI), which we will cover in detail once again in Automating Your Workflow.
Optimization is the phase where you prepare your assets like images, CSS and JavaScript for use on the production server. Everything you do in this phase is to ensure that your code can be served up onto visitors’ browsers in the shortest amount of time.
When we talk about optimization, we usually think of these tasks:
- Minifying CSS
- Minifying and concatenating JavaScript
- Combining multiple images into a sprite
- Optimizing images and other assets
- Cachebusting assets
- Inlining Critical CSS
- …
There’s so much more we can talk about optimization, and we will cover them in detail in the book.
Deployment is the final phase in the workflow. This is where you push your code up to the server and allow your changes to be seen by the public.
A primal way of doing deployment is to FTP into the server, then copy and paste files that have changed. This requires a lot of effort and takes a long time.
When automating deployment, we want to think of ways where we can get new code up into the server without us manually looking for what has changed.
There are many ways of doing this and the method you choose should depends on how your team wants to work. Once again, we will go into more detail when you get into the book.
Phew.
That’s the 6 phases of a development workflow! There’s so much to cover within each of these phase that we can’t possibly finish everything in one email.
Well, that’s why I wrote Automating Your Workflow. It’s to help you learn and understand everything about workflows.
Before you pick up Automating Your Workflow, Take some time to think about these questions:
- What does your perfect workflow look like?
- What tasks would it run?
- What phases would it cover?
The more defined your answers are, the easier it is to set up the workflow you’ve been dreaming of.
Oh yes, please hit reply and let me know what the workflow of your dreams look like. I’m looking forward to helping you build this workflow! :)
Stay awesome,
Zell