March 19, 2008

iPhone 2.0: Safari hosts local apps; SQL on a smartphone!; go get Safari 3.1 now

I have a secret: I love JavaScript. It has an extremely simple C-like grammar--it has far more in common with C than Java--and is readable and compact. I can teach it to a child in an hour. With just a few days of messing around, a beginner can write powerful client and server applications in JavaScript, and the minimum required toolset is a browser and a text editor. To test changes to your code, you refresh its browser page.

I developed my appreciation for JavaScript by using it to create applications of surprising scale. In 1999, I wrote a book about creating Web applications, laying out in detail how one can do anything with JavaScript, CSS, DHTML, XML and SQL. The pinnacle of client-side JavaScript at the time was Microsoft's JScript, implemented in Internet Explorer. I took great care in my book to balance IE against Netscape, and to document the ways in which each browser adhered to and diverged from W3C standards. IE did better than most people would assume. It went on to become the basis of the ECMAScript standard. Then Microsoft all but pulled the plug on the language's internal development. The JScript editor and debugger vanished from Visual Studio. My book flopped, but worse than that, a simple language that had justifiable momentum, and even a job market built around it, dropped from sight except as a means to render dynamic HTML content and discern one browser from another.

JavaScript has reemerged as the J in AJAX, where it's assigned such common duties of manipulating in-memory data structures, loading plug-ins and performing explicit animation on user interface elements. It's good to see JavaScript back in action, but for years I've imagined what JavaScript might have become if it had been actively developed after Microsoft let it go. My crushing disappointment was that AJAX, not so advanced in light of history, didn't aim at the one target I felt JavaScript was destined for: Standalone browser-based applications.

Now we're back on track. Incremental developments in WebKit, the open source project on which Apple's Safari is based, have coalesced into the Safari browser for iPhone 2.0, due out in June, and Safari 3.1, which was just delivered for OS X. Apple and WebKit developers have invested an impressive amount of effort to implement vital portions of HTML 5, CSS 3 and SVG (scalable vector graphics) standards. HTML 5 provides a standard for embedded SQL statements into script code. SVG (scalable vector graphics) does what its name suggests, but also brings motion into places where only static bitmap graphics worked before. SQL (through SQLite) and SVG are linked into Safari, not plug-ins. CSS 3 sets up implicit and explicit animation, with both managed by the renderer.

Close

On Twitter now

Platforms

Powered by Twitter

On Twitter now

White Paper

D2D Virtual Tape Library Replication Primer

This whitepaper explains the terminology and concepts behind Data Replication technologies and establishes some sizing rules through worked examples. Learn the new paradigm in disaster tolerance—protect data anywhere.

Download now »

White Paper

An Alternative to Virtualization for Datacenter Cost Savings

Server virtualization is a popular option for dealing with mounting datacenter costs. Another equally promising approach is the use of an Application Delivery Controller. Citrix NetScaler provides a low-cost way for organizations to reduce their server count and accrue cost savings from a reduction in space, cooling, power and personnel.

Download now »

White Paper

Why Your Firewall, VPN, and IEEE 802.11i Aren't Enough to Protect Your Network

The emergence of WLANs has created a new breed of security threats to enterprise networks.

Included in HP ProCurve WLAN solutions is security technology that alleviates threats from WLANs through:
* Monitoring wireless activity inside and out of the enterprise
* Classifying WLAN transmissions into harmful and harmless
* Preventing transmissions that pose a security threat to the enterprise network
* Locating participating devices for physical remediation

Download now »

White Paper

Bringing the Edge to the Data Center

Effectively address data protection challenges, implementing solutions that help store and protect business–critical data while cutting costs and improving efficiency and reliability.

Download now »
simbo1905 18-Oct-09 3:41am
Mozilla has a hall of fame of standalone applications that are written using its gecko runtime engine. Those applications can be anything (e.g. pigin is a chat client and komodo is a script debugger). You use xhtml+css+js for the user interface and use js to invoke XPCOM exposed C code such as your own back-end C code or any mozilla libraries that already ship with their browser e.g. http network libraries, libraries to store user preferences. Searching now for 'sqlite storage' on developer.mozilla.com we can see that there is a sqlite engine there in the mozilla toolbox to use. There was a book published in 2002 called "Creating Applications with Mozilla". I bought that book back in the early days when I too was charmed by how good the early JScript engine was writing complex UIs for IE and Netscape. I thought at the time "windows programming in MFC or Java AWT just sucks compared to using xhtml+css+js". There never were a vast amount of cross platform standalone apps written. The same technology has been used to create the thousands of firefox plugins showing that the technology is mature. Also related to your article is Mozilla Prism. That is a mozilla single-site browser that treats a website like a user application - this dell ubuntu laptop has a linux appstore which ships a Facebook prism app so that I can launch Facebook more like an app rather than having to open it in a browser. Apple don't really have much of an incentive to help people copy the same approaches as you recommend. They charge $100 for the iPhone SDK and have tens of thousands of developers pay it. Today there are 90,808 apps on the store by 21,935 publishers. If they only bought one SDK each thats a huge amount of SDKs bought. If they were to let people take a pure xhtml+css+js+sqlite or even a natively compiled flash approach (adobe is trying that) it eats into their amazing revenue stream. On the plus side they would instantly get millions of new developers who only know dhtml or only know flash writing apps for them - but they don't need that as there are so many coco developer using the native api.

Sign up to receive Platforms Resource Alerts

Subscribe to the Today's Headlines: First Look Newsletter

Find out what will be news for the day, with our first-thing-in-the-morning briefing.

©1994-2009 Infoworld, Inc.