Chapter 12. Exposing your app to other programs
This chapter covers
- Implementing RESTful services in Grails
- Applying authentication to API calls
- Exporting services to remote clients
Now that you’ve added access control to Hubbub, your application is ready for the big, bad world. Your users can start conversations and kick off a big hubbub. Does that mean there’s nothing more to add? No. An important feature of web applications these days is an API.
Do you ever wonder why Twitter and Facebook became so popular? Sure, people like socializing, and people gravitate to where everyone else is. But how did they gain critical mass in the first place? By being first to market? Well, Facebook came after MySpace and still managed to supplant it.
They’re successful for many reasons, but one of the most important is that they’re open platforms. Think about all the websites that include Twitter feeds on their home page, or all the pages that have the “share via Twitter/Facebook” links. And never forget the popularity of games such as Farmville on Facebook, games that are created by companies independent of Facebook itself. Such integration with external sites and applications is a key element of a sticky platform, which refers to how well the platform attracts and retains new users.