urn:lsid:ibm.com:blogs:entries-84a1e68f-fa2b-4d83-a240-5f565e7d6248Mainframe Performance Topics with Martin Packer - Tags - air I'm a well-known mainframe performance guy, with almost 30 years of experience helping customers manage systems. I also dabble in lots of other technology. I've sought to widen the Performance role, incorporating aspects of infrastructural architecture.03012017-09-06T04:15:14-04:00IBM Connections - Blogsurn:lsid:ibm.com:blogs:entry-9b3449a3-52e9-4efa-8031-c62571a6e170First Impressions Of Programming With Adobe AIRMartinPacker11000094DHactivefalseComment Entriesapplication/atom+xml;type=entryLikestrue2008-06-25T11:00:43-04:002008-06-25T11:00:43-04:00<p>Many of you will have, by now, installed the Adobe AIR runtime. Most probably it will be to run something like Twhirl.<p>At this point many of you will be asking "what's Twhirl?"<p>If I said it was a nice desktop application that makes using Twitter <strong>so</strong> much easier I hope you don't ask "what's Twitter?" :-)<p>So, we're beginning to see these desktop applications coded using Adobe AIR, which stands for "Adobe Integrated Runtime" (formerly "Apollo").So, what's special (if anything) about AIR?<p>In my experience, two things:<ul><li>AIR applications run across Mac, Windows (and in Alpha form) Linux.<p>(In fact I installed the Linux AIR alpha plus Twhirl on my ASUS EEE PC some months ago. (Nice machine that EEE, by the way.) It worked fine within the limitations of the AIR alpha code.)<li>It's entirely possible to code up AIR applications using just a text editor. (in fact that's precisely what I did.)<p>My editor of choice, for whatever that's worth, is Notepad++ on Windows. (And I'd rather not start an editor war here, thanks.) :-) And the EEE comes with the Kate editor, being built on Debian Linux.<p>I <strong>like</strong> environments where there is little, if any, in the way of barriers to entry for programmers. </ul><p>So what does an AIR application consist of?<p>In principle one can do fancy things with Adobe Flex Builder and .SWF files but that requires expensive tooling. But there is another way:<p>You can write an AIR application of arbitrary complexity with two files:<ul><li>A <strong>small</strong> XML file.<li>Your HTML file which can also have javascript in, just like normal web pages. In fact your typical AIR HTML file could be thrown straight into a web browser and work just fine.(That is unless you use some of AIR's special capabilities - which your javascript can detect the availability of and code around accordingly.) And I assume that when I say "your browser" I mean a standards-compliant one like Firefox. :-) Note: The flavour of AIR that uses HTML / Javascript is actually built around the Safari browser.<p>So I really think the "this builds on what you already know" point makes it attractive to an awful lot of people.</ul><p>This isn't an AIR tutorial so I'm not going to give you samples of the small XML and html files. You can easily find those on the Web. I just want to leave you with the impression there isn't much to it. And there is an O'Reilly pocket guide for AIR. (But there isn't a "For Dummies" book for it - so <strong>that's</strong> alright.) :-)<p>There <strong>are</strong> alternatives - such as Mozilla's XULRunner (whose user interface is based on XUL rather than HTML) and, I suppose, Microsoft's Silverlight. But neither is as easy and "I just need a text editor and the SDK to do it" is pretty enticing.<p>So, I'm impressed at its simplicity, the fact it builds on HTML, XML and Javascript. And if you want to be able to build something that looks like a desktop application, complete with drag-and-drop and clipboard capabilities, this may well be a good fit for your needs.<p>I mentioned the SDK. It's free (but it doesn't run on Linux and I've not heard any suggestion that it will). It comprises two useful tools:<ul><li>ADL - which you use for testing<li>ADT - which you use for packaging up your completed application. This involves signing the resulting .AIR file - and the ADT tool has the capability to enable you to be "self certifying" so that gets round the cost of getting a certificate from a more formal authority. But it does require users to trust you. :-)</ul><p>Both are simple to use.<p>So, I got a "Hello World" application up and running in about twenty minutes, and that even with typ(o)ing in the XML and HTML files from the O'Reilly book. Swiping from the Web would probably be quicker - but you'd learn less.<p>And now I'm proving remarkably productive at writing a full-scale application. What's slowing me down - if anything - is my very basic CSS. And <strong>this</strong> application uses XMLHttpRequest and walks the DOM tree to build the window contents on the fly. All using <strong>standard</strong> javascript. Oh, and my CSS is rather more under control. :-) I just need to refactor it into multiple parts as all my CSS / HTML / Javascript is in the one file. Oh, and then there's refactoring to use dojo. I'm told you can use dojo in an AIR application, so long as you ship the dojo runtime with it.<p>If you want to know more about AIR go to their <a href="http://onair.adobe.com/blogs/onair/">blog</a>. For Twhirl go <a href="http://www.twhirl.org/">here</a> and, of course, Twitter is <a href="http://twitter.com/">here</a>.<p><strong>Note:</strong> IBM doesn't appear to have any commercial interest in AIR. And I <strong>certainly</strong> don't. So I'm just telling you how I see it.<p>Many of you will have, by now, installed the Adobe AIR runtime. Most probably it will be to run something like Twhirl.<p>At this point many of you will be asking "what's Twhirl?"<p>If I said it was a nice desktop application that makes using Twitter <strong>so</strong> much easier I hope you don't ask "what's Twitter?" :-)<p>So, we're beginning to see these desktop applications coded using Adobe AIR, which stands for "Adobe Integrated Runtime" (formerly "Apollo").So, what's special (if anything) about AIR?<p>In my experience, two things:<ul><li>AIR applications run across Mac, Windows (and in Alpha form) Linux.<p>(In fact I installed the Linux AIR alpha plus Twhirl on my ASUS EEE PC some months ago. (Nice machine that EEE, by the way.) It worked fine within the limitations of the AIR alpha code.)<li>It's entirely possible to code up AIR applications using just a text editor. (in fact that's precisely what I did.)<p>My editor of choice, for whatever that's worth, is Notepad++ on Windows. (And I'd rather not start an editor war here, thanks.) :-) And the EEE comes with the Kate editor, being built on Debian Linux.<p>I <strong>like</strong> environments where there is little, if any, in the way of barriers to entry for programmers. </ul><p>So what does an AIR application consist of?<p>In principle one can do fancy things with Adobe Flex Builder and .SWF files but that requires expensive tooling. But there is another way:<p>You can write an AIR application of arbitrary complexity with two files:<ul><li>A <strong>small</strong> XML file.<li>Your HTML file which can also have javascript in, just like normal web pages. In fact your typical AIR HTML file could be thrown straight into a web browser and work just fine.(That is unless you use some of AIR's special capabilities - which your javascript can detect the availability of and code around accordingly.) And I assume that when I say "your browser" I mean a standards-compliant one like Firefox. :-) Note: The flavour of AIR that uses HTML / Javascript is actually built around the Safari browser.<p>So I really think the "this builds on what you already know" point makes it attractive to an awful lot of people.</ul><p>This isn't an AIR tutorial so I'm not going to give you samples of the small XML and html files. You can easily find those on the Web. I just want to leave you with the impression there isn't much to it. And there is an O'Reilly pocket guide for AIR. (But there isn't a "For Dummies" book for it - so <strong>that's</strong> alright.) :-)<p>There <strong>are</strong> alternatives - such as Mozilla's XULRunner (whose user interface is based on XUL rather than HTML) and, I suppose, Microsoft's Silverlight. But neither is as easy and "I just need a text editor and the SDK to do it" is pretty enticing.<p>So, I'm impressed at its simplicity, the fact it builds on HTML, XML and Javascript. And if you want to be able to build something that looks like a desktop application, complete with drag-and-drop and clipboard capabilities, this may well be a good fit for your needs.<p>I mentioned the SDK. It's free (but it doesn't run on Linux and I've not heard any suggestion that it will). It comprises two useful tools:<ul><li>ADL - which you use for testing<li>ADT - which you use for packaging up your completed application. This involves signing the resulting .AIR file - and the ADT tool has the capability to enable you to be "self certifying" so that gets round the cost of getting a certificate from a more formal authority. But it does require users to trust you. :-)</ul><p>Both are simple to use.<p>So, I got a "Hello World" application up and running in about twenty minutes, and that even with typ(o)ing in the XML and HTML files from the O'Reilly book. Swiping from the Web would probably be quicker - but you'd learn less.<p>And now I'm proving remarkably productive at writing a full-scale application. What's slowing me down - if anything - is my very basic CSS. And <strong>this</strong> application uses XMLHttpRequest and walks the DOM tree to build the window contents on the fly. All using <strong>standard</strong> javascript. Oh, and my CSS is rather more under control. :-) I just need to refactor it into multiple parts as all my CSS / HTML / Javascript is in the one file. Oh, and then there's refactoring to use dojo. I'm told you can use dojo in an AIR application, so long as you ship the dojo runtime with it.<p>If you want to know more about AIR go to their <a href="http://onair.adobe.com/blogs/onair/">blog</a>. For Twhirl go <a href="http://www.twhirl.org/">here</a> and, of course, Twitter is <a href="http://twitter.com/">here</a>.<p><strong>Note:</strong> IBM doesn't appear to have any commercial interest in AIR. And I <strong>certainly</strong> don't. So I'm just telling you how I see it.Many of you will have, by now, installed the Adobe AIR runtime. Most probably it will be to run something like Twhirl. At this point many of you will be asking "what's Twhirl?" If I said it was a nice desktop application that makes using Twitter so much easier...029396urn:lsid:ibm.com:blogs:entries-84a1e68f-fa2b-4d83-a240-5f565e7d6248Mainframe Performance Topics with Martin Packer2017-09-06T04:15:14-04:00