Tcoz Tech Wire

Discoursing on trends and technologies interesting to Tim Consolazio, sole proprietor of Tcoz Tech Services, specializing in Flash/Flex/Air, iPhone, Facebook, Twitter, and related technologies.

"Technology from an indie software developer's perspective".

Monday, June 22, 2009

TcozTwitter: A Twitter Client using Adobe Air and the Flex Mate Framework - Day 7: Running on the iPhone...really?

This post covers my progress developing a Twitter client using the technologies mentioned in the article title, but also takes another interesting turn. I've been working on the side with Citrix to understand their latest XenApp Server product, and how a Flash/Flex/Air developer might be able to leverage it. To this end, I decided to branch my Air code base, and use what I've already done to drive forward a version of TcozTwitter that could be delivered on the iPhone...or any mobile device for that matter.

Notice I said “branch”, not “start all over again with a different technology”, and “any mobile device”, not just “iPhone”. Those are the important things to get here. More on that in a minute.

If you're interested in the history, links to all the previous blog articles are at the end of the article.

To summarize, here's the “thin line” of technologies you'll need to be familiar with, if you want more detailed summaries, look at the links at the bottom of this article:

Amazon EC2 Cloud and S3. EC2 is essentially a vast pool of processing power that you can isolate a piece of to run whatever you need. I frequently liken it to a ball of clay; you grab a chunk and shape it the way you want; when you're done, you take a snapshot of the configuration (so that you can “restart” it from where you left off), and put the chunk back on the bigger ball. S3 is “Simple Storage Service”. It's basically a huge pool of storage space that you can access via an API or one of many downloadable clients. When you take your “snapshot” of your “chunk” (or in EC2 parlance, when you “bundle” your “instance” into an “AMI”), the AMI is saved to a “bucket” (essentially a directory) that you've previously created in S3. When you “restart” your instance, you point to the configuration file that gets stored with your AMI data, fire it up, and there ya go.
XenApp Server and Desktop. There's a lot to this technology, but I'm focusing on the iPhone-tweaked version of the product, which you can read about here. Briefly, XenApp and Desktop are server-side software that “virtualizes” applications and allows you to view them over a variety of different clients. You install whatever app on a server—any technology that the server supports is fine—then “publish” it via the XenApp software so that it can be accessed remotely by Citrix Viewer and Receiver clients. Citrix has published an AMI in the EC2 cloud that you can use to experiment with. Remember, an AMI is a saved configuration, ready to go. All you need to do is go the cloud, fire it up, install your app, publish it, and remote clients can access and run it. The Citrix XenApp AMI is a demo that times out in three months; plenty of time to learn your way around.
Flex/Air, and Mate. Flex is an ActionScript 3 component framework used to build applications that run in the Flash player, Mate is a Flex-specific framework, heavily leveraging MXML, to simplify and organize building applications with Flex and ActionScript 3. I'm using Mate purely to familiarize myself with it. I'll say this; compared to other frameworks, it's pretty easy to get your head around, and it does simplify a lot of tasks. I have some concerns, but that's true of any prescribed development approach.
The iPhone. Enough said about that I think, and then some.

You'd be surprised, once you know exactly how it all works, how easy it is to set this all up and get basic applications working. I can publish an app, or an app update in a matter of minutes.

Here's some screenshots of my Twitter client, running on the iPhone, using all the above mentioned technologies:








