Spontaneously, i will use procedural programming. One step after another. Like a todo list with every tasks done in order.
I believe procedural programming is a much understandable paradigm because it is based on a succession of ordered tasks and the order is (well should) be easy to follow.
But of course, other options are available. Let's explore the event driven programming paradigm with an MVC application based on Zend Framework 2. We will implement a small application to handle the orders of a coffee bar.
Added to the discovery of the event driven programming, we will also need to manage the dependencies in forms with two use cases :
- a first form with a simple list of values injected in a Select element
- a second form with a list of Objects (and their properties) in a Select element, tied to an input text field and a counting.
The whole application can be found in my github
- CoffeeBar Application 1/19 - Introduction to event driven programmation
- CoffeeBar Application 2/19 - Install the framework
- CoffeeBar Application 3/19 - Spying on our cache
- CoffeeBar Application 4/19 - The Open Tab Form
- CoffeeBar Application 5/19 - Triggering the opening of a tab
- CoffeeBar Application 6/19 - A listener to manager the tab and its history
- CoffeeBar Application 7/19 - Managing opened tabs
- CoffeeBar Application 8/19 - Displaying active tabs
- CoffeeBar Application 9/19 - Placing an order, mixing drinks and food
- CoffeeBar Application 10/19 - Building a form to place the order
- CoffeeBar Application 11/19 - Processing the form
- CoffeeBar Application 12/19 - Processing the order
- CoffeeBar Application 13/19 - Chef todo list
- CoffeeBar Application 14/19 - Marking prepared food
- CoffeeBar Application 15/19 - Food is prepared, reacting to it
- CoffeeBar Application 16/19 - Get the staff todo list
- CoffeeBar Application 17/19 - Serving
- CoffeeBar Application 18/19 - The bill, last but not least
- CoffeeBar Application 19/19 - Closing the tab