These are chat archives for opal/vienna

6th
Dec 2014
Can Edremitoglu
@cantonic
Dec 06 2014 15:50
did this channel just die?
Adam Beynon
@adambeynon
Dec 06 2014 15:50
hi @cantonic
some days its busier
sometimes..
Can Edremitoglu
@cantonic
Dec 06 2014 15:50
oh hi.
last message from 30th of oct :)
i am just about to move a backbone/rails application to vienna
but getting started is a bit hard. trying to find out what opel gems i need for it
Adam Beynon
@adambeynon
Dec 06 2014 15:56
sure. so vienna relies on opal itself (obviously), and opal-jquery
opal-jquery is just a wrapper around jQuery, giving it a bit more of a ruby feel
opal-rails is recommended as well, as it makes the integrartion of Opal into a rails app pretty much seamless
Can Edremitoglu
@cantonic
Dec 06 2014 15:57
oh thx for the hin. so i need opal, opal-rails, opal-jquery, (opal-rspec) and vienna
i assume using opal-all won’t work?
Can Edremitoglu
@cantonic
Dec 06 2014 16:03
the vienna gem on rubygems.org is a bit confusing :) looks like there is no version of opal/vienna on rubygems
by the way, i am just writing down my progress, thoughts and issues here in order to give you direct feedback. I don’t expect answers actually so please don’t feel stressed by all the following messages :)
Adam Beynon
@adambeynon
Dec 06 2014 16:11
lol, no problem
well, thats another thing i forgot to say
you need to use vienna from github
someone got to the vienna name on rubygems before me
Can Edremitoglu
@cantonic
Dec 06 2014 16:11
ah okay :)
Adam Beynon
@adambeynon
Dec 06 2014 16:11
so, we are rewriting vienna as rubyfire/fire
but that wont be out for a week or so
its a bit of an update as well
Can Edremitoglu
@cantonic
Dec 06 2014 16:12
hmm… i want to use vienna in production
so i am not just testing around. we are working on a school management application and i am currently coding a calendar module for it
should I wait for the new version?
Adam Beynon
@adambeynon
Dec 06 2014 16:25
@cantonic Fire is just a rewrite. As Im going through it, Im not having to make any actual code changes to adjust to it
the only difference is the Fire namespace instead of Vienna
but I get around that by doing Vienna = Fire
Can Edremitoglu
@cantonic
Dec 06 2014 16:25
ah ok. then everything is fine :) i am really excited to get started and to show it to my team
Adam Beynon
@adambeynon
Dec 06 2014 16:47
@cantonic give me a ping if you need any pointers etc
we also have the opal/opal room which is a bit more active too
Can Edremitoglu
@cantonic
Dec 06 2014 16:48
thank you for the offer @adambeynon . I just got rid of backbone and got opal-rails v 0.6.3 working (yay)
yeah i just joined the other room
it's a pretty strange and awesome feeling to write jquery as ruby code and see it really working :)
Can Edremitoglu
@cantonic
Dec 06 2014 17:24
@adambeynon do you have a preferred directory structure? I created the directories models, views and controllers in app/assets/javascripts/vienna/… and then stumbled over opal/opal-rails#16 which says that you can use the views directory of rails for your templates. which dir structure do you prefer when using vienna with rails?
Can Edremitoglu
@cantonic
Dec 06 2014 17:35
i just noticed that there is no Controllers class in vienna. I wonder what the ‘C' in ‘MVC’ stands for.
Adam Beynon
@adambeynon
Dec 06 2014 17:39
@cantonic usually I create controllers as PORO (plain old ruby objects)
they do any ajax stuff
and create the views
I usually put stuff into app/assets/javascripts/project_name/views
I dont namespace classes inside my opal code
so all views, models are top level
Can Edremitoglu
@cantonic
Dec 06 2014 17:47
@adambeynon but doesn’t that lead to duplicated model names? My activerecord model is called Calendar as well as the vienna model. Do you have an example of a controller maybe? that would be helpful
Can Edremitoglu
@cantonic
Dec 06 2014 17:53
btw: using opal-rails and vienna both from github doesn’t work. dependency issue with opal-jquery
Elia Schito
@elia
Dec 06 2014 23:19
@cantonic opal-rails master uses opal master and it's probably better to use opal-jquery master too