Solved
- app
- assets
- controllers
- models
- callback, relationships, scopes, validations, methods
- views
- bin
- config
- database.yml
- development, test, production 连接 db/.sqlite3
- routes.rb
- database.yml
- coverage
- index.html 网页版检查test coverage的工具
- db
- migrate
- YYYYMMDDHHMMSS_create_proverbs.rb
- development.sqlite3
- test.sqlite3
- production.sqlite3
- schema.rb
- migrate
- docs
- lib
- log
- public
- storage
- test
- controllers
- factories
- models
- sets: where we create contexts
- context.rb --take the subcontext and make them into one context
- tmp
- vendor
- Gemfile
- README.md
- To build web-based applications,
-
- you need to know the MVC pattern in software architecture
Model - business logic - connect to the database (scope)
View - given the right data, all about looking good - should not doing any calculations
Controller - connect the views and models - take the correct data from models and give it to views - like the cream in the oreoo, too large -- business logic creeps in - to clean it up -- refactor - who did all the calculations? models
But why MVC? - parallel -- specialization
-
- you need to understand why and how to do software testing Testing
simplecov- false positives- acceptance test -- views (cucumber, capibara)
Why testing? - documentation - reduce technical debt - institutional memory
-
- We need to use source code control to manage project development
-
- We need to understand the OOP paradigm
-
- user-centered design
- interactions
- tradeoffs
- mental models
- gulf of execution:
- gulf of evaluation: what i think it will happen and what it actually happens
-
- keep users in control
-
- reduce cognitive load
-
- keep designs consistent
Real question: - model process the data - controller - view