mini rails framework
DESCRIPTION
Mini rails framework to better understand how Rails Framework WorksTRANSCRIPT
Hello
Introduction
My work
Mini Rails framework
Not more then 30 minutes ..promise ;(
Goal?
Rails breakdown
Rails
Active
Su
pp
ort
ActiveRecord ActionPack ActionMailer Railties
ActiveModel
ActionController ActionView ActionDispatch
Why Ruby is Programmer Friendly
ActiveRecordActiveRecord Pattern
Let’s CodeText !
ControllerFront Controller
class MyApp def call(env) [ 200, {‘Content-Type’ => ‘text/plain’}, [“you requested “ + env[‘PATH_INFO’]] ]
statusheaderbody
Let’s Code!
Routing
ViewTemplate View
Let’s Code!
Use the force source
Follow the Baseics
module ActiveRecord class Base include ActiveRecord::Naming include ActiveRecord::Persistence endend
Model logic that requires DB Access ActiveRecord gem edit activerecord
Model logic that doesn’t requires DB Access ActiveModel gem edit activemodel
Code handling the process & routing of a request ActionDispatch gem edit actionpack
Features you get on your controller ActionController gem edit actionpack
View and helpers code ActiveView gem edit actionpack
Code to glue framework together Rails gem edit railties
https://github.com/aviandri/mini-rails
Thank You