Proposal for the Ruby Summer of Code: Make ActionView Javascript Framework Agnostic

About You

Have you participated in Google Summer of Code before?: Yes

Detail your previous GSoC experience

Last year I worked with The Perl Foundation under Jonathan Leto to develop a CPAN module Math::Primality (–primality).  The project was challenging but Jonathan was extremely helpful and patient and could always point me in the right direction.  He jumped in from time to time to help me out when I was stuck, and we finished ahead of schedule.  I’m very proud of the end product and is probably the best tested and best documented code I’ve produced.  I’ve been involved with the Perl community since, hacking on the Parrot VM (which is the VM that will run an implementation of Perl 6) and have been a committer for a number of months now.


I am currently 24 years old living in Champaign-Urbana, IL attending school full time and working part time as a web developer.  My undergraduate degree was in Math & Computer Science (with coursework focusing on Number and Coding Theory, Numerical Analysis, and Cryptography).  I’ve been a web developer since before beginning college and currently work supporting a legacy application in PHP + MySQL and develop new software in Ruby on Rails.  I had to pick up Ruby/Rails for this current job and am loving it.

About Your Project

Why do you use Ruby and/or Rails? How would you like to see them improve?

I started with Ruby on Rails for work but soon began using it to prototype my own projects.  I’ve been using jQuery for a number of years before that and love it as well.  I’d like to see Ruby on Rails become JavaScript framework agnostic, as this provides more choices for the developer.  Especially with the big push for modularity in Rails 3 we shouldn’t be tied to one framework.

Outline the specific project you’re proposing

This project will make ActionView javascript framework agnostic by providing an intermediate class that exposes a consistent API that multiple javascript frameworks can implement.  This project will be accompanied by tests to ensure correctness and documentation both for the new code and a tutorial for how to add other javascript frameworks. The project aims to not break any existing functionality and enable the developer to pick which framework they would like to use.

Why is this important to the Ruby and/or Rails communities at large? Why is this important to you?

I love Ruby on Rails.  I love jQuery.  It makes me sad to see the two not integrated well.  And although most of my work requires me to use completely custom jQuery, we should lower the barrier of entry for people to use JavaScript in their Rails applications.  Many throw out RJS completely simply because it uses Prototype and they don’t.  The intermediate class would not only allow the option to choose which JavaScript framework, but would make it easier to extend JavaScript functionality.

List a clear set of goals/milestones you’ll hit during the summer, along with a rough timeline. Be specific about your deliverables.

Assuming a timeline similar to GSoC

  • When notified of acceptance until the beginning of the program: Documentation and testing of existing functionality. I am unsure of the existing test coverage.  The first step will be to fill out any missing documentation and tests to ensure I don’t break anything in the process.
  • By midpoint of the internship: Replicate the existing functionality through the intermediate class. I will first work on developing an intermediate class that will be called instead of Prototype/Scriptaculous methods directly. By half way through the summer I would like to have this class completely functional, deprecating the old methods.
  • By the end of the internship: Have at least jQuery functioning through the intermediate class. By the end of the internship I would like to have jQuery functioning through that same intermediate class, so one could simply specify “prototype” or “jquery” and get the same functionality without breaking any code.  If I am ahead of schedule, I will also begin integrating other popular javascript frameworks like mootools or YUI.
What are the “unknowns” in this project for you? What kind of pitfalls could you run into?

I am unsure of the total extent to which Prototype or Scriptaculous is tied to ActionView.  I would need a mentor to help me walk through the code so I can understand how exactly these two parts are currently coupled.

Though I am familiar with Prototype, I am more familiar with jQuery and I don’t know if there is any functionality in Prototype that *cannot* be replicated in jQuery.

Again, I also don’t know the extent to which the existing functionality is tested and documented.  I’ll need to spend more time in the Rails guts to assess this one.
How will you measure progress? How will you handle falling behind?

Progress will be measured on the deliverables of 1) an intermediate class 2) no broken Prototype functionality and 3) a working jQuery recipe.  Each of those items will come with documentation and testing.

If I fall behind I may inlist the help of others in the Rails community to help test and debug my code.

Is there anything else you’d like to share with us about yourself or your project?

I’m pumped for this opportunity!

Posted in Uncategorized | Comments Off on Proposal for the Ruby Summer of Code: Make ActionView Javascript Framework Agnostic

Comments are closed.