Understanding eBay's plug-in Architecture
Join the DZone community and get the full member experience.
Join For FreeMichael Galpin has written a fascinating two part series on IBM Developer Works describing the evolution of eBay's architecture to an Eclipse-based plug-in framework that helped them solve some thorny front-end scalability issues.
"The V4 architecture took the approach of representing everything that was going to be used on the front end with strongly typed Java objects on the back end. Does your page use an image? Then there is a
Java object for that image. If you want to delete that image, it's as simple or as complex as deleting any other Java class. The same can also be said for links, CSS, and JavaScript. V4 does not use servlets or JSPs to create HTML. Instead, the actual HTML DOM is represented in the Java language, so you can
wire together CSS and JavaScript on the server."
Galpin then proceeds to show how JsDoc annoations can be used to create references to Java classes by specifying extra meta-data within the Javascript classes - This effectively allows eBay's plug-in framework to generate the Java domain objects from Javascript. He concludes the first part by showing a really cool example of how a running eBay instance can be introspected for its constituent V4 components, by mousing over an eBay Web page in production - the user is presented with a series of options, one of which includes opening up that particular component directly inside Eclipse.
I'm sure my girlfriend could probably care less about the magic happening behind the scenes here. But maybe, just maybe, the next time she's bidding on that gold bracelet, there will be a momentary appreciation of the work the good folks at eBay are doing to help her 'eBay refreshes' render at lightning speed.
Opinions expressed by DZone contributors are their own.
Comments