Filed under Apple

Flash Platform Galaxy: why choose Flash Platform

In those days I’m reading a lots of mailing lists, forums, blogs and so on where Flash Platform supporters are so disappointed about the latest marketing movement of Adobe.

In fact yesterday Adobe announced that they stop the development of Flash Player on Mobile devices (on Desktop they are going ahead).
The road is clear HTML 5 inside the browser and Flash Platform for RIAs, Games and out of browser in combination with Adobe AIR.

For me Adobe for the second time (the first one was during Adobe MAX) has totally mistaken how to communicate this news and obviously tech blogs bring this announcement like the end of Flash…
Personally I don’t think that is the end of Flash but I think that Flash is moving on a new position in multimedia world probably out of browser.
I’m an Adobe addicted, like you know, and in particular I’m a Flash Platform supporter, so I think that we have to move on and make something to spread the word about this foggy situation, guys, Flash Platform is ALIVE!
To do this, I start making a pdf file called Flash Platform Galaxy that could help people to have an idea of what is Flash Platform and why choose it ( I know, I’m not a graphic designer but I think it could be useful), if you want to add more informations or change something feel free to leave a comment at this post or drop me a line via email.
Let’s go guys, we have a platform to save ;)

Tagged , , , , , ,

Tricks for tween on mobile devices with Flash Platform

In this quick post I’d like to share with you my experience about Tween on Flash Platform projects delivered on a mobile devices.
I started work on mobile since Flash Lite 1.1 so I grew up with mobile, I lived all the Flash mobile evolution and now, on tablet and smartphone, I had some good tricks to share with you, I really hope that those tips could help you during your developer life.
OK, let’s start:

  • Use quality property of stage
    This is a really good technique to use when you have to improve performance of your project, when you need to make a fluid tween before launch it, set stage quality to low and when tween will finish set stage quality to high or best.
    Avoid to use this technique when you have vectors (textfield for example) on the stage because you could have a worst result.
  • Use cacheAsBitmap and cacheAsBitmapMatrix
    If you have vector object that you’d like to animate in your project remember to cache them and then animate; remember also to set your application with GPU acceleration and you can see a really good performance with this technique.
    Avoid to cache objects that you need to remove from display list, it will be so expensive for your memory.
  • System.gc() works!
    I tried in few sample to use it on Android and I saw a good result, so the “old” tip to call System.gc() twice in a try/catch statement works on mobile device too (only on AIR apps)
  • Take care with multiple animations on iPad and iPhone
    On iOS devices we don’t have AIR runtime so LLVM translate our AIR project for us in Native Binary so it could help if you move few objects per time in particular if you have big objects to move like a background or something like that
  • Greensocks tweens are the best
    I tried tweener and other tween libraries for AS3, but the best one for me are the Greensock tween library, in particular on iOS devices.
  • Last but not least, remember to test your animation on the device because you could see “funny” results
    Sometimes happen that on your computer everything works well but when you port your content on a tablet or smartphone everything works not so well.
    Before hurt your head, remember to test a lots of times your mobile content on the device, it could save your projects!
Finally I suggest to take a look at dev center mobile development zone of Adobe site because you can find many tutorials and helpful tips on mobile development.
That’s all folks for now, I hope you enjoy those tips.

Presentation Model design pattern: multiple screen solution – part 1

Today I’d like to talk about Presentation Model design pattern because it’ll be so useful for anyone that is working on multiple screen project with Flash or Flex.
In latest months we lived in phrenetic mobile world where we have tons of new and powerful devices on the market with different screen sizes, different hardware and so on, on the other hand we have clients that are looking for new business opportunities and they are seeking a way to spend less but earn more.
So, one way to solve those problems could be find a way to deploy with the same technology in different devices (tablets, smartphones, computers…) saving time with great results!
That’s not a dream, it could be made with knowledge, architecture and a good developer or a team!

Our goal

For a developer find a way to have a good project architecture to maintain it’s so important, usually when you start a project you try to define the parts that could be re-usable in different part of the same project or in different project too.
So our aim is find a way to write less code but it will cover the project needs and that could be portable in different screens / operating systems easily.

What is Presentation Model design pattern?

My mentor Martin Fowler describes it with those words: “Represent the state and behavior of the presentation independently of the GUI controls used in the interface”  (here the full article of Martin Fowler).
In fact with this pattern we divide UI (components, movieclips, sprites…) from their behaviors; each view will have one and only that one presentation model and only the presentation model will interact with the whole architecture (like with model or proxy…).
Probably with this image you can easily understand better this concept (from Martin Fowler website):

Like you can see we have 3 class, AlbumTitle that is a view with a textfield, AlbumPresentationModel that is the presentation model of AlbumTitle and it has the copy of the view but storing datas inside and finally the main model Album where we have the data that could be used for the whole application.
There aren’t any connection trough the views and the application model because only the presentation model has access to the whole project, so the view is only a bunch of components and custom graphics, this it means that if you have to change UI on a mobile project for a different device, changing the views and anything else, you will have done your job.
In fact with this easy technique you perfectly solve our problem and you should create the same content for different devices changing only the views.
Probably your application in different devices will have the same functionalities but with a different UI dedicated for the OS is running on.
With this sample design pattern you’ll have a solid infrastructure that will solve the big problem to port the same application in different screen sizes.
So in next paragraph we can take a look on how to organize our files project.

