-
Another year has passed and PHP 6 will not arrive.
Actually for the last couple of years I’ve been expecting PHP 6, and I believe this is more of a traditional blog for me to close the year.
PHP 6 will not come because the trunk was abandoned and rebuild from a 5.3.
Even if PHP 6 will not be out for a while now, PHP 5.3 is gaining popularity. Frameworks like Zend Framework and Symfony are each preparing in 2011 a 2.0 version that will need PHP 5.3+ to run. Even CodeIgniter, a framework that is was traditional PHP 4 compatible will need at least PHP 5.1.6 for version 2.0.
Even more, the official Zend certification for PHP is now ZCE 5.3, and it’s becoming very popular, even if it was released just few months back.
But a new year is ending and is time to check achievement from last year’s resolution and to write a new one.
Last year I’ve finished my masters, and with it I’ve finished way to many years to want to count of school. In fact this is the firs winter that I’m not in some form of school, maybe this is why I feel like I have so much free time :).
I’ve change my work place, and with it I was forced to use some things that were on my TODO list for quite some time:
- Linux
- Symfony Framework Linux was a subject around I was gravitating inevitable for years, but never got to in to deep. It was always on my “todo” list, but never got the time or patience to really get into much detail with it, or didn’t have the continuity when I did it. When I got to my new work place I found my self in front of a Ubuntu computer, and I’ve started to panic a little.
After few months I’ve made a new step, and for the first time in my life I went to a professional course. The course was organised by Info Academy. Paid from my own pocket and a little overlapped with my work hours. But I’ve reached the conclusion that I had to do it. Probably it does not sound like a big deal, but I usually study on my own, and it was quite weird for me. Now that is over I can say that it was a great investment and I recommend it (to all from Romania that can go to this centre).
Sometime during that course I’ve realised that it was time to boot in linux from time to time even at home. The next step was to reconfigure the boot manager to boot directly to linux. Now that I’m almost exclusively use linux, I’ve reached the conclusion that is user friendly enough to be a real alternative to Windows.
Symfony framework is another dusty entry on my “todo” list. Even if I’ve been playing around before with CodeIgniter and Zend Framework, I’ve never even got near to Symfony until last year. I’ve felt the fundamental difference of concept between ZF and Symfony. This was another reason to panic at my new work place, and after all: “all frameworks suck”.
Is not a very easy to learn framework because of the concepts, but I thing it worth it. What I like most about this framework is the CRUD generating, that is very easy to do but is very powerful and flexible. Another thing is the use of YML files, which was taken from Ruby on Rails, is a way better alternative to the PHP’s native ini files.
In the end, 2010 was a good year, with lot’s of achievements, even if I didn’t check everything on my last year’s resolution, I think I’ve checked enough.
And now I wish you a great and full of achievements 2011! Happy new year!
-
Last week I was supposed to create a little project. Requirements were short: interoperability.Given the fact that I’ve never used Adobe AIR before, I thought it was a good opportunity to try it.
The result was a small project management app. For the server-size I’ve used PHP + SOAP + Zend Framework, and for the client I’ve used Adobe AIR with JavaScript.
I’ve created the server in a few lines:
1<?php 2// autoload class for Zend Framework 3include 'Zend/Loader/Autoloader.php'; 4 5// class that deals with SOAP requests 6include 'SOAP.class.php'; 7 8// initialize autloader 9Zend_Loader_Autoloader::getInstance(); 10 11// if it's a request for the WSDL descriptor file 12if(isset($_GET['wsdl'])) { 13 $autodiscover = new Zend_Soap_AutoDiscover(); 14 $autodiscover->setClass('test'); 15 $autodiscover->handle(); 16// if it's a SOAP request 17} else { 18 $soap = new Zend_Soap_Server("http://localhost/soap/index.php?wsdl"); 19 $soap->setClass('test'); 20 $soap->handle(); 21} 22 23?>
The descriptor is build automatically using PHP Documenter type comments from the class that handles SOAP requests, if this case it’s named “test”.
This was the easy part so I’ve moved on to the Adobe AIR client following this simple steps:
- Download and install Aptana Studio
- Install Adobe AIR plug-in
- New project -> Adobe AIR
- and voila! Coding can begin!
Adobe AIR is using for a JavaScript engine Webkit. Sounds familiar? Webkit is used by Safari and Google Chrome. So the JavaScript code should only be compatible with Webkit!
Of course there is a “but” and a plus. The “but” is that there are some restrictions, for instance “eval” can only be used to decode JSON, and the text introduced directly in an element (as text) can not be executed:
1div.innerHTML = "<a onclick=\"alert('ceva')\" href=\"#\">click</a>";
This link will get to the element by will not run anything on “onclick” because the parameter was send as text.
This was a pretty big disadvantage for me, but I’ve managed to figure out an alternative by building HTML elements using DOM and adding events using addEventListener.
Briefly Adobe AIR is using this formula:
1Adobe AIR = (Webkit)Web Development - security + air framework.
It seems very easy for a Web Developer to develop desktop apps with Adobe AIR.
Of course is not very fast and it’s not looking like a good idea for complex apps. But if your thinking about medium and small apps, if I had to choose between Adobe AIR and PHP GTK for instance, the first option seems a lot more viable and easy to use!
In the end the project was ready in less then 3 days and the graphics were gorgeous! It didn’t even look like it was build using only HTML and JavaScript!
-
If your like me you prefer manuals in CHM format.
Unfortunately Zend Framework manual is only in .pdf and a little less obvious in HTML format.
Fortunately generating a format CHM manual is easy(really, it is).
The steps are:
-
Download and install HTML Help Workshop.
-
Download the Zend Framework manual in HTML format, the link is in bottom right, not very obvious I believe.
-
Open HTML Help Workshop.
-
File->Open and from the folder where the manual files are open htmlhelp.hhp
-
File->Complile
Done!
The compiled CHM manual is just few steps away!
-