Archive for the ‘Web Basics’ Category

File Under: Web Basics

W3C Helps You Build a Better Web With ‘Web Platform Docs’

The W3C, the group that oversees the development of HTML and other web standards, is moving beyond dry, boring specifications with a new venture into developer documentation. The W3C has just launched an alpha preview of Web Platform Docs, a community-driven site the W3C is hoping will become the go-to source for learning how to build the web.

In other words the W3C is competing with Webmonkey.

We’re okay with that because there’s no such thing as too much high-quality, accurate info on the latest in HTML5, CSS 3 and other W3C standards. And quite frankly, HTML and CSS have grown considerably since the days when Webmonkey’s cheat sheets could tell you everything you needed to know.

Now there’s a plethora of resources for learning how to build the web — the Mozilla Developer Network, the Opera Developer Network and Microsoft’s developer site, to say nothing of the thousands of tutorials on developer blogs. But while there’s plenty out there to teach you what you need to know, finding exactly what you need to know can be challenging. You’re a web developer; you should spend your time building a better web, not searching Google for accurate info on web standards.

The goal of the W3C’s Web Platform Docs is twofold: get tons of great documentation all under one roof, and then — the most challenging part — make sure that it stays up to date. Solving the second problem is no small task. The web is currently littered with great tutorials on CSS Flexbox, which are, unfortunately, all wrong now that the Flexbox spec has been changed. The same is true of Web Sockets tutorials, Indexdb tutorials and any other tutorial on a spec that has changed or might change in the future.

These days keeping up with the rapidly changing world of web standards is a full-time job and who better to tell you what’s going on, how you can use new tools and when browsers will support them than the people actually writing standards and building browsers?

The W3C has managed to bring together some of the biggest names on the web to help create Web Platform Docs. Representatives from Opera, Adobe, Facebook, Google, Microsoft, Mozilla and Nokia will all be lending their expertise to the new site.

While the list of participating companies is impressive, Web Platform Docs is also a wiki that anyone, not just W3C reps, can edit. As the W3C’s Douglas Schepers tells Webmonkey, “anyone can contribute and everyone is on equal footing.”

If your head is bursting with tutorials, code snippets, examples or solutions to common development problems, head on over to the site and sign up so you can contribute. Bear in mind that this is an alpha release. While the site looks great and has the basic features of a wiki up and running, many of the features Schepers mentions in the intro blog post aren’t available just yet. “In the spirit of ‘release early, release often’, we decided to announce the site at the earliest possible point and improve it in public,” writes Schepers.

Right now the content of the site is primarily documentation, but the plan is to include tips and best practices along with up-to-date information on standardization progress and browser support for individual features. Other cool planned features include a way to share code snippets and an API for some aspects of the site.

For an overview of the site and to learn a bit more about where the W3C plans to go with Web Platform Docs, check out the video below.

File Under: APIs, JavaScript, Web Basics

RSS in JSON, for Real?

Photo: Kevin Conboy/Flickr

A short while ago Twitter said they were going to move to JSON over XML, without much explanation other than they like JSON and not XML so much these days, etc. I’m a big believer that everyone has the right to support whatever they want when they want for whatever reason, whether they say the truth or not. Because of that belief, I take with a grain of salt every bit of support for every format and protocol. I assume that just because someone supports it today doesn’t tell you for sure that they will support it tomorrow. Though the penalty is usually pretty high for removing support for interfaces people depend on. They tend to remember it next time you ask for their trust. All that is fair game too.

So anyway, this got me thinking again about the possibility that JSON might take over from XML. What then? Should we give up all the interop we get from RSS just because it uses XML and not JSON? And it’s because of all that interop that that day will never come. A transition may happen over a long period of time, and before it’s complete there will be something after JSON. Because smart people see that, they tend to be conservative about switching just for the sake of switching. It’s why the web, which is entirely an XML application, will keep XML support everywhere for the forseeable future.

In other words, I’d bet with virtual 100 percent certainty that it’s safe to keep producing XML-based RSS feeds.

But people like JSON, there’s no denying that. And a JSONified RSS can totally co-exist with the original XML. So let’s have RSS in JSON? That’s a question that seems worth asking about, at this time.

Turns out it is a very straightforward thing to do. I of course have an RSS feed for Scripting News, the blog you’re reading right now. I wrote a script that maintains JSON and JSONP versions of the same content, automatically. When the RSS is built so are the JSON formats.

http://scripting.com/rss.json and http://scripting.com/rss.js

