3. Agile Web Development
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
3
4. Installing Rails
Ubuntu
Easy way Suggested way
apt-get install rails apt-get install rubygems
gem install rails
apt-get install rake
OSX Windows
Built in, you just need Instant rails
to use!
4
6. First application
$ rails meetup.balabit
meetup.balabit/
app
config
db
doc
lib
log
public
script
test
tmp
vendor
5
7. First application
app
config
db
doc
lib
log
public
script
test
tmp
vendor
5
8. Heart and soul
Model Controller View
app
config
db
doc
lib
log
public
script
test
tmp
vendor
6
9. Heart and soul
Model Controller View
app
config
db
doc
lib
log
public
script
test
tmp
vendor
6
10. Heart and soul
Model Controller View
app
config
db
doc
lib
Safety net log
public
script
Functional and Functional Tests test
Unit Tests
Integration Tests and Testers tmp
vendor
6
11. Configuration
Database
Mysql, Postgresql, Sqlite, Oracle, Mssql, Sybase
app
Router config
Find the corresponding controller db
doc
http://localhost/:controller/:action/:id lib
Environment specific settings log
public
Production script
test
Development
tmp
Testing vendor
7
12. Database & migration
Sqlite3 database files app
config
Migration files (upgrade & downgrade) db
doc
rake db:migrate (VERSION=)
lib
log
public
script
test
tmp
vendor
8
13. Documentation
HTML and Rdoc based documentation
app
rake doc:app config
db
doc
lib
log
public
script
test
tmp
vendor
9
14. Lib & Vendor
Non-third party drivers (lib)
Third-party drivers (vendor)
app
config
script/plugin install [remote repository] db
doc
lib
log
public
script
test
tmp
vendor
10
15. Log files
server.log app
development.log config
db
production.log doc
lib
test.log
log
custom log files public
script
test
tmp
vendor
11
16. Public files
Images app
CSS files config
db
Javascript files doc
lib
Favicon
log
404, 500 error pages public
script
Other public files test
tmp
vendor
12
17. Script files
console (access in terminal to the application)
app
dbconsole (direct access to the database) config
generate (controller, model, plugin, migration file) db
doc
destroy lib
log
plugin (installing 3rd party plugins)
public
runner (cronjob like tool) script
test
server (start server application) tmp
performance (checking performance tests) vendor
13
18. Temporary files
Cache files app
Pid files config
db
File based sessions doc
Sockets lib
log
public
script
test
tmp
vendor
14