Jul 292011
 

I got yet another mouthful from a ‘professional’ yesterday about Flash becoming redundant with HTML 5. It has lead me to contribute to the raging battles.

HTML was always for document formatting. This was from the beginning of internet it’s biggest demand: Markup that can visually structure information so that web browsers may display it. The markup also remained very basic so that any internet enabled device may be a medium to displaying information. “HTML is the basic building-blocks of webpages.

While the internet is a huge source of information the internet also became a massive marketing platform. Here the approach in design and development is radically different. Any person can compare www.wikipedia.org and www.theFWA.com to realise this.

The HTML-Flash war is producing some impressive results, but neither will ever take over the other’s primary purpose it fulfils on the internet.

Even if Flash is removed from the web for being redundant, Flash will still grow as a tool for standalone desktop applications under the name of Air. HTML has many limitation when used for a desktop application simply because it was designed for a stateless protocol.

Why make war if there is more than enough space for the both of us. If you want to use HTML then do so. If I choose to use Flash then leave me be.

Why argue about which is best? If we do may it be while keeping in mind that they can also work together. As Flash developer I am also excited about HTML5! As web developer I can now do even more with even less. At least now I don’t have to do all the basics of animation using Flash.

Let us agree that both technologies, HTML and Flash, have reached into the other’s grip on the internet. HTML can do rich and smooth animations (and video!). Flash can display huge amounts of information (with cascading style sheets) while remaining lightweight. And there are many more for both technologies.

Where you as HTML guru (or Steve) may think Flash is flawed, I am sure your example is one where the Flash developer just didn’t do as well as he could have done. I have also had face-palm moments after being exposed to some of the creations out there. But it would be ridicules to conclude that that is just how Flash is.

Maybe you war because you feel threatened by the other? Then I say that you as web developer should be able to fire both weapons. You should at least be able to learn how to. As JavaScript developer you should also be excited about Flash Player 11’s Stage3D. (Soon you will be able to take a quick break from struggling to get JavaScript to work on all internet browsers by playing an amazing online game from another tab.)

Last words go to Steve Jobs: Why did you limit your clients from viewing all of the internet when you could have so easily made it work?

 Posted by at 10:59

Career Timeline

 Programming  Comments Off
Jul 012011
 

Working on a Flash version of my CV. Here is a part that is almost done.

Note: you need to click on the timeline (to give flash the focus) for the mouse-wheel scrolling to work.

Demonstration:

  • 3D shadow effect
  • Creating reflections
  • Simple generated background
 Posted by at 16:22
Jun 292011
 

Update: I previously used AMFPHP on my server and it was pure lightning. Zend_AMF is letting me down at the moment as the response time from the server is poor. I am investigating the issue. Hopefully I will have a answer (and a fix) soon. For more information regarding the Zend_AMF bugs see ZF-7493 and ZF-10487.

Update: I now run my service through AMFPHP version 1.9. I’m getting better results.

Most developers think of ‘binary’ when AMF is mentioned. But with Zend_AMF and other AMF parsing tools there is also another not so well know feature that speeds up ‘AMF’ communication. It is persistent HTTP connections also known as ‘keepalive‘.

A persistent HTTP connection may be seen as a socket connection to the server, with the HTTP rule that the server still only responds when data is pushed from the client.

This page requires Flash Player 10.2

On the server is a database table with 2000 records of data generated using GenerateData.com. The XML option is what most developers use – simple HTTP calls to a URL that returns XML as text.

With the AMF option requests and its parameters are sent via a HTTP connection that has already been made at start-up. The server responds with serialized AMF data and keeps the HTTP connection open for more requests.

Now for some benchmarking.

This page requires Flash Player 10.2

When you click start, 20 HTTP requests will be made to the server one after the other (to get more accurate results) and XML will be returned. Thereafter 20 HTTP requests via a persistent connection will be made (one after the other) and serialized AMF data will be returned.

The results should conclude that the second method is faster and uses less bandwidth.

There is also the benefit of less parsing time as binary (AMF) data parses faster than XML (text), but you need way more data to be returned to make an accurate reading.

 Posted by at 16:07
Jun 242011
 

I have not had so much fun coding in a while. I wrote a light weight and extendable data grid as I have been wanting to for a while.

This page requires Flash Player 10.2

There were some features that required some thinking. I do believe writing a data grid tests one’s OOP disciplines pretty well. It can get very ugly if you don’t define your objects well before you start.

I generate 500 rows of random data: numbers, strings and dates. Added sorting (click on a column heading) and basic filtering below the grid.

Seeing the working grid now, the amount of content it handles and the speed at which it renders and scrolls is quite satisfying. :)

I want to add anther feature some time soon to display a tree-structure. A specified column will then display the tree roots and indentation.

 Posted by at 15:32

Dice Poker

 Programming  Comments Off
Jun 102011
 

Update: Source Code.

Discovered some old code of mine … I loved this game at some stage. Check out wikipedia to learn more about this game and how it works and what the rules are.

This page requires Flash Player 10.2

In short, you roll five dice. If you’re lucky you will have good numbers (like 5x 6′s) and you may choose the ‘score’ that will earn you the most points. If your numbers are not that good you may choose to keep the numbers that are good and roll the not-so-good numbers again. You may do this twice.

The idea is to weigh your chances with every through. Five of a kind is not very probable. If on a first through you get four of a kind your chances of getting five of a kind is as good as it is going to get. Seeing as five of a kind gives you the most points you should keep the four dice that are the same and roll the odd die again.

This is the only time I will say to you – Good Luck!

 Posted by at 19:53
Jun 092011
 

If you often generate reports for clients take some stress off of your server by generating PDF reports client-side. Here is a simple generator example that takes News24 RSS feeds and writes up a PDF.

This page requires Flash Player 10.2

Usage: Select the News24 categories you would like in the PDF report. After the categories’ RSS feeds have been loaded the parsing starts and the icons are downloaded. It takes a while for the downloading to start – give it some time. I am again using MinimalComps and LoaderMax.

Demonstration:

  • Use of AlivePDF – it is the best Flash PDF library at the moment.
 Posted by at 08:07