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

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
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
18Mar/090

New Home Page Layout

I dunno if anybody has noticed this cause most of the visitors come to the blog directly, i have deployed a homepage for the site http://www.php-architect.com , it contains no graphic, just some ajax / css tricks with some theme.
i was obsessed by the idea that i couldn't wait until i finish the content of the pages, and i deployed it.
waiting for suggestions to improve it and i will upload the content soon.

  • 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
2Jan/091

Zend Framework Free Book : Surviving The Deep End

Hey folks,
today Padriac Brady has released a new Zend Framework Book,

About the author :
http://www.survivethedeepend.com/zendframeworkbook/en/1.0/introduction#zfbook.introduction.me

To read the book :

http://www.survivethedeepend.com/zendframeworkbook/en/1.0

About the book (quoted from the book):

Zend Framework: Surviving The Deep End is written in the form of a detailed tutorial following a step by step approach to building a real life application. Topics are grouped where it makes sense and there will be continual references to earlier chapters which serves to reinforce what you're learning as you read. The book was designed to bring together elements of the Reference Guide, the growing body of community knowledge and my own personal experience so developers can see the bigger picture of developing a real application with the Zend Framework.No comments

To my mind that's always been the framework's main problem since the Reference Guide adds little beyond explaining each framework component in total isolation. It doesn't offer a development approach, ways of thinking or a list of advanced topics which combine components. You should note though that this book is not a replacement for the Zend Framework Reference Guide. It's assumed you can do some independent reading of the Reference Guide. The Guide is free, detailed, and reasonably easy to search. This book is a complement to it, not a replacement.No comments

The book also includes the full source code of the application within the text, and may repeat it several times to highlight new changes I am making. I understand that pages of source code can sometimes be frustrating but it does enforce clarity and I value clarity a great deal. For simplicity the full finalised source code of each chapter is available as a separate internet download.No comments

I will over time refer to several external libraries, other than the Zend Framework, which you are expected to install. These will include PEAR, Blueprint CSS Framework, jQuery, HTMLPurifier and PHPUnit. I know from experience this can be unpopular with some people but I assure you that their installation will be covered in detail and is quite straightforward even for beginners. You should bear in mind a real life application will require numerous external libraries!No comments

Finally, note that this book assumes a basic working knowledge of PHP 5, SQL, and Object Oriented Programming (OOP). These are necessary skills if you intend learning the Zend Framework but will not be covered by this book in detail. Since PHP is so simple to learn though, I don't doubt you can find countless resources online to get you started down the road towards PHP Guru status.

----------------------

enjoy reading ;)

To read the book :

http://www.survivethedeepend.com/zendframeworkbook/en/1.0

  • Share/Bookmark
20Nov/081

Appcelerator :: Building RIA Apps and Use Cases with ease

Yesterday i was browsing Zend Framework Webinars, and i stopped by the title :

Get "Rich" Quick : Building Ajax-based RIAs with the Zend Framework and Appcelerator

i didn't hear about the Appcelerator thing before, but the title was really interesting as i use Zend framework extensively and it is a great idea to add some interactivity and UI to my apps.

after watching the webinars, i really liked the idea of being able to build the full prototype and have it working with no server side code, and then in the development phase with some slight changes to the prototype, it becomes the working front end interacting with the server side code with no problems @ all.

i went to try.appcelerator.org and gave it a try on the fly, that got me more interested. so i downloaded the sdk installer for MAC and installed it, the installation was at ease, even creating the projects and testing.

Appcelerator supports what we call "technology driven agile development" and we call that process Interactive Use Cases.

  • Share/Bookmark
7Oct/086

Install Subversion with Web Access on Ubuntu 8.04 (Hardy Heron)

well, it is very useful to have a subversion server so u can have different versions of your applications; for back up and to be able to restore old versions, and be able to share the project with the team, when there is more than one developer working on it.

1- install apache

sudo apt-get install apache2

2- install subversion

sudo apt-get install subversion libapache2-svn

3- We're going to create the subversion repository in /svn

sudo svnadmin create /svn

4- Now we'll need to edit the configuration file for the subversion webdav module

sudo gedit /etc/apache2/mods-enabled/dav_svn.conf

we will comment the following line, so we can access the repository using the address http://www.servername.com/svn

<Location /svn>
</Location>

and the following line to enable the dav module

DAV svn

and the following line to set the path to our repository which is /svn in our case

SVNPath /svn

and the following 3 lines to enable basic authentication

AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd

5- We create a user to have access to our repository

sudo htpasswd -cm /etc/apache2/dav_svn.passwd

where is the desired login name
6- We restart the apache server

sudo /etc/init.d/apache2 restart

7- You can access now the repository using the address : http://www.servername.com/svn

  • Share/Bookmark