It depends on what your trying to achieve. The example given isn't a very useful one, more to highlight how it can be done. I use the Django framework a lot to serve API's for mobile apps. Curious, if you were to start from scratch, what would you use?