eBay Acellerator Toolkit for PHP, PHP5 Editions

Transcription

eBay Acellerator Toolkit for PHP, PHP5 Editions
eBay Acellerator Toolkit
for PHP, PHP5 Editions
eBay Developers Conference 2008
Carsten Harnisch
CEO, InTradeSys Limited
Share, reuse, and remix this talk
These slides are available under the Creative Commons
Attribution-Noncommercial-Share Alike 3.0 License.
You can blog, photograph, and share this information with others.
Don’t forget to tag it ebaydevcon and ebaydevcon08.
© 2008 eBay Inc. Some rights reserved.
eBay and the eBay logo are among the registered trademarks of eBay Inc., PayPal and the PayPal logo are trademarks of PayPal, Inc., Skype and the
Skype logo are trademarks of Skype Limited Corp., Shopping.com and the Shopping.com logo are trademarks of Shopping.com Ltd., and
ProStores is a registered trademark of ProStores, Inc.
Other trademarks and brands are the property of their respective owners.
The views expressed in this presentation are those of the presenter, and do not necessarily reflect those of eBay, Inc.
Agenda
•
History, licence and download
•
Roadmap for PHP5 editions
•
Basic and advanced features
•
How-tos, code samples and labs
Nomenclature—Just a Few Abbr.
•
EbatNs
•
•
Shopping API
•
•
eBay Acellerator Toolkit (New Schema)
Anything regarding search and item information,
not authenticated, plain HTTP
Trading API
•
Anything regarding listing items, sales and
transaction, My eBay, more spezialized APIs,
authenticated over HTTPS
The eBay API & the EbatNs:
A Short History
•
Versions for legacy schema in early 2004
•
Transition to Auth&Auth
•
UTF8 only support
•
Rewrite for the SOAP based eBay API
•
Split to Trading and Shopping API
•
PHP5 Version
Migration Note for PHP4 Users
•
The EbatNs PHP4 will be supported
till mid 2009
•
•
Anyway at a less prominent download area
Migration to PHP5 is rather painless
•
Using a define to have full backward
compatibility till version 599
Licence for any EbatNs P5 Version
•
Compliant with LGPL to maximize adoption
•
eBay directly supports us
•
Please support us to promote the EbatNs
•
•
Link/track back to our project homepage
Or make a link in our references page
Roadmap
How to Get the Packages?
•
eBay community codebase
•
•
http://developer.ebay.com/community/featured_
projects/?name=ebatns
InTradeSys Website
•
http://www.intradesys.com/
(In desperate need of relaunch..)
Basic Features
•
Same as PHP4 Editions
•
Full abstraction of eBay API types as PHP classes
•
Configuration and installation wizard
•
Array support
•
Getters / setters
•
Indexed values
•
Many bugfixes and performance enhancements
Advanced Features
•
AttributeSet extension now fully documented
with samples
•
Support for pull, notifications, bulk calls,
multithreading, result pagination, custom
feeds, …
•
New class EbatNs_Environment
Call Environment Basics
Call Scheme
Use EbatNs within Eclipse / ZendStudio
•
Fixes to the php.ini
•
Add libs
•
Code completion is fully supported
•
Debugging is fully supported
•
Very high level of integration
Set Up Your Environment
•
Set up the environment
•
Session
•
•
•
Service Proxy
•
•
Keys
User
Production / Sandbox
Use the configuration wizard
CodeSample—Configuration.php
A Simple GetItem Call
•
Decide for “Shopping” or “Trading”
•
Build the request, make your call,
proceed with the response
•
Basic input is the “ItemID”
CodeSample—SimpleGetItem.php
Logging & Debugging
•
Using EbatNs_Logger
•
Centralized logging facility
•
•
•
Log to “stdout”, echos to HTML page
Write to log file, DB, log-daemon
Trace call performance
CodeSample—Logging.php
Build a Custom Feed
•
Mashups or AJAX-apps might need
enriched data
•
The toolkit infrastructure can easily
be used to enrich data
•
You can use “eBay result”: enrich, modify,
remove data—re-serialize as XML/JSON
CodeSample—CustomFeed.php
Setup for Notifications
•
Prepare your system for notifications
•
Use the EbatNs_NotificationClient
•
Encapsulates all needed internals
(e.g. SOAP). Offers a “normal” API response
CodeSample—NotificationClient.php
Using the “OutputSelector”
•
Most calls support a way to customize the
returned data
•
Very often a selective data retrieval reduces
the call time by factor ten and more!
•
With the EbatNs you can use the
“EbatNs_OutputSelectorModel” to make
selection easy
CodeSample—OutputSelector.php
Working with Attributes
•
Download and parse using the AttributeExtension
•
Build a user-interface for attribute selection
•
Extends the API schema for
CharacteristicsSets
CodeSample—Attributes.php
Q&A
c.harnisch@intradesys.com
http://www.intradesys.com/
Thank you!
Questions?
To learn more, visit
www.ebay.com/devcon