Archive for September, 2007

* Ajax Applications in Adobe AIR - eSeminar

Posted on September 26th, 2007 by Dave Johnson. Filed under AJAX, Nitobi, Web, adobe, air, seminar.


I just completed an eSeminar about Adobe AIR and building AIR applications with Ajax and HTML. It was a good turnout (~250 peeps) and I hope that I gave all the attendees a good idea of some of the features of AIR and how to achieve some cool results.

People can download the slide deck here or check out the Adobe OnDemand site to see/hear it in all its glory.

I also wanted to post answers to some of the questions that I did not get to answer during the seminar.

Q: Can you explain in a nutshell offline data store with sql lite?
Through JavaScript or ActionScript one can write to or read from a SQLITE database that can be created on the users computer.

Q: Is it free like adobe reader?
Yes

Q: I mean can you mix ajax and flex controls
Yes

Q: Must the end user install the AIR Runtime on their machine to run air apps or can they be run on any machine line a flash projector file?
The AIR Runtime can be included in your application and installed with your application. It can also be installed from a Flash file.

Q: A question, mind sound a bit weird but, can you mix up html and flex controls?
Yes

Q: AIR can connect to external hardware (card reader etc)?
Not sure about that one!

Q: Can you access the webcam from an AIR app?
Yes

Q: The BETA label after Apollo made my manager a bit skeptical on using it through out the whole company, any insight in that ?
I think there is something to that - the difference between Beta 1 and Beta 2 is fairly large. However, I think that from Beta 2 onwards it will be much more stable.

Q: I also did not hear if you heard if u can use ruby on rails with air apps
You can use any server backend with AIR apps

Q: Will AIR be integrated w/products after CS3?
Not sure

Q: Can we make a executable in the future .. which would include the runtime with it
Your AIR application can include the runtime already

Q: What about MySQL?
You can use MySQL on the server but not on the client

Q: You doing any sessions at max?
Andre Charland and Alexei White from Nitobi will be presenting an Inspire session at MAX

Q: When is the final release of AIR 1.0?
Early 2008

Q: AIR release will be synchronize to the WebKit release?
AIR will be very close to Webkit - even providing bug fixes etc to the project

Q: Is iTunes created with AIR?
No

Q: Do you know when the expected release for AIR (for public use) will be?
The current Beta 1 version is for public use and the anticipated 1.0 release is early 2008

Q: How does this work with ColdFusion? As expected?
Yes as expected - any server technology will work

Q: MS Access mainform / subform - is there a plug-in that does something similiar?
Not sure at the moment

Q: Will there be a separate AIR development environment?
No. You can use Dreamweave, Aptana, or Eclipse at the moment I believe

Q: Where to start? Extensions for dreamweaver or handcoding
Do some hand coding and get familiar with the application.xml file and

Q: Is there an AIR plugin for Dreamweaver 8??
I don’t think so but don’t quote me :)
Q: Can I develop with Flex and use AIR?
Absolutely

Q: Maybe you said, but what rendering engine does AIR use? do we have to account for CSS issues liek we do for IE?
It is Webkit

Q: What must you go through to visually place objects in the appplication where you want them to appear?
Flex, Dreamweaver, Aptana. Just use your preferred HTML IDE

Q: Why would the application not update on its own?
There is update functionality I think - the AIR installer for your application generally deals with upgrades nicely

Q: Will Adobe Air be open source if not what will it retail for?
It is not open source but it is free. Well it is partially open source I guess since it uses WebKit

Q: Is Adobe Air the same thing as Adobe Apollo?
Yes

Q: Linux??
Not yet - after V1.0 comes out

Q: Does it go beyond the root of the XML file? for example ../..?
Good question - haven’t tried it!

Q: Is all of this code applicable to all Operating systems or do does it have to be coded differently for each OS
AIR is OS agnostic. You can run AIR apps on any platform although currently there are a few bugs that have been logged and will be fixed

Q: I thought I saw the use of .attachEvent previously; now it looks like a Flash .addEventListener call… what’s the difference?
attachEvent was the Nitobi Ajax Toolkit event attachment so that the code could run in a browser (IE et al) or AIR

Q: Does the system chrome command apply to osx as it does to windows?
Yes

Q: Can you change the appearance of the Windows XP window with AIR?
Not that I know of

Q: External files are included in the air file or they are on a server?
They can be either

Q: What about movies? Quicktime etc…
I think the same as Flash or Flex

Q: I assume that this will run on Mac the same why it runs on Vista?
Yes it works the same on both Windows and OS X

Q: Can you configure your AIR app with all the HTML and JS files residing on a web server?
Yes

Q: Would you say that AIR replaces the way Director used to be used for desktop apps?
To a certain degree yes. But it is definitely focused more on bringing the web experience to the desktop

Q: What does ADL stand for?
ADL is the name of the EXE used for debugging your AIR apps

Q: Will Air be able to play FLV movies?
Not sure

Q: Does AIR allow for a main form /subform similiar to an Access database? (Not something you have to answer now - just whenever there’s something similiar mentioned)
Yes you just have to build it ;)
Q: So what kind of CSS compliance is AIR in compairson with conventional online browsers?
AIR uses CSS 3.0 like the latest WebKit versions - whereas current versions of most browsers support CSS 2.0. I will probably get lambasted for making such a broad generalization!

Q: Can we use air to rotate 3D models?
Why not!

