Summary

We're at the halfway point of the book and we've already built a forum-like web application with really basic features, but we are able to at least create chatrooms for particular topics, join them, participate with messages, or add images to them. All this without any pain or boilerplate, thanks to the content management features that Play! Framework 2 puts in our hands for free.

Indeed, in this chapter we were able to deal with complex routing involving several ways to provide information, using different HTTP methods and URLs with or without extra parameters. Such requests were used to feed the server with data very easily, by using a single API that is independent of how the data is represented. For instance, on both sides we were dealing with forms.

Body parsing was there to help us, and to facilitate resource binding with our constrained forms. Moreover, they are consuming data in such a way that even large data sets won't crash the server—they are consumed reactively.

At this stage, we're also able to send data to the client in whatever fashion we'd like. XML, JSON, HTML, and all such are now open doors for our web applications.

But, for now, our forum is switching statically between pages all the time (read: loading the full page), and sometimes requests that we go back and refresh the page to use it further, such as refreshing a chatroom to see other participants' new messages.

So, what's missing now? Dynamic client behavior. That's exactly what will be covered in the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset