I sent in a talk proposal to PHP|Arch yesterday, to speak at their upcoming PHP|Works conference in Toronto this September. Please keep your fingers crossed on my behalf. The talk is titled "Building your REST API while your boss is out for lunch" which in retrospect is a little long and wordy for a title, but lets keep hoping anyways.


The goal of this talk is to introduce REST APIs, and demonstrate that they can be built quickly and easily to everyone's benefit. I also plan to spend a decent chunk of the talk examining security concerns, and how to handle them. For instance, your best bet when building an API (or any process that allows the user to access the same data in multiple methods) is to minimize the amount of unique or new code the API will function on. Both your website and your API should have a thin layer, that handles the incoming requests, then passes it off to a shared code base that handles data validation, and actually processing the request. This will definitely require some refactoring of the code handling the requests coming in off the web, but will pay for itself several times over every time you decide to upgrade the interface, or (and this is the important one) patch a security problem. Having duplicate code not only doubles your maintenance time, it also doubles the chances that you've missed something in either location.


The correct tab order for login forms is: Username -> Password -> [Remember Me ->] Login.


It is not Username -> Remember Me -> Password -> Login.


In any case, pressing the enter key should submit the form.


Get it right.



Also, If you feel some unknown, unexplained need to replace real form widgets with your own crap (flash or whatever), here are a couple of things you need to remember to code, because they seem to be strangely absent far too often:

  • Tabs - I use the tab key to navigate forms, as does most of the technically minded population, it's faster.
  • Shortcuts - There are these buttons on my keyboard that don't have letters on them, that doesn't mean they're useless. They do things, support the things they do. End->Shift+Home->Delete removes the entire line. Shift+Control->Left Arrow deletes the previous word. etc.
  • Enter - Hitting enter should submit the form, I shouldnt need to click on a button




[/soapbox]


Judging by the present activity on the internals list, it looks like PHP is finally going to get goto!

http://marc.theaimsgroup.com/?l=php-dev&m=111799083401504&w=2


let the flame war begin ... again

Hi, I’m Paul Reinheimer, a developer working on the web.

I co-founded WonderProxy which provides access to over 200 proxies around the world to enable testing of geoip sensitive applications. We've since expanded to offer more granular tooling through Where's it Up

My hobbies are cycling, photography, travel, and engaging Allison Moore in intelligent discourse. I frequently write about PHP and other related technologies.

Search