4 ms·
Perhaps time for a little zen ;) >I'd rather get the work done with the tools I like Well you can - within your own computing environment but when you want to
by bdfh42 16y ago
Perhaps time for a little zen ;)
>I'd rather get the work done with the tools I like
Well you can - within your own computing environment but when you want to reach out and run code on your user's computer then you have to take the tools available. In this instance we have a (broadly) common language that runs on Windows, Mac, Linux and then some - thats pretty amazing.
<language instead of a bytecode interpreter
It would be trite to point out that what you have "under the hood" in JavaScript implementations is a pretty good JIT bytecode interpreter. JavaScript code represents a fully portable version of the code that will run in the user chosen browser on the user chosen hardware platform.
<properly iterate an array
Just picking on of your points here - It may be that you can solve each obstacle just the once and retain that solution into the future. As an example try https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach https://developer.mozilla.org/en/JavaScript/Reference/Global... for how to add "forEach" functionality to an array - an array which (of course) can contain objects of any type. I just love the ability to work with arrays (collections) of objects representing server side classes.
- pedrocr 16y agoThanks for the reply >In this instance we have a (broadly) common language that runs on Windows, Mac, Linux and then some - thats pretty amazing. We have enough VM's that can do the same, it's not really a technical issue, which is what frustrates me. >It would be trite to point out that what you have "under the hood" in JavaScript implementations is a pretty good JIT bytecode interpreter. Yep, and I'd rather be able to target that. > JavaScript code represents a fully portable version of the code that will run in the user chosen browser on the user chosen hardware platform. It isn't fully portable really. Much less than any standardized bytecode anyway. One thing I've also struggled with is that I not only have to figure out Javascript I have to figure out each browser's take on it. I've had the same code fail subtly on Chrome while working fine on Firefox. > for how to add "forEach" functionality to an array I implemented this kind of thing in my own code and it works although the "block" syntax is a bit ugly ("function() {}"). > I just love the ability to work with arrays (collections) of objects representing server side classes. I'm not sure what you mean here. One bit that has frustrated me is replicating in Javascript code what I already have for the same concepts/models in Rails. Although some of that is surely bad separation between client and server on my part.
- bdfh42 16y agoYou are probably aware of these anyway but - just in case... jQuery (and other frameworks) deal with almost all browser compatibility issues when it comes to the UI. JSON is a great format for passing class properties from server to client and back again making it reasonably straightforward to connect (via AJAX) JavaScript objects with server side classes.