Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Buiding application for social networks


Published on

Hiện nay, mạng xã hội đang là xu thế mạnh nhằm gắn kết mọi người và các tổ chức lại với nhau. Sử dụng mạng xã hội cho phép người dùng nhanh chóng có được thông tin hữu ích cần thiết. Người dùng đã đến lúc không cần kiếm tìm thông tin mà thông tin tự đến với người dùng một cách chính xác hơn. Mặt khác, thực tế cho thấy đa số người dùng học hỏi kiến thức mới ngoài việc do nỗ lực bản thân mà chủ yếu cũng từ chính bạn bè và các kênh thông tin trực tuyến hằng ngày họ theo dõi hơn là việc học tập một cách gò bó và gượng ép.
Ứng dụng chạy trên các mạng xã hội cũng đang tăng nhanh để đáp ứng cho đa số người dùng đã có mặt ở nhiều lĩnh vực khác nhau. Các mạng xã hội hiện nay cũng đang tích cực phát triển các ứng dụng kiểu này nhằm phục vụ tối đa người dùng trong các quan hệ xã hội. Việc phát triển ứng dụng cho mạng xã hội là một hình thức ứng dụng mới dựa trên kiến trúc gồm ba thành phần chủ yếu (app client - front end, container (social network) và app server - back end) cho phép tích hợp các ứng dụng vào trong mạng xã hội một cách dễ dàng.
Việc phát triển một ứng dụng hiệu quả tích hợp cả mạng xã hội, điện toán đám mây đã trở nên đơn giản hơn. Bài báo cáo này trình bày sơ bộ những phân tích lợi ích, phân loại và kiến trúc hoạt động và cách xây dựng các ứng dụng cho mạng xã hội.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Buiding application for social networks

  1. 1. BUIDING APPLICATION for SOCIAL NETWORKS Đỗ Duy Trung Hai Phong Aptech
  2. 2. Agenda• Overview• How to create application for Social Network?• Social Network Architecture• Fundamentals & requirements for building application• Demo• Q&A
  3. 3. What is Social Network? • A social structure made up of actors: – Individuals – Organizations • The dyadic ties between these actors: – Relationships – Connections – InteractionsOr in plain English:Social networks are essentially about who know who, and who know what.
  4. 4. Advantages of Social Networking?• Work connections• Keeping in touch• Get feedback• Share multiple points of view• Talking to other persons• Stay in touch anywhere
  5. 5. How do you typically train your team to use an authoring tools?
  6. 6. What is Social computing?• Social behavior: – blogs, email, instant messaging, social network services, wikis, social bookmarking• Computation: – collaborative filtering, online auctions, prediction markets, reputation systems, computational social choice, tagging, and verification games
  7. 7. How can we share?• A social networking service (SNS) is an online service that focuses on building and reflecting of social relations among people, e.g., who share interests and/or activities• Basic services – Profile – Friend list – Wall, status, photo, blog….
  8. 8. Example of Social Networks1. Social Networking : 15. Social knowledge : WikiFacebook, Zing.Me,, G+,, Ba 16. Social job : Linkedin, calavat, … 17. Social shop : Vatgia, chodientu.vn2. Social News : Linkhay, Newsvine, Digg, 18. Social reviews: Aha, Vatgia , agoda3. Social Measuring : Technorati, BlogPulse 19. Social lens : Squidoo4. Microblogging : Twitter 20. Social study :, Tienganh123…5. Blogs : Opera, Yahoo+, Blogspot, WP 21. Coupons network : Grouponvietnam.com6. Social Bookmarking : Diggo, Delicious 22. Social map :7. Social Q&A : Google, Yahoo Wikimap, GGmap, diadiem, bando, thodia.vnanswer, Vatgia 23. Social chat : Yahoo8. Video Sharing : Youtube, Viadeo, chatgroup, Bebo, Paltalk, , Zingchat9. Photo Sharing : Picasa, Flickr, 24. Social Game : Zing, VTC, Ongame…10. Social Search : Google vertical search 25. Social music :…11. Professional Networks : 26. Social bid :, daugianguocCalavat, Hoclamgiau 27. Social health:, khamchuabenh12. Community Groups 28. Social application/widget : Apple store(Forum),,…13. Blogging Communities14. Document shares, GitHub - Social Coding (for developers)
  9. 9. Users after launchMembers – March 2012Referral Traffic January 2012
  10. 10. How to build a social network (references)• Programming Social Applications - Jonathan Le Blanc• OpenSocial Network Programming - Lynne Grewe• ASP.NET 4 Social Networking - Atul Gupta, Sudhanshu Hate, Andrew Siemer• PHP 5 Social Networking - Michael Peacock• Drupal 7 Social Networking - Michael Peacock• Web Mining and Social Networking - Guandong Xu, Yanchun Zhang, Lin Li• …
  11. 11. How to create application for Social Network?
  12. 12. What can applications do?• Encourage communication & collaborationbetween members• Allow members to be more expressive in howthey present their professional identities• Provide novel functionality that leverages amembers social network in a moment of need
  13. 13. Vocabulary• They are not widgets?• Or gidgets…• They are gadgets!
  14. 14. Gadget• Gadget is really just a mask for something greater....• Gadget is just one face of an application
  15. 15. Meet the actors• Viewer – Always the member currently viewing the gadget.• Owner – The member who owns the profile being looked at. Sometimes also the owner of a canvas page.
  16. 16. Meet the container• A container is a social network that provides an environment for Javascript and REST calls, "view" for gadgets to surface on, and underlying Social Data.
  17. 17. Meet the view• Home Page: – Primary point of entry for members – Owner & Viewer are always the same – Content should be focused on the Members interaction with the application• Profile Page – Owner is the person who owns the profile – Information displayed is seen by all who visit the profile – Content should be focused on what the member does with the application• Canvas – Serves many purposes & contexts for an application – Owner & Viewer might not be the same. Owner is determined by how it was navigated to – Content can be anything related to the application
  18. 18. SocialSite Architecture
  19. 19. OpenSocial ArchitectureHome Server/ Back-end Container Client/Front-end Apps Social Network Gadgets
  20. 20. Container• Display (Core Gadget Container): – Widgets in a portal: news, weather forecast, music, video...• Social Graph connection (Social Gadget Container): – Gadgets with social data: friends list, groups, activities...
  21. 21. Anatomy of an Open Application
  22. 22. Fundamental of SNS• Web API• Protocol: HTTP, SOAP, REST• Data Format: JSON, ATOM, XML• Security: OpenID, OAuth
  23. 23. Web APIGoogle (96): Google Buzz API, Google Plus APIFacebook (8): Facebook API, Graph API, Social Plugin, RealtimeTwitter (3): Twitter API, Twitter Streamming API….
  24. 24. Web Services• are the key point of Integration for different applications belonging to different – Platforms – Languages – Systems• Protocols – SOAP (Simple Object Access Protocol). SOAP revolutionized RPC and loose coupling beyond the restrictions posed by earlier protocols – HTTP based APIs refer to APIs that are exposed as one or more HTTP URIs and typical responses are in XML / JSON. Response schemas are custom per object – REST on the other hand adds an element of using standrdized URIs, and also giving importance to the HTTP verb used (ie GET / POST / PUT etc)
  25. 25. SOAP vs REST• The main advantages of REST web services are: – Lightweight – not a lot of extra xml markup – Human Readable Results – Easy to build – no toolkits required• SOAP also has some advantages: – Easy to consume – sometimes – Rigid – type checking, adheres to a contract – Development tools
  26. 26. RESTful web service (RESTful web API)A simple web service implemented using HTTP andthe principles of REST. It is a collection of resources,with four defined aspects:• URI• Media type of the data supported is often JSON, XML , YAML or a valid Internet media type.• HTTP methods (e.g., GET, PUT, POST, or DELETE).• The API must be hypertext driven
  28. 28. REST API or Graph API• Rest API• Graph API
  29. 29. Graph API•• _TYPE• oken=...
  30. 30. Social Graph API
  31. 31. OpenID vs OAuth• OpenID is about • OAuth is about authentication to many authorization – sites with one application or site A has username. permission to call site Bs ap• Using login credentials • Allowing an application from an OpenID (TwitPic) to act on your provider (Google) to behalf to and access login to another information from an application (Stack application that you use Overflow) (Twitter)
  32. 32. Authentication /authorize?client_id &redirect_uri login 1 OKUser permission App Allow access_token 2 /redirect_uri?code= API /access_token?code&client_id &client_secret
  33. 33. JSON: The Fat-Free Alternative to XML• JSON object { "name": "Jack ("Bee") Nimble", "format": { "type": "rect", "width": 1920, "height": 1080, "interlace": false, "frame rate": 24 } }• JSON arrays ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] [ [0, -1, 0], [1, 0, 0], [0, 0, 1] ]
  34. 34. RSS 2.0 vs Atom 1.0<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><rss version="2.0"> <feed xmlns=""> <channel> <title>Example Feed</title> <title>Example Feed</title> <description>Insert witty or insightful remark <subtitle>Insert witty or insightful remark here</subtitle>here</description> <link href=""/> <link></link> <updated>2003-12-13T18:30:02Z</updated> <lastBuildDate>Sat, 13 Dec 2003 18:30:02 <author>GMT</lastBuildDate> <name>John Doe</name> <managingEditor> (John <email></email>Doe)</managingEditor> </author> <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> <item> <title>Atom-Powered Robots Run Amok</title> <entry> <link></link> <title>Atom-Powered Robots Run Amok</title> <guid isPermaLink="false">urn:uuid:1225c695-cfb8- <link href=""/>4ebb-aaaa-80da344efa6a</guid> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa- <pubDate>Sat, 13 Dec 2003 18:30:02 80da344efa6a</id>GMT</pubDate> <updated>2003-12-13T18:30:02Z</updated> <description>Some text.</description> <summary>Some text.</summary> </item> </entry> </channel> </feed></rss>
  35. 35. RequirementsProvider Developer• Social Network Platform • Programming Languages – Web API – Javascript, PHP, Java, C#,…• Authentication • Application – OAuth – APP_ID – OpenID – APP_SECRET• SDKs • Tools• Canvas • Coding & pulishing• Plugin • Integrating & embeding
  36. 36. Im a developer - how do I get involved?Authenticate with OAuth Use the API • REST protocol • RPC protocolMethod Summary • Javascript API• String getDisplayName() • Graph API• String getField(key, opt_params)• String getId()• Boolean isOwner()• Boolean isViewer() Get Information!• …. Including: ABOUT_ME, ADDRESSES, CARS, FASHION and many more
  37. 37. Im a serverBe a Container • - Adding and removing friends • - Adding and removing apps • - Storing activities • - Retrieving activity streams for self and friends • - Storing and retrieving per-app and per-app-per-user dataSO • Put your socialness out there for others to use • Shingdig (apache)
  38. 38. Facebook• REST, JSON  Open Graph protocol• OAuth 2.0• Social Plugins• SDK: iOS, Android, PHP, JavaScript, ...
  39. 39. OpenSocial?• Open, standard, application model thatenables Social Web Applications• Writing applications specifically for a single API• “Write once, run everywhere”
  40. 40. OpenSocial?• Standard Internet technologies (HTML, CSS, JS)• Simple, XML definition• Ajax• Standard based authorization model• Add social context to requests
  41. 41. Facebook vs OpenSocialFacebook OpenSocial• FBML • XHTML / XML• FQL • JavaScript• FBJS• Partial support for ajax • Full support for ajax
  42. 42. The web is better when its social OpenSocial enables apps,containers, and other clients to collaborate and move the social web forward.
  43. 43. A typical gadget based portal
  44. 44. Demo•
  45. 45. Thank you!Your feedback is a gift! HPA Forum: @TrungDD Facebook: @doduytrung Twitter: @doduytrung Linkedin: @doduytrung Pinterest: @doduytrung Google+: @doduytrung
  46. 46. References• Developers Guide to Social Programming - Mark D. Hawker• Programming Social Applications - Johnathan LeBlanc••••••• frameworks• comparison_b19477