rc3.org Strong opinions weakly held

Posts Tagged ‘Web development’

The risky aspect of HTML5

The theory is that if all the User-Agent providers implement all these algorithms exactly as specified, complete interoperability will be achieved and people who build Web applications need no longer concern themselves with the differences between User Agents. Which would of course be wonderful.

Will it work? Nobody knows; it’s a science experiment. Just because nobody has ever succeeded in specifying a workable networked object model doesn’t mean this project will likewise fail. But it does mean that when considering the future of HTML5, we should recognize that this is a very hard problem, and there’s no guarantee that that part of it will come off.

From a blog post on HTML5 by Tim Bray.

Assessing Apple’s revamped checkout process

Form expert Luke Wroblewski compares Apple’s revamped checkout process to their old checkout process. If you do any work designing HTML forms at all, you’ll want to check this case study out. I’m particularly interested in the pros and cons of requiring users to enter their city, state, and zip versus entering just the zip and looking up the city and state. Luke has looked at this issue before.

Storing data for Google Maps

I hinted at this in my link post, but I thought I’d write up the whole thing in hopes of discussing it. I have a page that will include a Google Map with markers for a number of locations (potentially a large number of markers). For an explanation of how to add markers to a Google Map, check out this page.

So the question is: how do you get the address data from my database to Google Maps?

The process is to geocode the address and then apply the marker to the map. There’s a simple example at that link.

Here are some possible approaches:

  1. Write some code (PHP in this case) that emits the JavaScript used to geocode the addresses and put the markers on the map. Unfortunately then you have a mixture of JavaScript and PHP code that looks a lot like JavaScript on your page.
  2. Print out a JavaScript data structure that contains all the information for the markers and then iterate over that data structure in JavaScript.
  3. Put the map data in hidden elements on the page where it can be extracted using JavaScript. The downside is you have hidden elements on your page. The upside is that your PHP is completely separated from your JavaScript.
  4. Create a service that returns a JSON data structure of the marker information that can be called using XmlHttpRequest and call that from the page. That offers a clean separation of the JavaScript from the PHP but unfortunately could add latency to the page.

I’ve done some searching to find out how people handle this problem, but haven’t seen any good answers yet. Any ideas?

HTML 5/XHTML 2 link roundup

This is a special link roundup related to the W3C killing off XHTML 2 and putting all its eggs in the HTML 5 basket. I’ve posted about this myself here.

Links from July 9th

Determining whether to hide a report filter

Let’s say you have a report that has some filter controls on top that let you narrow the scope of the report. When the report loads, the filter is collapsed. The user opens the filter, changes some of the settings, and submits the form. What is the preferred method for determining whether the filter should be displayed? A related question is whether you should detect the filter’s visibility status in JavaScript or you should check on the server side and use the style attribute to control visibility.

Here are some options:

There are probably other options as well, and all of them will work. Choosing from among them is a matter of ease of maintenance, mostly. Ideas?

Links from June 3rd

Links from May 28th

Quotable: Simon Willison

This is a great definition of a microframework:

Microframeworks let you build an entire web application in a single file, usually with only one import statement.

Links from March 30th

← Before