Differences • PHP • Web centric • Not quite a language - collection of functions • Improved with PHP 7 • Ruby • General purpose (more effort to make web) • An expressive programming language 13
Where Ruby Wins! • No semi-colons needed at end of statements • Dot is not used for concatenation • Calling methods on objects with 1 less character • @user.name and not $user->name • Curly braces are not necessary • What opening tags? 18
What I like about Ruby? • Tooling support • Testing, profiling and debugging are not an after-thought • Dependency management is easy • Easily switch between Ruby versions • Open source community / ecosystem • Problems solved by smart people 19
What I like about Rails? • No need to depend on separate web server for development (build-in web server) • Command Line Interface (CLI) support and tools • rails new • Track DB schema changes (relatively) easily • "There's a Gem for that”™ 21
What I like about Rails? • MVP friendly • Commonly used stuff are already build - just add the Gem, configure and go! • From idea to product in short time - and its relatively secure and beta tester ready • Many deployment options • PaaS - Heroku, Azure • Self host via VPS, shared hosting 22
Reflections • These are merely tools for building great web apps • Figure out the best tool for the job • Test, Build, Validate, Iterate • Knowledge in design patterns is important in understanding how we build apps better • Can still write 7000 line spaghetti Ruby files 28