<div dir="ltr">Hi Riccardo,<div><br></div><div style>I haven't used Opal in anger but I would caution you against the holy grail of shared client/server code. I have written a reasonable amount of Clojure/ClojureScript, which in theory makes this possible, but it's really never come up as an attractive solution to any problem I've had. The sort of code I've shared between the client and server in the past tends to be small data-formatting functions, aggregations, and transformations -- all of which are functional.</div>
<div style><br></div><div style>I've never used Meteor, so a grain of salt is required, but I'm not sure I understand the appeal of accessing the database or other services directly from your views.</div><div style>
<br></div><div style>On a weirdly related note, if you want to combine ClojureScript and Rails instead, there exist a couple projects for getting ClojureScript into the Rails asset pipeline:</div><div style><br></div><div style>
<a href="https://github.com/yokolet/clementine">https://github.com/yokolet/clementine</a><br></div><div style><a href="https://github.com/nicholasbs/clojurescript-rails">https://github.com/nicholasbs/clojurescript-rails</a><br>
</div><div style><br></div><div style>My reasons for choosing ClojureScript over CoffeeScript in the past are simply due to the power and functional nature of the language. Obviously there's still a mental gap between server and client code.</div>
</div><div class="gmail_extra"><br clear="all"><div><div><br>Steven Deobald</div><div>C42 -- <a href="http://www.c42.in" target="_blank">www.c42.in</a> -- <a href="http://www.rubymonk.com" target="_blank">www.rubymonk.com</a></div>
</div>
<br><br><div class="gmail_quote">On 3 May 2013 16:24, Riccardo Tacconi <span dir="ltr"><<a href="mailto:rtacconi@gmail.com" target="_blank">rtacconi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi guys,<div><br></div><div>Have you every thought to use Ruby in your Rails project instead of CoffeeScript to write your Javascript? I just found opal-rails which allows to develop Javascript with Ruby:</div>
<div><br></div><div><a href="https://github.com/opal/opal-rails" target="_blank">https://github.com/opal/opal-rails</a></div><div><br></div><div>I am not sure about the maturity of the project but this could allow us to extend Rails to work, if needed, as the Meteor Framework:</div>
<div><br></div><div>client? do</div><div> # use jquery</div><div> # use angular.js</div><div>end</div><div><br></div><div>server? do</div><div> # back end stuff</div><div>end</div><div><br></div><div>
What do you think?</div><div><br></div><div>I see that is also possible to use Ruby on node.js: <a href="https://github.com/opal/opal-node#readme" target="_blank">https://github.com/opal/opal-node#readme</a>.</div><div><br clear="all">
<div>
Cheers,</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>Riccardo Tacconi<br>Ruby on Rails and PHP development - System Administration<br><a href="http://www.virtuelogic.net/" target="_blank">VIRTUELOGIC LIMITED</a><br>
<br><a href="http://github.com/rtacconi" target="_blank">http://github.com/rtacconi</a><br>
<a href="http://riccardotacconi.blogspot.com" target="_blank">http://riccardotacconi.blogspot.com</a><br><a href="http://twitter.com/rtacconi" target="_blank">http://twitter.com/rtacconi</a>
</font></span></div></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>