How to Use Unobtrusive Ajax

Okay, enough of the benefits for using Ajax unobtrusively.Let's get to the fun stuff.

Convincing Your Bosses and Clients

Certainly the first step in doing any programming, you have to convince the people who pay the bills, right?

Well, maybe not. Let me suggest something daring: don't ask for permission.Just do it.

Developing unobtrusively is much more a technical design than a design decision. Your bosses and clients depend on you to use your education and technical know-how to make the appropriate technical decisions when you work. Do you need to ask them before you comment your code? Do you need permission to decide whether or not to program with a Model-View-Controller pattern? Unless you are doing work for someone highly technical, chances are the answer is no.

You are responsible for making technical decision because you understand the pros and cons, and you understand how difficult it is to do things. Chances are, the people who pay the bills don't. Here is a bad example of a possible conversation, sadly one I've had several times in the past:

You: "What do we do if JavaScript is turned off?"

Boss: "Well, just display a message that they need to have JavaScript turned on."

Seems like a logical decision, doesn't it? Notice there are a lot of assumptions being made without being spoken. First, it's assumed that everyone has the option of turning JavaScript on. Second, it's assumed that the only way the web site will work is with JavaScript enabled. These ...

Get Unobtrusive Ajax now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.