** Draft **
I develop and maintain several apps written using Opal. These vary in their size, and vary in their usage. Each of these apps use rails as a backend. Some use html rendered through rails, and some use json rendered by rails. But in each case, these apps are tied in logic to the backend, and indeed share model logic between client and server.
- Don't Repeat Yourself.
- Shared modules - code once, use client & server
- RSpec - write tests once, run client & server
- Maintainability - Opal, questions about maintenance. Offset against maintaining ruby + coffeescript versions of same code
- Overhead - filesize vs. context of code, is a little filesize worse than maintaing 2 code bases
- Opal -> js, no different from coffeescript/es6 -> js
- sourcemaps!
- DRY - not just rails + Opal. What about rails + rubymotion. Webapp is just 1 target. native apps can also share code. Why make the webapp the maintenance nightmare, use ruby there as well
- Performance? Doubters are the ones who have not tried it. Just avoid fib calculations - you wouldn't do it in ruby anyway ;)
- etc..