2012-07-14, 10:27 AM
It sure is. The beta stage is usually the best time to start investigating how to build plugins and stuff so you can have releases ready for the first proper release.
(2012-07-17, 01:42 PM)Alex Smith Wrote: [ -> ]The problem is there will constantly be new great frameworks coming out. And, well if they don't stick to their guns development will never start/finish.
(2012-07-17, 02:02 PM)Fábio Maia Wrote: [ -> ]Yeah. Unfortunately.(2012-07-17, 01:42 PM)Alex Smith Wrote: [ -> ]The problem is there will constantly be new great frameworks coming out. And, well if they don't stick to their guns development will never start/finish.
Indeed. That's the only problem really.
(2012-05-03, 02:46 PM)Tomm M Wrote: [ -> ]Consider the following query builders:
// MyBB 1.6 // Requires escape_string $query = $db->simple_select('users', 'uid, username, email', "username LIKE '%Tomm%' OR username LIKE '%labrocca%'"); // Code Igniter $this->db->select('uid', 'username', 'email'); $this->db->like('username', 'Tomm'); $this->db->or_like('username', 'labrocca'); $query = $this->db->get('users'); // Laravel // Not sure if wildcards require escaping $query = DB::table('users') ->where('username', 'LIKE', array('%Tomm%', '%labrocca%')) ->get('uid', 'username', 'email'); // Yii // Requires wildcard characters to be escaped before use $query = Yii::app()->db->createCommand() ->select('uid', 'username', 'email') ->from('users') ->where(array('like', 'username', array('%Tomm%', '%labrocca%'))) ->queryAll(); // Doctrine/Symfony // $qb; createQueryBuilder instance $query = $qb->select(new Expr\Select(array('u.uid', 'u.username', 'u.email'))) ->add('from', new Expr\From('Users', 'u')) ->add('where', $qb->expr()->orX( $qb->expr()->like('u.username', '?1'), $qb->expr()->like('u.username', '?2') )) ->setParameters(array(1 => 'Tomm', 2 => 'labrocca')) ->getQuery(); // ... all produce $query = "SELECT uid, username, email FROM mybb_users WHERE username LIKE '%Tomm%' OR username LIKE '%labrocca%'";
As you can see, all 4 examples use a different method of querying the database with their own query builders. It's not that any of it is hard, alien or complex - it's just 100% different to what you're used to doing (perhaps, because this is the first framework experience?).
(2012-08-27, 04:14 AM)Pluton Wrote: [ -> ]Why is building sql statement with Framework Objects better, faster, more readable or more efficient than building query with strings?The main advantage is that it works with every supported DBMS.