Apple's ironic web strategy

I just read a very interesting post titled "How Apple Will Destroy The Web". How's that for an attention grabber? The author makes some very valid and interesting points, however there were two paragraphs that literally jumped off the page at me.

Apple has already starting preparing people for a post-web world. The iPhone taught people that web apps are slow and awkward – native apps are where it’s at. I’m not quite enough of a conspiracy theorist to believe that Apple made us suffer through the iPhone web app era as a social experiment, but it certainly ended up proving that native apps are far superior to web apps, given the right native environment.

And then there’s that word, “app”. I used to think it was an odd misstep on Apple’s part to use industry lingo in a mainstream product. But no, Apple needed a new word to define the new way people would relate to their technology. “Application” was too literal, bulky, boring. “Program”? Even worse. But “app” is short, succinct, snappy – and, just coincidentally, the first syllable in “Apple”. Apps are the way you do stuff.

Isn't this what Adobe has been saying for the past number of years. People want engaging experiences, they want something more than static, generic sites and slugish akward web apps. AIR, Flex and Flash, those are the tools designed to deliver exactly the experience the author says Apple is looking to deliver, albeit by a slightly different path.

Apple feels native apps are superior to web based apps (which is true) and wants to do it via native, proprietory apps that lock you into a specific OS. Adobe provides a framework and options that allow you, the developer, to deliver an application to a wider audience via the web or via the desktop, you make the decision based on requirements and user needs.

It seems extremely ironic that Apple's possible strategy for the web and their app store goes completely against the grain of the entire open source/open web/HTML standards crowd. The very same crowd that is burning virtual effigies of the Flash plugin while celebrating the release of the iPad.

How ironic indeed.

Apple, Flash the iPad and premature speculation

With Apple's announcement of the iPad and the subsequent storm about it not supporting Flash a lot has been written about Flash's demise. People are pointing to Apple's decision to not provide Flash support in the iPad and iPhone as a sure indicator that Flash's days must surely be numbered. As a freelance Flex developer, Flash (Flex) is my bread and butter, it literally puts food on my table so I have a vested interest in what happens with Flash and it's continued use and adoption on the next generation of internet devices. 

The release of the iPad seems to have polarized developers into one of two camps, traditional HTML/Javascript/open source purist developers who say Flash is going down for the count and the Flash development community and it's supporters who are screaming bloody murder at Apple, running around like the sky is falling since the iPad doesn't support Flash. I think both sides are missing something, the elephant in the room that a few days of reflection has made very clear in my mind. 

Everyone seems to be solely focused on video and the fact that HTML 5 can do video and that's why Apple doesn't need to include Flash on the iPad. True, HTML 5 can do video and video is a part of what Flash does quite well, but that is like comparing newspaper to television. Sure they both provide information, they tell stories, communicate points of view and provide entertainment, but no one would argue that newspapers are going to replace televisions (or vice versa), yet I think that's what is happening with the current debate that Apple's decision seems to have reignited. 

HTML is great at what it does. Flash is great at what is does. However I think that a developer who understands both, their strengths and their weaknesses, would not argue that HTML5/javascript will replace Flash. HTML is a great general, blunt force tool for presenting information over the internet. Flash is a more specialized tool, that when used properly, can augment HTML to better present information. Much of the backlash against Flash is from people who have experienced it when developers tried to use Flash for purposes it likely really should not have been used for.

The Flash community seems to have forgotten the above statements to some extent and the HTML purists seem to be oblivious to many of the things that are simply not possible in a browser without the Flash (or something other ie Java) plugin.

This is a short list of things Flash can do that HTML/Javascript can't:

  • cross platform support for video
  • cross platform support for audio
  • video camera capture
  • microphone capture
  • read/write access to the local file system
  • sockets (ie xml socket connection)
  • bitmap manipulation
  • graphics/3D rendering and animation
  • speed of xml parsing and searching (e4x)
 
Am I concerned that the Apple hasn't enabled Flash on the iPhone and iPad? Yes.  As a web developer I would like the content and applications I produce to be available to people on those platforms.
 
Am I freaking out thinking that the sky is failing because there is no Flash on the iPad? No. There are so many things Flash can do that people need done on the internet that can not be done in other environments that Flash is not going the way of the dodo bird anytime soon. Having said that I will start learning more about using HTML5 and javascript but any good developer should always be learning new tricks, it's called survival of the fittest.
 

 

PHP SimpleXml Parser Error

If you use PHP with SimpleXml to parse xml you may run across a strange issue where SimpleXml fails to parse perfectly formatted xml. You'll likley get an error like this

Warning: simplexml_load_string() [function.simplexml-load-string]:

Entity: line 1: parser error : AttValue: " or ' expected

Chances are the PHP server has 'magic quotes' turned on. To get around the issue, add a strip slashes command to the xml string before parsing it. So your php would change from

 

$xml = simplexml_load_string($xmlstr); 

 to

$xml = simplexml_load_string(stripslashes($page));

 Hope that helps someone, frustrating bug to track down.

Xml MetaData Parser Updated

After some feedback on my initial post of the Xml Metadata parser I have updated the parser. It can now handle complex objects, ie objects that contain properties that are themselves classes tagged with the xml metadata tags. Props to Bart Wttewaal who took a first pass at the updating the code to handle the complex objects.

With some minor reworking it can now read and write xml to and from objects that contain properties more complex than simple strings, int, booleans etc. For instance you can have a Person object with an address property that is of type Address. If the Address class has also been tagged with the Xml metadata tag, passing xml into a Person instance will also populate the corresponding Address instance in the Person.

You can download the updated version here.

Thanks to Bart for taking the source code and running with it. Always great to get feedback from users to make improvements.

Flex WYSIWYG Html Editor

Anyone who has ever worked with html in Flash or Flex knows frustration. It doesn't always display properly, the list of supported html tags is quite short and the RichText editor is borderline useless. Fortunately many of those short comings have been addressed in Air however that doesn't help if you are building something browser based.

I have been recently working on a simple Flex based CMS (content management system) and one requirement was a basic html wysiwyg editor. Thankfully the amount of html to be displayed in the site via Flash was minimal but the editor needed to allow the user to perform some basic tasks like text formatting and adding hyperlinks. There are some really great wysiwyg javascript html editors available (CKEditor and TinyMCE spring to mind) so I wanted to integrate one of those into the cms. 

Fortunately with a little knowledge of javascript and css it was not difficult. By using a div layer to display the html editor (I chose CKEditor) and some css, it was pretty simple to place the html editor over the flex app. A few javascript functions called via flash.external.ExternalInterface and the editor can be sized and moved to whereever the Flex app requires.

 

Flex html editor

Here is the first prototype. To the average user it appears that Flex has a built in html wysiwyg html editor. You can even drag the editor window and the div layer will move along with it (unfortunately it's a little sluggish on pc's for some reason). 

You can do a view source on the html page to see the javascript and css that is used, nothing special but it does the trick nicely.

< Previous