These are chat archives for opal/opal

7th
Oct 2014
Loïc Boutet
@loicboutet
Oct 07 2014 21:03
Has anyone made a vienna app inside a rails app?
I'm thinking that rails is quite useful when dealing with normal, mainly static webpage
but not so much when you want a javascript heavy page
vienna could be useful for handling this case
you would made a small vienna app for handling the necessary js
anyone has used it in such a fashion?
AstonJ
@AstonJ
Oct 07 2014 21:46
Sounds like a good idea @loicboutet - though you may want to look at voltframework.com as well :)
Loïc Boutet
@loicboutet
Oct 07 2014 21:47
well I like volt
but personally I cannot think of a lot of use case to use it
Ryan Stout
@ryanstout
Oct 07 2014 22:07
@loicboutet going to put in my $0.02 on Volt. Its a bit early, but you will be able to build anything in it. The live updating is only one small feature. You can also do bindings that don't live update (here's a video showing that: https://www.youtube.com/watch?v=c478sMlhx1o)
I think the big win with volt is sharing code between client and server. I'm working on a demo that should the sharing better
Loïc Boutet
@loicboutet
Oct 07 2014 22:08
hmm ok
Sharing code would definitly be a big plus
I admit I probably should look more into it
Ryan Stout
@ryanstout
Oct 07 2014 22:08
not needing to do REST api's to sync data between client and server is also nice, imho
Loïc Boutet
@loicboutet
Oct 07 2014 22:09
When I saw it I kind of thought it is a sort of meteorjs for ruby
Ryan Stout
@ryanstout
Oct 07 2014 22:09
it is similar, but I think meteor failed to make it easy to build the usual CRUD apps. Volt's buffers make CRUD stuff really easy.
(again, imho)
Loïc Boutet
@loicboutet
Oct 07 2014 22:10
OK
I agree with you with meteor
and kind of thought that volt would have the same problem
Ryan Stout
@ryanstout
Oct 07 2014 22:10
I'm with you, realtime apps aren't that common
Loïc Boutet
@loicboutet
Oct 07 2014 22:10
since I understood the use case it was trying to solve was the live application stuff
ok, we agree, and that mean I really have to dig deeper in volt
Ryan Stout
@ryanstout
Oct 07 2014 22:11
hit me up if you have any questions :-) hopefully I can get some more demo videos out soon
Loïc Boutet
@loicboutet
Oct 07 2014 22:12
can I ask you why the views use a custom templating language?
is it necessary for the automatic dom update?
Ryan Stout
@ryanstout
Oct 07 2014 22:13
yea, the views got changed recently (the video's not updated). Now the views are basically just ruby in {{ and }}
Loïc Boutet
@loicboutet
Oct 07 2014 22:13
oh nice !
I was a bit put off by the templating to be honnest, never been a big fan of handlebars
Ryan Stout
@ryanstout
Oct 07 2014 22:14
I'm still considering switching to erb style. I personally like {{ and }} over <% and %>, but most rubyists seem to like erb style (because it's familiar I think)
Loïc Boutet
@loicboutet
Oct 07 2014 22:15
in my experience yes it is way more familiar, and I have been extremely frustrated when using mustache/handlebar
Ryan Stout
@ryanstout
Oct 07 2014 22:15
is part of the issue the {{ and }} ?
I always just thought doing <% in a html attribute seems weird (since your already in a tag)
Loïc Boutet
@loicboutet
Oct 07 2014 22:15
personnally it s not the {{ }} in themselve
but the fact that I associate them with handlebar
and handlebar is good when you juste want to put value in the template
but sucks (imho) for logic stuff
Ryan Stout
@ryanstout
Oct 07 2014 22:16
yea, I agree on that
doing #each /each is weird too
Loïc Boutet
@loicboutet
Oct 07 2014 22:17
so when I had to use it I was kind of frustrated, so now I'm wincing at the sight lol
yeah
so if you tell me I can put ruby in {{ }}
I'm fine with it
if you tell me the view template is similar to handlebar... I will think it will have the same downside
Ryan Stout
@ryanstout
Oct 07 2014 22:18
cool. Yea, now its (almost) any ruby in between {{ ... }}
Loïc Boutet
@loicboutet
Oct 07 2014 22:18
do you see what I mean?
ok sounds good !
I'm quite excited at opal and the project building on top of it
I feel like rails did not catch up to the new development of single app page and hope ruby in general will be able to catch up
I'm glad to see new stuff like volt proposing solutions :)
Ryan Stout
@ryanstout
Oct 07 2014 22:26
yea, I think opal will play a big part in ruby's future :-)
Loïc Boutet
@loicboutet
Oct 07 2014 22:26
I think so too
what was your motivation when starting volt?
George
@georgeu2000
Oct 07 2014 22:43
Why do you want to put the logic in the view?
Loïc Boutet
@loicboutet
Oct 07 2014 22:44
well I'm talking about if else / each function kind of logic
George
@georgeu2000
Oct 07 2014 22:44
I see.
Ryan Stout
@ryanstout
Oct 07 2014 22:47
@loicboutet I mostly build very front-end heavy apps, and I wasn't really happy with rails+angular (or ember)
@georgeu2000 yea, the idea isn't to put "logic" in there, but you can call methods and stuff from bindings
but it's not a logic-less templating language, though you could use it that way
Loïc Boutet
@loicboutet
Oct 07 2014 22:48
ok !
do you have things in production built with volt already?
Ryan Stout
@ryanstout
Oct 07 2014 22:48
@loicboutet nothing huge, just some small stuff
working on a larger one now
Loïc Boutet
@loicboutet
Oct 07 2014 22:49
ok !
hey, byt the way, something totally different
what do you think about it?
Ryan Stout
@ryanstout
Oct 07 2014 22:50
I haven't seen it
looks like its useful
AstonJ
@AstonJ
Oct 07 2014 22:51
I saw Sprinkles (think there’s a blog post about it as well) but it’s still Angular. I would prefer to use Opal/Volt
Going back to tempting - I think {{ }} will continue to have negative connotations. I reckon switching to <% is going to be a very positive move (of I will stop going on about it now lol)
of = ok
Loïc Boutet
@loicboutet
Oct 07 2014 22:54
well, I understand your point about <% in html... but I agree with Astonj, in term of user adoption I think <% is the way to go
AstonJ
@AstonJ
Oct 07 2014 22:54
Great conversation too - I reckon a blog post on the topic would be a neat idea.
Loïc Boutet
@loicboutet
Oct 07 2014 22:55
Ryan > do you think your ideas in volt could be ported to rails?
a kind of volt-rails gem ?
AstonJ
@AstonJ
Oct 07 2014 22:56
Yeah @loicboutet I think it will help create less barriers. Plus we mustn’t forget so many of us dislike brackets-heavy languages, and {{}} seems to represent that (ok definitely shutting up now!)
Loïc Boutet
@loicboutet
Oct 07 2014 22:56
@AstonJ ahah yes
AstonJ
@AstonJ
Oct 07 2014 22:57
Interesting idea @loicboutet but I wonder if part of Volt’s appeal is that it’s a rack-app, built for the modern web - so might be less bloated and dare I say it, more scalable? (No idea if that’s actually the case)
Loïc Boutet
@loicboutet
Oct 07 2014 22:59
Well, I guess you can make the point that rails is bloated :)
Ryan Stout
@ryanstout
Oct 07 2014 22:59
@loicboutet Volt and rails kind of approach things differently, so I don't think it would make since to try to integrate it into rails
Loïc Boutet
@loicboutet
Oct 07 2014 22:59
but it is also the most used framework in ruby by a large margin
@ryanstout OK
I'm just trying to find a way to import new ideas in existing projects without rewriting everything :)
I'm working on a project right now, and it begin to be really js heavy
Ryan Stout
@ryanstout
Oct 07 2014 23:00
yea, thats always tricky
Loïc Boutet
@loicboutet
Oct 07 2014 23:00
I would be glad if I had a way to make it nicer and keeping the rails part :)
that s why I was thinking about a vienna integration
AstonJ
@AstonJ
Oct 07 2014 23:01
Maybe bloated wasn’t a good word to use - but Rails is getting on now, there may well be stuff there that is a little outdated. Having said that, I do love Rails. The only thing I currently dislike is that they haven’t or have no plans to adopt Opal.
Loïc Boutet
@loicboutet
Oct 07 2014 23:01
yeah, well the best thing to do for them to change their mind is to integrate well with them ;)
AstonJ
@AstonJ
Oct 07 2014 23:02
They have big apps on Rails, and switching to Opal might be a lot of work for them - but I feel ignoring it will mean something like Volt could well come in and steal their thunder.
Loïc Boutet
@loicboutet
Oct 07 2014 23:03
that is definitely something that could happen
the framework which will be unifying the front and the back with the modern requirement for both will definitely have a good shot :)
AstonJ
@AstonJ
Oct 07 2014 23:04
I’m personally very excited about Volt - it feels cutting edge, not just as good as Angular and the rest, but better, because it’s Ruby. I reckon we will see some awesome things with it :D
Loïc Boutet
@loicboutet
Oct 07 2014 23:05
Actually I will have to check it out more :)
I was kind of falling in love with vienna those last weeks
I like it s simplicity and its core principle
Now I might have to reconsider lol
AstonJ
@AstonJ
Oct 07 2014 23:06
Vienna looks awesome too :+1:
Loïc Boutet
@loicboutet
Oct 07 2014 23:06
well vienna is less disruptive
you an keep your existing habit for the back end
and have a nice front end framework in ruby
AstonJ
@AstonJ
Oct 07 2014 23:06
Admittedly, I haven’t looked too much into Vienna right now - but should...
Loïc Boutet
@loicboutet
Oct 07 2014 23:07
I think all is lacking is a good integration with rails/sinatra
like making it super easy to use inside those kind of project
and it could have an audience
What I like about vienna is that it just attach logic to your html elements
AstonJ
@AstonJ
Oct 07 2014 23:08
You should give that feedback to @adambeynon and @elia - though, they are probably already on it :D
Loïc Boutet
@loicboutet
Oct 07 2014 23:08
like you say "ok, now this table is my object and I will add attribute to it, and teach it its business logic"
I like the simplicity in that
and from what I see it s working quite well (for me at least)
AstonJ
@AstonJ
Oct 07 2014 23:09
I feel a new blog post coming on…. “Ruby is about to get cool again!"
Loïc Boutet
@loicboutet
Oct 07 2014 23:09
ah ah
I did a presentation kind of like that at the paris ruby meet up :p
"ruby is not only for your servers anymore"
AstonJ
@AstonJ
Oct 07 2014 23:10
have you got the slides up anywhere? :page_facing_up:
:p
but the talk is in french ^^
the slides are in english thought
AstonJ
@AstonJ
Oct 07 2014 23:11
Cool - thanks! My French is very rusty lol good to know the slides are in English
Nice chatting with you! I need to reboot (little snitch update) catch you laters
Loïc Boutet
@loicboutet
Oct 07 2014 23:11
sure :)
Loïc Boutet
@loicboutet
Oct 07 2014 23:18
In my talk I'm just using opal (and vienna) to make a very simple tic tac toe
and then use the same code
to have the tictactoe run in the browser
then embed it in atom-shell to make a desktop app
and then send it to the phonegap cloud to make a mobile app
and then you have a working app running everywhere with the same base code in ruby :)
George
@georgeu2000
Oct 07 2014 23:27
@loicboutet - Wow, that's awesome.
Loïc Boutet
@loicboutet
Oct 07 2014 23:28
thx, well opal is doing all the heavy lifting
after that it's just using already existing js tools
the code is there if you want to look at it https://github.com/loicboutet/opal-tictactoe
George
@georgeu2000
Oct 07 2014 23:29
Cool. Thanks.
Loïc Boutet
@loicboutet
Oct 07 2014 23:29
it needs some clean up
(I started from the vienna todo app and all the readme and stuff have not changed lol)
George
@georgeu2000
Oct 07 2014 23:30
I think a major pain point is that a lot of work is required to take a web app and convert to iOS and Android. And it is difficult to share code between them.
Loïc Boutet
@loicboutet
Oct 07 2014 23:30
I used some existing tictactoe class for the game logic
made from another member of the ruby paris meetup
just to prove you can reuse code in opal
yes definitely
well phonegap is the cheap solution to do that
George
@georgeu2000
Oct 07 2014 23:31
I read an interesting post by DHH about Rubymotion and the Basecamp app...
Loïc Boutet
@loicboutet
Oct 07 2014 23:31
you can embed your website in it, but well it won't have a native feel except if you put a lot of effort
oh? I missed that one
George
@georgeu2000
Oct 07 2014 23:31
Let me find it...
Loïc Boutet
@loicboutet
Oct 07 2014 23:32
thx
I ll be able to try rubymotion at my next job
George
@georgeu2000
Oct 07 2014 23:32
It's pretty old, so I wonder if things have changed...
Cool
Loïc Boutet
@loicboutet
Oct 07 2014 23:32
I am quite interested to try it :)
George
@georgeu2000
Oct 07 2014 23:32
I see it is by Nick, not DHH.
Loïc Boutet
@loicboutet
Oct 07 2014 23:33
OK
George
@georgeu2000
Oct 07 2014 23:33
It's interesting because it talks about integrating native controls with Ruby.
But, with iOS 8, it seems that the UI has changed...
Loïc Boutet
@loicboutet
Oct 07 2014 23:34
well yes, they do that on iOS version change
they changed quite a lot of the UI code between 6 and 7
George
@georgeu2000
Oct 07 2014 23:35
I see...
Loïc Boutet
@loicboutet
Oct 07 2014 23:35
(I unfortunately had to do some light coding in objective c in a previous life lol)
George
@georgeu2000
Oct 07 2014 23:35
You didn't like it?
Loïc Boutet
@loicboutet
Oct 07 2014 23:35
not a bit lol
the language is ugly as hell and the STI is pretty useless
but well, I think ruby spoiled me
ok ... need to go it's 1am here ;)
see you !
George
@georgeu2000
Oct 07 2014 23:41
Au revior