Ruby, JRuby, and Rails Application
Development (with
Passion!)
It is a well known
fact that Ruby on
Rails is gaining quite a
bit of popularity among developers and deployers of Web applications..
and for good reasons. Rails is considered a well thought out Web
application framework based on several development principles such as
Don't Repeat Yourself (DRY), Convention Over Configuration, which
enables an agile yet practical development environment. JRuby on
Rails provides another benefit by allowing them to leverage the
stability and the reliability of the Java platform. This course
will go through briefly the basics of Ruby (and JRuby) programming
language first. The rest of the course will be devoted to
learning Rails functionality such as Active Record, Action Controller,
and Action View. Attendees will acquire sufficient knowledge in
order to write reasonably sophisticated Rails application upon
completion.
Message to potential
attendees
The
2nd session of this course started from March 31st,
2009.
Just
like
other online courses I
teach, this course is offered online only. For those of
you who are not sure what it's like to take this course online, please
see What
it's like to take Sang Shin's online courses and FAQ mentioned
below. Just to set the
expectation correctly, there is no real-time webcasting.
How to register for
this course
In order to register for this course, all you have to do is sending
a blank email to the following email address.
Basically, when you send a blank email to the above, you are
subscribing our
class
forum. This forum can be used for posting
questions/answers. Please use this forum for all class related
communication (technical or non-technical).
If you have any further questions on this course, please see the course
FAQ below . Please read thie FAQ first
before you post a question to the course email alias.
Topics
and Schedule
Note
that only the topics
with the
dates assigned will be covered in this
course. (You need to submit homeworks only on the topics that have
dates.) It is my plan to provide presentation slides and hands-on
labs for the topics that do not have dates whenever I find time.
- Ruby Basics - March 31st, 2009 (updated with NetBeans
6.5.1 and JRuby 1.1.4)
- Ruby Blocks and
Closures - April 7th, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- Ruby Meta-programming
- April 14th, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- Ruby Object Oriented
Programming Concept - April 28th, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- JRuby
Basics - May
5th, 2009 (updated
with NetBeans 6.5.1 and JRuby 1.1.4)
- Rails Basics -
May 12th, 2009
(updated with NetBeans 6.5.1 and JRuby 1.1.4)
- Scaffolding - May 26th, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- Ruby/JRuby and Rails
Support in NetBeans - June 2nd, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- Active Record Basics - June 9th, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- Active Record Associations
Basics
- June 23rd, 2009 (updated with NetBeans 6.5.1 and JRuby
1.1.4)
- Action Controller Basics
- June 30th, 2009 (updated with
NetBeans 6.5.1 and JRuby
1.1.4)
- Action View Basics - July 18th,
2009 (updated with NetBeans 6.5.1
and JRuby
1.1.4)
- Action View Helpers - July
27th, 2009
- REST support - Aug. 2nd, 2009 (updated with NetBeans 6.5.1
and JRuby
1.1.4)
- Testing & RSpec - Aug. 9th, 2009 (updated with NetBeans 6.5.1
and JRuby
1.1.4)
- Ajax support -
Aug. 20th, 2009 (updated
with NetBeans 6.5.1
and JRuby
1.1.4)
- Deployment - Aug. 27th,
2009
- Example
Application -
Depot (Ecommerce) Sep.
9th, 2009 (updated
with NetBeans 6.5.1
and JRuby
1.1.4)
- Example
Application -
Flickr (Photo) Sep.16th,
2009 (updated
with NetBeans 6.5.1
and JRuby
1.1.4)
- Example Application -
Redmine (Project Management) Sep. 30th, 2009 (updated
with NetBeans 6.5.1
and JRuby
1.1.4)
This is the end of the
course. Some of the topics below might be covered in the
subsequent sessions of this course.
- Ruby Gems - will be covered in
the next session
- Rails Security - will be
covered in the next session
- Example Application
-
Typo (Blogging Engine) -
hands-on
lab ready
- Example
Application - Substruct (Ecommerce) -
hands-on
lab
ready
- Example Application
- FreeMIS (MIS) -
hands-on
lab ready
- Example Application -
TimeTracker -
hands-on
lab ready
- Caching
- Performance
-
- Action Mailer
- Rails and
other Web
technologies -
- Plug-in -
- Misc Topics
Ruby Basics
Topics covered: What is Ruby, Ruby
naming convention, Interactive Ruby (IRB), Ruby object, Ruby types -
Hash, Symbol, Ruby class, and Inheritance.
- Presentation (long version)
- Presentation (short version)
- Lab and homework
- Resources
- Basic Ruby tutorials
- Ruby websites
- Presentations
- Regular expression
- Forums
- NetBeans Ruby/Rails forum
return
to topics
Ruby
Blocks and Closures
Topics covered: What is block?, How to
create a block?, How does a block get passed and executed?, Proc
object, & operator, lambda, Where do blocks get used?, What is a
closure.
- Presentation
- Lab and homework
- Resources
return
to topics
Ruby Meta
Programming
Topics covered: What is and why
meta-programming?, Ruby language characteristics (that make it a great
meta-programming language, Introspection, Object#send, Dynamic typing
(and Duck Typing), missing_method, define_method.
- Presentation
- Lab and homework
- Resources
- Meta programming
- Duck typing
return
to topics
Ruby Object
Oriented Programming Concept
Topics covered: The concept of self,
main as top-level context object, singleton method.
- Presentation
- Lab and homework
- Resources
return
to topics
JRuby Basics
Topics to be covered: What is and what
is not JRuby?, Why JRuby (over Ruby) & JRuby on Rails (Ruby on
Rails)?, Why use (J)Ruby with Java? Calling Java from JRuby, Calling
(J)Ruby from Java
- Presentation
- Lab and homework
- Resources
- Websites
- Tutorials
- NetBeans support of JRuby
- GUI
- Presentations
return
to topics
Rails Basics
Topics covered: What is and Why Ruby on
Rails?, Building HelloWorld Rails application step by step, Key
concepts of Rails application development - App directory structure
(MVC), Environment, Rake, Generator, Migration, Rails console
- Presentation
- Lab and homework
- Resources
- Web sites
- Ruby on Rails tutorials
- MySQL
- Articles
- Presentations
- Websites that are built with Rails
return
to topics
Scaffolding
Scaffolding is a way to quickly put an
Active Record class online by
providing a series of standardized actions for listing, showing,
creating,
updating, and destroying objects of the class. These standardized
actions
come with both controller logic and default templates that through
introspection already know which fields to display and which input
types to
use.
Topics covered: What is scaffolding?, Controller (that is
generated through scaffolding), Templates (that are generated through
scaffolding)
- Presentation
- Lab and homework
- Resources
return
to topics
Ruby/JRuby and
Rails
Support in NetBeans
Topics covered: Coding/Editing,
Refactoring, Testing, Debugging, Profiling, Deployment
- Presentation
- Lab and homework (collection of NetBeans tutorials and
screencasts)
- Resources
- Websites
- Database
- Rails support in NetBeans blogs
return
to topics
ActiveRecord Basics
Topics covered: What is Active Record?,
Active Record Object Creation, Find operation, Dynamic Attribute-based
Finders, Validation, Migration, Callbacks, Exception Handling
- Presentation
- Lab and homework
- Resources
- Basics
- Validation
- Migration
return
to topics
ActiveRecord Associations
Basics
Topics covered: What is an
Association?, Auto-generated methods, Cardinality, Unsaved objects and
association
- Presentation
- Lab and homework
- Resources
return
to topics
Action Controller Basics
Action Controllers are the core of a
web request in Rails. They
are made up of one or more actions
that are executed on request and then either render
a template or redirect to another
action. An action is defined as a public method on the controller,
which
will automatically be made accessible to the web-server through Rails
Routes.
Topics to be covered: What is ActionController?, ActionController
classes, Request handling, Parameters, Session & Flash, Rendering,
Redirection, Classic problem of user refresh & redirection, Routing
(request mapping)
- Presentation
- Lab and homework
- Resources
return
to topics
Action View Basics
Topics to be covered: Types of
templates, ERb template, Builder template, JavaScriptGenerator
template, Using sub-templates, Layouts, Partials
- Pre-class reading material
- Presentation
- Lab and homework
- Resources
return
to topics
Action View Helpers
Topics to be covered: Types of
ActionView Helpers, FormHelper's, FormTagHelper's
- Pre-class reading material
- Presentation
- Lab and homework
- Resources
return
to topics
REST Support
Topics to be covered: What is REST?,
REST support in Rails, Format of the response via response_to
- Presentation
- Lab and homework
- Resources
return
to topics
Ajax
Topics covered: Ajax/JavaScript
libraries in Rails, PrototypeHelper, ScriptaculousHelper,
JavaScriptMacrosHelper, JavaScript related utility methods, Ruby
JavaScript template
- Presentation
- Lab and homework
- Resources
return
to topics
Testing & RSpec
Topics to be covered: Overview of Rails
testing, Unit testing, Functional testing, Integration testing
- Presentation
- Lab and homework
- Resources
- Tutorials
- NetBeans tutorials
- References
return
to topics
Deployment
Topics covered:
- Presentation
- Lab and homework
- 5538_rails_deploy.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/rails_deploy/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
- Deploying on GlassFish
- Warbler
- Goldspike
- JDBC
- Presentations
return
to topics
Performance
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5538_railsdeploy.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/railsdeploy/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics
Rails 2.0
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5520_jrubyrails_basics.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jrubyrails_basics/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics
Action Mailer
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5520_jrubyrails_basics.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jrubyrails_basics/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics
Rails Security
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5520_jrubyrails_basics.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jrubyrails_basics/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics
Rails and Other Web
Technologies
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5520_jrubyrails_basics.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jrubyrails_basics/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics
Rails Gems and Helpers
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- Resources
return
to topics
Plug-in
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5537_railsgems.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/railsgems/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics
Rails Example
Application -Depot Application
- Presentation - there is no presentation
- Lab and homework
- Resources
- Rails code examples site
- Examples
return
to topics
Rails Example
Application - Flickr Application
- Presentation - there is no presentation
- Lab and homework
- Resources
return
to topics
Rails Example
Application - CheckItOut Application
CheckItOut is a Ruby on Rails
application to manage personal money accounts. (The source code is
available in GPL license.)
- Presentation - there is no presentation
- Lab and homework
- Resources
return
to topics
Rails Example
Application - Redmine Application
- Presentation - there is no presentation
- Lab and homework
- Resources
return
to topics
Rails Example
Application - Substruct Application (ECommerce
Application)
- Presentation - there is no presentation
- Lab and homework
- Resources
return
to topics
Rails Example
Application - Typo Application
- Presentation - there is no presentation
- Lab and homework
- Resources
return
to topics
Rails Example
Application - FreeMIS Application
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- Resources
return
to topics
Rails Example
Application - TimeTracker Application
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- Resources
return
to topics
Ruby Gems
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5520_jrubyrails_basics.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jrubyrails_basics/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topi
Misc Topics
- Presentation
- PDF:
1 slide per page
- OpenOffice file
- Lab and homework
- 5520_jrubyrails_basics.zip
(Unzip it in a directory of your
choice
and read lab document from
<unzip-directory>/jrubyrails_basics/index.html to proceed)
- Online
lab document (This is the same document you will find in
the hands-on lab zip file)
- Homework
- Change
Log
- Resources
return
to topics