GrazrScript Tutorial
Where are the parts?

One common confusion in building Web applications is trying to figure out where all the parts reside. Unlike a desktop application, Web developers often refer to online applications as being "in the cloud," meaning they are dispersed and their physical location has little significance. Nevertheless, it is worth taking a minute to pin down exactly where all the components of a GrazrScript application are.
It all starts with Grazr Corp. servers
All of the code to run Grazr and the GrazrScript language is stored on a collection of servers maintained by Grazr Corp. In reality even these servers represent a cloud, because they are geographically dispersed to protect against power failures and other events that could take one of the servers offline. Luckily you don't have to worry about this, because Grazr is automatically read from an available server whenever it is needed. So just think of the "server" as a black box resting in an air-conditioned building protected by armed guards and attack dogs.
Then it moves to your browser
When you add Grazr to a Web page, all you are doing is including a few lines of HTML that tell the Web browser to load Grazr along with the rest of the page. You aren't actually installing anything on your computer. When the Web page is opened, the code for Grazr is sent from a Grazr Corp. server to your computer where it is run by the browser. As soon as Grazr starts running it requests the GrazrScript application file from the server.
Back to the Grazr Corp. server
When the server receives a request for a GrazrScript program, it first checks to see if it has an up-to-date copy in its own storage. This allows it to keep performance as fast as possible. If the server's copy of this data isn't current, it requests a new copy from the remote source. It is then passed along to your browser, where it is displayed.
The key for GrazrScript is that application files must be placed somewhere that is Internet accessible so the server can get them as needed. Right now Grazr Corp. doesn't provide file hosting, although we have plans to offer that service in the future. So you have to place your GrazrScript applications on your blog, a free or paid online storage site, or any other website that will allow you to upload files.
One more round trip
At this point a Web page is displayed in your browser, within that page is a copy of Grazr, and within Grazr is a copy of a GrazrScript application with a form waiting for input. Once you fill in the form and click the submit button, Grazr takes your input and sends it to the Grazr Corp. server for processing. The server figures out which feed URL you want to load, substitutes your form input into the URL, and gets the most recent version of that feed from a remore data source. That source can be a search engine or a content provider, such as YouTube. The requested data is then returned to the browser and displayed in Grazr.
The short answer
If you are dizzy from all these files flying across the Internet, here is the real point. GrazrScript applications will not run if you leave them on your own computer. They must be uploaded to the Internet, where they can be requested through a normal Web URL. If you upload your application file, and enter the proper URL when installing Grazr on your page, we will take care of the rest of the work.


