Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > บทความจากสมาชิก > Agile Toolkit Framework (ATK4) สอน Agile Framework for php



 
Clound SSD Virtual Server

Agile Toolkit Framework (ATK4) สอน Agile Framework for php

Agile toolkit framework (ATK4)
Website : http://www.agiletoolkit.org
Agile toolkit พัฒนาโดยบิษัท Agile Technologies (http://www.agiletech.ie)

ส่วนมากแล้วไม่มีใครรู้จัก เพราะบริษัทต่างที่ใช้ Framework มักใช้ตัวเดียวไม่ค่อยเปลี่ยน คนใหม่เข้าเข้ามาก็เรียนรู้ตัวเดิมที่บริษัทใช้ ทำให้รู้จักกันแค่ไม่กี่ตัว แต่ความจริง PHP framework มีเยอะมาก ซึ่งความสามารถหลักแทบไม่ต่างกันเลย ที่ต่างคือ features ของ framework นั้นๆ ผมเองเคยใช้ framework บางตัวก็ยังใช้ไม่ได้นานเท่าไหร่ ก็เปลี่ยนมาลองตัวใหม่ จนมาเจอเจ้าตัวนี้ที่ถุกใจเลยนำมา เผยแพร่สู่พี่น้องชาว PHP programmer

Agile toolkit เป็น Open-source projects ที่ได้แนวความคิดมาจาก Desktop Toolkits (QT, Cocoa, .NET)
Agile toolkit เป็น Enterprise framework หรือเครื่องมือที่มีประสิทธิภาพสูง สำหรับการพัฒนา UI ด้วย jQuery
ซึ่งมีประสิธิภาพสูงด้วย UI ที่มีความต่องเนื่องกับฐานข้อมูลอย่างปลอดภัย
และมี addons พร้อมใช้งานมากมาย หรือจะสร้างขึ้นมาเองก็ได้
ทำให้การพัฒนาเว็บไซต์ได้เร็วขึ้น เขียนโค้ดน้อยลง และเป็นระเบียบ อีกทั้งยังยืดหยุ่นในการเขียน

ตัวอย่างการใช้งาน :
1. http://www.youtube.com/watch?v=dubXcwof3Yc



2. http://www.youtube.com/watch?v=cYcAcT0QWrE



ตัวอย่างโค้ด :

ตัวอย่าง Model
class Model_Users extends Model_Table{
    public $table = 'user';
    function init() {
        parent::init();
        $this->addField('display_name')->caption('Display name');
        $this->addField('email');//->type('email'); 
        $this->addField('password')->type('password')->mandatory('Enter the password.');
        $this->addField('birth_date')->type('date');
        $this->addField('created')->type('datetime')->defaultValue(date('Y-m-d H:i:s'));
        $this->addField('status')->enum(array('active','ban','disable'))->mandatory('Please select user status.')->defaultValue('active');
        $this->addField('is_admin')->type('boolean')->caption('Admin');
        $this->addField('is_editor')->type('boolean')->caption('Editor');
        $this->addField('is_blogger')->type('boolean')->caption('Blogger');
        $this->addField('is_member')->type('boolean')->defaultValue(1)->caption('Member');
        
        $this->addHook('beforeSave',function($m){
            $m['email'] = trim(strtolower($m['email']));
        });
    }
}


ตัวอย่าง การใช้งาน
class page_test extends Page {
    public function init() {
        parent::init();
        //--------- CRUD ---------
        $crud = $this->add('CRUD');
        $crud->setModel('Users');
        if ($crud->grid) {
            $crud->grid->getColumn('display_name')->makeSortable();
            $crud->grid->getColumn('email')->makeSortable();
            $crud->grid->getColumn('created')->makeSortable();
            $crud->grid->addQuickSearch(array('display_name', 'email'));
            $crud->grid->addPaginator(5);
        }
        //--------- Form ---------
        
        $this->add('HTML')->set('<h2>Test user form</h2>');
        $form = $this->add('Form');
        $form->setModel('Users');
        $form->addSubmit();
    }

}


ตัวอย่างผลลัพธ์ :
ATK4

$this->add('CRUD');

เป็นความามารถที่สร้างมาจาก Model ซึ่งสามารถ เพิ่ม แก้ไข ลบ ข้อมูลได้
รวมถึงความสัมพันธ์ของ Table
หรือ $this->add('GRID'); จะแสดงผลออกมาในรูปแบบ grid จะไม่สามารถ เพิ่ม แก้ไข ลบ ข้อมูลได้

ตั้วอย่าง :

$this->hasOne('User', 'user_id', 'display_name');

หรือ

$this->addField('blog_category_id')->refModel('Blog_Category')->mandatory(true); // อ้างอิงไปยังโมเดล Blog_Category


Agile Toolkit Tutorial Session 2



http://www.youtube.com/watch?v=IFf9TLdaF8E




http://www.youtube.com/watch?v=PJUS7TPzt_o

Credit :
Go to : แนะนำ Agile Toolkit Framework (ATK4) ซึ่งอาจทำให้ชีวิตง่ายขึ้น
Go to : มาแล้วจ้า Agile Toolkit Tutorial Session 2 (.....)
Go to : User Profile : t-monroe - T-MONROE







   
Share
Bookmark.   

  By : TC Admin
  Article : บทความเป็นการเขียนโดยสมาชิก หากมีปัญหาเรื่องลิขสิทธิ์ กรุณาแจ้งให้ทาง webmaster ทราบด้วยครับ
  Score Rating :
  Create Date : 2013-06-02
  Download : No files
Sponsored Links
ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่