Here’s the second part of setting up windows instance in Amazon EC2.
The first part can be viewed here.
Video on setting up Windows instance in Amazon EC2 – Part II
CORS and JSONP
Sending cross domain AJAX requests is a bothering problem for newbie AJAX developers. If your application is running in http://domain1, sending a request to http://domain2 is a security issue and the browser doesn’t allow it.
A JSONP(JSONP for Padding) request solves this problem with the server returning a JSON response padded with a key. For example if the server sends {“message”:”hello”} as usual response, in JSONP the response is send as key({“message”:”hello”}) where the key is a callback function that the response-receiving client needs to have.
Another way to solve this is CORS(Cross Origin Resource Sharing), a HTML 5 feature. The server application needs to send a HTTP header called “Access-Control-Allow-Origin” (ACAP) which defines a permission. For instance, if domain1 were to send a request to domain2, then domain2 needs to send a HTTP header ACAP with the value “http://domain1” that indicates the permission. RESTful services like open weather map or yahoo stock quotes have ACAP header value set to “*” that makes them accessible from any application.
You can read more about CORS here.
Travel, Training, Magazine
Last two weeks have been very hectic thanks to three things; Travel;Amazon Web Services;HealthyCode Magazine;
I am working with a client who wants his team to be trained in a number of mobile JavaScript libraries. The crux is he wanted me to initially spend time with the basics of CSS3 and JavaScript. I was writing a lot of SASS(Syntactically Awesome StyleSheets) and generating CSS code, working with keyframes and transitions. What I thought would be a child’s play slowly dragged me into it and made me put in a lot of time and effort much more than I had anticipated.
As I am doing a lot of work with Amazon Web Services, more time was spent scratching my head as I used the words saas and sass interchangeably while coding.
We’re looking at April for the first issue of the magazine; The site, payment gateway etc. is getting ready at a feverish pace. We have hosted the site in AWS and it will be out in the open in a few days. The articles collection, the reviews, code evaluation etc, are just too exciting. I am amazed at the stuff our developers are doing there.
All these things, subconsciously keep reminding me of the Dunning-Kruger effect; Unskilled and Unaware of it.
Getting started with AWS S3 – Video
I have been playing with AWS as a part of an assignment. I plan to create multiple videos on AWS. Here’s an introductory video on AWS S3. In this video I show how to create a bucket and host in in S3. The demo just has a simple background music and not my voice :).