Greetings,
I'm kind of a home hobbiest when it comes to web application programming and hope to one day take it to the next level and become useful in somebodys' IT department. But I have a ways to go in that reguard yet. None the less, I'm working on studying Javascript and I stumbled upon the Raxan framework. It seems pretty cool and conceptually I find it rather intriguing so I've started to pull through the code to see what I might learn. Well, I'm running into things I've never seen before, but bare in mind I've only recently started to dig around in php and javascript. If the good folks here wouldn't mind answering a couple of questions to advance my understanding I'd really appreciate it. For example:
1) In the opening line of startup.js I see: "html = Raxan = { // html class object". I'm not familiar with any javascript declarations that look like this. Neither the indentifier 'html' nor 'Raxan' declare any kind of data type. I'm not seeing "var html, Raxan = new Array (or function)...or whatever" This confused me, though I admit that it is easy to do. So I guess my question is: When a class object has no initial declaration to any type of internal javascript variable other that user defined types, does it just default to type "object"?
2) Further down the line I see:
$trigger = Raxan.triggerRemote = function(target,type,val,serialize,opt){
opt = opt || {};
My questions about this is, is Raxan.triggerRemote defined right here in this declaration? And.... Last but not least what does this do: "opt = opt || {};" And is there another way of saying this? If so, why is this code fragment executed this way?
I'm just trying to learn what's going on here about how this framework actually works. I have learned that I don't always have to understand how a library works to find it useful, but do spend alot of time pulling through other peoples stuff in order to learn how things are done because most online tutorials only really can take you so far.
Thanks,
Mark