Q: How would this compare to Google Gears? Especially the offline capability.
I think that AIR provides a lot more than just offline capabilities like Google Gears does. It provides cross platform file IO, drag and drop, windowing and more

Thanks for all the questions and feel free to post more below!

Tags: .



* Declarative Ajax with CSS

Posted on September 20th, 2007 by Dave Johnson. Filed under AJAX, CSS, JavaScript.


Those that have developed or used Ajax components to build an application will be familiar with the idea of using some sort of declarative structure to define or configure a component. This is commonly achieved through either HTML or JSON.

For example, a simple dynamic table or grid JavaScript object may take a parameter that sets the height of each row in the table. Through JavaScript it might look like this:

var myTable = new Table({”id”:”myTable”, “rowHeight”:”20px”,”data”:["dog","cat","bird"]});

This could in theory instantiate a dynamic table with rows of height 20px and contents as defined by the data array.

Everything is right in the world.

Class it up

However, there are some out there - I won’t name any names - that might prefer to set something a table row height through CSS instead. So rather than setting the rowHeight in the configuration directly they may instead just specify a rowClass that is the class that will be applied to each TR element in the table. Defining the table would then look something like this:

var myTable = new Table({”id”:”myTable”, “rowClass”:”tableRow”,”data”:["dog","cat","bird"]});

and the corresponding CSS would look like this:

.tableRow {height:20px;}

Now the only problem here is that there are situations where we may want to know what the height of the rows in the table are through the objects API. For example:

alert(myGrid.getRowHeight());

So the question is, how can we support using CSS as the declaration for a component (too bad you can’t just put any name/value pairs in CSS in Firefox :(
Bridging the API Divide

Luckily for us we have the DOM. In the Nitobi Toolkit it is pretty easy to find a class in a stylesheet and read properties from it. In our Grid control we do something like this for rowHeight such that it can be defined through an HMTL declaration or CSS and still be accessible through the API. We end up with some code like this:

var ntbRow = nitobi.html.getClass(”ntbrow”);
if (ntbRow != null && ntbRow.height != null)
  this.rowHeight = parseInt(ntbRow.height);

The getClass function essentially scours all the included stylesheets for rules that contain the class in question.

This solution makes the components more skinnable and easier to work with in general while at the same time preserving the JavaScript API.

.



* Nitobi Hack Day

Posted on September 17th, 2007 by Dave Johnson. Filed under Nitobi, Uncategorized, hackday.


Now that things are starting to settle down at the new office and I am back from my travels in Dallas and Portland we can finally settle into some hack day fun.

It is really just an idea right now but please submit any ideas as comments. It will be open to pretty much anyone that wants to come and we will likely have it on an upcoming saturday. Nitobi will supply the hacking essentials like caffeine and pizza (maybe even some beer ;). The one stipulation is of course that everyone, either in a small group or alone, builds something cool and presents it to the rest of us (true to the spirit of the hack day). This something cool could be in the RIA space (Ajax, Flash, AIR, JavaFX, etc) but it could also be hardware or otherwise.

I am throwing out there Oct 13 as a tenative date so speak now if you have already got that day booked.

UPDATED: Oct 13 is just stupid cause thats thanksgiving weekend … Oct 20 is the new date.

UPDATED AGAIN: Please signup on Upcoming since space will be limited - and Andre will likely be doing some judging and giving away some sort of prize(s)

.



* Quote of The Day

Posted on September 16th, 2007 by Dave Johnson. Filed under Uncategorized.


This is not something that I am going to blog about very often but I could not help myself. Having lived in London for a few years I understand that if there is one thing that can unite Londoners it is their amazing disdain for public transport. Water cooler chatter usually consists of a healthy dose of war stories about the days train and bus rides.

From the linked article, Richard Middleton, the “head of rail” (!) at Steer Davies Gleave, says that “Germany is very good at integration - timetables match up … But the UK is better at providing information for passengers.”

I am not really sure what that means? I guess “providing information for passengers” is supposed to make up for really crap service?

Tags: , , .



* Wireless Free 4 All in Vancouver

Posted on September 15th, 2007 by Dave Johnson. Filed under Uncategorized, meraki, vancouver, wireless.


While it may take the likes of Google to provide free wireless to the city of San Francisco, Joe Bowser has instigated a veritable stampede to get a wireless mesh installed in Vancity. Unlike San Fran this is from the bottom up - from the grass roots rather than the tree leaves.

In particular Joe is focusing on the Gastown area with the help of Nitobi and their local neighbours like Bryght.

If you are in Gastown or Vancity then get your wireless mesh node here for the low low price of $99!

A big kudos to Joe for getting this whole crazy idea off the ground!

Picture of Brian Leroux and Joni Rustulka (Joni do you even have a blog and pls twitter more!?!?) care of nep

Tags: , .



* Vancouver Holiday

Posted on September 1st, 2007 by Dave Johnson. Filed under Nitobi, Uncategorized.




I was working down in Portland on a top secret Ajax application for a big Portland based company and am finally back in Vancity for a labour day weekend holiday. Come Tuesday morning I am back down in Portland for another week of work. I haven’t even had a chance to see the new office since we moved in _and_ I missed critical mass last night :(
Alas, I am looking forward to being back in Vancouver for more than a week at a time!

(picture of voodoo bacon donut in Portland care of Jake)

.