https://github.com/schultyy/layer-exercise
Exercise about software layers for @codepadawans
https://github.com/schultyy/layer-exercise
Last synced: about 1 year ago
JSON representation
Exercise about software layers for @codepadawans
- Host: GitHub
- URL: https://github.com/schultyy/layer-exercise
- Owner: schultyy
- Created: 2014-08-13T21:11:10.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-14T07:57:09.000Z (almost 12 years ago)
- Last Synced: 2025-04-06T23:35:29.050Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 149 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shop exercise
Here you should practise how to structure your application.
## Tasks
1. Clone this repository
2. Define, which class goes into which layer (view, domain,
infrastructure). Create a new folder for each layer and move the classes into their folders.
3. Add the missing require statements.
4. All method bodies in `shop_manager.rb` are currently empty. Implement all method bodies. You only need the `@shopping_card` and `@database` variables. Also you need to use the `Article` class.
5. Complete the `menu.rb` class so that in the end you can order articles, show all available articles, show shopping card and so on.
6. Add a new option "Add milk to shopping cart" (because I always forget that) which will add milk to the database and therefore display it when I list all my items.
7. When a user tries to add an article to their shopping card which does not exist, the user should see an error that this is not possible.
Help:
- [Lightning sessions Software architecture] (https://github.com/CodePadawans/lightning-sessions/blob/master/software_architecture.md)