How do you eat a whole cake?
Nobody bakes a wedding cake in one step. There is the sponge, the filling, the icing and the stand. Each part has its own recipe and its own problems.
An app is the same. "Build a help desk" is far too big to start. You break it into small problems, and then you solve them one by one.
Key words
| Word | What it means | Example |
|---|---|---|
| Decomposition | Breaking a big problem into smaller ones. | |
| Requirement | Something the app must do or be. | |
| User story | A requirement written as who wants what, and why. | |
| Front end | The part of the app the user sees and clicks. | a form |
| Back end | The part on the server that stores data and applies the rules. | |
| Database | An organised store of data. | the tickets table |
| Validation | Checking that input is sensible before it is used. |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can break a Netheret user story into front-end and back-end problems.
Starter: last lesson
Have a go
Starter: last lesson
3 questionsDecomposition goes from the whole to the parts
Start at the top with the whole app. Split it into the six epics (big areas of work). Split each epic into its user stories. Then split each story into the problems you must solve to build it.
Stop when a problem is small enough to build and test in one go. That is about the size of one small piece of code or one page.
From the app down to problems
flowchart TD
app[Netheret help desk app] --> e1[E1 Accounts]
app --> e2[E2 Support requests]
app --> e3[E3 On-site jobs]
app --> more[E4, E5, E6]
e2 --> s1[E2.1 Raise a request]
e2 --> s4[E2.4 Escalate a tier]
s1 --> p1[Show the form]
s1 --> p2[Check the input]
s1 --> p3[Make the reference]
s1 --> p4[Save the request]
s1 --> p5[Show it was received]
Check: the tree
Have a go
Check: the tree
3 questionsEvery problem sits on one side
The app has two sides. The front end runs in the browser: forms, buttons, pages. The back end runs on Netheret's server: it checks input, applies the rules and stores data in the database.
Data passes between them. A form sends the input to the server. The server sends back a page. The task wants a solution with real work on both sides, so show both.
Worked example: decomposing E2.1 Raise a request
| Problem | Side | In | What happens | Out |
|---|---|---|---|---|
| Show the form | Front end | A signed-in customer | Draw title, description and category boxes, each with a label | The form |
| Check the input | Both | The form data | Title 5 to 100 characters, category from the list | Clear error messages, or carry on |
| Make the reference | Back end | The last ticket number | Add 1 and write it as NTH-0001 | A new reference |
| Save the request | Back end | Checked data and reference | Store it with status new and tier 1 | A saved ticket |
| Show it was received | Front end | The saved ticket | Show the reference and a link to track it | A thank-you page |
The cells students fill in are left blank in this preview.
A common mistake
Warning
Many students think decomposition is a list of pages. A list of pages misses most of the work. Behind each page are rules and stored data: making a reference, checking who may see a request, saving a change. List those back-end problems too.
Check: front end or back end?
Have a go
Check: front end or back end?
3 questionsYour turn: decompose epic E3
Finish this decomposition of epic E3 On-site jobs. Add the five stories: schedule a job, assign an engineer, job brief, my schedule, mark progress. Under each story add two to four problems. Label each problem (front end), (back end) or (both). One problem to include: stop one engineer being booked for two jobs at the same time.
flowchart TD
e3[E3 On-site jobs] --> s1[E3.1 Schedule a job]
s1 --> p1[Show the job form: front end]
s1 --> p2[Check the engineer is free: back end]
Make a free account to save your work, or press Start lab to work through the whole lesson.
Non-functional requirements need decomposing too
A non-functional requirement sounds like one line. It still hides problems you must solve.
"A customer sees only their own company's requests" means every request page checks the role. Every list of requests is filtered by the customer's company. A guessed address must be refused.
Break each one down the same way as a story.
Worked example: two non-functional requirements
| Requirement | Problems to solve |
|---|---|
| A customer sees only their company's requests | Check the role on each page. Filter lists by company. Refuse a request that belongs to another company. |
| Text can be made larger | Save a text size on the user. Read it on every page. Apply a larger size in the CSS. |
The cells students fill in are left blank in this preview.
Match each requirement to a problem
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Exit quiz
Have a go