PHP Architect blog PHP, MySQL, ZF, Python, Linux, Mac, C++, Java, Flex, Air, ActionScript & apps development.

27Nov/090

Quick dive into Flash Builder 4 (formerly Flex)

It has been a while since I have opened Flash Builder 4 Beta, but having to fill in the survey for testing, I gave it another shot yesterday.

Downloaded the last build "253292" from adobe prerelease repository.

I spend like couple of hours reading the docs and trying this and that, there is a lot of improvements, but what really caught my eyes is the tooltip help when you mouse-over a component, it gives you a more detailed information than before.

And what really was a WOW for me is the changes in the Data menu, now with the simple wizard you can create a connection to web service, PHP, BlazeDs, and others.

I tried the PHP one, and it went very smooth, I could even without writing a single line of PHP, enter the database credentials, and select the table I want to have access to from my flex app, and in few click, flex created the service in PHP and the mirroring AS classes, It even downloaded the Zend Framework AMF component.

It is much different than before, I had to do a lot of hard coding to get to this point, now developers will have more time to concentrate on the application itself, rather than on connecting to database and making it work.

It is worth trying and developers should read the migration docs from previous versions to get ready for it when it released.

Download Flash Builder Beta : http://labs.adobe.com/technologies/flashbuilder4/

Flash Builder 4 Migration Doc. : http://livedocs.adobe.com/flex/gumbo/flex4featuresandmigration.pdf


  • Share/Bookmark
14Nov/091

Manage your notes / Code snippets with Snippely

It has been a challenge for me to keep tracking code snippets I want to remember, I have always used text files, or sending my self email with the snippet that I feel I am gonna need to look at again in the future, same for notes also.

Today I have found this nice Air App called Snippely, it allow you to manage your notes / code snippets, It is enough for me and better than text files and emails, I believe I am gonna stick to it for now.

Snippely

Only Two options I wish to see in the coming version, to backup / restore the data & to sync the data across many machines, but like I said, I am happy with what I have now.

You can get Snippely from their Google Code page : http://code.google.com/p/snippely/

I hope you will find it as much useful as I did.

  • Share/Bookmark
Tagged as: , , 1 Comment
11Nov/090

Fix for Zend Studio 7 Button Problems in Ubuntu 9.10 “Karmic Koala”

After updating to Ubuntu 9.10 "Karmic Koala", i had some problems with Zend Studio GUI, some buttons when clicked appear to be pressed, but no action follows.

After searching for a while i found this fix in Zend support pages, and it solved the issue

here is the link for the fix :
http://kb.zend.com/index.php?View=entry&EntryID=435

  • Share/Bookmark
21May/091

Zend Certified Engineer

Hi mates,

finally i have got certified as Zend Certified Engineer on 10th of this month.

i have been decided to take the exam since a year, but was too busy to hold myself at home and revise the manual and prepare for the exam, but this month i said this is it.

The exam is very tricky with lots of confusing questions, it tests your ability of thinking and your real experience with php, web development, security and many other topics that some people will not expect to exist in PHP exam, it is  real benchmarking to your abilities.

I must say that preaparing for the exam has opened various topics for me to dig deep in, and it was a great experience.

And being one of the only 2 certified in Egypt is cool ;)

  • Share/Bookmark
6May/092

PHP is Now

Lots of people asks the question why php, i guess this article titles "PHP is Now" by Cal Evans is the Director of the PHP Center for Expertise at Ibuildings, will help those who asks, to know what is the powers of this great tool.

article URL: http://www.ibuildings.com/blog/archives/1554-PHP-is-NOW.html

  • Share/Bookmark
22Apr/091

Zend Whitepapers – PHP Leads the way

I have been browsing Zend website, and i have been going through its white papers, and it is really interesting, so i thought about sharing it with my blog visitors

Zend White Papers

An overview on PHP (PDF)

This paper gives a clear and concise overview of PHP. The paper covers many aspects of PHP, it goes through the history of PHP, the people behind PHP, the PHP market, the future of PHP, and more.

PHP Leads Web 2.0 (PDF)
This paper defines and applies Web 2.0 for today’s users. Though it is difficult to define Web 2.0 there are usually a few common denominators such as, rich web applications, SOA (service oriented architecture), and social Web elements. This paper also explains what Web 2.0 means for the Enterprise and what it means for technology today.

PHP 4 to PHP 5 Migration (PDF)
A little over three years ago, the PHP community released version 5 of its popular programming language. PHP5 has now become the version of choice for many new PHP projects. PHP4 however remains popular and is still widely used. This whitepaper is aimed at developers who are still using PHP4 and considering switching to PHP5. It is also intended to provide IT managers responsible for PHP applications additional information for their decision on whether to stick with their current version or migrate. This paper seeks to answer the questions, “What are the benefits of migrating to PHP5? And, equally importantly, what are the risks?” The information below will put you in a better position to make an informed decision between PHP4 and PHP5.

