Switching From Flash To HTML5
- Started
- Last post
- 31 Responses
- stewdio0
@monolith JavaScript's prototypal inheritance model is more powerful than classical inheritance. You can mimic classical inheritance in JavaScript, but you *cannot* mimic prototypal inheritance in C++, Java, etc. JavaScript is not an abomination. It's the first descendant of Lisp, Scheme, and Self to make it mainstream. It's got bad parts of course, but its good parts are really, really good.
Watch this video "Volume One: The early years" here to see how JS came to be and why it's smarter than you give it credit for:
- your such a retardjadrian_uk
- i think you meant to write "you're" instead of "your"stewdio
- yes retardjadrian_uk
- fues0
Focus on animation and games to be more precise..
- Milan0
HTML5 is not what you think it is.
- dbloc0
start with jQuery.
http://jquery.com/
- monolith0
I watched and attended Crowford's sessions. IMO there are far more negatives than positives with Javascript and why most open source powers like Mozilla and Google want it replaced with something less messy. Loose typing that's so loose that it will very easily break applications, global variables, no proper classes, hashtables, no trace of packages or name spaces. This makes a problem of every public member of every object gets exposed to every other object and can be changed where security becomes a huge problem as well.
When you read Javascript The Good Parts you can't help but facepalm yourself over and over again when Crowford himself shows some of the most idiotic problems with Javascript.
I don't disagree with you about prototypal inheritance being relatively powerful and stuff like closure which is very popular and well implemented in Javascript. But the language is a mess from any way you look at it. One or two good things vs quite a
few bad things is not what I call a good compromise. This is why by default there are so many frameworks. They are attempts to try to compensate for the inadequacies of JS as a language and are trying to mimic "proper" languages.And I completely disagree with the whole you can achieve things in Javascript that you can in OOP and not vice versa. Class-based OO can offer things like static methods, abstract classes, interfaces, method overloading and operator overloading.
For anyone who is serious, javascript is an abomination as a programming language. It was patched together for the past 15 years and it's a mess, maybe ECMAScript 6 will bring something better but Crowford is defending it because he's JS grandaddy so to speak and the guy is behind JSON. It's his life and he has a certain dose of arrogance.
I mean if Javascript was such a great language Crowford wouldn't call every other book and guides for it useless.
When someone tells you that everybody else just doesn't get it, that's a signal that there is something wrong with the language and not the world and since I'm sure you have seen Crowford's lectures and read his books the amount of absurd nonsense that happens in Javascript is what makes it an abomination and no sugar coating will change that.
The best parts of JS IMO are well implemented closure, lambdas, dynamic objects, object literals but you can count those things on one hand. There are far more bad things that makes it a bad language.
I'll just leave you with this saying from Crowford that says it all:
"JavaScript became the world’s biggest programming language completely independent of its merits". JS became popular not because it's great but because it was really the only thing that was pushed on the web and now it's so widespread that you have to deal with it's problems.
- pango0
so in what order should like learn these wizardry art?
- < yeah .... what order say you?alicetheblue
- wtf was i saying... :( was probably drunk. i meant other than html, what should i learn first and what second and so on...?pango
- fues0
I know Milan.
- BabySnakes0
HTML is cake, CSS is where you will be cursing at your browser, and Javascipt isn't much different from AS. To get into some solid Javascipt OOP, Backbone.js is a nice framework. Combine it with jQuery and you will hardly miss flash*. http://documentcloud.github.com/…
- boz?monospaced
- negativeBabySnakes
- Boz would never say that.Amicus
- ukit20
Start with the basics, otherwise you will get confused.
Here's a good intro to HTML5
- stewdio0
(bump for @fues)
- vaxorcist0
frameworks can easily isolate you from the bullshit of browser testing, but add another layer of learning the framework PLUS learning javascript.... so it can be a bit too many layers of OO stuff at first, but if you're used to AS3, you're used to layers of stuff inside layers of stuff....
- kingsteven0
I learned a lot from hacking ^^ stew's chatttr (http://chatttr.com) - basically opening the js terminal and chrome and over-writing stew's functions with my own... then went and built this: http://♔.ws (btw. the amit pitaru-ness of it all is a little tribute to my flash roots) basically 2d canvas and a lot of 'lineTo' - very similar to flash's line drawing stuff.
I guess the difficult bit is learning all the frameworks etc. i'd recommend learning a bit of jquery (basically to target html elements so that you can manipulate them)... underscore.js (http://documentcloud.github.com... will give you alot of the methods that you use in flash that aren't standardised across js implementations.
- underscore link: http://bit.ly/1wlA2V…kingsteven
- also just realised my site isn't resizing when i click that link... :-/kingsteven
- PonyBoy0
Great Q by fues (you're not alone)... Keep the info / links coming!!
- zaq0
- BabySnakes0
http://html5boilerplate.com/
Get your HTML started on the right foot.
- vaxorcist0
This is a good thread, thanks everyone... some of these links are new to me.... and good....
underscore.js looks interesting, as my biggest irritation with JS / CSS DOM is the browser inconsistency effect from hell....
- fues0
Yes, god Lee Brimelow:
http://gotoandlearn.com/play.php…
- fues0
bump
- stewdio0
First, you have to unlearn what you have learned. I notice you mentioned Object Oriented programming. JavaScript is certainly about Objects, but it doesn't use Classical Inheritance (Classes and Objects). Instead it uses Prototypal Inheritance, and that is not a defect. It is a super power! http://en.wikipedia.org/wiki/Inh…)
You should really check out Douglas Crockford. Here's the useful book he wrote: http://www.amazon.com/exec/obido…
You might also find his video lectures useful. Chapter 2 and Act III will be your meat and potatoes, but I still enjoy Volume One anyway because I find the history fascinating. Really watch this stuff. Don't just have it playing idly in the background because you'll miss important bits. It's worth pausing on some code examples and thinking about what he's saying: http://yuiblog.com/crockford
And of course I have to mention Paper.js because I've been using it so much recently. It's an HTML vector graphics framework for the canvas. Just launched recently. Actively in development. Join their mailing list and start suggesting features ;) http://paperjs.org
- Fucken love paper.js :)mikotondria3
- unless he remembers prototypal inheritance from AS1... :-Dkingsteven
- not sure why he has to "unlearn" everything for retardedness of JS. Just use a framework that mimics OOP or if you coded in AS1 you know all this stuff anyways.monolith
- if you coded in AS1 you know all this stuff anyways.monolith