James Williams
Birmingham Newman University
jwilliams@staff.newman.ac.uk
3-hour session • 2 parts • 2 team tasks
30 minutes: Lecture on architecture patterns and system design
45 minutes: Task 1 - Design team system architecture
15 minutes: Break
30 minutes: Guidance on implementing first component
45 minutes: Task 2 - Build Sprint 1 feature
15 minutes: Standup and blocker discussion
┌─────────────────┠HTTP/REST ┌─────────────────â”
│ │ ◄─────── Request ────────► │ │
│ CLIENT │ │ SERVER │
│ (Frontend UI) │ ◄─────── Response ───────► │ (Backend API) │
│ │ │ │
└─────────────────┘ └────────┬────────┘
│
â–¼
┌──────────────â”
│ DATABASE │
└──────────────┘
Client (React): Product browsing, cart management, checkout UI
Server (Node.js/Express): Product API, user authentication, order
processing
Database (PostgreSQL): Products, users, orders
// Client: Fetch products from server
async function getProducts() {
const response = await fetch('http://api.example.com/products');
const products = await response.json();
return products;
}
// Server: Product API endpoint
app.get('/products', async (req, res) => {
const products = await db.query('SELECT * FROM products');
res.json(products.rows);
});
┌─────────────────â”
│ API GATEWAY │
└────────┬────────┘
│
┌───────────────┼───────────────â”
│ │ │
┌─────▼─────┠┌────▼────┠┌─────▼─────â”
│ Web │ │ Mobile │ │ Partner │
│ Client │ │ App │ │ API │
└───────────┘ └─────────┘ └───────────┘
┌─────────────────────────────────────â”
│ Presentation Layer (UI) │
├─────────────────────────────────────┤
│ Application Layer (Business) │
├─────────────────────────────────────┤
│ Data Access Layer (Database) │
├─────────────────────────────────────┤
│ Database │
└─────────────────────────────────────┘
┌──────────────â”
│ API Gateway │
└──────┬───────┘
┌───────────────┼───────────────â”
│ │ │
┌──────▼──────┠┌─────▼─────┠┌──────▼──────â”
│ User │ │ Product │ │ Order │
│ Service │ │ Service │ │ Service │
└──────┬──────┘ └─────┬─────┘ └──────┬──────┘
│ │ │
┌──▼──┠┌──▼──┠┌──▼──â”
│ DB │ │ DB │ │ DB │
└─────┘ └─────┘ └─────┘
For Your Projects: Start with monolith (one server). Microservices add complexity.
┌──────────┠┌──────────┠┌──────────┠┌──────────â”
│ Data │───►│ Clean/ │───►│ ML │───►│ Serve │
│ Ingest │ │Transform │ │ Model │ │ Results │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
Ingest: Collect tweets via API
Transform: Clean text, tokenize
Model: Run sentiment classification
Serve: Dashboard displays results
┌─────────────â”
│ VIEW │ (UI - displays data)
└──────┬──────┘
│
┌──────▼──────â”
│ CONTROLLER │ (Logic - handles events)
└──────┬──────┘
│
┌──────▼──────â”
│ MODEL │ (Data - business objects)
└─────────────┘
| Project Type | Recommended Pattern | Why |
|---|---|---|
| Web App with DB | Client-Server + Layered | Clear separation, team can split frontend/backend |
| Mobile + Web App | API-First | Single backend serves multiple clients |
| ML/Data Science | Data Pipeline | Natural flow from data to insights |
| Simple CRUD App | MVC Monolith | Simple, everything in one codebase |
Proves: Auth works, database connected, frontend/backend communicating
Proves: Pipeline works end-to-end, model integrated successfully
Time: 45 minutes
Deliverable: Architecture diagram + MVS scope document (save in docs/architecture.md)
Take a break. When you return, you'll start building!
Next: Part B - Sprint 1 Build
Registration, login, JWT tokens, protected routes
Good because: fundamental to most apps, tests full stack
Create, Read, Update, Delete for one entity (e.g., Products, Posts)
Good because: covers all HTTP methods, database operations
Show list of items, add search/filter functionality
Good because: involves API calls, state management, UI
Upload data, run model, display prediction
Good because: validates pipeline works end-to-end
Good: Everyone works in their comfort zone
Good: Everyone learns full system
# 1. At start of feature
git checkout main
git pull origin main
git checkout -b feature/user-registration
# 2. Work on your task, commit frequently
git add src/components/RegisterForm.jsx
git commit -m "feat: add registration form UI"
git add src/api/auth.js
git commit -m "feat: add registration API call"
# 3. Push to remote regularly (backup + visibility)
git push origin feature/user-registration
# 4. When done, create Pull Request
# Team reviews code, suggests changes
# 5. After approval, merge to main
# Delete feature branch after merged
✓ "Consider extracting validation logic into a separate function for reusability"
✗ "This code is messy"
"I finished the registration form UI. Now working on API integration. Stuck on CORS error - can someone help after their task?"
// Simple API test example (Jest + Supertest)
test('POST /api/register creates new user', async () => {
const response = await request(app)
.post('/api/register')
.send({ email: 'test@example.com', password: 'password123' });
expect(response.status).toBe(201);
expect(response.body).toHaveProperty('userId');
});
To Do → In Progress → Review → Done
| Issue | Solution |
|---|---|
| Story too big to finish | Break into smaller stories, complete subset |
| Blocked by another task | Use mocks/stubs, or pair to unblock |
| Merge conflicts | Pull from main daily, small focused PRs |
| Someone behind schedule | Pair programming, redistribute tasks |
| Technical blocker | Ask instructor, use Moodle forum, Stack Overflow |
Time: 45 minutes
Deliverable: Started implementation with initial commits pushed
Sprint 1 Review & Sprint 2 Start
Demo your work, conduct retrospective, and plan next sprint