Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Hinweis der Redaktion
9 lines of code and it works!
So how much code are we talking about for Ruby and Radiant
Our small server is not visible
Radiant’s core => 174908 loc (usually extended with plugins and own code)
Rails’s core => 131990 loc
Rack, This is what almost all Ruby based web frameworks build on
Basically it translates http to ruby
Rack, This is what almost all Ruby based web frameworks build on
Basically it translates http to ruby
Even merb
Default Merb
46595 loc
Apache + passenger, mongrel, thin, webrick
But there is still an other player out there...
But there is still an other player out there...
But there is still an other player out there...
6 lines of code (and a Rack compatible server) and we are off
This is Rails’ Rack stack
Each class in use stack is called Middleware
This is a piece of middelware, that doesn’t do much
Rack::Lock executes the call in a synchronize block (Mutex)
ActionController::Failsafe will render 500.html if it catches an exception
Rails::Rack::Metal is basically a wrapper around middleware for ease of use in a rails app
...
Your own... insert google analytic tags, filter out bad words...
again 6 lines of code (and a Rack compatible server) and we are off
Each page is defined by it’s
- verb (get, post, put, delete)
- URI, supporting parameters, wildcards and regex
- And it should (usually) respond
Rendering templates
- erb + haml + builder from files, inline, or defined template methods
- With layout files!
Rendering templates
- erb + haml + builder from files, inline, or defined template methods
- With layout files!
Before Filters!
Passing allows for better structured code
404’s
and error handeling
Rack as a stack
Sinatra for non-data driven apps (isdemax.be, design prototyping)