I learned a long time ago to embrace change. It’s why there is a RSS today that is derived from the RSS that Netscape shipped in 1999 and has features of my scriptingNews format shipped in 1997. If the world wants to go to JSON, help it get there in a way that benefits from all we learned in the evolution of RSS from 1997 through 2002. It’s stood up pretty well over the years. And there’s wide support for it, and lots of understanding of how it works. If there is to be a JSON-based syndication standard, we can cut years off the development process by simply accommodating it.

So I put together an invitation to discuss this.

http://rssjs.org/

If you find this interesting, give it some thought, and if you have something to say, write a blog post of your own, or write a comment on that page. Obviously there’s no moderation for what goes on your blog, but there will be moderation of the comments. Be aware of that. One feature of the past are personal attacks which are totally pointless and subtract from the discourse, and we should not carry that practice forward. That’s why the moderation. :-)

Otherwise, I totally look forward to hearing what people think.

Thanks…

This post first appeared on Scripting News.

Dave Winer, a former researcher at NYU and Harvard, pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software. A former contributing editor at Wired magazine, Dave won the Wired Tech Renegade award in 2001.
Follow @davewiner on Twitter.
File Under: HTML5, Web Basics

Popular ‘HTML5 Boilerplate’ Hits 4.0

HTML5 Boilerplate, easy to bolt on. Image: Les Chatfield/Flickr

The developers behind HTML5 Boilerplate have released version 4 of their boilerplate HTML, CSS and JavaScript templates for quickly prototyping HTML5 designs.

You can grab a copy of HTML5 Boilerplate v4.0 from the HTML5 Boilerplate website.

This release is notable for a number of changes including a snazzy new website, cleaned up and reorganized code and the beginnings of a high-resolution-screen @media query. This release is also notable for what it lacks, namely the trademark pink text highlight color which has been ditched in favor of a more neutral blue.

Version 4 of Boilerplate also updates the various code libraries that Boilerplate relies on, including jQuery, Modernizer and the very awesome Normalize.css.

You can see the complete changelog for this version over on Github and get any help you might need with HTML5 Boilerplate at Stack Overflow.

File Under: Web Basics, Web Services

Google’s New Page Speed Tool Speeds Up Your Website

Page Speed’s rewriter is done before the unoptimized version even starts loading images. Image: Screenshot/Webmonkey

Google has added yet another trick to the company’s Page Speed web optimization service — a page rewriter that turbocharges your site by making sure that your visible, above-the-fold content loads before anything else.

Google started on its web optimization quest with the Page Speed browser extension, then it moved the Page Speed tool online with an API and then created the Page Speed Service to handle some of the tricky bits of web optimization for you. Now the Page Speed service has another trick for users.

Page Speed’s new rewriter, which Google refers to as “Cache and Prioritize Visible Content,” works by optimizing three main things on your site — all of which are standard best practices for speeding up a website, but are often hard for smaller sites to pull off. First off the Page Speed rewriter isolates those parts of the page that can’t be cached (logged in user info for example) and caches the rest of the page.

The next step is, as the name implies, to “prioritize visible content rendering.” The Google blog is a little unclear on how this works, saying only that the rewriter “automatically determines and prioritizes the content that is above the fold of the browser, so that it doesn’t have to compete with the rest of the page.”

The third part of Page Speed’s optimization is to defer the loading of any JavaScript until the visible content is loaded.

At the moment the Page Speed Service is invite-only, but if you’d like to request access, head on over to the sign-up page and drop your e-mail and URL in the form.

While you’re waiting for access, if you want to see what Page Speed’s rewriter might be able to do for your site, you can head over to Web Page Test, which now has a profile for the Page Speed rewriter. I ran my personal site (a very simple, static HTML site served by Nginx) through it and found that, as you can see in the image above, the rewriter considerably improved the first load time of images (pretty much the only thing that takes any time to load on my site).

File Under: Web Basics

Fly Your Nerd Flag With a CSS Box Model T-Shirt

The CSS Box Model t-shirt.

If there is one ring that binds the rest of web development together, it’s probably the CSS Box Model. The box model is a set of convoluted, unintuitive rules that only a browser maker could love, but now it’s also a nice looking t-shirt.

If you’d like to keep the box model fresh in your mind (just glance down) or if you just need a nice new web nerd flag to fly, head on over to CSS Box Model and order a shirt for $25 (shipping included).

CSS Box Model will be taking pre-sale orders for the first run of t-shirts until August 15th.