- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
Mashup Styles
OK, the Pet Store Application must die.
Actually, its kind of comforting the way Sun keeps working the old war horse into it's publications, and the new article series, Mashup Styles, does not dissappoint. All kidding aside, this series, while not strictly Ajax related, is a good read so far. After all, we don't just write Ajax apps, we write apps that use Ajax as a part of doing something (Plus, it fits in nicely with my JSONP Ideas series). This series helps you do that by explaining not just how to write code, but the why and how of how mashups are designed and architected.
The first installment deals with server-side mashups:
In general, a server-side mashup works as illustrated in Figure 2.
Figure 2: How a Server-Side Mashup WorksPerhaps the biggest challenge in doing a mashup is contending with the basic security protection that the browser security sandbox provides. The browser security sandbox is responsible for keeping personal information secure. Many mashups use Ajax functionality. An
XMLHttpRequestis a JavaScript object that is used to exchange data asynchronously between a client and server in an Ajax transaction. To protect against possible maliciousness, most browsers allow JavaScript code that contains anXMLHttpRequestto communicate only with the site domain, that is, the computer system that hosts the web site, from which the page was loaded. The site from which the page is loaded is usually called the server of origin. For example, if the page containing theXMLHttpRequestis loaded frommySite.com, theXMLHttpRequestcan only connect tomySite.com. It won't allow theXMLHttpRequestto connect to another site. If the mashup requires a service in a site that is not the server of origin, such asyourSite.com, there's no way to access it through anXMLHttpRequest. Although the server-of-origin policy adds security, that security makes the creation of mashups more difficult.
The article illustrates how to add geocoding of pet locations to the Pet Store app using the Yahoo! geocoding service. If you've used web services in your J2EE apps before you won't find much new here, but if you are just getting started, there's lots of code and explanation here.
Topics: Ajax Development
Leave a comment
About Pathfinder
Recent
- Firefox Plugin Malware ‘Trojan.PWS.ChromeInject.A’
- Pathfinder releases version 1 of the its Flash Platform microsite (codename Mica)
- Pimp my Rails: Five Plugins & Gems to Make Rails Better
- iPhone: Using Pre-processor Directives for Device Testing
- Subtle OpenGL Projection Matrix Difference Between iPhone Simulator and Device
- App Security: Throw Out the Org Chart!
- Pimp my jQuery: Five plugins to replace the features Prototype and Scriptaculous users expect
- Thanksgiving 2008: What We’re Thankful For (In Rails)
- iPhone SDK: Testing with TextMate & GTM
- GWTQuery - JQuery-like Syntax in GWT
Archives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006


