970_90

Wednesday, 12 June 2013

Difference Between Cakephp and Zend Framework

S.No Cakephp Zend Framewok
1
It is just framework. It is Both framework and library.
2
In View Form helper, there is form elements, validation available. In View Form helper, there is form elements, validation, filters(like strip_tags), order of elements, sub form, and decoraters are available.
3
we can render form elements one by one We can render form in one line, one by one element, element OR  decorator OR error separetly.
4
Form configuration can not done by through configuation file Zend_form can be do configuration through zend_cofig or xml
5
When cake start, It load all library that's why Its not good for small project. Its library is too big as compare to cakephp. If you are  not using any component then it will not load by default.
6
It uses front controller design and singleton design pattern. It use front controller pattern, factory patter, strategy pattern, singleton pattern.
7
It is good for fast development. It is best, if you application are using webservices
8
ACL, Auth like comonents are easily availbele for cakephp. It has its own ACL, Auth components and upto deeper level.
9
When cake start, It load all library that's why Its not good for small project. Its library is too big as compare to cakephp. If you are  not using any component then it will not load by default.
10
It have session component It have Zend Session and Zend Registery components.
11
Its class name does not map with file location Its mapping,
If any class name is Zend_forms_abc
file location is Zend/Forms/abc.php
12
Mostly used for fast development. Mostly used for web services

1 comment:

  1. Print sql Query in zend framework

    //Before executing your sql query
    $dbObj = Zend_Db_Table_Abstract::getDefaultAdapter();
    $dbObj->getProfiler()->setEnabled(true);
    $profiler = $dbObj->getProfiler();


    //The code below must be after query execution
    $query = $profiler->getLastQueryProfile();
    $params = $query->getQueryParams();
    $querystr = $query->getQuery();

    foreach ($params as $par) {
    $querystr = preg_replace('/\\?/', "'" . $par . "'", $querystr, 1);
    }
    echo $querystr;

    ReplyDelete