Building a social network mashup (MASHUP) application with Groovy

Source: Internet
Author: User

Introduction: Online social networking is now very popular. In this article you'll learn how to mix Google maps, Twitter, Groovy, and Ajax to build social networks. By combining Google maps with location information that Twitter exposes, you can create a mashup (mashups) application that allows people to view Twitter in a specific location. The simple application built in this article allows users to view a map of their friends on Twitter-a network geography view.

Web-based social networking is now a big trend. The rapid spread of apps such as Twitter, Facebook and linkedinsocial shows that people want to be able to connect with like-minded people. Another popular thing is the open application interface. Google and Twitter, for example, are geared to developers around the world, enabling them to innovate. Both platforms provide APIs for querying and ultimately integrating any functionality you can imagine into your application.

Mashup is a typical WEB 2.0 application; they actually seamlessly integrate unrelated applications into a valid entity. The entity will be the component that drives it to work perfectly behind the scenes. The open APIs provided by entities that want to be included in a mashup community often rely on the RESTful principle, which makes it easier to build a mashup than you think.

Today's popular mashup apps are Google maps. Google maps is actually a JavaScript library that allows you to add the concept of position representation to your application. By providing some location information (using the form of address or coordinates) for Google maps, you can build a map that visually represents that location. If you've ever used Google's online map application (for example, to learn about driving directions), you've seen the actual application of Google Maps.

Twitter is a popular social networking application. It allows people to send an update of any content (called tweets) to a network of their followers (on Twitter, a good friend is the person you follow, and the follower refers to the person who follows you). This is often called micro-blogging. You can query the Twitter API for information on all aspects of Twitter data-for example, tweets that meet certain conditions (say, tweets that refer to Java™ programming), or the names of friends and even followers of a particular user. In addition, Twitter stores location information because Twitter users can choose to provide their location.

Because Twitter exposes location information, it can integrate Twitter with Google maps, creating a mashup that allows people to view Twitter in a specific location. That's what this article is about: building a simple application that allows users to view maps of their friends-a geographic view of the user's network. Perform the following three steps to achieve this goal:

Bind to Twitter via a java-based third-party library.

Implement a map through Google maps.

All content is bound to Groovy with Groovlets and a little Ajax.

Suppose you already have Groovy installed on your system. In the operation, I will continue to point out the other tools needed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.