gregmalcolm/making-movies — pull request #1 by DougReeder (2014-07-23 17:29:46+00:00)
Title: Sample Project Updates

## SEARCH
The principal changes I made were adding search to the Actors and Movies pages. The Actors page uses a technique suitable for hundreds of items - the list is generated server-side, initially all items are displayed, but the user can type to filter it down.

A proper movie database would contain tens or hundreds of thousands of actors and movies. The appropriate technique would be to filter at the database layer. I don't know Rails, so I couldn't implement that, but for the Movies page, I implemented the client-side mechanisms. A proper implementation would launch an AJAX query for each search, with a query parameter of the search string. My implementation downloads the JSON once, and does a simple filter on each key stroke. Either way, the response JSON is converted into HTML using a templating library.

## LAYOUT
Secondarily, I needed a list widget. It's not clear that there's a standard one for jQuery UI, so I used jQuery Mobile's ListView. Using jQuery Mobile also improved the styling generally, on large screens. I didn't delve into jQuery Mobile enough to make the layout actually work on a small screen.

## BUGS
After creating a new actor or movie, the list of actors or movies does not initially display. Refreshing or navigating around, then back corrects this. I didn't check that behavior before modifying the project, so it's not clear if this is an old or new bug.