A Practical Guide to Data Caching with Zend Server
When asked about the most significant methods to speed up PHP applications, most experts would say “Cache, Cache and Cache”. There are a lot of optimizations that could be done to PHP code that would make it run faster, but the most effective method to speed up PHP execution is to simply execute less, and one of the best ways to achieve that is through caching.

Team Development with Zend Studio for Eclipse
Today’s development organizations are under ever increasing pressure to be more productive. One key factor for productivity is effective coordination across development teams. Learn how Zend Studio for Eclipse can help improve productivity and team coordination with capabilities to allow for effective use of Source Code Management, Code Refactoring, integration between development and deployment environments and more.
PHP is Not Java: Session Management White Paper (PDF)
PHP is used by developers that have a wide range of backgrounds and skill levels. When writing scalable PHP applications, it is crucial to understand the “shared nothing“ architecture of PHP. The most misunderstood component in this architecture is the session handling. PHP sessions are different from the ones used in other languages. Due to the “shared nothing“ architecture of PHP, objects cannot survive a request. Session data is therefore serialized to external storage for each request, meaning that only serializable data can be stored, not resources such as DB handles. This is a very powerful and scalable approach for session data averaging around 10-100kb, as serialized session storage can easily be spread over a cluster and serialization does not introduce a great deal of overhead.

Zend Download Server (PDF)
This paper will explain how the Apache web server works. The paper will answer key question such as: How do large file downloads affect your server’s performance? What is the difference between web page and file download serving? What do you do when your web server gets saturation? Additionally, this paper clearly defines and explains what Zend Download Server does.

Scalability and Responsiveness with Zend Platform’s Job Queue (PDF)
This paper defines Job Queue for users. The paper also details as well as explains how Job Queue is used and how it works.

Integrating PHP with System I using Web Services (PDF)
The following paper examines the ways in which PHP and Zend helps System I developers. The paper demonstrates how quick and simple it is to create a Web Service wrapper for an existing RPG program.

PHP and Oracle (PDF)
The following paper explains how to install and utilize Zend Framework to develop applications in PHP.

  • Share/Bookmark
9Apr/090

Free Adobe Flex Builder 3 Professional for unemployed developers

Adobe Flex Builder 3 software is currently available for free for software developers who are affected by the current economic condition and are currently unemployed.

Follow the below link to download your Free copy

https://freeriatools.adobe.com/learnflex/

  • Share/Bookmark
22Feb/091

Build MySQL insert Query from Array that contains fields and values

The following function takes table name, and array where its keys are the table fields and it's values are the values to insert in each field, it constructs the MySQL Query based on the input and executes it to insert the data.

function insertRow($table_name, $input_array){
	$link = mysql_connect(SERVER, USER, PASS);
	mysql_select_db(DATABASE, $link);
	$SQL = "INSERT INTO $table_name ";
	$fields = "(";
	$values = "(";
	foreach ($input_array as $k => $v) {
		$fields .= "`$k` ,";
		$values .= "'$v' ,";
	}
	$fields .="#";
	$values .="#";
	$fields = explode(",#", $fields);
	$fields = $fields[0];
	$values = explode(",#", $values);
	$values = $values[0];
	$fields .= ")";
	$values .= ")";
	$SQL .= $fields . " VALUES " . $values;
	mysql_query($SQL);
	mysql_close($link);
}
  • Share/Bookmark
17Feb/092

List array Recursively in PHP

Code :

function listArrayRecursive($array_name, $ident = 0){
	if (is_array($array_name)){
		foreach ($array_name as $k => $v){
			if (is_array($v)){
				for ($i=0; $i < $ident * 10; $i++){ echo "&nbsp;"; }
				echo $k . " : " . "<br>";
				listArrayRecursive($v, $ident + 1);
			}else{
				for ($i=0; $i < $ident * 10; $i++){ echo "&nbsp;"; }
				echo $k . " : " . $v . "<br>";
			}
		}
	}else{
		echo "Variable = " . $array_name;
	}
}

Usage :

$ages = array(
				"ahmed" => "25",
				"mohamed" => "35",
				"group" => array("omar" => "15", "abdalla" => "20", "sub group" => array("john" => "10", "peter" => "20")));
 
listArrayRecursive($ages);

Output will be printed array in indented way.

  • Share/Bookmark
Tagged as: , , 2 Comments
3Feb/092

ZendCasts – Free Zend Framework Screencasts

A really good Zend Framework Resource that has been posted in the ZF mailing lists couple of days ago.

very usefull

URL : www.ZendCasts.com

  • Share/Bookmark