Advice for Web Programming
Here are some recommendations for developers who use the Ooyala APIs and who can benefit from recommendations about programming for the web.
These recommendations are based on the experience of Ooyala's engineering and professional services experts and are tips for putting in practice Ooyala's Best Practices.
Set up web caching
For best performance for your customers, set up a caching system for the responses from the Backlot API. One very popular and free program for caching is memcache, which comes free on Linux and is available for Microsoft Windows or Apple systems.
For instance, in the middle of the night (or whenever your front-end system is least active), you can set up a cron job (on Linux) that uses the Backlot API's /v2/assets route to retrieve all your videos (assets) from Backlot. With memcache running, the references to these videos are stored in case of future requests. When a request for an asset is received from a user, your program checks if the requested asset has already been cached. If so, the video is displayed; if not, a call to Backlot API retrieves it, stores it for future reference, and displays it. An example of coding with memcache in PHP is viewable at http://www.search-this.com/2007/07/24/an-introduction-to-memcached/
There is also a wealth of information on the Internet about this subject, such as http://www.mnot.net/cache_docs/.
Learn about Programming for Mobile WebSome recommendations1:
- Use basic HTML and CSS.
- Keep the size of images small for fast downloading.
- Use redirects with browser detection.
- Usability issues: do not overload your pages. Provide the necessary basics in an
- Avoid too many navigation links.
- Minimize the amount of content on a page.
- Presentational items can get in the way.
- Provide a link to a full-sized version, if desired.
Other sources of advice:
Take advantage of your browser tools
Become familiar with your browser's debugging tools.
For example, if you are developing for the iPad or iPhone, you can use the Apple Safari or Mozilla Firefox web browser to emulate those devices by changing the user agent. See http://www.mydigitallife.info/how-to-emulate-iphone-change-user-agent-in-safari-and-firefox-web-browser/.