Canfield Research Group LLC
  • Home
  • Jobs
  • Blogs
    • Company
    • On Error Do
  • Contact Us
  • Projects
    • Astronomy
  • Privacy Policy

Cross-Domain Integration Example

2/24/2014

0 Comments

 
The Astronomy page demonstrates a cross-domain integration. I wanted to have a nice pan/zoom function and automatically build a gallery for some old astronomy images I had. A cross-domain AJAX call was used to:

  • Scan the desired images directory
  • Create thumbnails using the image center and re-sizing / cropping it while maintaining aspect ratio. The thumbnails are cached.
  • Any new images added will automatically get thumbnails created and appear in the gallery
  • Build the HTML complete with Zoom abilities
  • Return that to the caller (across any number of web pages or domains)


The web template just needs a few lines of Javascript to perform the call and integrate the results. In this case JSONP was used since the web server and image/REST server are in different physical locations and domains.

This was just a simple example and more effort would be needed in a large scale deployment but it works as a nice example of using multiple servers/services to do what would be hard for each to do alone.

0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Robb Canfield

    CEO of Canfield Research Group. This blog focus on experiments, development and general strategies.

    Categories

    All

    Archives

    February 2014

    RSS Feed


Copyright 2018 by Canfield Research Group LLC