<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Superdit.com &#187; PHP</title>
	<atom:link href="http://superdit.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://superdit.com</link>
	<description>blogging, design, tech, and web</description>
	<lastBuildDate>Sat, 31 Mar 2012 20:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cropping Image to Square Dimension Using PHP</title>
		<link>http://superdit.com/2010/07/01/cropping-image-to-square-dimension-using-php/</link>
		<comments>http://superdit.com/2010/07/01/cropping-image-to-square-dimension-using-php/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 07:05:50 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=1089</guid>
		<description><![CDATA[When I wrote my previous post about creating image gallery with codeigniter, I browse some popular image sharing service, and I spent most of my time in flickr, till now I think flickr is still the best photo sharing on the net, when we search on flickr, there are many result that displayed only the<a href="http://superdit.com/2010/07/01/cropping-image-to-square-dimension-using-php/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>When I wrote my previous post about <a href="http://superdit.com/2010/06/27/basic-image-gallery-with-codeigniter/" target="_blank">creating image gallery with codeigniter</a>, I browse some popular image sharing service, and I spent most of my time in flickr, till now I think flickr is still the best photo sharing on the net, when we search on flickr, there are many result that displayed only the thumbnail photo, for example you can see on the screen that I captured</p>
<p style="text-align: center;"><a title="Search Home Design on Flickr.com" href="http://www.flickr.com/search/?q=home+design" target="_blank"><img class="alignnone size-full wp-image-1233" title="www_flickr_com_search__q=home+design" src="http://superdit.com/wp-content/uploads/2010/06/www_flickr_com_search__qhome+design.png" alt="Search Home Design On Flickr.com" width="485" height="300" /></a><span id="more-1089"></span></p>
<p>You can see above the thumbnail size between each image is different (the thumbnail in my <a href="http://superdit.com/2010/06/27/basic-image-gallery-with-codeigniter/" target="_blank">previous post</a> is based on this search) and it depend on image resolution that uploaded by the user, whether it wide, landscape or square, in <a title="Codeigniter Image Manipulation" href="http://codeigniter.com/user_guide/libraries/image_lib.html" target="_blank">codeigniter image manipulation</a> you can easily resizing to this kind of thumbnail just by set the <em>&#8220;maintain_ratio&#8221;</em> in the config options. Now back to flickr.com, when you see a thumbnail in the user sets, you can see the thumbnail are very tidy because all the resolution are the in same size (in flickr it resized and cropped to 75 x 75 pixels), like in the image below</p>
<p style="text-align: center;"><a title="Flickr.com users set example" href="http://www.flickr.com/photos/43102365@N04/sets/72157623773645610/" target="_blank"><img class="alignnone size-full wp-image-1235" title="www_flickr_com_photos_43102365@N04_sets_72157623773645610" src="http://superdit.com/wp-content/uploads/2010/06/www_flickr_com_photos_43102365@N04_sets_72157623773645610.png" alt="Flickr.com Users Sets" width="485" height="257" /></a></p>
<p>So if we want to create thumbnail like this, first we have to resize the image then crop it, &#8230; haha not really that simple right? Here my though, the easier case is the square one, when user uploaded the image the script have to check wheter the image is wide, landscape or square, for wide or landscape image first we have to resize with maintain ratio to minimum value between width and height. Then Crop the bigger size wheter it the width or the height. Let see an example:</p>
<p>We want to upload the 200 x 400 pixels and create the 100 x 100 pixels thumbnail,</p>
<ol>
<li>First upload the image, and put the original image on the server</li>
<li>Get the uploaded image width and height</li>
<li>Check whether the width is longer that the height</li>
<li>Resize the image with maintained ratio to 100 x 200 pixels</li>
<li>Then we have to crop from the top  image and start in coordinate (0, 50), this usually written in x,y symbols</li>
</ol>
<p>Yup pretty simple, now simple the implementation in the PHP code, in this code I assume the image is already placed on the server, so it will make the easier to locate the image, in the code below we create the thumbnail with maintained ratio, then create we create the second thumbnail that overwrite the first thumbnail that has been resized to the square that we desired, you can copy all this code and try on your local server, and just change the <em>$path</em> and <em>$img</em> variable that you want to test</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

header(&quot;Content-type: image/jpeg&quot;);

// get the image source
$path = &quot;img/&quot;;
$img = &quot;img_wide.jpg&quot;;
$img_src = imagecreatefromjpeg($path.$img);
$img_width = imagesx($img_src);
$img_height = imagesy($img_src);

$square_size = 100;

// check width, height, or square
if ($img_width == $img_height) {
    // square
    $tmp_width = $square_size;
    $tmp_height = $square_size;
} else if ($img_height &lt; $img_width) {
    // wide
    $tmp_height = $square_size;
    $tmp_width = intval(($img_width / $img_height) * $square_size);
    if ($tmp_width % 2 != 0) {
        $tmp_width++;
    }
} else if ($img_height &gt; $img_width) {
    $tmp_width = $square_size;
    $tmp_height = intval(($img_height / $img_width) * $square_size);
    if ($tmp_height % 2 != 0) {
        $tmp_height++;
    }
}

$img_new = imagecreatetruecolor($tmp_width, $tmp_height);
imagecopyresampled($img_new, $img_src, 0, 0, 0, 0,
        $tmp_width, $tmp_height, $img_width, $img_height);

// create temporary thumbnail and locate on the server
$thumb = &quot;thumb_&quot;.$img;
imagejpeg($img_new, $path.$thumb);

// get tmp_image
$img_thumb_square = imagecreatefromjpeg($path.$thumb);
$thumb_width = imagesx($img_thumb_square);
$thumb_height = imagesy($img_thumb_square);

if ($thumb_height &lt; $thumb_width) {
    // wide
    $x_src = ($thumb_width - $square_size) / 2;
    $y_src = 0;
    $img_final = imagecreatetruecolor($square_size, $square_size);
    imagecopy($img_final, $img_thumb_square, 0, 0,
            $x_src, $y_src, $square_size, $square_size);
    imagejpeg($img_final, $path.$thumb);
} else if ($thumb_height &gt; $thumb_width) {
    // landscape
    $x_src = 0;
    $y_src = ($thumb_height - $square_size) / 2;
    $img_final = imagecreatetruecolor($square_size, $square_size);
    imagecopy($img_final, $img_thumb_square, 0, 0,
            $x_src, $y_src, $square_size, $square_size);
    imagejpeg($img_final, $path.$thumb);
} else {
    $img_final = imagecreatetruecolor($square_size, $square_size);
    imagecopy($img_final, $img_thumb_square, 0, 0,
            0, 0, $square_size, $square_size);
}

imagejpeg($img_final);

?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2010/07/01/cropping-image-to-square-dimension-using-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating Register and Login Form Using EXTJS and CodeIgniter</title>
		<link>http://superdit.com/2010/06/02/creating-register-and-login-form-using-extjs-and-codeigniter/</link>
		<comments>http://superdit.com/2010/06/02/creating-register-and-login-form-using-extjs-and-codeigniter/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 06:07:41 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Extjs]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[form]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=460</guid>
		<description><![CDATA[Like another tutorial this post will create the basic form login and register using Extjs and Codeigniter, and I want to mix my previous post about Codeigniter Session Library, Extjs Unique Field Validation and using Statusbar in Extjs Window. 1. Setting up the database Using phpmyadmin in XAMPP I create the database named &#8220;ci_extjs_login&#8221;, and create<a href="http://superdit.com/2010/06/02/creating-register-and-login-form-using-extjs-and-codeigniter/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Like another tutorial this post will create the basic form login and register using Extjs and Codeigniter, and I want to mix my previous post about <a href="http://superdit.com/2010/04/17/creating-user-session-checking-with-codeigniter-library/" target="_blank">Codeigniter Session Library</a>, <a href="http://superdit.com/2010/05/07/unique-field-form-validation-using-php-and-extjs/" target="_blank">Extjs Unique Field Validation</a> and <a href="http://superdit.com/2010/05/24/extjs-window-form-masking-with-statusbar/" target="_blank">using Statusbar in Extjs Window</a>.</p>
<p><strong>1. Setting up the database</strong></p>
<p>Using phpmyadmin in XAMPP I create the database named &#8220;ci_extjs_login&#8221;, and create simple &#8220;users&#8221; table, here below is the sql code that I generated from phpmyadmin, for more advance database modelling you can use <a title="mysql workbench" href="http://wb.mysql.com/" target="_blank">mysql workbench</a>.</p>
<pre class="brush: sql; title: ; notranslate">
CREATE TABLE  `ci_extjs_login`.`users` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` VARCHAR( 100 ) NOT NULL ,
`password` VARCHAR( 100 ) NOT NULL ,
`email` VARCHAR( 100 ) NOT NULL
) ENGINE = MYISAM ;</pre>
<p><span id="more-460"></span></p>
<p><strong>2. Setting up the Codeigniter</strong></p>
<p>If you not have the copy of codeigniter you can download the latest from here <a title="codeigniter" href="http://www.2shared.com/file/_5iCleTc/Superditcom_source_extractor.html" target="_blank">here</a>, then copy the extracted file in your server folder, (here I&#8217;m using the default XAMPP htdocs), first setting the databse connection, open the file <em>&#8220;system/application/config/database.php&#8221;</em>, set the hostname, username, password, and database name (for username &amp; password I&#8217;m using the XAMPP default)</p>
<pre class="brush: php; title: ; notranslate">
$db['default']['hostname'] = &quot;localhost&quot;;
$db['default']['username'] = &quot;root&quot;;
$db['default']['password'] = &quot;&quot;;
$db['default']['database'] = &quot;ci_extjs_login&quot;;
</pre>
<p>Setting the config file, open file <em>&#8220;system/application/config/config.php&#8221;</em>,<em> </em>my <em>base_url</em> setting is like this (set the value to <em>&#8220;http://localhost/ci_extjs_login/&#8221;</em>)</p>
<pre class="brush: php; title: ; notranslate">
$config['base_url'] = &quot;http://localhost/ci_extjs_login/&quot;;
</pre>
<p>Setting the autoload file, open file <em>&#8220;system/application/config/autoload.php&#8221;</em>, in this file set the default loaded helpers and libraries to be loaded by the application</p>
<pre class="brush: php; title: ; notranslate">
$autoload['libraries'] = array('database', 'session', 'my_usession');
</pre>
<p>As you can see above, the <em>&#8220;database&#8221;</em> and <em>&#8220;session&#8221;</em>, are the default codeigniter library, for &#8220;my_usession&#8221; i&#8217;m using my own library it&#8217;s pretty simple to implement, to see more you can read my <a href="http://superdit.com/2010/04/17/creating-user-session-checking-with-codeigniter-library/" target="_blank">previous post</a>, next to load the url codeigniter helper, this will help when you linking a page to the server in Extjs.</p>
<pre class="brush: php; title: ; notranslate">$autoload['helper'] = array('url');</pre>
<p>Setting the route file, open file <em>&#8220;system/application/config/routes.php&#8221;</em>, change the default controller to &#8220;user&#8221; even though in this step we haven&#8217;t create the file yet</p>
<pre class="brush: php; title: ; notranslate">$route['default_controller'] = &quot;user&quot;;</pre>
<p><strong>3. Adding the Extjs file to in Codeigniter</strong></p>
<p><a href="http://superdit.com/wp-content/uploads/2010/06/ci_extjs_folder_structure1.png"><img class="size-full wp-image-727 alignright" title="ci_extjs_folder_structure" src="http://superdit.com/wp-content/uploads/2010/06/ci_extjs_folder_structure1.png" alt="" width="164" height="171" /></a>I usually create the separated folder from system in Codeigniter, create <em>&#8220;assets&#8221;</em> folder to put all images, css and javascript file, so you can put all the Extjs file in the js folder, as you can see on the image in the right. All Extjs file placed in the <em>&#8220;ext&#8221;</em> folder and the <em>&#8220;ext_plugins&#8221;</em> folder is the where I usually placed the plugins. You can see <em>&#8220;nbproject&#8221; </em>folder, this is the auto generated folder when you are developing project using <a title="netbeans" href="http://netbeans.org" target="_blank">netbeans</a>, you can remove it if you are in the production state. The next is to include the Extjs file in every html header, now create view file in codeigniter here <em>&#8220;system/application/views/header.php&#8221; </em>and my code is like this</p>
<pre class="brush: php; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo base_url(); ?&gt;assets/js/ext/resources/css/ext-all.css&quot;/&gt;

    &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(); ?&gt;assets/js/ext/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(); ?&gt;assets/js/ext/ext-all.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        var BASE_URL = '&lt;?php echo base_url(); ?&gt;' + 'index.php/';
        var BASE_PATH = '&lt;?php echo base_url(); ?&gt;';
        Ext.onReady(function() {
            Ext.QuickTips.init();
            Ext.BLANK_IMAGE_URL = BASE_PATH + 'assets/js/ext/resources/images/default/s.gif';
            Ext.form.Field.prototype.msgTarget = 'side';
        });
    &lt;/script&gt;

    &lt;style&gt;
    body {
        background:#7F99BE;
    }
    #header {
        border-bottom:1px solid #666;
        background:#1E4176;
        padding:5px;
        color:#fff;
        font-size:20px;
        font-weight:bold;
        font-family:'Lucida Grande', Arial, Sans;
    }
    &lt;/style&gt;
    &lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
</pre>
<p>As you can see above I&#8217;m using the Codeigniter url helper, <em>base_url()</em> to locate the Extjs file, the defined variable in javascript <em>&#8220;BASE_URL&#8221; </em>and <em>&#8220;BASE_PATH&#8221; </em>is useful when requesting server location, you can see on the next step. Now create file for login screen in <em>&#8220;system/application/views/user/login.php&#8221; </em>and add this code</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php $this-&gt;load-&gt;view('header'); ?&gt;

&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo base_url(); ?&gt;assets/js/ext_plugins/statusbar/css/statusbar.css&quot;/&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(); ?&gt;assets/js/ext_plugins/statusbar/StatusBar.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(); ?&gt;assets/js/form_validation.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo base_url(); ?&gt;assets/js/form_login.js&quot;&gt;&lt;/script&gt;

&lt;?php $this-&gt;load-&gt;view('footer'); ?&gt;
</pre>
<p>The status bar plugin you can copied from Extjs default example located in <em>&#8220;assets/js/ext/examples/ux/statusbar&#8221; </em>copy all the files inside this folder, actually you can directly link to that folder, but for me it easier to read the plugin that I used in the folder hierarchy. We have not create the two javascript file <em>&#8220;form_validation.js&#8221; </em>and <em>&#8220;form_login.js&#8221; </em>yet, we&#8217;ll create it on the next step, but I always wanted a footer file on the view so create file <em>&#8220;system/application/views/footer.php&#8221; </em>and the code is as simple as this (for this project just to closing the html and body tag)</p>
<pre class="brush: php; title: ; notranslate">
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Now create the javascript file, in this file we will create two from in the same file, which mean one page, two Extjs windows and two Extjs forms (login and register).  Create file in <em>&#8220;assets/js/form_login.js&#8221; </em>insert this code</p>
<pre class="brush: jscript; title: ; notranslate">
Ext.onReady(function() {

    /* 01. Start The Form Register Component */

    // 01. Form Register
	var formRegister = new Ext.FormPanel({
		frame: false, border: false, buttonAlign: 'center',
		url: BASE_URL + 'user/ext_register', method: 'POST', id: 'frmRegister',
		bodyStyle: 'padding:10px 10px 15px 15px;background:#dfe8f6;',
		width: 300, labelWidth: 150,
		items: [{
			xtype: 'textfield',
			fieldLabel: 'Username',
			name: 'username',
			id: 'regUsername',
			allowBlank: false,
            vtype: 'uniqueusername'
		}, {
			xtype: 'textfield',
			fieldLabel: 'Password',
			name: 'password',
			allowBlank: false,
			inputType: 'password',
            vtype: 'passwordlength',
            id: 'pass1'
		}, {
			xtype: 'textfield',
			fieldLabel: 'Confirm Password',
			name: 'cpassword',
			allowBlank: false,
			inputType: 'password',
            id: 'pass2',
            initialPassField: 'pass1',
            vtype: 'password'
		}, {
			xtype: 'textfield',
			fieldLabel: 'Email',
            id: 'regEmail',
			name: 'email',
			vtype:'uniqueemail',
			allowBlank: false,
            validationEvent: ''
		}
		],
		buttons: [
			{ text: 'Register', handler: fnRegister },
			{ text: 'Reset', handler: function() {
					formRegister.getForm().reset();
				}
			}
		]
	});

    function fnRegister() {
        Ext.getCmp('frmRegister').on({
            beforeaction: function() {
                if (formRegister.getForm().isValid()) {
                    Ext.getCmp('winRegister').body.mask();
                    Ext.getCmp('winLogin').body.mask();
                    Ext.getCmp('sbWinRegister').showBusy();
                }
            }
        });
        formRegister.getForm().submit({
            success: function() {
                formRegister.getForm().reset();
                Ext.getCmp('sbWinRegister').setStatus({
                    text: 'Registration Success',
                    iconCls: 'x-status-saved'
                });
                Ext.getCmp('winRegister').body.unmask();
                Ext.getCmp('winLogin').body.unmask();
            }
        });
    }

    // 01. Window Register
	var winRegister = new Ext.Window({
		title: 'CI Extjs &amp;mdash; User Register',
        id: 'winRegister',
		layout: 'fit',
		width: 350,
		height: 210,
		y: 120,
		resizable: false,
		closable: false,
		items: [formRegister],
        bbar: new Ext.ux.StatusBar({
            text: 'Ready',
            id: 'sbWinRegister'
        })
	});

	winRegister.show();

    /* 02. Start The Form Login Component */

    // 02. Form Login
    var formLogin = new Ext.FormPanel({
		frame: false, border: false, buttonAlign: 'center',
		url: BASE_URL + 'user/ext_login', method: 'POST', id: 'frmLogin',
		bodyStyle: 'padding:10px 10px 15px 15px;background:#dfe8f6;',
		width: 300, labelWidth: 150,
		items: [{
			xtype: 'textfield',
			fieldLabel: 'Username',
			name: 'username',
			id: 'logUsername',
			allowBlank: false
		}, {
			xtype: 'textfield',
			fieldLabel: 'Password',
			name: 'password',
            id: 'logPassword',
			allowBlank: false,
			inputType: 'password'
		}
		],
		buttons: [
			{ text: 'Login', handler: fnLogin },
			{ text: 'Reset', handler: function() {
					formLogin.getForm().reset();
				}
			}
		]
	});

    function fnLogin() {
        Ext.getCmp('frmLogin').on({
            beforeaction: function() {
                if (formLogin.getForm().isValid()) {
                    Ext.getCmp('winRegister').body.mask();
                    Ext.getCmp('winLogin').body.mask();
                    Ext.getCmp('sbWinLogin').showBusy();
                }
            }
        });
        formLogin.getForm().submit({
           success: function() {
               window.location = BASE_URL;
           },
           failure: function(form, action) {
               Ext.getCmp('winRegister').body.unmask();
               Ext.getCmp('winLogin').body.unmask();
               if (action.failureType == 'server') {
                    obj = Ext.util.JSON.decode(action.response.responseText);
                    Ext.getCmp('sbWinLogin').setStatus({
                        text: obj.errors.reason,
                        iconCls: 'x-status-error'
                    });
                } else {
                    if (formLogin.getForm().isValid()) {
                        Ext.getCmp('sbWinLogin').setStatus({
                            text: 'Authentication server is unreachable',
                            iconCls: 'x-status-error'
                        });
                    } else {
                        Ext.getCmp('sbWinLogin').setStatus({
                            text: 'Something error in form !',
                            iconCls: 'x-status-error'
                        });
                    }
                }
           }
        });
    }

    // 02. Window Login
	var winLogin = new Ext.Window({
		title: 'CI Extjs &amp;mdash; User Login',
        id: 'winLogin',
		layout: 'fit',
		width: 350,
		height: 160,
		y: 340,
		resizable: false,
		closable: false,
		items: [formLogin],
        bbar: new Ext.ux.StatusBar({
            text: 'Ready',
            id: 'sbWinLogin'
        })
	});

	winLogin.show();
});
</pre>
<p>Now for the custom validation file I&#8217;m using the unique field validation from my <a href="http://superdit.com/2010/05/07/unique-field-form-validation-using-php-and-extjs/" target="_blank">previous post</a> and modified a little bit, although is not perfect but still can used in here, so create file <em>&#8220;assets/js/form_validation.js&#8221;</em> and the code is</p>
<pre class="brush: jscript; title: ; notranslate">
/* Custom Unique Username Validation
 * Used in 01. Form Register */

var usernameErrLength = 'Username minimum 4 character !';
var usernameErrUnique = 'Username already in use !';
var usernameSuccess = 'Username avaliable';
var emailErrFormat = 'Email not valid !';
var emailErrUnique = 'Email already in use !';
var emailSuccess = 'Email valid &amp; avaliable';

Ext.apply(Ext.form.VTypes, {
    uniqueusernameMask : /[a-z0-9_\.\-@\+]/i,
	uniqueusername : function(val) {
        if (val.length &lt; 4) {
            Ext.apply(Ext.form.VTypes, {
                uniqueusernameText: usernameErrLength
            });
            return false;
        } else {
            Ext.Ajax.request({
                url: BASE_URL + 'user/ext_is_unique_username',
                method: 'POST',
                params: 'username=' + val,
                success: function(o) {
                    if (o.responseText == 0) {
                        resetUsernameValidator(false);
                        Ext.apply(Ext.form.VTypes, {
                            uniqueusernameText: usernameErrUnique
                        });
                        return false;
                    } else {
                        resetUsernameValidator(true);
                    }
                }
            });
            return true;
        }
	},
	uniqueusernameText : usernameErrUnique,

    uniqueemailMask : /[a-z0-9_\.\-@\+]/i,
    uniqueemail : function(val) {
        var uniqueemail = /^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/;
        if (uniqueemail.test(val)) {
            Ext.Ajax.request({
                url: BASE_URL + 'user/ext_is_unique_email',
                method: 'POST',
                params: 'email=' + val,
                success: function(o) {
                    if (o.responseText == 0) {
                        resetEmailValidator(false);
                        Ext.apply(Ext.form.VTypes, {
                            uniqueemailText: emailErrUnique
                        });
                    } else {
                        resetEmailValidator(true);
                    }
                }
            });
            return true;
        } else {
            return false;
        }

    },
    uniqueemailText : emailErrFormat,

    password : function(val, field) {
        if (field.initialPassField) {
            var pwd = Ext.getCmp(field.initialPassField);
            return (val == pwd.getValue());
        }
        return true;
    },
    passwordText : 'Passwords do not match',

    passwordlength : function(val) {
        if (val.length &lt; 5) {
            return false;
        } else {
            return true;
        }
    },
    passwordlengthText : 'Password minimum 5 character'
});

function resetUsernameValidator(is_error) {
	Ext.apply(Ext.form.VTypes, {
		uniqueusername : function(val) {
            if (val.length &lt; 4) {
                Ext.apply(Ext.form.VTypes, {
                    uniqueusernameText: usernameErrLength
                });
                return false;
            } else {
                Ext.Ajax.request({
                    url: BASE_URL + 'user/ext_is_unique_username',
                    method: 'POST',
                    params: 'username=' + val,
                    success: function(o) {
                        if (o.responseText == 0) {
                            resetUsernameValidator(false);
                        } else {
                            resetUsernameValidator(true);
                        }
                    }
                });
                return is_error;
            }
		}
	});
}

function resetEmailValidator(value) {
    Ext.apply(Ext.form.VTypes, {
        uniqueemail : function(val) {
            var uniqueemail = /^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/;
            if (uniqueemail.test(val)) {
                Ext.Ajax.request({
                    url: BASE_URL + 'user/ext_is_unique_email',
                    method: 'POST',
                    params: 'email=' + val,
                    success: function(o) {
                        if (o.responseText == 0) {
                            resetEmailValidator(false);
                            Ext.apply(Ext.form.VTypes, {
                                uniqueemailText: emailErrUnique
                            });
                        } else {
                            resetEmailValidator(true);
                        }
                    }
                });
            } else {
                return false;
            }
            return (value);
        }
    });
}
</pre>
<p>The last file in views is index which is called when user is authenticated in <em>&#8220;system/application/views/user/index.php&#8221;, </em>here I&#8217;m using my last project layout using Extjs and I can&#8217;t explain more about this, if you want simple layout just html and php that would be fine, or if you want follow my step you can separate the javascript file from the php file like the way from previous step</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php $this-&gt;load-&gt;view('header'); ?&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
    var layout_west1 = new Ext.tree.TreePanel({
    region: 'north', title: 'Menus', height: 250, bodyStyle: 'margin-bottom:6px;',
    autoScroll: true, enableDD: false, rootVisible: false, id: 'treePanel',
    root: {
        text: 'Menu',
        expanded: true,
        nodeType: 'async',
        children: [{
            text: 'Menu 1',
            expanded: true,
            children: [{
                text: 'Menu 1.1',
                leaf: true
            }, {
                text: 'Menu 1.2',
                expanded: true,
                children: [{
                    text: 'Menu 1.2.1',
                    leaf: true
                }, {
                    text: 'Menu 1.2.2',
                    leaf: true
                }, {
                    text: 'Menu 1.2.3',
                    leaf: true
                }]
            }]
        }, {
            text: 'Menu 2',
            expanded: true,
            children: [{
                text: 'Menu 2.1',
                leaf: true
            }, {
                text: 'Menu 2.2',
                leaf: true
            }]
        }, {
            text: 'Logout',
            id: 'logout',
            icon: BASE_PATH + 'assets/img/icons/minus-circle.png',
            leaf: true
        }]
    },
    listeners: {
        click: function(n) {
            switch (n.id) {
                case 'logout':
                    do_logout();
                    break;
            }
        }
    }
});

var layout_west2 = new Ext.Panel({
	region: 'center', margin: '10 0 0 0', autoScroll: true,
	bodyStyle: 'padding:10px;background:#eee;font-family:&quot;Lucida Grande&quot;',
	html: '&lt;p style=&quot;padding:20px;text-align:center;color:#666;font-size:14px;border:1px dotted #999;background:#fff;&quot;&gt;\n\
            &lt;img src=&quot;public/img/btn-left.jpg&quot;/&gt;&lt;br/&gt; CodeIgniter - Extjs &lt;br/&gt;&lt;span style=&quot;font-size:11px;&quot;&gt;Simple Login Screen&lt;/span&gt;&lt;/p&gt;'
});

var tab_center = new Ext.TabPanel({
    xtype: 'tabpanel', resizeTabs: false, minTabWidth: 115, tabWidth: 135,
    enableTabScroll: true, layoutOnTabChange: true, border: false,
    activeItem: 'tab_welcome', autoDestroy: false,
    items: [
        { xtype: 'panel', id: 'tab_welcome', bodyStyle: 'padding:10px', title: 'Welcome' }
    ]
});

var tbCenter = new Ext.Toolbar({
    items: ['-&gt;', {
        icon: BASE_PATH + 'assets/img/icons/minus-circle.png',
        text: 'Logout',
        handler: do_logout
    }]
});

var layout_center = new Ext.Panel({
    id: 'content-panel', region: 'center', layout: 'card', margins: '0 5 5 0',
    activeItem: 0, border: true, tbar: tbCenter, items: [tab_center]
});

var layout_main = new Ext.Viewport({
	layout: 'border', renderTo: Ext.getBody(),
	items: [
        { region: 'north', autoHeight: true, height: 100, border: false,
            html: '&lt;div id=&quot;header&quot;&gt;CodeIgniter - Extjs&lt;span style=&quot;font-size:12px;&quot;&gt;Simple Login Screen&lt;/span&gt;&lt;/div&gt;',
            margins: '0 0 5 0', style: 'border-bottom: 4px solid #4c72a4;' },
        { region: 'west', baseCls: 'x-plain', xtype: 'panel', autoHeight: true,
            width: 180, border: false,
            split: true, margins: '0 0 0 5', items: [layout_west1, layout_west2]
        }, layout_center]
});

function do_logout() {
    Ext.Ajax.request({
        url: BASE_URL + 'user/ext_logout',
        method: 'POST',
        success: function(xhr) {
            window.location = BASE_URL + 'user/login';
        }
    });
}

layout_main.show();
&lt;/script&gt;

&lt;?php $this-&gt;load-&gt;view('footer'); ?&gt;
</pre>
<p><strong>4. Create controller</strong></p>
<p>Create the controller file user.php in <em>&#8220;system/application/controllers/user.php&#8221;</em></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

class User extends Controller {

    public function __construct()
    {
        parent::Controller();
    }

    public function index()
    {
        if ($this-&gt;my_usession-&gt;logged_in)
        {
            $data['title'] = 'User Index';
            $this-&gt;load-&gt;view('user/index', $data);
        }
        else
        {
            redirect('user/login');
        }
    }

    public function login()
    {
        if ($this-&gt;my_usession-&gt;logged_in)
        {
            redirect('user/index');
        }
        else
        {
            $data['title'] = 'User Login';
            $this-&gt;load-&gt;view('user/login', $data);
        }
    }

    public function ext_is_unique_username()
    {
        $cond = array('username' =&gt; $_POST['username']);
        $query = $this-&gt;db-&gt;get_where('users', $cond);
        if ($query-&gt;num_rows() != 0)
        {
            echo 0;
        }
        else
        {
            echo 1;
        }
    }

    public function ext_is_unique_email()
    {
        $cond = array('email' =&gt; $_POST['email']);
        $query = $this-&gt;db-&gt;get_where('users', $cond);
        if ($query-&gt;num_rows() != 0)
        {
            echo 0;
        }
        else
        {
            echo 1;
        }
    }

    public function ext_logout()
    {
        $this-&gt;my_usession-&gt;unset_userdata(&quot;user_id&quot;);
        echo &quot;{success:true}&quot;;
    }

    public function ext_login()
    {
        $cond = array(
            'username' =&gt; $_POST['username'],
            'password' =&gt; $_POST['password']
        );
        $query = $this-&gt;db-&gt;get_where('users', $cond);
        if ($query-&gt;num_rows() != 0)
        {
            $row = $query-&gt;row();
            $this-&gt;my_usession-&gt;set_userdata('user_id', $row-&gt;id);
            $this-&gt;my_usession-&gt;set_userdata('username', $row-&gt;username);
            echo &quot;{success:true}&quot;;
        }
        else
        {
            echo &quot;{success:false, errors: { reason: 'User not found !' }}&quot;;
        }
    }

    public function ext_register()
    {
        $data = array(
            'username' =&gt; $_POST['username'],
            'password' =&gt; $_POST['password'],
            'email' =&gt; $_POST['email']
        );
        $this-&gt;db-&gt;insert('users', $data);

        echo &quot;{success:true}&quot;;
    }

}
</pre>
<p>The final result should look like this</p>
<p style="text-align: center;"><img class="size-full wp-image-768  aligncenter" title="ci_extjs_login_form" src="http://superdit.com/wp-content/uploads/2010/06/ci_extjs_login_form.png" alt="" width="365" height="397" /></p>
<p style="text-align: center;">default login and register form in <em>&#8220;http://localhost/ci_extjs_login/index.php/user/login&#8221;</em></p>
<p style="text-align: center;"><img class="aligncenter" src="http://i49.tinypic.com/1zycxuh.jpg" alt="" width="639" height="324" /></p>
<p style="text-align: center;">default index layout in <em>&#8220;http://localhost/ci_extjs_login/index.php/&#8221;</em></p>
<p>Like always I provide the source to be downloaded but, not included the Extjs file, you have to download yourself from  <a title="extjs" href="http://www.2shared.com/file/_5iCleTc/Superditcom_source_extractor.html" target="_blank">here</a>.</p>
<p><strong><a href="http://www.2shared.com/file/_5iCleTc/Superditcom_source_extractor.html" target="_blank">DOWNLOAD SOURCE</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2010/06/02/creating-register-and-login-form-using-extjs-and-codeigniter/feed/</wfw:commentRss>
		<slash:comments>86</slash:comments>
		</item>
		<item>
		<title>Resource Links For PHP Performance Tips</title>
		<link>http://superdit.com/2010/05/25/resource-links-for-php-performance-tips/</link>
		<comments>http://superdit.com/2010/05/25/resource-links-for-php-performance-tips/#comments</comments>
		<pubDate>Tue, 25 May 2010 03:02:45 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=168</guid>
		<description><![CDATA[This time I want to share my resources about PHP performance link, because when developing web application I always worry about how fast my application can serve the user request, I really need advice about performance in PHP and I found it some, you can see more than 15 resources about PHP performance, but you<a href="http://superdit.com/2010/05/25/resource-links-for-php-performance-tips/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>This time I want to share my resources about PHP performance link, because when developing web application I always worry about how fast my application can serve the user request, I really need advice about performance in PHP and I found it some, you can see more than 15 resources about PHP performance, but you may found something similar tips from one post to another post. Well at least I&#8217;m try to follow the advice, and hope this list useful for you.</p>
<h5>1. <a title="PHP Performance Tips from Google" href="http://php100.wordpress.com/2009/06/26/php-performance-google/" target="_blank">PHP performance tips from Google</a></h5>
<p><a title="PHP Performance Tips from Google" href="http://php100.wordpress.com/2009/06/26/php-performance-google/" target="_blank"><img class="aligncenter size-full wp-image-656" src="http://superdit.com/wp-content/uploads/2010/05/001-php100_wordpress_com_2009_06_26_php-performance-google.png" alt="" width="500" height="200" /><span id="more-168"></span></a></p>
<h5>2. <a title="More on PHP Performance" href="http://php100.wordpress.com/2009/07/13/php-performance/" target="_blank">More on PHP performance</a></h5>
<p><a title="More on PHP Performance" href="http://php100.wordpress.com/2009/07/13/php-performance/" target="_blank"><img class="aligncenter size-full wp-image-657" src="http://superdit.com/wp-content/uploads/2010/05/002-php100_wordpress_com_2009_07_13_php-performance.png" alt="" width="500" height="200" /></a></p>
<h5>3. <a title="A How To on Optimizing PHP" href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank">A How To on Optimizing PHP</a></h5>
<p><a title="A How To on Optimizing PHP" href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank"><img class="aligncenter size-full wp-image-658" src="http://superdit.com/wp-content/uploads/2010/05/003-phplens_com_lens_php-book_optimizing-debugging-php_php.png" alt="" width="500" height="200" /></a></p>
<h5>4. <a title="Practical PHP Performance" href="http://www.developertutorials.com/tutorials/php/practical-php-performance-8-02-07/page1.html" target="_blank">Practical PHP Performance (4 pages)</a></h5>
<p><a title="Practical PHP Performance" href="http://www.developertutorials.com/tutorials/php/practical-php-performance-8-02-07/page1.html  " target="_blank"><img class="aligncenter size-full wp-image-659" src="http://superdit.com/wp-content/uploads/2010/05/004-www_developertutorials_com_tutorials_php_practical-php-performance-8-02-07_page1_html.png" alt="" width="500" height="200" /></a></p>
<h5>5. <a title="PHP Performance Series: Caching Technique" href="http://blog.digitalstruct.com/2008/02/27/php-performance-series-caching-techniques/" target="_blank">PHP Performance Series: Caching Technique </a></h5>
<p><a title="PHP Performance Series: Caching Technique" href="http://blog.digitalstruct.com/2008/02/27/php-performance-series-caching-techniques/" target="_blank"><img class="aligncenter size-full wp-image-660" src="http://superdit.com/wp-content/uploads/2010/05/005-blog_digitalstruct_com_2008_02_27_php-performance-series-caching-techniques.png" alt="" width="500" height="200" /></a></p>
<h5>6. <a title="Cache it! Solve PHP Performance Problems" href="http://articles.sitepoint.com/article/caching-php-performance" target="_blank">Cache it! Solve PHP Performance Problems (5 pages)</a></h5>
<p><a title="Cache it! Solve PHP Performance Problems" href="http://articles.sitepoint.com/article/caching-php-performance" target="_self"><img class="aligncenter size-full wp-image-661" src="http://superdit.com/wp-content/uploads/2010/05/006-articles_sitepoint_com_article_caching-php-performance.png" alt="" width="500" height="200" /></a></p>
<h5>7. <a title="Performance Tuning PHP" href="http://www.scribd.com/doc/10633/Performance-Tuning-PHP" target="_blank">Performance Tunig PHP</a></h5>
<p><a title="Performance Tuning PHP" href="http://www.scribd.com/doc/10633/Performance-Tuning-PHP" target="_blank"><img class="aligncenter size-full wp-image-663" src="http://superdit.com/wp-content/uploads/2010/05/007-www_scribd_com_doc_10633_Performance-Tuning-PHP.png" alt="" width="500" height="200" /></a></p>
<h5>8. <a title="PHP Performance Best Practice" href="http://atomized.org/2005/04/php-performance-best-practices/" target="_blank">PHP Performance Best Practice</a></h5>
<p><a title="PHP Performance Best Practice" href="http://atomized.org/2005/04/php-performance-best-practices/" target="_blank"><img class="aligncenter size-full wp-image-664" src="http://superdit.com/wp-content/uploads/2010/05/008-atomized_org_2005_04_php-performance-best-practices.png" alt="" width="500" height="200" /></a></p>
<h5>9. <a title="High Performance PHP on Digg" href="http://eliw.com/presentations/dcphp-2007-high-perf.pdf" target="_blank">High Performance PHP on Digg</a> by <a title="Elliott White" href="http://eliw.com/" target="_blank">Elliott White</a></h5>
<p><a title="High Performance PHP on Digg" href="http://eliw.com/presentations/dcphp-2007-high-perf.pdf" target="_blank"><img class="aligncenter size-full wp-image-666" src="http://superdit.com/wp-content/uploads/2010/05/009-eliw_com_presentations_dcphp-2007-high-perf_pdf.png" alt="" width="500" height="200" /></a></p>
<h5>10. <a title="42+ tips for optimizing your php code performance" href="http://blog.tuvinh.com/42-tips-for-optimizing-your-php-code-performance/" target="_blank">42+ Tips For Optimizing Your PHP Code Performance</a></h5>
<p><a title="42+ tips for optimizing your php code performance" href="http://blog.tuvinh.com/42-tips-for-optimizing-your-php-code-performance/" target="_blank"><img class="aligncenter size-full wp-image-667" src="http://superdit.com/wp-content/uploads/2010/05/010-blog_tuvinh_com_42-tips-for-optimizing-your-php-code-performance.png" alt="" width="500" height="200" /></a></p>
<h5>11. <a title="Performance Tuning in PHP" href="http://www.slideshare.net/jignesht/performance-tuning-in-php-presentation" target="_blank">Performance Tuning in PHP</a></h5>
<p><a title="Performance Tuning in PHP" href="http://www.slideshare.net/jignesht/performance-tuning-in-php-presentation" target="_blank"><img class="aligncenter size-full wp-image-668" src="http://superdit.com/wp-content/uploads/2010/05/011-www_slideshare_net_jignesht_performance-tuning-in-php-presentation.png" alt="" width="500" height="200" /></a></p>
<h5>12. <a title="Let's make the web faster - PHP performance tips" href="http://code.google.com/intl/zh-TW/speed/articles/optimizing-php.html" target="_blank">Let&#8217;s make the web faster &#8211; PHP Performance Tips</a></h5>
<p><a title="Let's make the web faster - PHP performance tips" href="http://code.google.com/intl/zh-TW/speed/articles/optimizing-php.html" target="_blank"><img class="aligncenter size-full wp-image-669" src="http://superdit.com/wp-content/uploads/2010/05/012-code_google_com_intl_zh-TW_speed_articles_optimizing-php_html.png" alt="" width="500" height="200" /></a></p>
<h5>13. <a title="PHP : Performance Improvement Tips" href="http://blog.jaric.tw/2009/04/05/php-performance-improvement-tips/" target="_blank">PHP : Performance Improvement Tips</a></h5>
<p><a title="PHP Performance Improvement Tips" href="http://blog.jaric.tw/2009/04/05/php-performance-improvement-tips/" target="_blank"><img class="aligncenter size-full wp-image-670" src="http://superdit.com/wp-content/uploads/2010/05/013-blog_jaric_tw_2009_04_05_php-performance-improvement-tips.png" alt="" width="500" height="200" /></a></p>
<h5>14 . <a title="10 Performance Tips to Speed Up PHP" href="http://www.wardontheweb.com/10-performance-tips-to-speed-up-php/" target="_blank">10 Performance Tips to Speed Up PHP</a></h5>
<p><a title="10 Performance Tips to Speed Up PHP" href="http://www.wardontheweb.com/10-performance-tips-to-speed-up-php/" target="_blank"><img class="aligncenter size-full wp-image-671" src="http://superdit.com/wp-content/uploads/2010/05/014-www_wardontheweb_com_10-performance-tips-to-speed-up-php.png" alt="" width="500" height="200" /></a></p>
<h5>15. <a title="15 top web design tips to optimize your PHP" href="http://www.noamdesign.com/blog/15-tips-to-optimizing-your-php-code/" target="_blank">15 Top Web Design Tips to Optimize Your PHP Code</a></h5>
<p><a title="15 top web design tips to optimize your PHP" href="http://www.noamdesign.com/blog/15-tips-to-optimizing-your-php-code/" target="_blank"><img class="aligncenter size-full wp-image-673" src="http://superdit.com/wp-content/uploads/2010/05/015-www_noamdesign_com_blog_15-tips-to-optimizing-your-php-code.png" alt="" width="500" height="200" /></a></p>
<h5>16. <a title="Optimizing a php application in 5 minutes" href="http://giorgiosironi.blogspot.com/2009/10/optimizing-php-application-in-5-minutes.html" target="_blank">Optimizing a PHP Application in 5 Minutes</a></h5>
<p><a title="Optimizing a php application in 5 minutes" href="http://giorgiosironi.blogspot.com/2009/10/optimizing-php-application-in-5-minutes.html" target="_blank"><img class="aligncenter size-full wp-image-674" src="http://superdit.com/wp-content/uploads/2010/05/016-giorgiosironi_blogspot_com_2009_10_optimizing-php-application-in-5-minutes_html.png" alt="" width="500" height="200" /></a></p>
<h5>17. <a title="PHP Performance From Symfony Live" href="http://www.slideshare.net/xdecock/php-performance-sflive-2010" target="_blank">PHP Performance From Symfony Live</a></h5>
<p><a title="PHP Performance From Symfony Live" href="http://www.slideshare.net/xdecock/php-performance-sflive-2010" target="_blank"><img class="aligncenter size-full wp-image-675" src="http://superdit.com/wp-content/uploads/2010/05/017-www_slideshare_net_xdecock_php-performance-sflive-2010.png" alt="" width="500" height="200" /></a></p>
<h5>18. <a title="PHP Performance on Windows" href="http://www.slideshare.net/ruslany/php-performance-on-windows" target="_blank">PHP Performance on Windows</a></h5>
<p><a title="PHP Performance on Windows" href="http://www.slideshare.net/ruslany/php-performance-on-windows" target="_blank"><img class="aligncenter size-full wp-image-676" src="http://superdit.com/wp-content/uploads/2010/05/018-www_slideshare_net_ruslany_php-performance-on-windows.png" alt="" width="500" height="200" /></a></p>
<h5>19. <a title="Simple Optimization for PHP and MySQL" href="http://www.dublish.com/articles/10.html" target="_blank">Simple Optimization for PHP and MySQL</a></h5>
<p><a title="Simple Optimization for PHP and MySQL" href="http://www.dublish.com/articles/10.html" target="_blank"><img class="aligncenter size-full wp-image-677" src="http://superdit.com/wp-content/uploads/2010/05/019-www_dublish_com_articles_10_html.png" alt="" width="500" height="200" /></a></p>
<h6>More Tips On YouTube &#8230;</h6>
<h6>- <a title="PHP Performance Tips" href="http://www.youtube.com/watch?v=Sibg0T3wKs4" target="_blank">PHP Performance Tips</a></h6>
<h6>- <a title="Improve your PHP Application Performance with Zend Platform" href="http://www.youtube.com/watch?v=a7npNTNFoUk" target="_blank">Improve your PHP Applications Performance with Zend Platform</a></h6>
<h6>- <a title="YouTube Playlist of PHP Performance (7 Videos)" href="http://www.youtube.com/view_play_list?p=6FA005F4C23090AC" target="_blank">Youtube PlayList of  PHP Performance (7 Videos)</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2010/05/25/resource-links-for-php-performance-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EXTJS: Getting each row value from the grid</title>
		<link>http://superdit.com/2010/05/14/extjs-getting-each-row-value-from-the-grid/</link>
		<comments>http://superdit.com/2010/05/14/extjs-getting-each-row-value-from-the-grid/#comments</comments>
		<pubDate>Fri, 14 May 2010 02:44:12 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[Extjs]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=495</guid>
		<description><![CDATA[When I write this post, a friend of mine asking me how to get the value from all the row in EXTJS grid, she use EditorGridPanel to make the grid editable by it&#8217;s user, and submit all edited value in each row to the server  i&#8217;m using php to take all the server side process).<a href="http://superdit.com/2010/05/14/extjs-getting-each-row-value-from-the-grid/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>When I write this post, a friend of mine asking me how to get the value from all the row in <a title="extjs" href="http://extjs.com/" target="_blank">EXTJS</a> grid, she use EditorGridPanel to make the grid editable by it&#8217;s user, and submit all edited value in each row to the server  i&#8217;m using php to take all the server side process). Actually the idea is very simple, the grid need to have <em>sm</em> config options it is a shorthand for <em>selModel</em> and this config that make the grid can be selected per row, and you can added the <em>checkboxselection </em>model to choose the row that you desired, so trid to make it simple tutorial, and at the of the post you can download the source from this post.</p>
<p><strong>1. Setting the main page</strong><br />
Include the EXTJS file (javascript and css) in html header file, then create single div with an id to where the grid to put on, and i&#8217;m using inline css style to centering the div the on the page</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;extjs/resources/css/ext-all.css&quot;/&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;extjs/adapter/ext/ext-base.js&quot;; ?&gt;&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;extjs/ext-all.js&quot;; ?&gt;&quot;&gt;&lt;/script&gt;
&lt;/head&gt;

/* This should be fill with the EXTJS script code
 * It explain on the next step
 */

// on the body section
&lt;body&gt;
&lt;div id=&quot;grid-example1&quot; style=&quot;height: 200px;width:600px;margin:0 auto;padding:20px;&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><span id="more-495"></span></p>
<p><strong>2. Create the data in array for store inside the grid</strong><br />
To make it simple I using data for grid from an array, for more expert use, maybe using Json data reader will be fit</p>
<pre class="brush: jscript; title: ; notranslate">
var myData = [
	[1, 'Luffy', 'Monkey D Luffy', 'monkeyd@luffy.com', 'East Blue'],
	[2, 'Zoro', 'Roronoa Zoro', 'roronoa@zoro.com', 'East Blue'],
	[3, 'Sanji', 'Leg Sanji', 'sanji@baratie.net', 'East Blue'],
	[4, 'Usop', 'Soge King', 'usap@sogevillage.com', 'East Blue'],
	[5, 'Franky', 'Franky Cyborg', 'franky@water7.com', 'East Blue'],
	[6, 'Chopper', 'Tony Chopper', 'chopper@drum.com', 'East Blue']
];
</pre>
<p><strong>3. Create the data store for editable grid, in this case i&#8217;m using Form.ComboBox</strong></p>
<pre class="brush: jscript; title: ; notranslate">
// main store for grid
var store_mbti = new Ext.data.ArrayStore({
	fields: [
		{ name: 'id' }, { name: 'username' }, { name: 'full_name' },
		{ name: 'email' }, { name: 'village' }
	]
});

// store including the data for editable grid, using Form.ComboBox
var strVillage = new Ext.data.SimpleStore({
	fields: ['village'],
	data : [['Baratie'], ['Drum Island'],
		['Soge Island'],['Swordmen Land']]
});
</pre>
<p><strong>4. Create the checkboxselectionmodel</strong><br />
This component have to be created and included in grid config options named <em>sm</em>, the <em>selModel, </em>this is to make the entire single row selectable</p>
<pre class="brush: jscript; title: ; notranslate">
var cb_select = new Ext.grid.CheckboxSelectionModel();
</pre>
<p><strong>5. Create the main grid component</strong><br />
If you want the grid to be manually selectable by the user you need to add <em>cb_select </em>in the grid column header</p>
<pre class="brush: jscript; title: ; notranslate">
var grid_mbti = new Ext.grid.EditorGridPanel({
	store: store_mbti,  frame: true, border: true, autoHeight: true,
	resizable: true, loadMask: true, stripeRows: true,
	title:'Grid Select All', sm: cb_select,
	columns: [
		// cb_select, // uncomment, if using checkboxselectionmodel
		{ header: &quot;Username&quot;, dataIndex: 'username', },
		{ header: &quot;Full Name&quot;, dataIndex: 'full_name', width: 150 },
		{ header: &quot;Email&quot;, dataIndex: 'email', width: 150 },
		{ header: &quot;Village&quot;, dataIndex: 'village', width: 120,
			editor: new Ext.form.ComboBox({
				allowBlank: false,
				mode: 'local',
				store: strVillage,
				valueField: 'village',
				displayField: 'village',
				triggerAction: 'all',
				editable: false
			})
		}],
	tbar: [{
		text: 'Submit',
		handler: function() {
			// the implementation is in the next step
		}
	}]
});
</pre>
<p><strong>6. Load the store and render the grid</strong></p>
<pre class="brush: jscript; title: ; notranslate">
store_mbti.loadData(myData);
grid_mbti.render('grid-example1');
</pre>
<p>The alternative way from using render grid is, to add config option on grid named <em>renderTo</em> and fill it with html id that you desire</p>
<p><strong>7. Function handling on the toolbar, using ajax or not it&#8217;is up to you</strong><br />
Creating function handler should be in handler config in toolbar button, when I try my self it got some error on firebug</p>
<pre class="brush: jscript; title: ; notranslate">
// this implementation is inside button handler on step 5
handler: function() {
	grid_mbti.getSelectionModel().selectAll();
	var sm = grid_mbti.getSelectionModel().getSelections();
	var temp = '';
	for (i=0; i&lt;=sm.length-1; i++) {
		temp = temp + '|' + sm[i].get('village')
	}
	Ext.Ajax.request({
		url: 'process_data.php',
		method: 'POST',
		params: 'village=' + temp,
		success: function(obj) {
			var resp = obj.responseText;
			if (resp != 0) {
				Ext.MessageBox.alert('Success', resp + ' Processed');
			} else {
				Ext.MessageBox.alert('Failed', 'No Processed');
			}
		}
	});
}
</pre>
<p><strong>8. Handling the server side process</strong><br />
Like the previous step, the php file I called is <em>process_data.php, </em>the php script convert the variable received to an array, and then you can loop through the array</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

$arr_village = explode('|', $_POST['village']);
$count = count($arr_village) - 1;
if ($count != 0) {
    foreach ($arr_village as $value) {
        // data process in here, manipulate db or whatever
    }
    echo $count;
} else {
    echo 0;
}

?&gt;
</pre>
<p>The result screen should be like this, first before submit with the last one column editable</p>
<p style="text-align: center;"><img class="size-full wp-image-529 aligncenter" src="http://superdit.com/wp-content/uploads/2010/05/gridEditor_extjs.jpg" alt="" width="507" height="197" /></p>
<p>And after click the submit button on the top left of the grid toolbar, all the row in the grid should be selected</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-531" title="gridEditor_extjs2" src="http://superdit.com/wp-content/uploads/2010/05/gridEditor_extjs2.jpg" alt="" width="499" height="187" /></p>
<p>Yup that&#8217;s all, you can download all the code from the link below but once again i&#8217;m not included the <a title="extjs" href="http://extjs.com" target="_blank">EXTJS</a> file, you just can download it by your self on the official site. In the downloaded code I provide 2 grid with different use of selection model so you can clearly see the different, and I welcome for any suggestion from you thanks.</p>
<p><a title="Download Source" href="http://www.box.net/shared/ay7j8mlher" target="_blank">DOWNLOAD SOURCE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2010/05/14/extjs-getting-each-row-value-from-the-grid/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Big List of PHP Framework</title>
		<link>http://superdit.com/2009/07/22/big-list-of-php-framework/</link>
		<comments>http://superdit.com/2009/07/22/big-list-of-php-framework/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 04:00:48 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=3</guid>
		<description><![CDATA[A PHP framework can help you to develop web application faster, and it used by many company around the world. Here a list of php framework that avaliable and downloadable, I copy the sort explanation about the framework, you can go to the official site to learn more, so here it goes : 1. CodeIgniter<a href="http://superdit.com/2009/07/22/big-list-of-php-framework/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>A PHP framework can help you to develop web application faster, and it used by many company around the world. Here a list of php framework that avaliable and downloadable, I copy the sort explanation about the framework, you can go to the official site to learn more, so here it goes :</p>
<p><strong>1. CodeIgniter</strong><br />
<img class="alignleft size-thumbnail wp-image-15" title="codeigniter" src="http://superdit.com/wp-content/uploads/2009/07/codeigniter-150x150.jpg" alt="codeigniter" width="59" height="59" />CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks.<br />
more on &#8230;<a href="http://www.2shared.com/file/tfFyBlS2/codeigniter_archive.html" target="_blank"> codeigniter archive </a></p>
<p><strong>2. CakePHP</strong><br />
<img class="size-thumbnail wp-image-11 alignright" title="cakephp" src="http://superdit.com/wp-content/uploads/2009/07/cakephp-150x150.png" alt="cakephp" width="90" height="90" />CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.<br />
more on &#8230; <a href="http://www.2shared.com/file/Uv0yVqSl/cakephp_archive.html" target="_blank">cakephp archive</a></p>
<p><strong>3. Zend Framework</strong><br />
<img class="size-thumbnail wp-image-17 alignright" title="zend_framework" src="http://superdit.com/wp-content/uploads/2009/07/zend_framework-150x150.jpg" alt="zend_framework" width="43" height="43" />Extending the art &amp; spirit of PHP, Zend Framework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase.<br />
more on &#8230; <a href="http://framework.zend.com" target="_blank">http://framework.zend.com</a></p>
<p><strong>4. Symfony</strong><br />
<img class="size-full wp-image-21 alignleft" title="symfony" src="http://superdit.com/wp-content/uploads/2009/07/symfony.gif" alt="symfony" width="269" height="73" />Symfony is a full-stack framework, a library of cohesive classes written in PHP. It provides an architecture, components and tools for developers to build complex web applications faster. Choosing symfony allows you to release your applications earlier, host and scale them without problem, and maintain them over time with no surprise.<br />
more on &#8230;<a href="http://www.symfony-project.org" target="_blank"> http://www.symfony-project.org</a><span id="more-3"></span></p>
<p><strong>5. Yii Framework</strong><br />
<img class="alignleft size-full wp-image-23" title="yii logo" src="http://superdit.com/wp-content/uploads/2009/07/yii-logo.jpg" alt="yii logo" width="56" height="55" />Yes, it is Yii — a high-performance component-based PHP framework best for developing large-scale Web applications. Yii comes with a full stack of features, including MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access control, scaffolding, input validation, widgets, events, theming, Web services, and so on. Written in strict OOP, Yii is easy to use and is extremely flexible and extensible.<br />
more on &#8230; <a href="http://www.yiiframework.com" target="_blank">http://www.yiiframework.com</a></p>
<p><strong>6. Prado</strong><br />
PRADO™ is a component-based and event-driven programming framework for developing Web applications in PHP 5. PRADO stands for PHP Rapid Application Development Object-oriented.<br />
more on &#8230; <a href="http://pradosoft.com" target="_blank">http://pradosoft.com</a></p>
<p><strong>7. Kohana</strong><br />
Kohana is a PHP 5 framework that uses the Model View Controller architectural pattern. It aims to be secure, lightweight, and easy to use.<br />
more on &#8230; <a href="http://kohanaframework.org/" target="_blank">http://kohanaframework.org/</a></p>
<p><strong>8. Akelos</strong><br />
The Akelos PHP Framework is a web application development platform based on the MVC (Model View Controller) design pattern.<br />
more on &#8230; <a href="http://akelos.org" target="_blank">http://akelos.org</a></p>
<p><strong>9. Phocoa</strong><br />
PHOCOA is an object-oriented, event-driven, componentized, MVC (model-view-controller) web framework inspired by Apple’s Cocoa and WebObjects technologies.<br />
more on &#8230; <a href="http://phocoa.com" target="_blank">http://phocoa.com</a></p>
<p><strong>10. Recess</strong><br />
<img class="alignleft size-full wp-image-25" title="recess" src="http://superdit.com/wp-content/uploads/2009/07/recess.gif" alt="recess" width="139" height="30" />You should enjoy PHP development. That&#8217;s why Recess exists. Recess is a serious PHP framework designed to give you a delightful development experience.<br />
more on &#8230; <a href="http://www.recessframework.org" target="_blank">http://www.recessframework.org</a></p>
<p><strong>11. Seagull</strong><br />
Seagull is a mature OOP framework for building web, command line and GUI applications.<img class="alignleft size-full wp-image-26" title="seagull" src="http://superdit.com/wp-content/uploads/2009/07/seagull.png" alt="seagull" width="115" height="35" /> Licensed under BSD, the project allows PHP developers to easily integrate and manage code resources, and build complex applications quickly.<br />
more on &#8230; <a href="http://seagullproject.org" target="_blank">http://seagullproject.org</a></p>
<p><strong>12. evoCore</strong><br />
evoCore is the framework at the heart of the b2evolution blogging application. It is freely available for anyone to use. It is dual licensed so you can choose to use it either under the GNU GPL or the Mozilla MPL license. (b2evo for example is using it under the GPL).<br />
more on &#8230; <a href="http://evocore.net" target="_blank">http://evocore.net</a></p>
<p><strong>13. Qcodo</strong><br />
The Qcodo Development Framework is an open-source PHP 5 framework that focuses on freeing developers from unnecessary tedious, mundane coding. The result is that developers can do what they do best: focus on implementing functionality and usability, improving performance and ensuring security.<br />
more on &#8230; <a href="http://qcodo.com" target="_blank">http://qcodo.com</a></p>
<p><strong>14. Agavi</strong><br />
<img class="size-full wp-image-8 alignleft" title="agavi" src="http://superdit.com/wp-content/uploads/2009/07/agavi.png" alt="agavi" width="137" height="56" />Agavi is a powerful, scalable PHP5 application framework that follows the MVC paradigm. It enables developers to write clean, maintainable and extensible code. Agavi puts choice and freedom over limiting conventions, and focuses on sustained quality rather than short-sighted decisions.<br />
more on &#8230; <a href="http://www.agavi.org" target="_blank">http://www.agavi.org</a></p>
<p><strong>15. FUSE</strong><br />
FUSE is a Model View Controller framework for PHP. Taking influence from other web frameworks such as Ruby on Rails and CakePHP, then adding in custom, intuitive features of our own design, FUSE has developed into a robust, stable platform for MVC development using object oriented PHP.<br />
more on &#8230; <a href="http://www.phpfuse.net" target="_blank">http://www.phpfuse.net</a></p>
<p><strong>16. Horde</strong><br />
<img class="alignleft size-thumbnail wp-image-30" title="horde" src="http://superdit.com/wp-content/uploads/2009/07/horde-150x150.png" alt="horde" width="54" height="54" />The Horde Framework provides backend-independent interfaces for dealing with preferences, logfiles, MIME, hierarchical data, authentication, data formats, encryption, forms, session handling, file storage, remote procedure calls &#8211; and more is on the way.<br />
more on &#8230; <a href="http://www.horde.org" target="_blank">http://www.horde.org</a></p>
<p><strong>17. Zoop</strong><br />
<img class="alignleft size-full wp-image-31" title="zoop" src="http://superdit.com/wp-content/uploads/2009/07/zoop.png" alt="zoop" width="42" height="42" />Far from being Yet Another PHP Framework or Rails clone, Zoop has been in development since 2001 and in use for the last 6 years in a number of different production environments. While it predates the recent proliferation of PHP frameworks, it&#8217;s based on solid MVC principles, including separation of display, logic, and data layers. It&#8217;s designed to be efficient, modular, and extensible, striking a balance between lightweight and fully-featured.<br />
more on &#8230; <a href="http://zoopframework.com" target="_blank">http://zoopframework.com</a></p>
<p><strong>18. PHPWork</strong><br />
phpWork is an event-driven(EDP), component-based framework similar as architecture to ASP.NET. It is part of &#8220;The work family&#8221; including javawork.org, phpwork.org and flashwork.org. It helps you build php-based websites in a very fast, reliable, safe and well-organized way.<br />
more on &#8230; <a href="http://phpwork.org" target="_blank">http://phpwork.org</a></p>
<p><strong>19. Lisa PHP Framework</strong><br />
<img class="alignleft size-full wp-image-32" title="Lisa" src="http://superdit.com/wp-content/uploads/2009/07/Lisa.jpg" alt="Lisa" width="33" height="33" />LISA is an object oriented web application framework based on PHP 5.2 and Smarty template engine. LISA is follows the model view controller architecture.<br />
more on &#8230; <a href="http://code.google.com/p/lisaframework" target="_blank">http://code.google.com/p/lisaframework</a></p>
<p><strong>20. Orinoco</strong><br />
<img class="alignleft size-full wp-image-37" title="oricono" src="http://superdit.com/wp-content/uploads/2009/07/oricono.png" alt="oricono" width="42" height="48" />orinoco framework is a light full-stack web framework written in PHP5. It is based on MVC architecture and implements the Model 2 design pattern. Its infrastructure helps developers create a clean and maintainable applications.<br />
more on &#8230; <a href="http://code.google.com/p/orinoco-framework" target="_blank">http://code.google.com/p/orinoco-framework</a></p>
<p><strong>21. DIY</strong><br />
It is an open-source lightweight web application framework based on object-oriented PHP 5, MySQL, and XSLT. It is fully object-oriented and designed following the MVC architecture and REST design principles. The idea behind it is not to reinvent the wheel but instead to combine existing and proven technologies in a convenient and effective way.<br />
more on &#8230; <a href="http://www.xml.lt/Resources/Framework" target="_blank">http://www.xml.lt/Resources/Framework</a></p>
<p><strong>22. ash.MVC</strong><br />
ash.MVC is a simple PHP programming framework proposed by Ash. The basic approach of this framework is to adopt a middle-path approach between faster development cycle, and a robust and scalable application. Moreover, the schemes proposed in the framework stick to the line of simplicity all along.<br />
more on &#8230; <a href="http://ash-mvc.org" target="_blank">http://ash-mvc.org</a></p>
<p><strong>23. SolarPHP</strong><br />
Solar is a PHP 5 framework for web application development. It is fully name-spaced and uses enterprise application design patterns, with built-in support for localization and configuration at all levels.<br />
more on &#8230; <a href="http://solarphp.com" target="_blank">http://solarphp.com</a></p>
<p><strong>24. PHPOpenBiz</strong><br />
Want to build a data centric business application without dirty code &#8211; PhpOpenbiz (Openbiz) is the solution! OpenBiz is a PHP application framework for professional IT developers and consultants to build web-based enterprise applications.<br />
more on &#8230; <a href="http://www.phpopenbiz.org/jim" target="_blank">http://www.phpopenbiz.org/jim</a></p>
<p><strong>25. PHPonTRAX</strong><br />
<img class="alignleft size-full wp-image-48" title="phpontrax" src="http://superdit.com/wp-content/uploads/2009/07/phpontrax.png" alt="phpontrax" width="47" height="49" />Want to become a better PHP programmer, cut your development time in more than half, create ultra clean, and easy to maintain, enterprise quality applications, complete with highly reusable code/components? or perhaps you just want to enjoy creating software, instead of tedious, repetitive, boring SQL statements.<br />
more on &#8230; <a href="http://www.phpontrax.com" target="_blank">http://www.phpontrax.com</a></p>
<p><strong>26. PHPDevShell</strong><br />
<img class="alignleft size-full wp-image-47" title="phpdevshellpng" src="http://superdit.com/wp-content/uploads/2009/07/phpdevshellpng.png" alt="phpdevshellpng" width="91" height="56" />Tired of complex and heavy PHP based frameworks? Need a web based application to be up and running ASAP? Are you perhaps a sole developer or small team that needs a head start with your new project? If yes, then PHPDevShell is your answer. PHPDevShell as the name suggests provides a “shell” for your code to run in. It was developed from the ground up to be fast, secure and to provide immediate results for the developer using it.<br />
more on &#8230; <a href="http://www.phpdevshell.org" target="_blank">http://www.phpdevshell.org</a></p>
<p><strong>27. Madeam</strong><br />
Madeam is a PHP framework for small agile teams and freelancers.<br />
more on &#8230; <a href="http://madeam.com" target="_blank">http://madeam.com</a></p>
<p><strong>28. Limb3</strong><br />
Limb is an OpenSource(LGPL) Library of Interdependent Modules and Blocks mostly aimed for rapid web application prototyping and development with PHP5.<br />
more on &#8230; <a href="http://limb-project.com" target="_blank">http://limb-project.com</a></p>
<p><strong>29. PHPCliFramework</strong><br />
more on &#8230; <a href="http://cliframework.com" target="_blank">http://cliframework.com</a></p>
<p><strong>30. WASP</strong><br />
more on &#8230; <a href="http://wasp.sourceforge.net/content" target="_blank">http://wasp.sourceforge.net/content</a></p>
<p><strong>31. PHP for Applications</strong><br />
more on &#8230; <a href="http://p4a.crealabsfoundation.org" target="_blank">http://p4a.crealabsfoundation.org</a></p>
<p><strong>32. Lion PHP Framework</strong><br />
Lion is an emerging open source PHP framework for creating rich web applications as a combination of the most valuable features and patterns taken from the development community.<br />
more on &#8230; <a href="http://www.lionframework.org" target="_blank">http://www.lionframework.org</a></p>
<p><strong>33. Flow3</strong><br />
<img class="alignleft size-full wp-image-39" title="flow3" src="http://superdit.com/wp-content/uploads/2009/07/flow3.gif" alt="flow3" width="109" height="40" />FLOW3 brings new concepts to the PHP world. Domain-Driven Design, Dependency Injection and Aspect-Oriented Programming are some of them. And besides some great features we offer a new view on the &#8220;how&#8221; of software development.<br />
more on &#8230; <a href="http://flow3.typo3.org" target="_blank">http://flow3.typo3.org</a></p>
<p><strong>34. Adventure PHP Framework</strong><br />
more on &#8230; <a href="http://adventure-php-framework.org" target="_blank">http://adventure-php-framework.org</a></p>
<p><strong>35. Amhulio</strong><br />
Amhulio is a PHP 5 and MySQL web framework. With the idea of widgets, the design pattern of MVC, and the technology of AJAX, we have created a structural, and extensible architecture for rapid development of interactive and complex web application.<br />
more on &#8230; <a href="http://www.amhulio.com" target="_blank">http://www.amhulio.com</a></p>
<p><strong>36. ATK Framework</strong><br />
<img class="alignleft size-full wp-image-40" title="atk" src="http://superdit.com/wp-content/uploads/2009/07/atk.jpg" alt="atk" width="76" height="56" />ATK is a special purpose framework, targeted at business applications. It allows you to build an application with very small amounts of code.Its focus on business features makes it an excellent framework for HRM, CRM, data management and CMS type applications.<br />
more on &#8230; <a href="http://www.atk-framework.com" target="_blank">http://www.atk-framework.com</a></p>
<p><strong>37. Ambivalence</strong><br />
Ambivalence is a Model-View-Controller framework for PHP web development. Based on the Java-based Maverick project, Ambivalence also offers clean MVC separation and an XML sitemap. Ambivalence provides an optional service to authenticate and enforce access controls upon users, based on the JBoss implementation of the J2EE Java Authorization and Authentication Service (JAAS).<br />
more on &#8230; <a href="http://amb.sourceforge.net" target="_blank">http://amb.sourceforge.net</a></p>
<p><strong>38. Nette Framework</strong><br />
Nette Framework is a powerful, component-based and event-driven framework for <img class="alignright size-full wp-image-34" title="nette" src="http://superdit.com/wp-content/uploads/2009/07/nette.png" alt="nette" width="86" height="46" />creating web applications and services in PHP 5. Nette Framework is designed with simplicity in mind.<br />
more on &#8230; <a href="http://nettephp.com/en" target="_blank">http://nettephp.com/en</a></p>
<p><strong>39. Andromeda</strong><br />
Andromeda is a programmer productivity tool, our only measure of success is how much we can reduce labor and increase quality. We want to help you to get it done, get it right.<br />
more on &#8230; <a href="http://www.andromeda-project.org" target="_blank">http://www.andromeda-project.org</a></p>
<p><strong>40. CoughPHP</strong><br />
Cough is an extremely lightweight PHP ORM framework for dealing with objects that have single table counterparts in a database. Cough is built to be easy to learn, use, and extend.<br />
more on &#8230; <a href="http://www.coughphp.com" target="_blank">http://www.coughphp.com</a></p>
<p><strong>41. InterJinn</strong><br />
<img class="alignleft size-full wp-image-41" title="interJinn" src="http://superdit.com/wp-content/uploads/2009/07/interJinn.jpg" alt="interJinn" width="22" height="34" />InterJinn™ is an open-source multi-tier framework for web and shell applications using the PHP scripting engine.<br />
more on &#8230; <a href="http://www.interjinn.com" target="_blank">http://www.interjinn.com</a></p>
<p><strong>42. Jelix</strong><br />
Jelix is an open-source PHP5 framework which help you to develop any k<img class="alignright size-full wp-image-42" title="jelix" src="http://superdit.com/wp-content/uploads/2009/07/jelix.png" alt="jelix" width="65" height="22" />ind of web applications.<br />
more on &#8230; <a href="http://jelix.org" target="_blank">http://jelix.org</a></p>
<p><strong>43. KissMVC</strong><br />
KISSMVC is a simple and minimalist PHP Model-View-Controller (MVC) framework for rapid development of web applications.<br />
It is designed with the KISS principle in mind, and the entire source code can be read and understood in minutes.<br />
more on &#8230; <a href="http://kissmvc.com" target="_blank">http://kissmvc.com</a></p>
<p><strong>44. Kolibri</strong><br />
Kolibri is a lightweight, flexible web application framework written in PHP 5. Kolibri&#8217;s focus is on providing you with the tools to customize the framework to your liking &#8212; from its custom URI mapper and plug-in-based core architecture, to the view technology of your choice. Kolibri flies either way.<br />
more on &#8230; <a href="https://launchpad.net/kolibri" target="_blank">https://launchpad.net/kolibri</a></p>
<p><strong>45. phpPeanuts</strong><br />
more on &#8230; http://www.phppeanuts.org</p>
<p><strong>46. PHPulse</strong><br />
PHPulse is the FASTEST PHP based MVC framework in the world! It is built to be <img class="alignleft size-full wp-image-45" title="phpulse" src="http://superdit.com/wp-content/uploads/2009/07/phpulse.jpg" alt="phpulse" width="174" height="61" />EXTREMELY lightweight and fast with a modular development environment allowing for quick plug-n-play functionality to be added merely by dropping in extra modules.<br />
more on &#8230; <a href="http://www.phpulse.com" target="_blank">http://www.phpulse.com</a></p>
<p><strong>47. Pluf</strong><br />
<img class="alignleft size-full wp-image-43" title="pluf" src="http://superdit.com/wp-content/uploads/2009/07/pluf.png" alt="pluf" width="64" height="22" />Simple, elegant and easy for people used to Django but in PHP5 so easy to deploy all over the world.<br />
more on &#8230; <a href="http://pluf.org" target="_blank">http://pluf.org</a></p>
<p><strong>48. QCubed</strong><br />
<img class="alignleft size-full wp-image-44" title="qcube" src="http://superdit.com/wp-content/uploads/2009/07/qcube.jpg" alt="qcube" width="130" height="53" />QCubed (pronounced &#8216;Q&#8217; &#8211; cubed) is a PHP5 Model-View-Controller framework. The goal of the framework is to save the time for developers around mundane, repeatable tasks &#8211; allowing them to concentrate on things that are useful AND fun.<br />
more on &#8230; <a href="http://qcu.be" target="_blank">http://qcu.be</a></p>
<p><strong>49. Swat</strong><br />
more on &#8230; <a href="https://code.silverorange.com/wiki/Swat" target="_blank">https://code.silverorange.com/wiki/Swat</a></p>
<p><strong>50. LightVC</strong><br />
LightVC is a lightweight model-view-controller (MVC) framework without the model. This decoupling allows any model or object relation mapping (ORM) tool to be used, including none at all if one is not needed.<br />
more on &#8230; <a href="http://www.lightvc.org" target="_blank">http://www.lightvc.org</a></p>
<p><strong>51. Tangra Framework</strong><br />
<img class="alignleft size-full wp-image-36" title="tangra" src="http://superdit.com/wp-content/uploads/2009/07/tangra.png" alt="tangra" width="108" height="46" />Tangra is a LGPL licensed open source framework for development of PHP5 applications. Its main target is to boost the productivity of the developers. It consist code library, modules and control center.<br />
more on &#8230; <a href="http://www.tangraframework.net" target="_blank">http://www.tangraframework.net</a></p>
<p><strong>52. TinyMVC</strong><br />
TinyMVC is an Model-View-Controller application framework for PHP. It provides clear separation between the database operations (Model), the presentation (View), and the glue in between (Controller).<br />
more on &#8230; <a href="http://www.tinymvc.com" target="_blank">http://www.tinymvc.com</a></p>
<p><strong>53. Flourish</strong><br />
Flourish is The PHP Unframework, an object-oriented PHP library designed to reduce <img class="alignright size-full wp-image-35" title="flourish" src="http://superdit.com/wp-content/uploads/2009/07/flourish.gif" alt="flourish" width="143" height="49" />code and improve security. It’s not an MVC framework and it doesn’t try to solve every problem. Instead, it focuses on being small, portable, well documented and easy to use.<br />
more on &#8230; <a href="http://flourishlib.com" target="_blank">http://flourishlib.com</a></p>
<p><strong>54. Stubbles</strong><br />
<img class="alignleft size-full wp-image-28" title="stubbles" src="http://superdit.com/wp-content/uploads/2009/07/stubbles.png" alt="stubbles" width="106" height="90" />Stubbles is a PHP 5 framework, that combines your favorite features from other programming languages and frameworks. When using Stubbles, it does not force you to use all of its packages, instead you just use the packages you like and combine it with PEAR, the Zend Framework or any other PHP-based framework.<br />
more on &#8230; <a href="http://www.stubbles.net" target="_blank">http://www.stubbles.net</a></p>
<p><strong>55. Atomik Framework</strong><br />
Atomik is a free, open-source, micro framework for PHP5. Atomik is built for small web applications that do not need heavy frameworks but still want powerful features. It is build with the KISS principle in mind as well as speed and security. Atomik is also an ideal introduction for beginners to the world of web development frameworks.<br />
more on &#8230; <a href="http://www.atomikframework.com" target="_blank">http://www.atomikframework.com</a></p>
<p><strong>56. Simplicity</strong><br />
Simplicity is a lightweight modular Web development framework. It is designed with a tight core providing and innovative module chain architecture. All framework functionality is provided by modules which can be loaded in module chains and a simple routing interface allows you to direct requests to the appropriate module chain.<br />
more on &#8230; <a href="http://www.simplicityphp.com/" target="_blank">http://www.simplicityphp.com</a></p>
<p><strong>57. DOOPHP</strong><br />
<img class="alignleft size-full wp-image-79" title="doo" src="http://superdit.com/wp-content/uploads/2009/07/doo.png" alt="doo" width="215" height="54" />Doo framework is one of the fastest, if not the fastest PHP framework available. It enables developers at all levels to rapidly develop robust web 2.0 applications. MVC based, URI routing, Extremely simple, RESTful API, Templating, ORM tool, Clean IP, OOP, Flexible license.<br />
more on &#8230; <a href="http://doophp.com" target="_blank">http://doophp.com</a></p>
<p><strong>58. DragonPHP</strong><br />
DragonPHP is an open source PHP 5 web application framework that is based on the MVC 2(Model View Controller &#8211; Model 2) architecture. Key Features: Request Dispatcher, Session Management, Page Controller, Page Flow Routing, Security, Common Logger, Validator, Dynamic Templating, Modules, Database Access.<br />
more on &#8230; <a href="http://www.dragonphp.com" target="_blank">http://www.dragonphp.com</a></p>
<p><strong>59. tk_self</strong><br />
more on &#8230; <a href="http://tkself.org" target="_blank">http://tkself.org</a></p>
<p><strong>60. SpotLight</strong><br />
SpotLight  is a web application development framework based on  Model-View-Controller  architecture. Considering influence from framework such as  Struts  for  Java ,  SpotLight has incorporated the best aspects of such systems of development and became stable  MVC  platform with object-oriented  PHP  usage. SpotLight gives a powerful kernel for development MVC based applications with Ajax support.<br />
more on &#8230; <a href="http://spotlight.cv.ua" target="_blank">http://spotlight.cv.ua</a></p>
<p><strong>61. WEB2BB</strong><br />
WEB2BB is an ultra light, ultra fast, and freely available MVC written in PHP. It does not try to be all things to all people, nor does it even care what other frameworks do. It just provides a simple and easy to use framework for PHP projects.<br />
more on &#8230; <a href="http://web2bb.com" target="_blank">http://web2bb.com</a></p>
<p><strong>62. SENCHA</strong><br />
SENCHA is an open-source PHP MVC framework. The framework is none-restrictive, scalable, allows for rapid-development &amp; lets you spend more time building the application and not worrying about building solid foundations. Sencha 2.0 is currently under development! Here you will find documentation, news &amp; tutorials.<br />
more on &#8230; <a href="http://www.sencha-project.org" target="_blank">http://www.sencha-project.org</a></p>
<p><strong>63. Bedrock Framework</strong><br />
<img class="alignleft size-full wp-image-110" title="bedrockframework" src="http://superdit.com/wp-content/uploads/2009/07/bedrockframework.png" alt="bedrockframework" width="69" height="69" />Bedrock Framework is a web framework designed around bridging popular APIs<br />
and technologies with PHP. While it has an MVC core with all the functionality expected from a web framework, its primary goal is to simplify the use of other technologies with PHP.<br />
more on &#8230; <a href="http://www.bedrockframework.com" target="_blank">http://www.bedrockframework.com</a></p>
<p><strong>64. VLC for PHP</strong><br />
VCL for PHP is PHP framework to develop web applications, it&#8217;s OpenSource and it&#8217;s licensed using LGPL. The framework has been designed to be integrated into an IDE, called Delphi for PHP, which allows you to develop PHP web applications visually with all the benefits of a RAD Integrated Development Environment<br />
more on &#8230; <a href="http://www.qadram.com/vcl4php/index.php" target="_blank">http://www.qadram.com/vcl4php/index.php</a></p>
<p><strong>65. Maverick PHP</strong><br />
Maveric is an extremely simple, lightweight, and flexible <span>MVC</span> <span>framework</span> written in <span>PHP</span>. Check out <a href="http://svn.jamessocol.com/maveric/wiki/StoryOfMaveric">StoryOfMaveric</a> to see what inspired yet another MVC framework.<br />
more on &#8230; <a href="http://svn.jamessocol.com/maveric" target="_blank">http://svn.jamessocol.com/maveric</a></p>
<p><strong>67. phpHtmlLib</strong><br />
phpHtmlLib is now an application development framework for developing OOP style web applications in PHP.                     The application framework supports an MVC style architecture, Ajaxable and                      Cacheable interfaces for developing rich client web applications.                     It still contains the set of PHP classes and library functions to help                      facilitate building, debugging, and rendering of XML, HTML, XHTML,                      WAP/WML Documents, and SVG (Scalable Vector Graphics) images as well                      as complex html                      <a href="http://phphtmllib.newsblob.com/?target=-ws">Widgets</a><br />
more on &#8230; h<a href="http://phphtmllib.newsblob.com" target="_blank">ttp://phphtmllib.newsblob.com</a></p>
<p><strong>68. BaseBones</strong><br />
more on &#8230; <a href="http://code.google.com/p/barebonesmvc-php" target="_blank">http://code.google.com/p/barebonesmvc-php</a></p>
<p><strong>69. micMVC</strong><br />
<img class="alignleft size-full wp-image-108" title="micmvc" src="http://superdit.com/wp-content/uploads/2009/07/micmvc.png" alt="micmvc" width="251" height="141" />micMVC is a light-weight application framework for PHP5 that uses the MVC architecture. It attempts to be more lightweight and easy to use than TinyMVC or LightMVC but also includes support for basic testing. micMVC does not require an application framework to be installed on the host computer as an application written using micMVC packages all the necessary framework code with the application. On a personal note I am not a huge fan of PHP but have been forced to use it quite often for various projects as most basic hosting packages offer PHP. I wrote this framework to make life a little less painful for me when having to write PHP code.<br />
more on &#8230; <a href="http://riftor.g615.co.uk/index.php?action=view&amp;id=22" target="_blank">http://riftor.g615.co.uk/index.php?action=view&amp;id=22</a></p>
<p><strong>70. Odin Assemble</strong><br />
Odin Assemble is a small footprint PHP framework designed to help you create and maintain dynamic websites without a content management system.<br />
more on &#8230; <a href="http://www.odinassemble.com" target="_blank">http://www.odinassemble.com</a></p>
<p><strong>71. Castle-PHP</strong><br />
more on &#8230; <a href="http://code.google.com/p/castle-php/" target="_blank">http://code.google.com/p/castle-php/</a></p>
<p><strong>72. MiMVic</strong><br />
MiMViC that embraces the PHP 5.3 and takes a step into future by utilizing the namespaces, lambda functions and minimality. MiMViC is supposed to be super-light weight and programmer friendly framework, thus giving programmer only the most essential tools for programming. Practically speaking MiMViC follows the &#8220;KISS  Rule&#8221; for real!<br />
more on &#8230; <a href="http://code.google.com/p/mimvic/" target="_blank">http://code.google.com/p/mimvic/</a></p>
<p><strong>73. CIEXtended</strong></p>
<p>CIEX stands for CIEXtended and is based on the popular PHP framework:  <a href="http://codeigniter.com/" target="_new">CodeIgniter</a>.<br />
As CIEX is based on CodeIgniter, it also has an extremely small  footprint, in fact probably smaller than CodeIgniter as CIEX has been  optimized thoroughly. You should also find that CIEX is easier to use,  and more convenient. Some of the missed features in CodeIgniter has been  implemented/changed in CIEX, which will make your job (as web  developers) more efficient and with ease.<br />
more on &#8230; <a href="http://ciex.levallois.biz/" target="_blank">http://ciex.levallois.biz/</a></p>
<p><strong>74. </strong><strong>FAT-FREE</strong><br />
The philosophy behind the framework and its approach to the  Model-View-Controller design pattern is towards minimalism in structural  components, avoiding application complexity and striking a balance  between code elegance, application performance and programmer  productivity.<br />
more on &#8230; <a href="http://fatfree.sourceforge.net/" target="_blank">http://fatfree.sourceforge.net/</a></p>
<p><strong>75. Noloh</strong><br />
<img class="alignleft size-full wp-image-456" title="nolohLogoSmall" src="http://superdit.com/wp-content/uploads/2009/07/nolohLogoSmall.png" alt="" width="131" height="56" />NOLOH is a lightweight, on-demand, object oriented  Web application development platform. It is ideal for developing feature-rich web sites and web applications faster and with fewer resources. NOLOH extends PHP 5.1+, eliminates the need for HTML and JavaScript, and builds in many advanced features such as codeless AJAX, automatic SEO and a full suite of UI controls.<br />
more on &#8230; <a href="http://www.noloh.com" target="_blank">http://www.noloh.com</a></p>
<p><strong>76. Vork Enterprise PHP Framework</strong><br />
Vork is an open-source PHP framework designed for rapid development of performance-oriented scalable applications. The mission of Vork is to provide an MVC architecture with a full-featured toolkit and universal database support without adding overhead, creating slow &amp; unscalable abstraction layers or re-inventing native PHP functionality.<br />
more on &#8230; <a href="http://www.vork.us/">http://www.vork.us/</a></p>
<p><strong>77. KumbiaPHP</strong><br />
Kumbia PHP Framework is a full-stack MVC framework written in PHP for developing database-backed web applications according to the Model-View-Control pattern and other patterns as ActiveRecord and TemplateView. Optimized for PHP programmer productivity.<br />
more on &#8230; <a href="http://sourceforge.net/projects/kumbia/">http://sourceforge.net/projects/kumbia/</a></p>
<p><strong>78. mgframework</strong><br />
Mangrove aims to be a highly robust product offering new and uniform approaches to existing problems in web application development. In order to use the Mangrove PHP framework at least PHP 5.3 with the <em>mbstring</em> and <em>intl</em> extensions is required. Furthermore, it is highly recommended to utilize a caching mechanism like XCache or APC. Mangrove has been tested and proven to work on both Linux and Windows setups running Apache httpd 2.0+, nginx and lighttpd with no additional php.ini settings.<br />
more on &#8230;<strong> <span style="font-weight: normal;"><a href="http://code.google.com/p/mgframework/" target="_blank">http://code.google.com/p/mgframework/</a></span></strong></p>
<p><strong>79. Lithium</strong><br />
<a href="http://superdit.com/wp-content/uploads/2009/07/php_lithium_logo.jpg"><img class="alignleft size-full wp-image-493" title="php_lithium_logo" src="http://superdit.com/wp-content/uploads/2009/07/php_lithium_logo.jpg" alt="" width="145" height="129" /></a>Lithium, the most RAD framework for PHP 5.3+ is focused on quality, speed, and flexibility. It&#8217;s a set of no-nonsense philosophies and tools that enable you to build better applications, in less time, without sacrificing quality or extensibility.<br />
Lithium understands distributed storage and caching, queuing systems, micro-dispatch frameworks, with integrated support for document oriented databases like CouchDB and MongoDB, alongside relational databases like MySQL and PostgreSQL.<br />
Lithium&#8217;s architecture allows you to get your application up and running quickly, and still allows you to take control of the framework to support the requirements of your application.<br />
more on &#8230; <a href="http://lithify.me/" target="_blank">http://lithify.me/</a></p>
<p style="text-align: left;"><em>added on May 23, 2010</em></p>
<p><strong>80. Yellow Duck Framework</strong><br />
The Yellow Duck Framework is an object oriented framework that will help you with creating web applications. It&#8217;s implemented using the popular PHP web scripting language.<br />
more on &#8230;<strong> </strong><a href="http://ydframework.berlios.de/" target="_blank">http://ydframework.berlios.de/</a></p>
<p><strong>81. LightMVC</strong><br />
more on &#8230; <a href="http://ldos.fe.uni-lj.si/eng/index.php?id=01_Members/15_Marko_Tkalcic/mvc/index.html" target="_blank">http://ldos.fe.uni-lj.si/eng/index.php?id=01_Members/15_Marko_Tkalcic/mvc/</a></p>
<p><strong>82. Ister</strong><br />
The Ister PHP4 Framework is a class library providing a consistent object oriented framework to build web applications. Features are custom logging, database abstraction, encapsulation of HTTP, classes to configure applications, form processing and more. Also included in the framework is an improved version of the templating system t24. The framework is aimed to support the implementation of the MVC pattern for PHP.<br />
more on &#8230; <a href="http://www.ister.org/code/ister/" target="_blank">http://www.ister.org/code/ister/</a></p>
<p><strong>83. Sourdough</strong></p>
<div id="_mcePaste"><span style="font-weight: normal;"><img class="alignleft size-full wp-image-618" title="sourdough_logo_small" src="http://superdit.com/wp-content/uploads/2009/07/sourdough_logo_small.gif" alt="" width="244" height="79" /></span></div>
<p>Sourdough is a comprehensive web application framework for PHP5. Sourdough provides developers with real-world solutions for common system components such as User Management, Session Handling, User Authentication, Exception Handling and Logging, Template System as well as Form Building and Handling. It does also include a database abstraction layer with excellent support for the popular MySQL database as well as support for many other database systems like MSSQL, PostgreSQL, and the new lightweight SQLite.Sourdough&#8217;s extensive feature set can also simplify or eliminate many common, and often tedious, programming tasks.<br />
more on &#8230; <a href="http://sourdough.phpee.com/" target="_blank">http://sourdough.phpee.com/</a></p>
<p><strong>84. MagicPHP</strong><br />
<img class="alignleft size-full wp-image-1308" title="magicphp" src="http://superdit.com/wp-content/uploads/2009/07/magicphp.gif" alt="" width="48" height="48" />MagicPHP is an MVC framework which allows you to build rich, highly sophisticated web applications without ever leaving the PHP code line, giving you more time to focus on what really matters: core functionality.<br />
more on &#8230; <a title="MagicPHP" href="http://sourceforge.net/projects/magicphp/" target="_blank">http://sourceforge.net/projects/magicphp/</a></p>
<p><strong>85. SimplePHP</strong><br />
SimplePHP is a small, light and versatile framework. It was created by Scott Nicol for use on his own sites, but has been refined and documented for public use. There is currently a documentation and download available, and is under constant development.<br />
more on &#8230; <a title="SimplePHP" href="http://weareinfinite.net/simple/" target="_blank">http://weareinfinite.net/simple/</a></p>
<p><strong>86. PSX Framework</strong><br />
psx is a framework for developing dynamic Web sites in PHP. It is completely object-oriented programmed and designed in a modular fashion. All classes in the psx library are independently usable because of dependency injection. It has a focus on social technologies and provides classes to use and implement OAuth, OpenID, OpenSocial, PubSubHubbub, Atom, and RSS. It has a strict separation between code logic and design. The template engine is based on pure PHP, which means speed and flexibility.<br />
more on &#8230; <a href="http://phpsx.org/" target="_blank">http://phpsx.org/</a></p>
<p><strong>87. Open Delight</strong><br />
Opendelight framework encompasses the multi-tier architecture of web, and enables entreprise-grade web application development really fast and easy.<br />
more on &#8230; <a href="http://www.adiipl.com/opendelight/" target="_blank">http://www.adiipl.com/opendelight/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2009/07/22/big-list-of-php-framework/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>

