Writing the Code for the Web Client

For the Web-enabled light switch, we will create a simple Ruby on Rails project to manage the user interface interaction first via a web browser. We won’t spend a lot of time on the user interface, though, since that will ultimately be the job of the custom Android application we will create after the web interface is functionally tested.

Rails runs optimally on Mac or Linux computers, and it is already installed by default on Mac OS X 10.6. However, it is not the latest version. Because this project requires Rails 3.0 or higher, the instructions are not applicable to older versions of the framework. Follow the instructions on the Ruby on Rails website to get the latest Rails release running on your computer. ...

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.