I completely agree. I call myself a "web developer" because that's the most accurate description of what I do. "web programmer", "software engineer", and "systems engineer" are all too narrow.
On top of programming, I also do system ops, ui design, customer service (and client service), project management. Developing a web site takes a lot more than programming, especially if the team is small.
This all looks very cosy with all these companies supporting it, but I wonder how this site will deal with the more political aspects of web technologies. For example, it's still totally ridiculous that there is not one audio or video format that plays everywhere. You have to dual-encode to two formats. So if you make a game with sound effects, you have to find both a Vorbis and AAC encoder, and if you want to host a video you'll need Theora and H.264 or whatever the deal is there, and so on. So what will WebPlatform.org recommend, given how obvious it is that one format would be far simpler and make for a better platform? Will it side one way or another? Will this upset their "stewards"?
For audio at least, things are looking up. Opus, a new royalty-free codec backed by both Mozilla Foundation and Skype (Microsoft), has been standardized as an RFC[1], and will likely be mandatory in WebRTC[2]. So we should be seeing that across all major browsers in a year or two.
Opus beats almost all other codecs (MP3, AAC and HE-AAC, Vorbis) in subjective quality[3], so it's a good standard to have.
The IETF is forming a new working group for an open video codec[1]. It is still a BoF and will be chartered in 3-6 months, which is when the real work will begin. More details on the charter can be found in this email [2].
As for the audio, WebRTC chose G.711 and Opus as mandatory to implement (MTI)[3]. The reason for G.711 is so that WebRTC can interoperate with legacy devices.
Not solely. Opus is a hybrid of the SILK codec, which is more for speech, and CELT, which is more aimed at music. It can seamlessly switch between the two methods and use them simultaneously: https://wiki.xiph.org/OpusFAQ#Why_not_keep_the_SILK_and_CELT...
The main goal was streaming (of both music and speech), and hence, low latency. Matching or bettering high-latency codecs (like Vorbis) on quality was just a bonus, and I believe somewhat of a surprise to the developers when listening test results came out.
> Opus is a totally open, royalty-free, highly versatile audio codec. Opus is unmatched for interactive speech and music transmission over the Internet, but also intended for storage and streaming applications
While everyone is involved, the site serves web developers. So the best practice for developing for the platform at large is the target.
http://docs.webplatform.org/wiki/WPD:Policy/Pillars outlines a bit more of the thinking behind the priorities.
In the case of <video>, the site will recommend encoding to both Theora and H.264, and serving both sources, yes. It's the practical (although not necessarily convenient) answer.
On the video front, WebM is supported by most of the major browsers excepting IE and Safari, both of which support WebM via extensions or MP4/H.264. WebM might make its way into IE/Safari once Microsoft and Apple decide that there's no chance of being ambushed by patents [0].
Yeah this looks awful. No syntax highlighting either, which is odd because its basically automatic these days (rainbow.js or any of a million plugins). It's also surprising that they resorted to a screenshot instead of just putting the playable game on the page.
I think the use of setInterval is fine because it keeps the code very short compared to the requestAnimationFrame shim, but there should definitely be mention of it.
Hopefully I can add my tutorials to this site (which I think are much cleaner) when I'm finally done with my (blocking) larger projects.
I don't see how the red text "Web Platform Docs is an open wiki that anyone can help improve. See the getting started guide[0] to learn more." in the alert box at the top of the page could be more clear.
I am not being argumentative when I ask this, I just want more details about this bullet:
> - Questionable class-like implementation.
Can you just lay it all out right here? What is wrong (or suboptimal) with the implementation, what alternatives would you prefer, etc. Everything that is behind that bullet, I want to hear it!
Instead of using prototypes and functions shared among all instances of the same type of object, it uses closures for each instance. The coding style is also questionable, with everything referencing a variable named 'I'.
It works, but in my opinion it is absolutely not a correct way to write code. In any case, OOP and class-style programming in Javascript is a large topic.
As you suggest, there are several schools of thought about how best to provide class-style programming. By using a closure instead of prototypes, you can have "true" private properties and functions. If you use prototype, you'll need to use a convention to mark something as private and hope the developers respect that (marking it with an underscore is common). In my experience, someone will ignore the convention and then something will break when you change or remove your "private" variable.
If the code was using those or other advantages of the pattern (like easier subclassing, methods already bound to the instance, etc) consistently, it would make sense. As it is, it just does ugly things like using 'I' and 'this' without any thought or pattern I can discern.
> Instead of using prototypes and functions shared among all instances of the same type of object, it uses closures for each instance.
So, is this generally considered a poor practice? I usually only use prototypes and shared functions when I am going to be instantiating the same type of object many times (when doing lots of vector math, for example).
I get your point, but you should remember that we all have learned things the "wrong" way for the sake of brevity before we moved on to learning the best way. Despite the flaws, I still think the tutorial is a great introduction to breaking down the steps of creating a game.
Absolutely! I can look back at the set of tutorials that I myself wrote while I was learning JavaScript and HTML5, and there's a bunch of stuff that makes me blush now - including among other things using jQuery and this quote: "Learn jQuery and love it." For the sake of completeness (and cannon fodder for anyone who wants to criticize) it's here: http://www.iguanademos.com/Jare/docs/html5/Lessons/
My concern was perhaps due to expectations about the quality of the site's content, as people were talking about where it stood compared to w3schools and even MDN.
* The naming convention is terrible. 'canvasElement' sounds like it would be the canvas element, yes? No, it's the canvas jQuery object!
* Use of hard-to-read string concatenation.
* Use of .get(0) - use [0] instead.
And some non-jQuery objections:
* Unfortunate line continuation style that is hard to maintain (What if you change the length of the canvasElement variable name? You have to re-align it!) and falls apart in a proportional font.
* Inconsistent use of single vs. double quotes. I recommend single quotes for JS strings and double quotes for HTML attributes. Do it the other way around if you prefer, but at least pick one and stick with it!
* I'm reading the code out of context, but I'm guessing that CANVAS_WIDTH and CANVAS_HEIGHT are "constants". Why are they being used directly in the code like this? Shouldn't this code be wrapped up in a function that takes those as parameters?
Ignoring that last objection for the moment, I might write the jQuery version like this:
You're right, of course, that in this particular example jQuery has little or no advantage over direct DOM manipulation, but if they are going to offer a jQuery example, it ought to at least be a good one.
BTW the $ prefix on a variable containing a jQuery object is a very common practice in jQuery code. It's especially useful when you need both the jQuery object and the corresponding DOM element (assuming a single-element selector like '#foo'). Then you can use $ on the jQuery object and the same name without the $ for the DOM element:
That jQuery code is so horrible. What about if CANVAS_WIDTH is from an insecure source? Maybe someone sets it to include some of its own <script> tags or other tomfoolery.
your condescending tone aside, jQuery's API and vendor support is subject to change, especially in the coming months. last i heard, 50% usage also means 50% non-usage. you are also assuming that the target is a web browser, which is what jQuery is meant for. jQuery has no bearing on firefox extension programming, nodejs programming, or upcoming win8 RT and Firefox OS programming.
>your condescending tone aside, jQuery's API and vendor support is subject to change, especially in the coming months. last i heard, 50% usage also means 50% non-usage.
I'm afraid the points you make are not gonna help with my condescending tone.
50% usage? That's a HUGE success for a de-facto standard. There are even _official_ standards with much LESS use (SOAP comes to mind). So, the "50% non usage" part means absolutely nothing.
>you are also assuming that the target is a web browser, which is what jQuery is meant for. jQuery has no bearing on firefox extension programming, nodejs programming, or upcoming win8 RT and Firefox OS programming
Even if that was true, it would be irrelevant. Yes, a standard is only a standard is some SPECIFIC field. RS-232 is a standard, but has no bearing on, say, building construction. And those ANSI Screw size standards have no bearing at all in software: http://www.engineersedge.com/screw_threads_chart.htm
That doesn't make them any less standard.
That said, your examples are also false. jQuery can and IS used in nodejs AND in firefox extension programming. And presummably Firefox OS programming. Some examples:
Shouldn't the point of the "web platform" be that they make de-facto standards like JQuery obsolete? It seems to me that the examples and information on this site should be based on code that will work on all browsers without an intermediary between the code and the software these vendors (mostly) produce.
They didn't want search traffic until the content and structure start to stabilize? Google, et al. will crawl for years after a URL 404s so it might make sense to hold off until the first round of stabilization
Wonderful, just wonderful. I'm glad to have woken up today to find the first item on Hacker News to be several big-name companies collaborating to bring several technologies forwards and more standardized, instead of fighting against each-other for the proprietary implementations of trivial things.
I'd really like to see a 'Web 2012' standard, and 'Web 2013' standard, etc. It's basically the set of APIs which is implemented across all browsers at that date (say July 1st of that year).
So as an app developer, you could just design to 'Web 2011' which is the set of APIs fully supported (or polyfilled) across all browsers as of July 1st, 2011.
What's the definition of "all browsers" though? Are we counting IE6? Only the newest version of each major browser? Would you be expecting web users to be using a minimum browser version?
Although a cool idea, I don't see how this would mitigate any issues currently surrounding standards.
Latest release version of major browsers (Chrome, IE, FF, Opera, Safari).
Have a mobile version which tracks mobile browsers.
Once the HTML5 term was dropped (because it's a living spec), it's impossible to refer to any meaningful feature set. Of course it's all HTML, but there's so much variance in what's supported and what is not. If I can then say 'HTML 2011', that means HTML which was supported by RTM versions in 2011.
A variation on this would be to say that rather than referring to the latest RTM version of browsers, 'HTML 2011' would refer to the subset of HTML which can target 80% (or something) of worldwide users.
I'm truly asking, why is that? If the OP found it through TNW (or any other!), I see no reason why not to give credit and traffic to the news provider?
You're just a click away, the link is at the beginning of the article and it is not an add covered site or link bait.
For one thing that's what I'd expect based on the title (since the site already launched). If the site hadn't launched, then a link to a relatively contentless news story would be fine.
I don't want to be an asshole who just criticizes, but really? It's the best W3C, Apple, Google, Microsoft, Mozilla, Facebook, HP, Adobe, Nokia and Opera could come up with?
Actually a "2 + 3" captcha is much more effective than a typical one with an image. You'd be surprised.
When I ran a phpBB forum that spammers would join to get some of my PageRank 2 juice, putting up a special question on the registration form (by modifying the php code), was much more effective than phpBB3's captcha function with maximum difficulty applied.
Spamming software doesn't have support for capctha questions, only captcha images.
It depends on the threat. If you're worried about someone writing a custom script to attack your site, you want a hard captcha. If you're worried about random form-filling bot spammers, you want to be unique.
I wrote a plugin for wordpress years ago that simply asked you to copy a number into a box. If you had JavaScript, it would even do it for you and hide it so most users never even knew it was there. It filtered out nearly every single piece of spam. This would have been mid-2000s though, might be different now.
The problem is, it's always in the form of "x + y = ?", which makes it ridiculously easy to bypass with an script.
At least that's what I initially thought. But after some more digging it seems that x and y are hard-coded to be 2 and 3, respectively.
I opened the registration page in 4 different browsers with different IP addresses (my own, my VPS, and a couple borrowed from Tor) and in all cases the "security" question was "What is 2 + 3?"
Ten minutes to implement, stops nearly all automated attacks that aren't specific to this site, much less user hostile, and far fewer accessibility issues.
As someone pointed out above, the robots.txt may be like that because the site hasn't been deemed properly ready. (And similarly, the site isn't fully developed so the blog isn't set up yet.)
>I don't want to be an asshole who just criticizes, but really? It's the best W3C, Apple, Google, Microsoft, Mozilla, Facebook, HP, Adobe, Nokia and Opera could come up with?
No, it's the best a small team, sponsored by those companies, but having nothing to do with them --it's not like Google or Adobe or MS assigned their best engineers to the new site-- could come up with as an ALPHA release, and in a short period of time.
No, it's not. I didn't (and still don't) see a mention of it being alpha or even beta on the site's homepage or the linked article. There's a notice on wiki pages that I missed.
And my impression (from the article) was that the initial content is provided by the aforementioned companies' employees, and the site is curated by W3C. So it's not like a bunch of nerds have created a site and these tech giants are endorsing it by putting their logos in the main page. They are the guys who are running it, and it's not a charity, too. It benefits all these companies (whom, in total, worth maybe about 3 trillion dollars) financially.
I'm not sour at them or anything - I'll probably use their site and share it with others. I'm just disappointed that it's just not up to the standards of what I was hoping these multi-trillion campaniles are able to do. If they were just a bunch of guys, I'd commend them. Now that it's a coalition of biggest tech giants, I can't be as forgiving.
utm links are tracking links for Google Analytics. If the link was clicked from inside a mailing list's email (which it most likely was), and they have Analytics setup with their Email Marketing Provider, it'll put that utm junk on the end.
Apple is a steward but puts a lot of thought and care into how its brand is presented on its own pages, let alone on those of a third party.
In a best case scenario they'd push back the launch of the site to make sure that everything is up to their standards (which logos they appear next to, amongst, etc; what their blurb says), but their second choice is to forbid anything about them on the site whilst they think about how they want it to look.
I'm impressed that they'd settle on IRC on Freenode for direct chat. Seems like the sort of thing that would not be improved by corporate lawyers for whatever reason.
i second that. however webplatform.org will need some serious SEO to displace w3schools. also, webplatform needs some serious work on their docs to make them readable and easy to search.
Maybe if webplatform.org is mentioned in enough places, webplatform will have a better Google ranking and webplatform might displace w3schools.
The promotion of webplatform would really help webplatform gain popularity. Do not hesitate to send the link to webplatform ( http://www.webplatform.org ) to as many people as possible.
Is there a community on Stack Overflow that is already offering the same functionality as the WebPlatform forums?
Some thoughts...
The Q/A format in general seems like a great solution to the problem of sharing the best way to do things because it requires the person asking the question to ask a 'good' question and the person answering the question to provide a 'good' answer. Voting up the 'best' answer gives the closest approximation to the 'right' answer. The WP forum is devoid of any real content. It'll be years before it has anything approximating what SO offers.
I can see the wiki format being good as a replacement for something like w3schools, but that isn't really what this appears to be. Plus, we all know that wiki's get out of date pretty quickly with the ever changing technology... unless of course enough people are paid to work on this content... and who says they are the 'experts'. You can already see in the comments here that people disagree with the coding examples. Who is going to moderate all of this?
Is there no way to sign up for this without connecting it to a Facebook, Linkedin, Twitter or Google account? The signup form indicates that you can sign in with a site-specific account, but I can't find out how to create one.
This awesome, I remember being really frustrated when I started out at my Rails internship because there wasn't any comprehensive documentation for HTML stuff like I was used to with Java, C++, etc.
If a webmaster is looking: "Your first look at JavaScript" [1] is duplicated from [2]. However, what should be internal links in [1] take you to [2]. For example, search "where to put javascript" in the first document.
I'd rather they come together to do something important, like implementing browserid/Persona. I don't think this will even come close to the usefulness of StackEchange.
Since this is related I'd love to share a similar project I am working on: http://www.betterfrontend.com - think of it as curated best-practices for Front-End Development.
Some good content here, but the rails specific stuff feels out of place on a site that purports to be focusing on the frontend. I'd consider either making it backend agnostic, or rebrand the site as Better Frontend for Rails developers.
Valid points. My vision is most that popular frameworks have their own best-practices. Initially starting with rails is just easier to target and be used for. Thoughts?
Agreed. Now if they would cease support for IE<9 on the desktop and for their mobile browsers pre-WP7, that'd be great. Offering a standards compliant browser for Windows XP (combined with a mandatory upgrade) would help as well. Given that IE9 depends on elements that were introduced in Vista that'll be quite an undertaking, so offering a browser choice menu for IE users on XP would be easiest.
Definitely still alpha (as they disclaim). Login doesn't always work, and when it does it sometimes forgets I'm logged in when moving from page to page..
one thing that would be of huge help, but also a huge undertaking is to allow for selection of targeted browsers, with the least common denominator dictating which code examples you see. for example if IE < 9 is selected, a jQuery fallback would be an acceptable compromise.