Skip to content
Home » Blog Posts » Teach students to develop thin slices across relevant layers of the app

Teach students to develop thin slices across relevant layers of the app

Build thin vertical slices of the application to learn more quickly

In the previous post I wrote about possible ways to expand thin slices of the two sample applications. This week I want to explore one or two of those slices further to illustrate how each slice has a bit of each horizontal layer. Each slice should be like a layer cake: have a bit of the bottom, some of the middle, and a bit of the top layer too.

While students might think it’s better to expand each layer on its own, this slows down their progress. Building horizontal layers independently means the database people are working independently of the business logic people, who are only vaguely aware of the people building out the interface. Each should be working with someone from the other components together so that they can align on variable names, datatypes, and all of the other things they need to agree on in order for the parts of the feature to work together.

Layered cake cut into slices with one slice missing to show layers
Photo by Olga Petnyunene on Unsplash

The photo shows a layer cake with messy layers. This is probably normal for most applications. Some of the code for each layer leaks into the layer above and below a little bit. That’s not a problem. The important part is to try to keep the code separate as much as possible in its layer, and that it doesn’t jump from one layer over another layer. For example, you don’t want the visual front end to jump straight to the database layer. You want the front end layer to use the business logic layer to get the data that it wants to show.

Start small and grow the components

Teach students to start by building the smallest part of each layer so they know how the parts fit together. Then they can grow each component a little bit in each following slice.

For example, if the pizza store starts with only text and sends an email, then the following slices grow the business logic. We modify the page to add a form, which is connected to a method in the business logic, that adds a record in the database. Now people can pick toppings, or size of pizza.

Teach student to not start with the database. Teach them to only add the relevant table and columns that we need for this slice. It is easy to add columns, tables, or change columns, and remove tables by changing the schema and storing it in the git repository.

Similarly, as students expand the feature, they change other components too. The team mobs on this part together as a trio. There is no waiting on another pair, or team to get back to them. They do the work tougher and make the changes required and deploy the new version.

Teach the students to do these thin slices: add size of pizza, add toppings, add contact number for the order, etc in small slices. Do one small step at a time, make the commit, deploy, get feedback. Then move onto the next one.

The polar bears also grows slowly

The polar bear site needs the database in order to list the bears that were tagged. We can limit what we do to start the app, and expand the app by adding methods in the business logic. As we expand the logic, we also modify the navigation on the site, and how we display the bears.

A change in one layer requires a change in the others too. Again we show the students that the work goes smoother, and faster in a small mob of people: database, business logic, frontend.

We can start with showing only a few sample bears that are hardcoded into the html. Then we can connect the database and show real data. As we do that we now need to also add pagination so that we’re not showing too many bears at once. Pagination needs to be done in the business logic, and also shown in the frontend with page numbers.

If we change the logic to let us show a single bear, then we need to be able to query the data for one bear. This means changing the logic, and adding a new page to show this bear in the frontend. We should also modify the navigation so that we can go back to the list too.

Again we are only making small changes each time. We don’t do much with each change, but each is still a step forward.

Teach your students to develop their work in thin slices

You can cover this type of work in your classrooms in two ways. I tend to use both. It’s good to repeat things.

In the lecture theatre

On the one hand, you can do it in larger classrooms by asking students questions. Have them talk to the person next to them in a lecture. Give them a scenario: what’s the smallest site you can imagine to do x? Then give them time to think and discuss with their neighbour. Then compare their idea with that of another pair. Finally, ask them to share them with what you have. This should make some hidden assumptions visible, and aid their work.

In the practical session

On the other hand, talk to your teams in class. Ask them questions about how they’re doing their work. Ask questions that make them highlight their assumptions about what’s required. For example, you can always ask how the team has divided up the work, and then ask when is it merged together. Lastly, ask them when they mob on parts of the work. This should reveal some places where they might try some steps to speed up the feedback loops.

Always keep asking them these sorts of open ended questions, and they will slowly realise they need to collaborate more than they are now.


This post is part of a project pulling together my materials and ideas about Teaching Team Collaboration: the Human-Side of Software Development for software development to students.

If you’d like to be notified of future posts, then please sign up for more using the adjacent form. When you sign up, then I’ll send you a free copy of the collaboration rules as a PDF from the book. You can also follow me on LinkedIn

The ideas above are from my book 101+ Ideas to Improve Team Collaboration, which covers all of these little things that students can do to improve their collaboration.

Cookie Consent with Real Cookie Banner