Blog

How to Craft a Feature the Right Way

Placeholder Avatar
Lucas Caton
March 27, 2019

The Problem

There are two key processes that developers often struggle with when implementing project features: Planning and Deliverables.

Planning

Before touching the codebase, it is important to create a development plan since this will be our guide to developing the feature. This plan should contain any notes as well as an approach for solving each feature section.

Let’s Plan a Feature Together

Say our client is asking us to implement multi-tenancy into a brand new application where we need to be able to register, login and use a dashboard. Multi-tenancy is an architecture in which a single instance of a software application serves multiple customers or accounts. Each customer or account is called a tenant.

Slack is a great example of multi-tenancy. Each account has its own subdomain which you use to register, login and scope the data for each account. Multi-tenancy is quite complex, so we need to split this requirement into multiple features (stories) and create an epic. We will need to make the registration feature, the login feature and the rest of our app to work in this fashion.

  • EPIC: Multi-tenancy
  • Story: Registration
  • Story: Login
  • Story: Dashboard

Let’s write the details for each story (feature):

Registration Feature

Tasks:

  1. As a user I should be able to register using my account name, full name, email and password.
  2. Each account should have it’s own sub-domain.
  3. After submitting the registration form I should receive a confirmation email.
  4. By clicking the confirmation link my account should be confirmed and I should be asked to login before being able to use the application.

In this example, there is a list of tasks that could take some time to implement. I highly recommend you to convert these tasks into new stories for example points 2 and 4 are great candidates. Here is why: From the client perspective it allows them to see some progress instead of waiting for the whole registration feature to be fully completed.

From the developer perspective it allows you to deliver results sooner, but also helps you in thinking how to refactor the code you just implemented at the next opportunity. It also helps while reviewing the feature pull request. Because there is less code to review, it becomes easy to spot mistakes and write fixes.

Login Feature

  1. As a user I should be able to login as a registered user using my account name, email and password.
  2. After submitting the login form I should be redirected to my account dashboard.

Dashboard Feature

  1. As a user in session I should be able to see the account dashboard by default.
  2. My account dashboard should include the account subdomain in the URL.
  3. My account dashboard should display my account data.

Point 3 looks like a new story since we need to know what data will be displayed, also we need to plan how to scope this data by the account. This will take some time.

Deliverables

We could say each of the stories is a deliverable so, right after merging and deploying our story, the client will be able to see your changes in action. Ideally you should deliver as much as possible per day. The better you plan, the quicker you can deliver.

Keep in mind that a deliverable is something the client can actually test. So make sure you let the client know how to test the deliverable, you can also test the deliverable with the client and guide them through the feature.

Tips and Advice

Knowing how to code is not enough anymore. To be a successful engineer, you also need planning skills among others. Work on those skills to become more productive for your team. Divide and conquer: Split a requirement into multiple steps to easily achieve the goal.

Final Thoughts and Next Steps

You can apply this technique to your life and tackle big problems. I encourage you to give it a try and share the results.