HOW TO WRITE BIG APPS
The Seneca pattern is a way to break your application into pieces so that you can put it back together again in many different ways. You don't have to worry about architecture, database choice, network design, scaling or even which objects to define - you can defer them all! Instead you focus on the "stuff that needs to happen" right from that start.
A concrete, production implementation exists in Node.js, and you can also write components in other languages.
BIO
Richard Rodger is the COO of nearform.com, a consultancy that helps startups build and launch software products. Richard is the author of Mobile Application Development in the Cloud (Wiley 2012), and was formerly CTO of feedhenry.com, a mobile applications platform. He is a regular contributor to the Sunday Business Post newspaper, and holds degrees in Mathematics and Philosophy, and Computer Science.
NOTES:
How do you build big apps?
- Technical Debt. Take it on
- if you don't take it on, you don't live long enough to have it matter
Patton
"A good plan, violently executed now, is better..."
How do you reduce tech debt?
- wrong question. How do you give yourself more choice in reducing debt? is a better one
Better languages and better mental models helps
- ruby fanboy
anecdote about roman numerals
- they were able to do addition, subtraction, and even multiplication, but not division
- tech debt
roman numerals came from etruscan numbers coming from carving lines into wood to count goats
mental models for code
- procedural, functional, object oriented, logic
- goes through an example that proves that there wasn't consensus in the room about how to describe a car
- claims OOP is a broken mental model because we can't possible describe every possible iteration of a car. Claims design patterns are a workaround to brokenness
- immediately dismisses procedural (spagghetti)
"we need a new mental model"
rails creates a shared mental model
humans are better at pattern matching than we are at logical deduction
plugs nearForm his company that builds MVPs for startups and intentionally does it hackily
here's the secret model:
1. Embrace micro services. You can then swap out implementations later. Must communicate with messages.
2. You can pattern match on messages. e.g if it contains message: tweet, twitter service knows to grab it. tweet service can be implemented in any language
3. Patterns map to actions.
- cmd: drive vs. cmd:drive, type:hover. How do you know
- Two rules to make it work. 1. more specific always wins and 2. alphabetically
4. Layers
- If the pattern already exists, keep it around. refer to it from the other one.
- this is basically decorators
senecajs.org
Design for many languages
Design for scale (human + machine)
- looks fractal in nature (wrap patterns in patterns that look similar)
Design for human brains
Q&A
What are the bigger implications of this paradigm?
- doesn't know if it will ever scale to hundreds of machines, but if you get that far you're doing alright.
- i concur with the not scaling part.












