Wednesday, November 16, 2011

The curve is going through dugged up path

More updates, or desperation, may just be ahead on the horizon for Adobe's Flash Development... and probably the others that goes along with it -- Flex for one. The article published on The Register provides more gleam on this one.

A new developer on Flex, Flash, and Air.. may have to look shop somewhere else or this may turn out to be a good one. About a few weeks ago, I just got the latest Flex SDK (4.5.6), now, rumor says it's no longer marketable... But who knows? This can just be inviting more attention..

Hope's something worthwhile ride comes by.

Thursday, November 10, 2011

Mobile development taking some curves

Adobe announced today that they're killing mobile Flash development.

This is received differently by different group of people - developers, reviewers, hackers, and even Jobs enthusiasts. Some believe and titled their articles as if Steve Jobs really killed Flash with his persistent denial of Flash's existence and importance in the horizon -- to put Flash out any near his turf. A few more comments that Flash may not just go away easily and it may take some time to actually "die". In between, some developers feel aweful about their expertise with Actionscript and Flash development -- real investment seemingly going to trashbins. The other side of the fence goes saying AS is basically ECMAScript and that switching to Javascript wouldn't hurt a lot.

Along all the sides of the differing point of views, there's this me. Just started out liking development with Flash Builder 4.5 with the ability to retain and enhance my PHP skills and adjust to AS and Flex. Actually, most of what I've done is just following video tutorials using the provided example projects. Whenever I tried changing the samples with the data I could use for my own application, something just goes awefully wrong.

Great time last week was spent working on a solution on why suddenly I can't start a project other than for Android OS - no iOS, no Blackberry -- I was stucked. Got it miraculously working after OS re-installation, which it really is not a factor in the solution equation. Got it working after forceful update to version 4.5.1.

A few days back, most hours after the whole day's work were spent trying to make the ZendFramework work for the PHP class I've developed from scratch just to come up with the basic structure for a DataService configuration I have tried during the first few days of the toturials. To this day, I really doesn't know to make it work.. Stuck.

Despite the seatback and the not-so-good timely news of Adobe's killing Flash, There's some light in the horizon: "package native apps with Adobe AIR for all major app stores". Build one, deploy to all.. That's pretty good!!!

The other side of the fence of developers, developing not from the native code, would mean performance penalties and sacrifices. These performance penalties may be quite OK with hardware devices overcoming the penalties (e.g.: a 1.2Ghz with a 800Mhz output). Might be OK or awefully bad.

A good time to expand the horizon and pool more options.

Thursday, October 27, 2011

To iOS or NOT

Last week, I attended a 4-hour seminar/showcase of iOS Application Development at Mint College in Fort Bonifacio. iOS basically is the operating system for iPhone and iPad devices. It integrates closely with Mac and of course Apple.

A few weeks before that, Steve Jobs passed away raising the question: "How will Apple and innovations from it without Steve Jobs?". You can come up with your own view of the matter, but we'll reserve that for some other time.

The market of mobile applications is increasing exponentially. It's just like the days when all companies and establishments wanted to have their own website and website application has been on the same rise. Now, establishments are clamouring for their own mobile application.

Mobile applications are not new to the horizon, even at the consumer level. Back in the early ages of cellphones, applications already exists and most are on the courrier's end. Eventually, they were made to adopt the Internet and made the system port to websites -- e-commerce came to play a great role, online-banking, and the fraud part, also joined the wagon.

When Apple launched its first version of iPad for the tablet framework, suddenly, the landscape of computing started to change. Despite the existence of tablets way before Apple released its own, (hence the legal battle that it is facing on all sort of countries from other players), tablets are not seen as usefull of to be considered consumer-based or business platform.

Apple changed the outlook on tablets down to the consumer level. Application development needs to pursue and grab the opportunities that it presents in almost all industries: Education for the technology-end; business operations; medical practice.... and the list goes on to coin the tag "I have an app for that".

A couple of years back, the challenge to develop for the mobile platform, as suggested by the increasing adoption of devices, came to play a role in the process. I am a web application developer, though I started my programming practice from DOS-based applications, I should be able to bridge any deficiencies or any adjustment for the web. In about a few weeks of searching for faster solution, I cam accross jQueryMobile - a javascript implementation that uses the industry-proven jQuery framework. It was in its Alpha-1 stage back then. Now, it's in RC2 release -- just about to go mainstream.

I was pulled by it. Going through the readings and searching, jQuerymobile pulled them too. The path is, I will not have must adjustment from how I develop my applications using PHP-MySQL-Javascript-CSS-XHTML and others. jQueryMobile provides really beautiful integration for the mobile platform. As part of the challenge, I had developed a mobile version of the school system I am improving. A restaurant/bar menu and ordering system came next. It was easy, you can build an application with database-integration and custom-views in a matter of hours or days, way faster that most available practices at that time.

There's a catch however, as it is web-based, it can only run with a mobile's browser. Well, by right now, most mobile devices comes with an Internet browser. From my tests and with the available devices I can lay hands on, there are browsers that do not interpret javascript and CSS -- you'll be doomed with text-only -- not good.

