Wednesday, May 23, 2012

In Place Editor Custom Binding for Knockout.js

I recently discovered knockout.js and was totally blown away. It does a great job of removing the need for (most) DOM manipulations which lets you focus on your data model and get complex UIs running with a minimal amount of code.  That said, those complex UIs are by default made up of simple widgets (input boxes, buttons, etc) and if you want more complex widgets (date pickers, inline editors, etc) you need to either find them elsewhere or roll your own.  Ryan Niemeyer gives a great explanation of how to create a date picker (or any custom binding) and I quickly incorporated it into my own site.  Since I also needed an inline editor I figured I would post my results so others could reuse and improve upon them.  The following code is very much based on the Custom Bindings article referenced above and the Jeditable inline editor.

Tuesday, May 15, 2012

Euphemisms: When Good Words Go Bad

A euphemism is a nice way of saying something not so nice.  The problem with euphemisms is that the more successful they are, the more likely they are to take on the not so nice meaning of the thing they're trying to be nice about.  Once this reversal happens, they transition from a euphemism to a synonym and a new euphemism must be created.  It's an interesting quirk of language that a word or phrase can be intended to mean one thing and then become so popular that it comes to mean something entirely different.