Download presentation
Presentation is loading. Please wait.
Published byJoseph Webster Modified over 8 years ago
1
1 Rails for the Ruby-Impaired John Paul Ashenfelter CTO/Transitionpoint
2
2 Why Build a Web App? Solve a (customer’s) problem
3
3 What Makes an Web App “Better”? Good Fast Cheap
4
4 The Holy Grail of Web Apps Build an application that solves a problem better, faster, and cheaper than anyone else
5
5 Keys to Successful Web Apps Follow standards Use best practices Reduce, reuse, recycle code Focus on quality and consistency Gracefully respond to change
6
6 Why Is Rails So Hot? Integrates/encourages best practices Inherently agile Keeps the framework out of the way Convention over configuration Self-contained Extracted from real-life applications Open source
7
7 Why Should I Care? Hits the ColdFusion sweet spot easy to use flexible fast (development and run-time) everything is built-in Java developers are adopting… and competing against you Lots of real-world momentum
8
8 Learning from Ruby on Rails Ruby and CFML are similar Scripting-oriented Dynamic (eg duck-typing) Rails and CF Frameworks are similar Built for web applications MVC ORM options
9
9 Rails Components Active Record migrations Action Pack Action Controller Action View Action Mailer Active Support Rake Web 2.0/AJAX Prototype Script.alicio.us RJS Generators Plugins Servers Webrick mongrel
10
10 Code: Create a Rails app Create application skeleton You’ll be using the command line Create the database Not much config for dev/mysql Start server Server options Development modes Generate a scaffold
11
11 ActiveRecord Built-in ORM CRUD validation filters transactions callbacks (16!) observers migrations
12
12 Code: Making the db invisible Conventions Names for keys, tables Magic columns Migrations ActiveRecord sugar has_XXX associations acts_as_XXX
13
13 Action Controller routing REST flash filters before, after, around caching cookie, session management
14
14 Code: Interacting with the user Default and custom routes The “flash” RESTful routes and methods
15
15 Action View templates rhtml (embedded Ruby) rxml (Builder) rjs (AJAX) helpers paging, form/field, formatting layouts partials and components
16
16 Code: Showing your work Templates, layouts, and partials Helpers Forms RJS (AJAX)
17
17 Code: Other Cool Stuff fixtures and YAML the vendor/ directory plugins capistrano JRuby
18
18 Rails Lessons for Web Frameworks 1.Best practices are, well, best. 2.Make the database invisible 3.Easy things should be easy 4.Testing is crucial… and should be easy
19
19 Call to Action for CF Frameworks More convention, less configuration Pick an ORM and integrate it We need a migrations library Pick a AJAX library and integrate it Pick a testing library and integrate it And automate the creation Don’t be afraid of the command line Leverage Ant for automation where possible
20
20 Getting Started Resources Rails Environments InstantRails (Windows) Locomotive (Mac) >gem install rails (any Ruby installation) Rails Editors Eclipse with RadRails (radrails.org) Textmate (Mac) Other plugins… (Netbeans, Dreamweaver, etc.) Agile Web Development with Rails, 2 nd ed.
21
21 Thanks/Questions John Paul Ashenfelter ashenfelterj@transitionpoint.com http://www.transitionpoint.com Transitionpoint Consulting Training Mentoring
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.