-
-
Notifications
You must be signed in to change notification settings - Fork 5
Todo list tutorial
Almost every language or framework ends up with a to-do list tutorial somewhere. The reason is simple: it exercises just enough of the stack to be useful without becoming overwhelming.
Here, the to-do list introduces form handling, state, repeated output, and a little application structure.
This version keeps persistence simple by storing the list in the session. That lets us focus on the WebEngine workflow before adding a real database.
The tutorial introduces:
- form handling
- session-backed state
- list rendering
- a small model represented by application classes
The normal flow is:
- add a form to create items
- store the items in the session
- represent them with application classes
- render the list back into the page
- add actions to mark complete or remove items
This is usually the point where the value of thin page logic becomes very clear, because the page needs to coordinate several actions while still staying readable.
Once the session-backed version works, it is worth asking what changes if the list must be shared between multiple users or survive beyond one browser session. That naturally leads into a database-backed version, which is where the address book tutorial goes next.
If you want to approach the same tutorial with tests first, there is also a todo list TDD tutorial.
We'll build on the code introduced in the todo list to build a full database-backed application in the address book tutorial. There's also an extension of this tutorial that adds testing from the start in todo list TDD tutorial.
- File-based routing
- Page views
- Page logic
- Dynamic URIs
- Headers and footers
- Custom HTML components
- Page partials
- Binding data to the DOM
- DOM manipulation
- Hello You tutorial
- Todo list tutorial
- Address book tutorial WIP
- Blueprints
- Application architecture
- Coding styleguide WIP
- PHP environment setup WIP
- Web servers WIP
- Background cron tasks
- Database setup WIP
- Client-side compilation WIP
- Testing WebEngine applications WIP
- Production checklist WIP
- Security WIP