Saturday, December 31, 2016

2016 wrap up

2016, what a year to be a Flash developer!

Before I start, I want to thank everyone that helped me this year, including donations, freelance jobs, feedback and engagement in social media (your likes and retweets really are appreciated).

I really enjoy helping and engaging with the community that has given me so much in the last 10 years.

This was a great year for me, I actually was able to fulfill all the goals I set myself.

One of my goals was to develop a FOSS (free and open source) project each month.
I published 11 new projects and gave maintenance to all of my old ones. I was short on one project but some projects were too big that they might as well count as 2 ;-).

I broke the top 100 mark at GitHub Awards:

Thanks to the ActionScript community I was able to get enough recognition to break in the top 100 developers in GitHub that use ActionScript.

I also learned 2 new programming languages: C# and Dart, I'm not good enough to develop something useful with them, but I plan to improve on them for the coming year.

What's coming for the next year? Very exciting stuff:

Just today I published Earthquake App, a very simple but good looking mobile app that explains how a mobile app is developed with Feathers and Starling.

Some months ago I mentioned on Twitter that I wanted to write a book on how to make mobile apps with Feathers, I'm now ready to write it, expect it for the first quarter of 2017.

This year I developed a lot of business apps which use a broad range of web APIs and some AIR specific APIs such as Geolocation, CameraUI and File. I'm getting a little bored of it and I will spice it up by going back to my roots as a game developer.

I'll start developing some simple games and make use of ANEs such as Game Services (Achievements, Leaderboards, In-App purchases), Push Notifications, realtime multiplayer, etc.

I plan to repeat my 2016 goal and publish one FOSS project a month, this time I will open source both games and apps.

Last but not least!

In the past months I have been working on an app kit that consists on 2 parts, a client app and an admin panel.

This kit allows any small to medium businesses to have a mobile app for iOS and Android and to being able to modify its contents without needing to update it. They will just need to open the admin panel, make the changes they want and the app will automatically keep up to date with them.

This kit will be available in mid January and will of course be free and open source.

That being said, I wish everyone a healthy and successful year 2017.

Your friend,


Saturday, November 5, 2016

Firebase fever

Today I will share my experience and thoughts on Firebase.

Earlier this year someone approached me and asked that if costs (of a mobile app) could be decreased by using Parse.

I had no clue what Parse was, but my guess was that is a backend platform and didn't thought about it. All these years I have made my own Web APIs with PHP and MySQL and have been working great with Flash and Flex apps.

Fast forward in April I read that Parse was closing and everyone was starting looking for alternatives, that's when I investigated what Parse was.

Parse is a Backend as a Service provided by Facebook used my hundreds of thousands of developers. One day they suddenly decided to shut it down. No one knows why but one can speculate the obvious, it wasn't profitable enough.

At the same time I was investigating what was the fuzz about NoSQL and why it has been getting so popular. Basically it allows you save and retrieve simple datasets very fast.

I was starting to look around for a service that had a free tier that was good enough for learning, I found several services but all of them were pretty underwhelming until I found Firebase.

I liked that its free tier was fair and it had a well documented REST API. So I started using it and really liked how easy was to integrate it with ActionScript.

As you know you can't take things from granted, so I said that Firebase was good enough, but I still have my doubts to fully invest on it so I just kept toying around with their platform for the next weeks.

A month later Firebase switched from V2 to V3 and announced that they have been merged with some Google services. That's when I knew Firebase could be a good bet and started to get serious about it.

I developed some in-house projects to see how it compared with my previous stack (PHP + MySQL). And I was pleasantly surprised that the switch was smooth and almost painless.

Firebase offers several services for iOS, Android and Web, but only they have official documentation on Realtime Database using REST.

But that wasn't enough for me, I wanted to have Firebase Auth in my app so I couldn't have to do all the OAuth nonsense by myself (which I have also documented).

I began investigating if there was a method to login using only REST and yes there was a method. You needed to send some parameters to a special URL and listen for the responses.

To learn about this I created a simple app that stores To-Do lists that requires sign-up and sign-in to retrieve them.

Once I finished it I noticed that Firebase V2 was getting deprecated so I said to myself to not release it until I found out how to update it to V3.

Some weeks later someone found a way to do it in V3. When Firebase and Google merged they reused Google Identity Toolkit and named it Firebase Auth. The problem is that they left their documentation a bit incomplete so another round of trial and error was inbound.

This time I grabbed the JavaScript SDK and took a look. I found 4000 lines of minified JavaScript, thankfully string literals are not minified so I only had to search for certain keywords.

I figured out how the requests were made, how and what parameters needed to be sent and so on. I wish Firebase could document this but I now understand why they don't. It really was challenging understanding how their framework works at first, everything relies upon Access Tokens, Auth Tokens, id's, etc.

They made the choice to create very easy to use libraries so anyone could plug and play Firebase into their projects. That's fine and all but they are missing on people that don't use Java, Swift/Obj-C or JavaScript. You can easily use Firebase for a Windows/Mac/Linux game, console game or on a Internet of Things device.

Once I finished porting the ToDo app to Firebase V3, I thought to myself that it could be a waste to keep all this research for myself and that's when I wrote a comprehensive guide on how to use Firebase with only ActionScript and made several examples showcasing the most common uses.

