Kieran Posted February 23, 2010 Report Posted February 23, 2010 I'm about to start some full on development (perhaps even for phpVMS) with another PHP Framework. Does anybody have a favourite? I don't have much experience with PHP frameworks, the only framework I've ever used is Rails for Ruby. Thanks guys. Quote
Administrators Nabeel Posted February 23, 2010 Administrators Report Posted February 23, 2010 Well phpVMS is written on Codon, I used to have that in active development for an old job. It's based on CakePHP (well, not initially, but I've modified it). It's really lightweight. But now, vaCentral is written using CakePHP. I use a custom "framework" for the API server (it's a MVC format in 3 files), super lightweight. I am a big fan of Cake, there's alot of Ruby-isms. I'm looking out for symfony2, and the next version of Cake. CodeIgniter is ok to start with, but there's no ORM. I like recess too. But Cake is my "goto" framework, it's great all around. It's benchmarked to be slower, but with some caching, it runs just fine. In my benchmarks, all the frameworks ran about the same, since it's server-limited before you even hit code maximums IMO. Quote
Kieran Posted February 23, 2010 Author Report Posted February 23, 2010 I've got the Cake framework on my server at the moment too. I'd never heard about Symfony but the website design is too totally awesome to not give it a go:D. What are the benefits of using a php Framework? Quote
Administrators Nabeel Posted February 23, 2010 Administrators Report Posted February 23, 2010 Yeah, I'm waiting for 2.0 (http://symfony-reloaded.org/). I haven't played with 1.0 much, but it has a sweet admin generator. I might use it for vaCentral when I do the rewrite I have to get started with soon. Benefits... well I like the MVC model - templates, logic and database all separated. Clean code means less bugs. Means more productive time. Quote
sean212 Posted February 23, 2010 Report Posted February 23, 2010 Well it does reall make you life easier! Think about it like this... Would you rather use this... <?php $handle = mysql_connect('localhost', 'blah', 'tt'); mysql_select_db('dbaaa'); $check = mysql_query("SELECT * FROM users WHERE login = '".mysql_real_escape_string($_POST['callsign'])."'", $handle); $total = mysql_num_rows($check); if ($total == 0) { mysql_query("INSERT INTO users (id, login, pass) VALUES (NULL, '".mysql_real_escape_string($_POST['callsign'])."', MD5(".mysql_real_escape_string($_POST['pass']).") )"); } ?> or this... <?php include "includes/bootstrap.php"; Pilot::Add($_POST['callsign'], $_POST['pass']); ?> Quote
Administrators Nabeel Posted February 23, 2010 Administrators Report Posted February 23, 2010 Yeah, I'm a bit weary of ORM, though I use it extensively, albeit with alot of caching with APC or memcache. In phpVMS I've done that a bit with the findPilots() and findSchedules() functions, I love the flexibility. But I've seen some frameworks do odd joins and whatnot with ORM (I remember with Doctrine a few times I saw some funky joins which were fixed) I like with cake it's: $user = array( 'User' => array( 'username' => 'something', 'password' => 'something', // other fields ), ); $this->User->save($user); I kinda brought the same concept over to phpVMS for updating alot of things all over (pireps, etc. So I think you'll like working with phpVMS - controller formats follow cake, models are a bit different but same concept with the 'find*' functions (I couldn't really implement ORM this late in the process but I've standardized things quite a bit) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.