简体   繁体   English

社交网络应用程序的Java库

[英]Java library for Social networking Application

是否有一个Java库提供开发社交网络应用程序的功能,如添加好友,查找最近邻居,发送消息等等。我知道这要求太多,但只是想知道这样的库是否真的存在。

This is very broad functionality. 这是非常广泛的功能。 Here are some related projects: 以下是一些相关项目:

If you want to add support for existing social network applications than I think all of the Bozho's solution would be ok for socializing your applications. 如果您想添加对现有社交网络应用程序的支持,我认为所有Bozho的解决方案都可以用于社交您的应用程序。 For distance based calculations (geocoding) you will have to use separate mechanism and librabry google and yahoo both have an excellent api for that though these differ in terms of their usage restrictions so its good to you research before deciding one, Yahoo also supplies a promising feature YQL which is also useful in some cases.... Which one of them is better depends on your requirements... see following questions finding latitude and longitude , another similar question and finding distance between two zipCodes 对于基于距离的计算(地理编码),你将不得不使用单独的机制和librabry谷歌和雅虎都有一个很好的API,虽然这些在使用限制方面有所不同,所以在决定之前你对它有好处,雅虎也提供了一个很有希望的功能YQL在某些情况下也很有用....其中哪一个更好取决于您的要求...查看以下问题查找纬度和经度另一个类似问题查找两个zipcode之间的距离

If you want to create your own social networking site as then I think you will have to start by ur own... However It would be a nice idea to integrate that site with existing popular social networks using OAuth or open ID.... 如果你想创建自己的社交网站,我认为你必须从你自己开始...但是,使用OAuth或开放ID将该网站与现有的流行社交网络集成是一个不错的主意....

@Bozho's answer is valid, all those libraries integrate with a set of Social services. @Bozho的答案是有效的,所有这些图书馆都与一套社会服务相结合。

This question really depends on the extent of integration you want. 这个问题实际上取决于您想要的整合程度。 I've worked on a couple of large scale Social aggregators and I've found that such a silver bullet just doesn't exist. 我已经研究了几个大规模的社交聚合器,我发现这样的银弹不存在。 I've found the best results in my experience by using small lightweight libraries that do one thing well. 通过使用一个很好的小型轻量级库,我发现了我的经验中最好的结果。

For example, say I wanted to integrate with Twitter, Facebook, and Google Talk. 例如,假设我想要与Twitter,Facebook和Google Talk集成。 I might use Scribe for my authentication code, Jackson for parsing JSON API responses to my business objects and Smack for doing my XMPP work. 我可能会使用Scribe作为我的身份验证代码,Jackson可以使用JSON API来解析我的业务对象,使用Smack来执行我的XMPP工作。

There are certainly pros and cons for both methods; 这两种方法肯定有利有弊; the major benefits I've found of avoiding massive libraries are: 我发现避免大量库的主要好处是:

  • Flexibility. 灵活性。 For example your business objects only contain the information you care about. 例如,您的业务对象仅包含您关注的信息。
  • Testability. 可测性。 You can compose your components in such a way that tests are easy to write around them. 您可以使用易于围绕它们编写测试的方式编写组件。
  • Robust. 强大的。 You are not constrained by a 3rd parties implementation of typically volatile 3rd party APIs. 您不受第三方实施通常不稳定的第三方API的限制。
  • Less code. 更少的代码。 Using a collection of small, proven libraries will result in less of a footprint: less code to manage = less that can go wrong. 使用一组经过验证的小型库可以减少占用空间:管理的代码更少=可能出错的代码更少。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM