Titanium PR2 Released
A little over two months after their initial launch of Titanium, Appcelerator today followed with the “PR2? release of their open-source web-as-desktop-app run-time platform (i.e., an open-source competitor to Adobe AIR).
This release adds support for Linux to their OS X and Windows versions and also provides a GUI for creating stand-alone Titanium apps (the previous version relied on command-line utilities). This application is a Titanium app itself and includes some innovative features, including a view of the Titanium group’s Twitter / FriendFeed streams and a direct connection to their IRC channel.
Appcelerator is also trying to make it as easy as possible hack away on the Titanium platform without requiring the use of C++; they’ve added a new module API that lets you use JavaScript, Ruby or Python in addition to Bjarne Stroustrup’s spawn.
On a lower level, and of more probable interest to our community, the JavaScript APIs have been greatly extended. Let’s consider the File API in the first release of Titanium, which consisted of one documented method (”read”) and one undocumented method (”write”). In the PR2 release, it looks quite a bit richer:
copy ( to ) : boolean
Copies a file to another location.
createTimestamp ( ) : number
Returns a timestamp of the file’s creation.
createDirectory ( recursive ) : boolean
Creates a directory.
deleteDirectory ( recursive ) : boolean
Deletes an existing directory.
deleteFile ( ) : boolean
Deletes a file.
exists ( ) : boolean
Checks whether or not a file exists on the user’s system.
extension ( ) : string
Returns the file’s extension.
getDirectoryListing ( ) : array
Returns an array of files inside a directory.
isDirectory ( ) : boolean
Checks whether the file object is a directory.
isFile ( ) : boolean
Checks whether the file object is a file.
isHidden ( ) : boolean
Checks whether the file object is hidden.
isSymbolicLink ( ) : boolean
Checks whether the file object is a symbolic link.
modificationTimestamp ( ) : string
Returns a timestamp of the file’s last modification.
move ( to ) : boolean
Moves a file to another location.
name ( ) : string
Returns the name of the file.
nativePath ( ) : string
Returns the full path of the file.
parent ( ) : File
Returns the parent directory where the file resides.
read ( ) : string
Reads the content of the file.
readLine ( reset ) : string
Reads a particular line in the file’s content.
resolve ( path ) : boolean
Changes the file or directory referenced by a File object.
size ( ) : number
Returns the size of the file.
spaceAvailable ( ) : number
Returns to space available on a user’s system.
toString ( ) : string
Returns the file’s properties as a string.
write ( data [, append] ) : boolean
Outputs data into a file.
Check out the full API docs to get a feel for the rest of the APIs; but being an open-source project, Titanium’s newest APIs are still in the source only.
In terms of the run-time itself, they’ve updated their WebKit renderer to be very close to the latest and greatest and it includes all of the new HTML 5 goodies that Safari 4 has.
Nolan Wright, Appcelerator CTO, has created some screencasts to show off some of the new features; here’s one of them:
















