f | Ruby on Rails .. | f | Ruby on Rails .. |
| | | |
t | | t | Here is my log: <http://herbert.poul.at/board/thre |
| | | ad/579/?page=1>
|
| | |
|
| | | It took me a total of 4 hours (and 2 minutes) - I' |
| | | m not really satisfied with the results, but it do |
| | | es the job.
|
| | | the most useful resources were a developer.apple.c |
| | | om site: <http://developer.apple.com/tools/rubyonr |
| | | ails.html> and the really painful-to-use api <http |
| | | ://api.rubyonrails.org/>
|
| | |
|
| | |
|
| | | # Screenshots
|
| | |
|
| | | # Evaluation
|
| | |
|
| | | In [WebappFrameworkComparison/Planning] i prepared |
| | | a few questions, so i now try to answer them ...
|
| | |
|
| | |
|
| | | ** How easy was the framework to learn ? **
|
| | |
|
| | | well.. i had no previous knowledge of ruby .. and |
| | | still found my way around the code.. and could sta |
| | | rt customizing the scaffolding template .. (probab |
| | | ly because there is already so much code that it's |
| | | no problem to tweak it)
|
| | |
|
| | | ** How easy was the setup ? **
|
| | |
|
| | | easy enough .. downloaded "Locomotive" <http://loc |
| | | omotive.raaum.org/> and everything worked fine - B |
| | | ut it shouldn't be any harder for a server environ |
| | | ment i guess.. there are just 3 components .. ruby |
| | | , rails and mysql .. so it can't be that hard ..
|
| | |
|
| | | ** How easy is the deployment of new versions ? ** |
| | |
|
| | |
|
| | | Should be easy .. update the files, run the migrat |
| | | ion files (for database schema updates) and everyt |
| | | hing should work already ... (migration files aren |
| | | 't really powerful .. but with a bit of luck .. th |
| | | ey might even work sometimes)
|
| | |
|
| | | ** How extend able is the result ? (e.g. Imagine i |
| | | would like to add a workflow where changes get on |
| | | line once an administrator approves them) **
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | ** How much duplication was necessary ? (e.g. need |
| | | to describe the models in the database as well as |
| | | in code or xml ? / need to describe attributes of |
| | | models in models and views ?, etc.) **
|
| | |
|
| | | well.. for "normal" types it's not all that bad.. |
| | | e.g. if you add a new string .. simply add the mig |
| | | ration file .. and modify the _form.html (no idea |
| | | if this is supposed to happen automatically ?) .. |
| | | and this should be .. it..
|
| | | but once you add a relation or even a many-to-many |
| | | relation ship this is not that easy anymore.. you |
| | | have to code it .. in 1. _form.html, 2. the contr |
| | | oller for create AND update 3. list.html 4. show.h |
| | | tml .. and add it in 5. migration file, 6. BOTH mo |
| | | dels if it is a 1:n relation (belongs_to and has_m |
| | | any on the other side)
|
| | |
|
| | | i don't think this is all that great...
|
| | |
|
| | |
|
| | | ** How much useless code (code which is the same f |
| | | or every application, view, model, ...) was requir |
| | | ed **
|
| | |
|
| | | how about a little quote from a [tutorial on onlam |
| | | p.com](http://www.onlamp.com/pub/a/onlamp/2007/01/ |
| | | 05/revisiting-ruby-on-rails-revisited-2.html?page= |
| | | 2):
|
| | |
|
| | | [...] so I'll open cookbook2\app\controllers\r |
| | | ecipe_controller.rb (Figure 17)
|
| | | and add a line to both the create and update m |
| | | ethods.
|
| | |
|
| | | or the [tutorial on many-to-many relationships](ht |
| | | tp://jrhicks.net/Projects/rails/has_many_and_belon |
| | | gs_to_many.pdf):
|
| | |
|
| | | Add the @tags=Tag.find_all line to both the ne |
| | | w and edit methods as depicted in line 17 & 32 bel |
| | | ow.
|
| | |
|
| | | other than that .. most useless code was auto gene |
| | | rated.. isn't that great ?
|
| | |
|
| | | ** URLs: **
|
| | |
|
| | | ** How does the mapping of URLs work ? **
|
| | |
|
| | | there is a routes.rb which has a simple default ro |
| | | ute which should work for most applications:
|
| | |
|
| | | map.connect ':controller/:action/:id.:format'
|
| | | map.connect ':controller/:action/:id'
|
| | |
|
| | | e.g. /bars/list or /bars/show/1
|
| | |
|
| | | ** How can you link within templates to other acti |
| | | ons/views/... ? **
|
| | |
|
| | | there is a link_to template function which gets pa |
| | | ssed a controller, action and optionally id. (ie. |
| | | the params which are defined in the route)
|
| | |
|
| | | # Various Comments
|
| | |
|
| | | # Code Examples
|
| | |
|
| | | # Conclusion
|