PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : معرفی 10 api وب 2 که میتوانید واقعا استفاده کنید



A.L.I
28th November 2008, 01:46 PM
Ten Web 2.0 APIs you can really use




One of the great outgrowths of the Web 2.0 phenomenon has been an increased availability of Web APIs – Internet-based services with an HTTP-based programming interface. Gone are the days when developers would furtively “scrape” HTML pages for data or useful information. Now major Web services make easier, stabler, and more open ways to read and modify data on their servers

Many APIs are simply formalized interfaces to a user-centric application. The Flickr API (http://www.flickr.com/services/api/), for example, is an elegant and convenient interface that's a great example for anyone thinking of providing an API. But for developers, if you're not making a Flickr client or building a Flickr mashup, it's not really that useful.

Here are some of the more interesting and important APIs that you can use for real programming problems, either in Web applications or in desktop or server software.


1. Google Maps API (http://www.google.com/apis/maps/)




Since its introduction in 2005, Google Maps has become a ubiquitous feature in both public and intranet Web applications. The API lets Web developers embed a map widget into their own HTML pages, with map tiles imported from the Google database, and programmable stick pins and other data. With a backbone of REST based on XML and XSLT, the Google Maps API is well-encapsulated in an easy-to-use JavaScript library.

It's possible to use competitors to the API, including Yahoo's Map API (http://developer.yahoo.com/maps/) and Microsoft's Virtual Earth (http://maps.live.com/). In time we'll see more alternatives, such as integrating the cool OpenLayers (http://www.openlayers.org/) map widget with data services that support the standardized Open Geospatial Consortium (http://www.opengeospatial.org/) APIs. But today Google Maps is the best of the mapping APIs. If you're interested in future-proofing your application, you can use Mapstraction (http://www.mapstraction.com/), a toolkit that gives a single interface layer to Google and Yahoo as well as the OpenStreetMap (http://www.openstreetmap.org/) user-generated mapping service.

2. Geonames.org (http://www.geonames.org/)



One of the key parts of any geographical application is geocoding -- turning feature names like “Mountain View, California” or “Lake Baikal” into latitude/longitude pairs that can be put on a map or compared with other map points. Google and Yahoo both have geocoding APIs, but they have some heavy restrictions on use and confusing copyright rules


3. OpenID (http://openid.net/)




No, Web APIs aren't just about maps and map data – they can be about people, too. OpenID is a new service created by blogging company Six Apart and adopted by many other sites. The API lets you offload the tasks of registering and managing user accounts from your application to an identity provider. Users like it because they can use one user account on several different Web sites. Conversely, identity providers can use the API so their users can use other Web sites without having to maintain separate accounts.

The API is interesting in that it depends on HTTP redirects to and from the identity provider Web site. This allows logon systems that depend on browser state, such as cookies or certificates. Parameters are passed back and forth through URL parameters, including digital signatures for validation. A great set of open source libraries in Perl, Python, Ruby and PHP from JanRain (http://openidenabled.com/), makes integrating this API relatively painless.

4. Amazon S3 (http://www.amazonws.com/)




One clever system for off-loading tedious Web development tasks is the Simple Storage Service (S3) from Amazon's Web Services. S3 lets you store and manage files on a Web server in Amazon's data center, and you can use the API to secure certain files from the public. S3 has both a REST and a Simple Object Access Protocol (SOAP) interface, and Amazon charges a few pennies for each gigabit of data stored or transferred.
S3 is a really convenient way to scale storage of data, and there are applications from simple backup services to rich Web applications. The photo-sharing service SmugMug (http://www.smugmug.com/), for example, uses S3 as the backend storage for all its images, saving the time and effort of provisioning dozens of Web servers


5. Amazon EC2




In a similar vein to S3, Amazon has a distributed computing service called the Elastic Compute Cloud (EC2). EC2 is a Web service that lets you build virtual servers for any purpose – you get a Xen instance for each one – and turn them on or off as needed. It's a server farm rental service, expandable to as many servers as you need, controlled with a simple interface.
Amazon provides a set of command-line tools for the service, but it will be interesting to see how other tools integrate this service. Building the API into a server watchdogs, failover tools or load-balancing systems are some exciting applications. Although this service is still in beta, it has the capacity to change the way we build data centers.

6. Atom API (http://atomenabled.org/)




One of the most tedious tasks in Web development is importing and exporting data to and from content management systems and other dynamic Web sites. The pioneering work in creating desktop user interfaces and command-line tools for publishing was with the Blogger, MetaWeblog and Movable Type APIs, but this work has been generalized and expanded for other kinds of Web sites to the newer Atom API 0.3.

Atom is a REST-like API that uses Post requests to create new resources on the target site, and Get, Put and Delete requests to manipulate existing pages. There's also an optional SOAP interface, although it seems to be only rarely supported. The Atom API is supported by many blogging services and a number of open source content management systems (CMS). The API's uptake has been slower than its sibling Atom feed standard (a replacement for RSS), but it's rapidly displacing proprietary blogging and posting APIs.


7. OpenSearch (http://opensearch.org/)



When Amazon's A9 search service and aggregator launched in 2004, the company took a new tack on search aggregation. Instead of running its own spiders, unilateral database licenses, or running screen scrapers on other search engines, the company developed and promoted an open standard API. Called OpenSearch, this simple REST-based API is a convenient back-channel for retrieving search results from a number of OpenSearch-enabled sites


Its most basic configuration is a discovery system – using HTML headers – to find search engines for sites and determine the order and names of URL parameters for sending a REST-like search request with HTML output. A more sophisticated level returns an Atom feed of multiple results, leaving it up to the client to display or analyze each result. OpenSearch has been integrated into the search bars for Mozilla Firefox 2.0 and Internet Explorer 7.0, which has given the standard a considerable boost

The Web itself is a pretty impressive data-interchange mechanism, but it operates at a coarse-grained level of files. Exchanging pieces of objects, structured objects, or collections of objects can be kind of tricky, and marking up metadata can also be hard. There have been a number of efforts to make it easier to interchange marked-up data, such as Google's GData and Yahoo's MediaRSS. At the launch of its new Vox blogging service, Six Apart also launched a new media-exchange API, the Open Media Profile.

The Open Media Profile is based on OpenSearch's REST-like interface, but adds key output extensions for exchanging richer data types than Atom feeds usually handle. It supports embedded and linked objects and licensing metadata. Although its data interchange tools are better than competing standards, it lacks the unification of data exchange and update found in GData. There's still not a clear lead in this area.

9. MediaWiki (http://meta.wikimedia.org/wiki/API) API




With almost 6 million Wikipedia articles in all the various languages, managing the corpus of wiki work from Wikimedia Foundation (http://www.wikimedia.org/) is a huge task. Programmatic interfaces to MediaWiki and other wikis has always been through scraping HTML pages, and some “bot” creators have raised it to a fine art. But the development of a new API for MediaWiki Web sites – including Wikitravel, Wiktionary, and WikiNews – will make that considerably easier and less error-prone.
The MediaWiki API is a REST query mechanism that returns XML, YAML or JSON results. Although it's currently read-only, existing mechanisms for writing articles still work. Other wiki engines, including SocialText (http://www.socialtext.net/st-rest-docs/) and PbWiki (http://api.pbwiki.com/), are also building APIs. A nascent cross-engine standard, Amo (http://www.socialtext.net/amo/), might provide a unified API for wikis the way that Atom has for blogs and CMSs


10. JS-Kit (http://js-kit.com/)



One of my favorite APIs is a tool called JS-Kit.com. It's a hosted service that lets Web developers drop a full-fledged commenting system into a page on a Web site. The REST API is wrapped in a single JavaScript library that can be included in Web pages. Designers can style the comment sections as they wish


http://www.linuxworld.com

استفاده از تمامی مطالب سایت تنها با ذکر منبع آن به نام سایت علمی نخبگان جوان و ذکر آدرس سایت مجاز است

استفاده از نام و برند نخبگان جوان به هر نحو توسط سایر سایت ها ممنوع بوده و پیگرد قانونی دارد