-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add notes for Bridging the Gap - Using JS in Rails presentation
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
BRIDGING THE GAP - USING JAVASCRIPT IN RAILS TO WRITE DRY RICH CLIENT APPLICATIONS | ||
|
||
JS is cool and great, but can have some drawbacks. | ||
|
||
Problem: repitition of code in JS and Ruby: | ||
* Ruby in Javascript: | ||
* doesn't really work, but fun for a toy | ||
* Javascript in Ruby: | ||
* Ruby Racer - uses V8 js processing engine in Ruby | ||
* easy to use | ||
* you can add new js functions by writing Ruby class methods | ||
* you can write js functions that can be called by Ruby (using V8) | ||
|
||
Idioms / Structure | ||
* The Javascript Way: | ||
* Standard Library for JS: | ||
* CommonJS, CommonJS Modules | ||
* Nodejs, V8 | ||
* CommonJS Module: | ||
* exports a public API | ||
* You can use Ruby modules to write a CommonJS modules (and use them with IncludeJS) | ||
|
||
Future of JS and Rails: | ||
* not sure if new include sytanx for Rails/JS/CoffeeScript is the best way to go. | ||
|
||
|