Development in the native form -- like iOS -- will eliminate such -- but you can only develop for iOS device -- the ones that ONLY come from Apple. I am not liking the way how it can go. Like when I dropped MS VB development -- thinking I'll be stucked developing for windows only. To this day, that had not changed much. I went to open source -- for the web.

The same dilemna approaches me. If I'm going to develop with iOS:

  • I'll get familiar with using Objective-C. (anyone knows who and what else uses Objective-C? I have not gone to knowing this yet)
  • I can build iOS apps definitely
  • Consequently, I may go away from my web-application development and into iOS. Because, they don't mix and match and the tendency is you'll accommodate one for the place of the other.

After drilling further, I came accross Adobe's Flex Builder with PHP(AFBP) -- SWEET!!!!! I can do Flash faster and I can exploit my PHP know-how.

It is SWEET!

Going through a little reading and tutorials, I found out that developing for iOS and Android can just be an option away from distribution. Build on one platform and implement on others. If I go iOS, the app can only work on iOS device. with AFBP, I can leverage to work on Android too..

Further, using PHP on the server-side gives me comfort. I can expand this to use databases -- mySQL is just a script away.

How about other adjustments? Well, I need to learn how to do Flex and Active Scripting -- but that's just part of the tutorials I can go through..

On to the next exercise...

Thursday, October 6, 2011

The Concerned Plumber

Being new at a city, a plumber, who's workplace is around the corner, rented a room at the first floor on a four-storey building. Starting on the next day, he would go out early to catch up his ride to his workplace and from work, he'll dip himself to the lone bed in his room.

One day, he woke up hearing some water dripping just next to his bathroom. We wondered if he left the faucet on the night before. He got up, guided by the familiar sound of the water dripping, led him to see that the water was coming from the ceiling. The problem is just not his own right to fix and do it right. So, he decided to talk to the building owner and suggested that he can take care of it at the expense of the owner or the occupant of the room above his.

The owner agreed and so he finished his work early at his workplace to give himself some time to take a look at the seemingly plumbing problem. He walked-up the stair and find his way to the room in question. He knocked cautiously not wanting to alarm anyone. The door opened to a few months old baby crying to its heart out carried by his mother while asking the stranger what he wants. The plumber obediently went in and calmly expressed his concern about the water leaking through the floor. As busy as the mother trying to ease up the baby crying, she just motioned to the guest to just go ahead and take a look at it himself.

The guest went through a sea-full of different toys and stuff cluttered on the floor and through a separate room leading to the kitchen. To his surprise, there really isn't any plumbing that needs to be done -- the kitchen sink is full of dishes and a few more stuffs and the faucet is left open.

As the concerned and affected plumber, what would be the best way to solve the problem?

Tuesday, September 20, 2011

Chaining scripts with LABjs

This article-guide on the use of LABjs may be simple or complex depending on how you approach.

Simple, if you're starting up or your scripts are located in external files and your chain of scripts are accessible from inside the <head> and are called the same from all over your scripts.

Complex, if you have otherwise and/or script blocks are inserted within or after the page. Changes can be all over.

The comment post of "Kevin Hakanson" provided the more simpler way to approach it, at least on how my projects are made : (script blocks can be anywhere you need them against putting all in one location and manipulating them there --- atomic approach may not always work). The method allows a single $LAB chain accross your pages, even if they are called separately or individually == define the instance of $LAB and use this variable in all independently called script blocks (taking his example):

  var instance = $LAB
.script("framework.js")
.script("myscript.js")
.wait(function(){ myscript.init(); });

instance.wait(function(){
framework.init();
framework.doSomething();
});

As you defined the variable as "instance", you can then call it on the other script blocks as "instance.script().wait()" chain to all script blocks.

Monday, July 25, 2011

MySQL "Push" backup strategy

A "pull" backup strategy can be achieved by a MySQL replication.

Alternatively, a "push" backup strategy can also be achieved through cron or task scheduler with the following 2-step strategy:

1. take a backup of the database

> mysqldump [options] database > backup.sql

2. send or dump the backup to the remote database

> mysql -u<user> -p<password> -h<remotehost> [options] < backup.sql

Note: the second step should have an explicit password, it should not be blank; to avoid prompt.

You can then add this to your cronjob or Task Scheduler (on Windows) to execute at a certain interval and frequency.

Friday, July 22, 2011

Duplicating MySQL table to another table

Method #1: [the better option]

  1. get the creation table information of the table to be duplicated
  2. change the table name
  3. execute the script

Method #2: this will remove the index definitions of the table though. Use:

CREATE TABLE <newtable>  SELECT * FROM <oldtable> WHERE 1 = 0;

the where clause just says you are ONLY copying the structure and not the data.

Method #3: Copy to and from another database

  1. Copy the table to another database[#2]
  2. Rename the table on the other database[#2]
  3. Copy back to the source database[#1]