Manage a project for different screen sizes

Another important thing before starts the project is understand how to organize the project for different OS, in fact if you work with Adobe AIR on Android you’ll have only the XML descriptor with Android permissions described in this file, on Playbook you’ll have another XML file dedicated to this platform and so on.
So, my suggestion is to organize the project in different projects that work together.
In this image you can see how I organize it for our final scope, I’ve a common project (Runtime Shared Libraries in this case but you can use also an Actionscript or AIR project if you work with Flash for example) where I’ll put all classes that are common for different target, so in my case all the presentation models, main models, utils classes, my notification bus and views that are common for different projects like components for example.

In the target device projects I add only what I need for that device, in this case only a couple of views and assets but in big projects could be more stuff that those one:

When you have a specific behavior only for a target device, you can easily extends the common presentation model and add new functionalities or create a side class that you’ll add in the specific view.
So with this infrastructure you can solve bugs and change stuff directly on the common project and all the platforms will be ready to package the project and upload to their store. That’s cool, isn’t it?

Summary

So in this post I hope to give you some ideas on how to solve the big problem to create a common base code that could be useful for different purpose.
In next post I’ll show you how to implement it in practice, for now if you have any feedback or suggestions for the second part of this article please add a comment to this post.

Tagged , , , , , , , ,

Think different?! NO… but maybe…

I want broken my silence about Apple vs Adobe “war” and share with you my thoughts.

It’s an hot topic and probably not all people will be agree with me but I feel to tell you my point of view.
First of all, today we are sure that Adobe will not invest anymore on iPhone packager for Flash CS5, so from a developer point of view I’m totally agree with Mike Chambers and Adobe too.
Android is a really amazing mobile OS not only for smartphone but also for MID, I saw on a Nvidia Tegra 2 and performance were really impressive.
I had an iPhone a year ago and now I’ve a HTC Hero with Android, guys believe me, it totally changes my life, everytime I say: “Android takes best features of Blackberry, iPhone and Nokia in one OS! Oh yes… phone calls work on Android :P “.

I saw AIR 2 and Flash Player 10.1 on Android in action during 3GSM in Barcelona and … WOW, Adobe is working very hard on that technologies and I test a Flash website not optimize for mobile on FP 10.1 and it works very well.
Future on Android will be very cool for every Flash Platform developers… but…

I’m also owner of a company and I know a little bit my customers or potential ones and if you talk about iPhone or Android they feel an app or game in different way.
I think the big problem is that few people known the powerful of Android OS and Google is not advertising so much it.
People that use Android after iPhone they don’t come back again, they are so happy about OS but if you take a look at carrier’s advertising they prepare great iPhone campaign but I didn’t see any Android campaign or carrier’s advertising dedicated to Android phones.
Adobe made a good job with iPhone packager and Apple close doors to it, if I see from point of view of both I could think that Adobe didn’t develop anything for iPhone and will not do that in the next future, Apple lose tons of possible applications in own store but they preserve their ecosystem, and freelances or IT companies?! Did you ever think to them?!

We are in a particular market moment where everybody is seeking a new way to make business or to invert the trend, those strategies could be useful in 80′s or 90′s not in 2010! Customers are not so happy to bring a company that make an iPhone app, another one for a RIA on web, another for a desktop apps and so on, or maybe one big company that make all but ask tons of money that there aren’t in this historical moment!
Lots of companies and developers were waiting for this new marketing possibility and probably, this possibility could create a win-win situation for everybody.
Companies and developers work more and have new possibilities to make business in a particular market moment, Adobe would be the first company that introduce in the market a technology that is real cross-platform, with AS3 I can develop on web, mobile, desktop apps and so on; probably many people upgrade to Flash CS5 only for iPhone packagers so they have a high ROI; finally Apple would have tons of new developers that will buy their products, probably approach Objective C maybe only to take a look but they will approach it, and they gain more revenue from the store… so everybody win nobody lose.
Probably it’s a poor point of view from a little man, but a win win situation could help in this moment…

I spent a couple of days to understand what is happening between Adobe and Apple but I think that nobody could know and nobody tell us the truth.
For now we can only wait and change our marketing strategy focusing on Android devices, maybe a day we could count more in big companies decisions… or maybe not…

Tagged , , , , ,

MacWorld but also developer.apple.com

I love Apple so much!

This period is so interesting for MACWORLD and this year I’m so excite to view new iTV, new macbook AIR, new firmware upgrade for iPod Touch (finally I could see emails in my iPod Touch) and new services like rent video! That’s cool.

But also, I suggest to take a look at developer.apple.com, in particular in iPhone section, you must register for FREE and you’ll have a lots of materials about development on iPhone and so on.

There you can also submit your iPhone application and put in apple site. New opportunities ae growing up.
In 2008, I think that we’ll have a lots of changes from AIR to new Macbook AIR (everything we call AIR in 2008, it’s funny!).
I love Apple, I love AIR… and I love 2008!

Tagged , , , , ,
Follow

Get every new post delivered to your Inbox.

Join 1,112 other followers