Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 29 2018 21:49
    elia closed #27
  • Sep 29 2018 21:49
    elia commented #27
  • Sep 29 2018 21:49
    elia closed #25
  • Sep 29 2018 21:49
    elia commented #25
  • Sep 29 2018 21:49
    elia closed #24
  • Sep 29 2018 21:49
    elia commented #24
  • Sep 29 2018 21:49
    elia closed #18
  • Sep 29 2018 21:49
    elia commented #18
  • Sep 29 2018 21:48
    elia closed #15
  • Sep 29 2018 21:48
    elia commented #15
  • Oct 03 2017 15:59
    the-robear closed #31
  • Dec 02 2016 23:19

    elia on master

    Add a notice about suspended ma… (compare)

  • Dec 02 2016 23:05
    elia commented #32
  • Nov 07 2016 12:41
    doodzik closed #32
  • Nov 07 2016 12:41
    doodzik commented #32
  • Jun 13 2016 19:24
    dougo commented #23
  • Jun 11 2016 19:51
    dancinglightning commented #23
  • Jun 11 2016 19:42
    dougo edited #23
  • Jun 11 2016 19:41
    dougo commented #23
  • Jun 11 2016 19:35
    dancinglightning commented #23
Adam Beynon
@adambeynon
but I get around that by doing Vienna = Fire
Can Edremitoglu
@cantonic
ah ok. then everything is fine :) i am really excited to get started and to show it to my team
Adam Beynon
@adambeynon
@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
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
@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
i just noticed that there is no Controllers class in vienna. I wonder what the ‘C' in ‘MVC’ stands for.
Adam Beynon
@adambeynon
@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
@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
btw: using opal-rails and vienna both from github doesn’t work. dependency issue with opal-jquery
Elia Schito
@elia
@cantonic opal-rails master uses opal master and it's probably better to use opal-jquery master too
Can Edremitoglu
@cantonic
thank you @elia . are there any concerns about using the master branch for production? sure, a stable version is always better, but there seem to be quite a few updates since the stable version
Elia Schito
@elia
@cantonic yeah, all things considered master has a huge load of fixes
Also the build is practically always green and you can be sure that it’s master that will get the most attention for bugs
Can Edremitoglu
@cantonic
@elia the latest build is failing :)
Can Edremitoglu
@cantonic
hey guys, I need your help please. first I wasn’t able to install vienna because i got this error when doing bundle install: Could not find gem 'vienna (>= 0) ruby' in git://github.com/opal/vienna.git (at master). Source does not contain any versions of 'vienna (>= 0) ruby’. Then I noticed, that the gem’s name has changed from vienna to opal-vienna. now I am getting Could not find gem 'opal (~> 0.5.0) ruby', which is required by gem 'opal-sprockets (>= 0) ruby', in any of the sources.. this is what I put into my Gemfile following #16 :
gem 'opal-rails',     github: 'opal/opal-rails'
gem 'opal',           github: 'opal/opal'
gem 'opal-sprockets', github: 'opal/opal-sprockets'
gem 'opal-jquery',    github: 'opal/opal-jquery'
gem 'opal-vienna',    github: 'opal/vienna'
Can Edremitoglu
@cantonic
alright, changed the Gemfile and could install everything:
gem 'opal-rails',     github: 'opal/opal-rails'
gem 'opal-jquery',    github: 'opal/opal-jquery'
gem 'opal-vienna',    github: 'opal/vienna'
gem 'opal-haml',      github: 'opal/opal-haml'

now I am receiving this error in the js console:

GET http://localhost:3000/assets/opal.map 500 (Internal Server Error)
GET http://localhost:3000/assets/opal-jquery.map 500 (Internal Server Error)

excerpt from development.log:

TypeError (no implicit conversion of nil into String):
  /Users/cantonic/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/json/common.rb:155:in `initialize'
  /Users/cantonic/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/json/common.rb:155:in `new'
  /Users/cantonic/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/json/common.rb:155:in `parse'
  opal (0.7.0.beta3) lib/opal/sprockets/server.rb:39:in `call'
Can Edremitoglu
@cantonic
ok, i realise this has nothing to do with opal
i guess it has to do with coffee-rails-source-maps gem
Can Edremitoglu
@cantonic
alright. got opal-rails working. I defined my first vienna model and getting Uncaught NameError: uninitialized constant Object::Vienna
adding //= require vienna to app/assets/javascripts/application.js solved it. maybe that should be mentioned in the README.
Can Edremitoglu
@cantonic
sorry, but I need help again :( I read that vienna is not supporting not-hash style routes. This is a bit of a problem since I need vienna to run on /calendars instead of /#/calendars because I am using rails. any ideas for a workaround?
Can Edremitoglu
@cantonic
@adambeynon can you help on this maybe when you are online?
Can Edremitoglu
@cantonic
i just found Vienna::HistoryRouter, but can’t get it working.
Can Edremitoglu
@cantonic
I fear that I have to drop that and continue using backbone :(
Can Edremitoglu
@cantonic
After fighting with BackboneJS for quite some time, the wish for a better “getting started” guide for opal-vienna rises. @adambeynon I will surely give opal-vienna another, but will probably need your help. We could take my try on opal-vienna as a chance to write some getting started documentation and note down problems I will encounter as an opal beginner. What do you think?
Jared White
@jaredcwhite
I have to say, as someone who tried out Vienna briefly, wrote part of an Opal-based framework that I never released, and then recently wrote another part of one from scratch for an actual client project, I'm increasingly becoming a fan of just building POROs (Plain Old Ruby Objects). You can create an MVC framework yourself out of thin air just by writing a few simple objects and connecting them using those patterns. I find the vast majority of client-side frameworks are way-ay-ay-ay too complicated. Backbone is nice in the sense that it's fairly simple to understand, but in many cases to me it feels like it's simply trying to abstract away Javascript ugliness (something that just isn't required when coding in clean, sensible Ruby!) Using opal-jquery plus opalerb files takes care of events and templating just fine. Anyway, I do look forward to seeing Fire come out but for now I'm content just using my own little home-brewed MVC codebase. :)
Adam Beynon
@adambeynon
@jaredcwhite agreed. fire/vienna end up being not a lot more than just conventions for models and views for me. Fire actually has less client side code than vienna atm
of course, ruby modules makes things like view bindings really easy
but also very optional
Can Edremitoglu
@cantonic
convinced. i will put my current work with backbone on hold and trz rebuilding it with opal.
Elia Schito
@elia
@jaredcwhite @adambeynon :+1:
Jared White
@jaredcwhite
This message was deleted
Jose Bencosme
@jlbenc
Hello, all. How's the RubyFire project coming along? Very excited about this idea.
Loïc Boutet
@loicboutet
any news one "ruby fire" ?
Elia Schito
@elia
@loicboutet I think you need to ask @AstonJ if he has any insights
AstonJ
@AstonJ
I don’t unfortunately - haven’t had a chance to speak to @adambeynon for a while - perhaps you can give us an update Adam? :P
Martin Becker
@Thermatix
@all I have a request, can I borrow the code for Route class for use in my router library?
If I'm allowed I'd like to know the author so I can give credit
Elia Schito
@elia
the author is @adambeynon btw
Martin Becker
@Thermatix
is that a yes?
Elia Schito
@elia
yes, MIT license is yes :), but please read the license in order to grasp how it works exaclty