So, I finally purchased MV last night and I feel like I'm a newb at scripting agian! 🙁
I have gotten pretty proficient at scripting in Ruby. But Javascript is like a different planet right now. I've spent much of the past 15 hours studying Javascript from tutorial websites and watching videos. But I have a few questions regarding how it compares to Ruby.
First, if I'm understanding this correctly, 'this' is basically the same as 'self' in Ruby. Is that right?
Secondly, the accessors of Ruby, 'attr_accessor', 'attr_reader', 'attr_writer', provide a way for you to make variables within a class accessible from outside the class itself. What's the equivalent in Javascript?
Thirdly, what about the Ruby Hash? Is there something similar in Javascript? I like the way the Ruby hash keys can be anything, string, integer, array, class, etc. They are very useful. So I was wondering is there an equivalent? Or is must I just use JS Arrays?
Fourthly, the 'module' of Ruby. Do I need to just set constant variables in the class I'm working in? How would this be used by the script's users? One of the cool things about Ruby is that you could provide an easily accessible area for the user to adjust things to their settings in the module.
Finally, 'aliasing'. What's the deal on that? Do I just have to overwrite methods that I plan to alter?
I hope this isn't too much to ask. I really want to start coding with MV and I'm trying to grasp the concepts of Javascript as it relates to Ruby. The syntax, I know, will just come with time and practice. So any help you can provide would be greatly appreciated.
I have gotten pretty proficient at scripting in Ruby. But Javascript is like a different planet right now. I've spent much of the past 15 hours studying Javascript from tutorial websites and watching videos. But I have a few questions regarding how it compares to Ruby.
First, if I'm understanding this correctly, 'this' is basically the same as 'self' in Ruby. Is that right?
Secondly, the accessors of Ruby, 'attr_accessor', 'attr_reader', 'attr_writer', provide a way for you to make variables within a class accessible from outside the class itself. What's the equivalent in Javascript?
Thirdly, what about the Ruby Hash? Is there something similar in Javascript? I like the way the Ruby hash keys can be anything, string, integer, array, class, etc. They are very useful. So I was wondering is there an equivalent? Or is must I just use JS Arrays?
Fourthly, the 'module' of Ruby. Do I need to just set constant variables in the class I'm working in? How would this be used by the script's users? One of the cool things about Ruby is that you could provide an easily accessible area for the user to adjust things to their settings in the module.
Finally, 'aliasing'. What's the deal on that? Do I just have to overwrite methods that I plan to alter?
I hope this isn't too much to ask. I really want to start coding with MV and I'm trying to grasp the concepts of Javascript as it relates to Ruby. The syntax, I know, will just come with time and practice. So any help you can provide would be greatly appreciated.