It really works, even over EDGE on an OG iPhone (as I write this article, I'm actually expecting the delivery guy with my new 3GS 32mb Black. UPDATE, I have the new iPhone, and the Citrix stuff runs great over the 3G network). I leave it up and running on my iPhone while it's docked to see my tweets come in without any page refreshes and whatnot.

I also have to say, Citrix' luminaries Chris Fleck and Ray Yang have been great. When I started my experiments, I pinged them with a few questions, and they've been supporting my efforts with tech info and advice ever since, because they're interested in my perspective on these technologies.

It's that perspective that, perhaps, makes this all interesting, so much so that TechCrunch published a story on my findings that stayed on the front page of their site for weeks and sparked a lot of debate, mostly revolving around “There's no need for Flash on the iPhone,” and “why don't you just build a native app”. Flash is a great candidate for building mobile apps. The industry just seems to have a variety of issues that prevent it from getting out there on mobile devices, and I have good reason to believe they're not primarily technical ones.

Anyways, I'm an independent developer; in a nutshell, that means I go from contract to contract, building various kinds of applications for various kinds of clients of all sizes. I've worked for Microsoft, Viacom, Thomson Reuters, IAG Research, American Express, CitiGroup, IEEE/Spectrum, and a slew of smaller shops and startups. I'm pretty proud of my portfolio, and I work hard to stay cutting edge; I run servers to host all kinds of development environments and server software, like Flash Media Server, TomCat, BEA WebLogic, MAMP, Red5, Blaze, Ruby/Rails, .Net, Air, SVN, FTP, mySQL, SQL Server, Oracle Comm. Edition, etc. etc.

It's a lot of work, and isn't cheap; sure I write it off, but I have to do the cash layout, and admin/maintain them. IMHO, it's necessary; a good independent developer should know how to put together a good development and staging environment in just about any technology.

So, enter the Amazon EC2 cloud. Now, I can spin up instances of virtually any kind of development environment...install this and that software/app/etc...save the configs and shut them down...for about 10 cents an hour. After doing the math, that works out to about half what I pay now for a fully dedicated hosted box at a solid host company, and that's only if I leave it up and running 24/7. It's WAY flexible. For staging and development testing, it's fantastic.

However, most of what I do for a living involves Flash development. I love the iPhone and have learned Objective C, got my business accepted into the dev program—it turned out to be more than a matter of just paying for it to my surprise—and so on. But I've been working with Flash for a decade, and it's a big disappointment that Flash doesn't run on it.

Enter XenApps, which Citrix makes available as a demo AMI config in the EC2 cloud. All I have to do is select the AMI, launch it, and I'm looking at a clean build of Windows Server 2k3 with XenApps, Desktop, and all that; everything I need to work with to see if I can deliver a Flash/Flex/Air application to an iPhone.

I settled on Air, mostly due to the fact that Air doesn't deal with browser security and sandboxes the way that Flash/Flex do; Air is a native runtime, with it's own encrypted data store and access to NativeWindow and other elements that make it a fairly powerful RIA desktop development environment. Crossdomain and such isn't a hassle as well. You can also publish an Air app (which, on Windows, is an .exe) in a very straightforward way from the XenApp environment, as opposed to using AppViewer, which is a .Net app Citrix distributes that you run in lieu of your actual SWF by pointing it at the web page that embeds it. It works and works well, but I figured why bother with web pages and such if I can just run my Flash app in a native runtime environment without the involvement of the browser footprint.

The connection should be evident; there I was developing a Twitter client in Flex Builder, and publishing it to Air, using the Mate framework. So I decided to marry the two efforts, and see if I could branch my slowly developing Twitter app—it's hard to find spare time, but I fit it in now and then—and see if I could tweak it for delivery to the iPhone via XenApps.

Yay verily, it worked; I installed the Air runtime on the Windows instance, installed my Air TcozTwitter client, published it through the XenApps server, and pointed the iPhone Citrix Receiver at it, and there it was, touch enabled and all. True, I had to rethink the UI in terms of the iPhone. I've had people say that Flash apps won't port directly to the iPhone because they use mouseovers and such—think about it, the iPhone doesn't have “fingerovers”, which is interesting—but that's true of any technology no matter what. As a UI developer, you have to look at the device, consider the interactivity, and develop your app, using your given technology, in that context. If you factor your code well and the UI is truly abstracted, this isn't that big a deal though at all, certainly a heck of a lot less work than writing the whole thing all over again in Objective C...and then Symbian...and then Android...and then Windows Mobile...and then Blackberry...and whatever else winds up getting cranked out of BigTech Labs XYZ.

Here's points I found to be VERY interesting about this manner of development:

I'm not an “enterprise”, I'm an independent developer. But, I don't just write code for clients, I build things off to the side to keeps my chops fresh and who knows, maybe make some money. I find that this technology, although created by Citrix which is typically associated with “enterprise”, works for me. The Citrix guys seemed to find that interesting too. A library of demo apps that I can bang off a single EC2 instance is also a powerful demo tool for landing contracts. As I mentioned once before, I could probably get work just by having put all this together.
With just UI refactors, I can roll out the same codebase to any mobile device that Citrix has written a Receiver for. They've covered a number of them, see their website for more info.
The XenApps “tweaked” version I'm working with, via the Receiver, presents your apps as a selectable library; so, the user downloads ONE app (the phone-specific Receiver), and they can access ALL the apps that I publish though XenApps.
Consider the above...all I have to do, to deploy a new app to my entire userbase, or update one, is install it on my EC2 instances, which you access via RDP or the Citrix Receiver desktop app (I use the Mac version). No app store approval iterations. It'll be interesting to see how this shakes out.
Because the app runs on a regular server, I don't have the development restrictions inherent on the iPhone. I can make any number of network connections of any kind, store data in a variety of ways locally, and whatever else I need to do. The available technology I can use to drive my apps is essentially unlimited.
For proving out concepts and getting user reactions, this can't be beat. I can build apps rapidly in one codebase, get them deployed to all kinds of devices, and see what users think. What hits on a Symbian may not hit on an iPhone. Depending on the reaction, I can decide to build a native app, or abandon the effort for a given platform.

There are some things I have yet to figure out, the Citrix guys say they are interested in helping me find solutions:

Encrypted data store in the Air runtime is having some issues; I believe these are probably related to the permissions that XenApp is using to run apps under; some server config will probably solve this, if not, I can always just dump everything to a SQL DB or some such.
iPhone mechanisms, like the auto-complete for text, the new cut 'n paste, and such, don't work, because the app isn't actually running on the phone. Fixable, because I can just build the capability into the application, and just make sure I emulate the iPhone look 'n feel. The investment of time can in fact give me the same look and feel consistently across any device...nice for my end users on different platforms, and of course very useful looking forward to things like NetBooks and touchscreen e-readers.

Will I abandon building native apps for the iPhone, and whatever else I find the time to learn how to build apps for? Of course not. There's money to made out there, and different development technologies is something I'm interested in. So, the Objective C book and Xcode will still take up space on my hard drive, and be frequently used.

But, if I work with a client that needs apps rapidly deployed to a variety of devices, without going through the rigor of building multiple versions and maintaing multiple code trees, will I be glad that I learned how to do this...and, will I continue to ensure that apps I build are constructed in such a way where I can branch and get a version running on the iPhone this way in relatively little-to-no time?

You bet. Citrix has most definitely found a place in this independent developer's toolbox.

I wonder how many other contract Flash developers have said that.

As always, thanks for visiting.

Article Links:

TcozTwitter: A Twitter Client using Adobe Air and the Flex Mate Framework: Day 1, Day 2, Day 3, Day 4, Day 5, and Day 6.

Flash/Flex...on the iPhone? Initial Exploration, Follow up with Citrix.

Why the Amazon EC2 Could and S3 is a great thing for the independent developer, Article Link

Labels: , , , , , , , , , , , ,

Wednesday, June 17, 2009

TcozTwitter: A Twitter Client using Adobe Air and the Flex Mate Framework - Day 6: Running on the iPhone

It's been a few days since my last post, but I've been VERY busy. Swift3d V6 is out (it's great 3d modeling and animation software, very Flash and Papervision friendly), I'm still skilling up my iPhone dev chops, I'm digging in to Flash Media Server 3.5.2, my current contract is coming to release (V1.0 of Thomson Reuters Insider), and...well, you get the idea.

If you've been following my blog, you know I've been working with Citrix to use their XenApps image in the Amazon EC2 cloud to deliver Flash/Flex/Air apps to the iPhone using the Citrix Receiver. You can view the previous post links on the right of the blog page, or search for "iPhone" and "Citrix" tags to review previous posts on how I'm going about this.

I've got the issues sorted for the most part: design parameters for an iPhone app delivered this way, how to get rid of the Adobe Air EULA so that users don't have to click through it, and so forth. I've even got ads integrated (I'm running an OpenAds server that I've set up a couple of campaigns on for friends that own businesses...free ads for them, proof of concept for me).

I'm going to put up a full blog post on the issue, but for now, here's a picture of what I'm looking at on my iPhone. I just leave it up in my iPhone doc, and see my tweets come in without any refreshes; it's a fairly real-time twitter client. I've even tried it over the EDGE network, it works fine (remember, that client is actually not running on the iPhone). No awkward refreshes like standard VNC or RDP, etc.

With this as a base, adding features to complete the functionality is pretty straightforward. I'll be adding a login screen (right now it just uses my creds), a post-tweet screen, a fancy loader, and all that. But it's all just Flash development at this point, the mechanism to deliver it to the iPhone running as a native app, all I need to do is update the Air app on the EC2 cloud instance to deploy a new version; users of the Citrix Receiver won't have to update the app, they'll just have to restart the Citrix client.

Pic below, detailed blog post in next couple of days. Interestingly enough, there's not that much to tell. If you know how to put it all together, it's actually pretty easy to set it all up.

Labels: , , , , , , , ,

Monday, June 1, 2009

Flash Flex on the iPhone? Setting up the Amazon Cloud Instance running Citrix XenApps

This is a continuation to my series of articles detailing how to get Flash Apps running on an iPhone...sort of. You really don't run Flash on the iPhone, you run it on a Citrix XenApps server, which runs on a Windows instance in the Amazon EC2 cloud.

My previous blog articles can be found here:

- Flash, Flex...on your iPhone?
- Monday, May 18, 2009 The Citrix Receiver Follow Up: Flash/Flex (and then some) on your iPhone...or Symbian...or WinMo...or...

Quick blurbs on what the technologies I mention above are:

- Flash/Flex/Air: if you're reading this article, no explanation needed.
- Citrix, simply, specializes in terminal-based delivery of applications. Think "thin client" delivery of applications.
- XenApps, in there own words, "Citrix XenApp virtualizes an individual application, be it Microsoft Office, PowerPoint, Excel, or SAP (sic, or Flash, etc.), allowing users to run those applications on a client directly from a XenApp server hosted with a Windows application."
- Amazon EC2, cloud-based computing infrastructure. I describe this more below.

So, my goal is to "Deliver Flash/Flex/Air apps, initially for the iPhone but eventually for any client, from the EC2 cloud running an instance of a Windows Server running Citrix' XenApps".

Whew. I could probably land a contract just by saying I know what that means.

In order to get this rolling, I'll have to get a Citrix XenApps instance running in the on the Amazon EC2 cloud. Citrix offers a video showing how to do this, you can view it here.

Three IMPORTANT notes, this is fair warning, and this is coming from somebody that has worked with resources in clouds before (I've just never been responsible for actually configuring and maintaining one).

- WATCH THE WHOLE VIDEO CAREFULLY. Believe me, you won't figure it out on your own if you've never done anything like this before.
- DO NOT SKIP THE VIDEO IN FAVOR OF THE "STEP BY STEP" IMAGES BELOW THE VIDEO. They don't provide enough detail.
- DO NOT USE SAFARI. If you're a Mac user, you probably know Safari doesn't always work well in sites that have multiple form submissions. The Amazon web pages broke quite a bit until I switched to Firefox.

Let's talk about what "an instance in the EC2 cloud" means. An "instance", is conceptually like a dedicated server...but it's not. It's an allocation of resources that appears to me to be a server, but which is disposable; when you terminate an instance, it's configuration is saved so you can restart it, but otherwise, the resources are freed up. The company, like Amazon, uses commodity hardware to build a platform to make instances available, and you pay for the time that each of your instances runs, because you're using resources in their cloud. When I terminate the instance, I don't get billed anymore, because there's no server to keep up and running, just a stored configuration that gets reconstituted into an instance if and when I start it back up.

Conceptually, the "cloud" is like a big ball of clay. When I need a chunk of clay, I grab off as big a handful as I need; I pay for that chunk based on the size of it, and how long I keep it out of the main big ball. When I'm done, I take a snapshot of the chunk, and just put it back onto the big ball. It's now available for anybody else to use, and my billing stops until I grab a new chunk, which by using my snapshot, can get instantly reshaped to the last known configuration. I can grab as many chunks as I need, shape them all differently, and so on.

It's a great model. In addition to a website hosted by Brinkster (where my blog and main site is), I currently pay almost $150 a month for a dedicated Windows server that I use for deployment and testing of customer apps. I pay for it whether or not I'm actually doing anything with it, which has irked me more than once. It's a business write off and all that, and IMHO an essential tool for any independent web-based software developer, but still, if I can economize by just using cloud instances of windows and linux servers, activating and deactivating them when I actually need them, and enjoy the easy flexibility of multiple environments (this one runs Tomcat on Linux...this one .Net on Windows Server 2008, etc.) I can cut that cost to a fraction and save myself multiple webserver config headaches and such.

Anyway, to get started, you go to the Amazon Elastic Compute Cloud EC2 Site. Initially, this is a little scary, because you see a list of usage fees by the hour, and you have to submit a credit card. But I'm intrepid, and have a business credit card, so on I go. I needed to set up an EC2 account, which lets me run select all kinds of pre-made server images that I can run as instances, and an Amazon S3 account, which is the storage mechanism for my files and so forth. They run independently of one another; again, remember that you're not actually running a server, you're running an allocation of resources, broken down into processing and storage. This way, I can run the same image as multiple instances, each with different (or differently configured) apps, using different amounts of processing power, all pointed at the same storage, or different areas of storage. Very flexible and elegant.

Anyway, the EC2 account I want to run my server images in is "$0.125 per Small Windows Instance (m1.small) instance-hour (or partial hour)". According to the documentation, it breaks down like this:

- You're paying by the hour, 12.5 cents, for every hour your instance is running. Hmm...let's assume I'll leave it up all day for a month: 12.5 x 24 = 300 cents = three bucks a day, x 30 = 90 bucks a month. I don't mind that as an investment in learning this technology and proving its use; if I land one contract because of this, it'll more than repay me in a couple of hours. And if course, I don't have to run it all the time.

- The specs for a Small Windows Instance, which should be plenty for my development experiments and demos: 1.7 GB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of instance storage, 32-bit platform. Hmmm...we'll have to see how it goes. The large instance has 7.5 GB or memory, but is fifty cents an hour. So, here's hoping the Small Windows Instance can swing it.

So, you fill out the forms (again, don't use Safari), which when complete, takes me to a page with the following message:

"Thank you for signing up for Amazon Elastic Compute Cloud. We will e-mail you a confirmation when the web services are available for you to use. In order to begin using this service, you will need a X.509 certificate. You can Create a New X.509 Certificate or Upload Your X.509 Certificate."

Ok...so let's create the X.509 Certificate. If you don't know what one is, an X.509 certificate binds a name to a public key value; more generally, a public-key certificate is a digitally signed statement from one entity, saying that the public key (and some other information) of another entity has some specific value. So, by using a certificate, a browser and an application know that they are speaking to the intended targets by comparing those values; if it checks out, the communication is coming and going from where it's supposed to.

After a minute or so to create the certificate, I now have a certificate assoicated with my EC2 account, and my instances will be run using it.

That really seemed to be about all there was to it; strangely enough, by signing up for EC2, I seemed to have already signed up for S3; I went to the S3 page to sign up, but it told me I already had access, and as far as I know, I've never signed up for it before. It makes sense, but seemed a little implicit; I'd prefer to have at least received an explicit notice of some kind. It doesn't seem to cost me any additional money though.

Once that's done, you go to the EC2 Console and look up an image of the XenApps demo image. This image is located in the Community AMIs list after you click "Launch Instances" (search for "XenApps"). In order to do so, you'll need to create a security group and a key under which to run the instance; these items do things like open ports so that you can access the instance however you need, like HTTP, RDP, and via the Citrix clients. WATCH THE VIDEO, it explains exactly how to do this and what it means.

All in all, not so bad to get this end of it up and running. I still need to know how to upload and configure apps to make them available, but that's the next step. For now, I'm an independent developer with direct experience in setting up custom configured server instances in a cloud. I understand the benefit of it and can put out a wide number of configurations for any kind of client to access and test applications, and it's costing me twelve-and-a-half cents an hour to play with. Worth every penny IMHO.

Next, making Flash/Flex/Air apps available on my fancy new server instance running XenApps.

As always, thanks for visiting.

Labels: , , , , , , , , , , ,

Monday, May 18, 2009

The Citrix Receiver Follow Up: Flash/Flex (and then some) on your iPhone...or Symbian...or WinMo...or...

I said I'd follow up on my story Flash, Flex...on your iPhone?, (this story generated a lot of press, got picked up by TechCrunch and blogs all over) and here it is. 

As a quick recap, I looked at the Citrix Receiver iPhone app, and was impressed with the experience. It's not a VNC or RDP solution; Citrix has created a client that, by use of a highly optimized communication protocol, lets you view apps running in the EC2 cloud (for the layman, that means "you see it on your phone but it's actually running somewhere else") without installing them on your phone. This means that you can build an application out of any technology, deploy it to the remote server infrastructure, and access it on your phone, or computer, or any device that runs the Citrix Receiver. The technology is optimized for this use; there's no awkward, blocky screen redraws, no browser toolbars, etc. A properly designed application appears to be running as a full-screen application on the phone, no matter what technology it's built out of. This suite of tools is branded "XenApps" for the most part; I'm not one of their marketers and know there's more to it, but "Xen..." is a big Citrix branding buzzword these days.

It's amazing how many people responded negatively, clearly without trying the Citrix Receiver demo. For the most part the issues are around the rampant abuse of Flash all over the web; poorly programmed banners, autoplay video players, that sort of thing. I concede: the web is full of bad Flash, and if that's the extent of your experience, you'll probably be pretty close minded about the subject. I've been a Flash developer for a long time though, and have never programmed a banner. I work on enterprise-level applications that make companies money; I've built applications that you've more than likely used, and that have helped people sell companies, and is currently helping a startup stay in business. Flash development, with Flex and Air, is stronger than ever and isn't going anywhere. Hating it is a waste of time. 

To continue my rant, I'll tell you one thing for sure: I don't want to be in the business of porting those apps to every different platform on earth. Yes, I could make money doing it. But it's boring and doesn't move me along to the next new project. People say, "forget Flash just build an iPhone app". Erm...what about Android? And Blackberry? And Symbian? And Windows Mobile? And Windows desktop? And OSX Desktop? Hire all those developers....maintain all that code...I've got better things to do. I want my app to have as much reach as humanly possible with as little work as possible, and porting the code to everywhere isn't a good strategy. 

Note: Citrix said that for Blackberry and Android clients, we have to "stay tuned". The guys on the call wouldn't nail in any dates or promises about this, but they didn't say "no". I'd assume that, considering how attractive this technology could be to corporations, a Blackberry client would be a no brainer. There is currently one for the iPhone, Symbian, and Windows Mobile 6.1.

The Citrix Receiver, backed by the Citrix technology on the server side, is the sort of thing that makes this possible. Again I'll say, and Chris Fleck, VP of Solutions Development for Citrix agreed readily, that it's not for every kind of app; if you have something that requires lots of real-time graphical updates, like a MMORG or something, you should probably consider going native. But that's the minority of apps; 75% of the stuff I've seen in the iPhone app store, or more, could be served using the Citrix technology, which would give the developers the opportunity to deploy it to all the new platforms coming out. 

One big thing though; the Citrix Receiver is branded Citrix. This was a big downside, and I told the Citrix guys so; if I'm MTV, or Thomson Reuters, or CNN, or Disney, I'm not going to want my front-end gateway UI to be branded Citrix. I want people searching their platform's app store for my brand, and when they pull it down, I want to see my logo on their phone. Here's what it currently looks like:




To this, Citrix responded, "that's a real valid point. We're going to look into this". One of their developers that was on the call seemed to think it would be a no brainer to implement. So, from what I can see, Citrix is going to enable this. So, you brand the Citrix Receiver as your own...

...YOU DON'T EVEN HAVE TO BUILD IT. You just brand it and get it in the [ fill in mobile platform ] app store. 

Then you take your code base, deploy it to the Citrix solution on the EC2 cloud, and that's it. Anybody with the receiver can use your app, no matter what technology it's built out of. It just stuns me that people don't see the potential for this. If Citrix really puts in the time and makes this solution rock solid, it could very well represent a significant direction of the next wave of mobile device use. 

Citrix showed me how easy it is to do it; in fact, it looks so easy, and so cost effective to get up and running, that I'm going to try it with my Planet Sudoku app. They even have a little app shell, called "AppViewer" which you can embed your tech in, that takes care of the full-screen look-and-feel for you. 

Initially, I was going to port this thing to the iPhone, but now, as an experiment, I'm going to just refactor the UI to fit the iPhone, use the AppViewer shell, and deploy it with the Citrix solution; you'll be able to play my Sudoku client on your iPhone in a lot less time than if I retooled the whole thing to Objective C. More blogging to come on that one I'm sure. 

Is it really that easy? I don't know for sure, but as far as I can tell, this is a heck of a lot easier than porting the app to Objective C. In their own words (note that where they say "Windows", you can sub in "apps that run on Windows", like Java, Flash, Flex, Air, Silverlight, etc.):

"While unmodified Windows applications can be delivered to mobile devices via Citrix XenApp, XenApp also provides an excellent platform for delivering custom mobile applications. Citrix is seeing interest in this area from a number of it's ISV partners. The concept is to build the application using tools normally used to build full Windows applications, but simply design the user interface with the smaller screen size and resolutions of mobile devices as a design consideration. The concept is to reskin the UI of larger applications with a smaller form factor UI. As long as the custom mobile application can be published on Citrix XenApp, it can be delivered to mobile devices with the Citrix Receiver installed."

So, if this indie software developer can make this work, I'd pretty much say that anybody can, not matter what your reach is. You don't need deep corporate pockets; I don't actually know this for a fact yet, but I'm optimistic, and am actually trying it now, so I'll let you know. 

For more info on this topic, and/or to learn how to get involved in this sort of development, visit the Citrix developer community site, and take a look at the Tips and Tricks sections. 



Labels: , , , , , , , , , ,

Friday, May 15, 2009

Flash, Flex...on your iPhone?

I'm a Flash/Flex/Air developer primarily, with expertise in what I think of as "supporting" technologies (gateways and data layers built out of .Net, Java, PHP, Ruby, etc.). My usual contract gig is, I manage and/or work on an application's UI, using ActionScript technologies, and offer whatever assistance is needed to set up the gateway and data transfer backends. Sometimes I build all of it, sometimes I just have to work with the backend guys to understand how something like OpenAMF or Fluorine works, it depends on the client's expertise, but that's why they hire me. 

Flash/Flex, however, has been one of my greatest disappointments with the iPhone. We were promised "the complete web", and it's one of the reasons I jumped on the OG iPhone day one. Shortly after dumping my other phone and signing onto AT&T, I visited one of my ActionScript-based web apps...

...and discovered there was no Flash. Apple and their fanbois came back with a few short, lame justifications for this disclosure omission: "we support the open web, Flash is proprietary", "the Flash player is not really a Web 2.0 technology", were some of the things I saw bandied about. Fact is, it's the best solution for RIAs, and is getting stronger all the time. I've been doing this for 15 years, picked Flash/Flex for a reason, and the industry seems to support my decision; the NYTimes recently dumped Silverlight for Adobe Air, MLB did the same thing a while back if I remember correctly, and I'm currently working on a very large project that I can't talk that much about, but which will go live soon (and then I'll talk about it as much as I can). 

I have actually viewed Flash apps on my iPhone over VNC and RDP connections (check out WinAdmin in the app store). This lets me pull up a browser remotely, and access any web page I want, including ones with embedded flash apps. If the Flash app is designed properly, with a web page that properly sizes the browser, removed as many tool/status bars as possible, and so on, the experience isn't bad, but, I admit it's unreasonable to ask your average user to buy and install WinAdmin, or some other VNC client, to play a Flash game. I'd also have to provide the server for browser access, etc. 

It seems somebody has set out to solve this problem: Citrix. Take a look at this:

http://citrixcloud.net/

They offer a client for iPhone, called Citrix Receiver, which offers a 2-hour session, expires-in-24-hours, demo of access to the CitrixCloud. In their own words, the CitrixCloud, or C3 is "a complete set of service delivery infrastructure building blocks for hosting, managing and delivering cloud-based computing services. C3 includes a reference architecture that combines the individual capabilities of several Citrix product lines to offer a powerful, dynamic, secure and highly available service-based infrastructure ideally suited to large-scale, on-demand delivery of both IT infrastructure and application services. "

For the layman, that means more or less, "you can use our products to expose your apps to pretty much any client. With one of our viewers, a user can use any application on just about any client as if it was installed on their desktop". 

So, by now you may have guessed: The Citrix Receiver can provide access to Flash and Flex applications in a very compelling way. 

Ultimately, it's still the iPhone accessing web pages, but, it's not doing it through Safari, which can't run the Flash player. It's accessing a browser on a Windows machine remotely. The Citrix Receiver hides this though; you wouldn't really know it unless you were looking for it. The applications are sized full-iPhone-screen, some for landscape, some for portrait, and there's no browser toolbar or anything like that; you appear to be using a full-screen Flash/Flex app. 

So, when they go live with this (again, Citrix Receiver is a demo), does this mean I'll have to install the Citrix Receiver and understand all this cloud stuff to simply run an iPhone game?

Yes...and no. Here's a total hypothetical. Say you're an internet game company of some kind, something like a Pyzam. You're in the business of buying and developing Flash games, integrating advertising, all that. You create a branded version of the Citrix Receiver, and get your cloud infrastructure set up. Users go to the App Store, and get your branded viewer for free. They create an account, log in, and happily play Flash/Flex/Air games on their iPhone, with advertising and whatever else the developers build into the games/widgets/etc. 

I think that's compelling. Sure it needs more thinking through, and at this point is probably most useful to corporations or organizations housing large portfolios of Flash apps. But this is a direction that shows that, with some ingenuity, even today, you can offer applications built out of pretty much any technology on the iPhone. This also works with Windows apps, Silverlight, and so on, but I'm really interested in Flash/Flex. 

Also, it gets around a lot of the "pay for and we must approve" apps scenario, and enables use of ActionScript development resources, which are nowhere near the scarcity and premium of good iPhone development. If Apple doesn't like your content, they can reject your viewer though I suppose. 

So in the end...will phones just become all about the screen, and what viewer/cloud-access apps they can run? The thin-client finally plants its flag for good in the mobile world? Hmm...

Below are some screenshots from the Citrix Receiver demo. As always, thanks for reading Tcoz Tech Wire. 

Remember, these are Flash and Flex apps. They look great, and work as expected. These are screenshots right from the iPhone.

These two photos are of the Citrix Receiver interface for accessing different kinds of apps:







These images show some basic Flash/Flex apps from their demo. The first is a pretty standard reports app, the second shows network statistics in real time, the meters moved and everything just like a native app:







These images show a Shirt Configurator: you select colors, styles, logos, etc., and can save the profile. I found this very interesting.






Labels: , , , , , , , , ,