Hopefully my efforts help a lot of people, I really was proud of what I made.

Monday, October 17, 2016

Pizza App

Pizza App is finally out!

Developing this app has been a great achievement for me. It contains very exciting features that were really rewarding to learn and implement.

I started developing this app back in March, it started as a simple pizza locator using the now deprecated Yelp V2 api.

I forgot about it for several months until I learned about the existence of Firebase. I thought that it could be a good idea to revisit the app and implement some cool features to it.

I have to confess that I regularly scout freelancer portals and see what is trending so I can learn what features people are asking for.

It is no surprise that real time chat applications are on the rising, everyone wants their own WhatsApp, SnapChat, etc.

Firebase offers its database services in realtime, to read data in realtime you only need to set up an URLStream and its ProgressEvent.PROGRESS handler. Every time a message is pushed to the database you instantly get notified by it.

People also often ask for users to be able to upload images, comment and vote on them. For this I used the Firebase Storage with the Firebase Database.

Using the CameraUI and CameraRoll is certainly challenging, there is a lot to consider, starting with how you get the picture data.

You can get it sync or async depending on the device and OS and each method has its own workflow. Thankfully I found a very detailed doc on Adobe's site explaining how all of it works.

Now that you have the picture data you need to convert it to BitmapData in order to be previewed inside an Starling app, but you also need to make the image no larger than 2048x2048 pixels.

That part was tough, it took me several hours to figure out an algorithm that allowed me to scale pictures while maintaining their aspect ratio.

Once that was sorted out, everything else was a walk in the park.

Yelp recently updated their API and it has been very easy to work with it, you no longer need to create complex requests just to get a list of businesses.

Now you only request an access_token and then use that token to access the api, both of those can be done with very simple URLRequest+URLLoader combo.

While I was developing this app I was learning more about how Firebase works only with a REST approach (in a future post I will elaborate my insights on this), at the same time I made some guides and examples that have been quite popular and hopefully have helped a lot of developers.

To wrap things up,  I'm glad that this app is finally out and I really hope it helps our community in showcasing what's possible to do with the Flash platform.

Now I will continue my plan to write a book on how to develop a simple business app with FeathersUI and Starling.

Monday, October 3, 2016

Why Adobe AIR?

Adobe AIR is a platform for developing desktop and mobile apps. It supports Windows, OSX, Android and iOS.

There are very similar products, such as PhoneGap, Xamarin, Unity, React Native, etc.

Why I choose AIR over those? Here's a list:

  • It's free and it doesn't asks you for a share of your profits (they tried to do that but it didn't worked out).
  • You can deploy to iOS without a Mac.
  • It's fast and performs well enough compared to pure native apps.
  • It uses a solid programming language.

Some people just want to make apps as a hobby but they don't have the monetary resources to invest on expensive software and hardware.

AIR allows you to create apps with virtually no cost. Just download the AIR SDK, a trial of Flash Builder / IntelliJ IDEA and you are set.

What it's interesting is the possibility to deploy to iOS without a Mac. Most other middleware platforms require that you have installed Xcode in your Mac to be able to compile. Some offer compilation on the cloud to get around this but it's a hassle to not have total control of your development environment.

ActionScript 3.0 is the language used for AIR, it is based on Java and JavaScript which are the two most popular languages at the moment.

It is a fact that no one likes to code in JavaScript, you can see it for yourself with the countless of libraries, transpilers and frameworks. That's why I avoid that mess of an ecosystem.

ActionScript 3.0 is starting to get a bit stale for these modern times but it still does the job just fine.

AIR has also its flaws, I will list the ones that annoy me the most:

  • Adobe has certainly limited the resources they allocate to the product. It is understandable since they don't really profit much of it. I wouldn't mind paying a monthly license for personal support or they had a marketplace where they can get a cut of the sales.
  • Continuing the previous one, fixes and enhancements take a bit longer to resolve since they are understaffed.
  • Lack of exposure, Adobe is not promoting developer technologies. You can see the trend that Adobe is moving to its roots as a design/creative company.

Some people may say that they don't like that extra functionality is only available on external plugins which are mostly paid.

I agree at some point that some features should be included in the runtime by default but I also like the idea that the community can extend the runtime and make an economy based on it.

Regardless of that I feel very comfortable developing business applications with the AIR runtime in 2016.

Performance is very good, I really like the Starling and FeathersUI approach of using the GPU to render everything. You quickly get addicted to run apps at 60 fps.

In conclusion,  I wish the AIR runtime would be more popular and people to not dismiss it just because its based on Flash. In the meantime I will enjoy this ride. 

Hello World!

Sometimes 140 characters aren't enough to fully express what I have in mind.

That's why I created this blog, to share my experiences and explain my decision making while developing software applications.

Right now I'm focused on mobile and desktop development with Adobe AIR, Starling Framework with FeathersUI and Apache Flex.

You can expect from this blog unbiased opinions on the cross platform ecosystem, guides, examples and personal experiences.

My goal is simple, make the Flash Platform great again (heh). But seriously, we got some undeserved infamy and the only way to demonstrate how wrong they are is by creating strong and stunning experiences.