Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Monday, November 2, 2009

JavaScript iPhone Web App

We wrote our first iPhone web app in class on Thursday. It was a simple app that utilized JavaScript to register which way the iPhone was oriented. We the iPhone was turned to the right or the left the accelerometer registered the change and the text on the page was updated to show which way the screen was oriented.

I added a few lines of JavaScript to have the screen display when ever the page is first loaded. That way the user doesn't have to turn the phone to get the orientation to register.

Here is the JavaScript code to make it work:

Thursday, October 1, 2009

Cappuccino

In class Thursday we split into groups and researched different rich internet languages/frameworks. Some groups had the big names ones like flash and silverlight but the problem with those is not everyone can run those applications. Flash player and silverlight are free downloads but it is an extra hassle for most people and for other they don't know how to install it. My group researched a new technology called Cappuccino. It is a framework that allows the programmer to write code in objective-j (based on objective-c) and when it is compiled it is translated into html, javascript, and css to produce a web application based on web standards that anyone can run in a standards browser.
This is a great solution because almost anyone can run the application and it is fast since it uses client side javascript. The script is executed on the client machine so there is usually very little to no interaction with the server once the application is running (depending on the type of application). This also comes at a price. Since javascript in on the client machine the user can view the script. Even though the program is written in objective-j someone could steal the javascript code and make modifications or host their own version of the program. There might be some way around this but I am not sure.