I've been doing a lot with ASP.NET MVC 2 at work and I'd like to utilize my new skills at home... but I have Apache servers, not IIS.
What PHP MVC solutions are the same or at least comparable to ASP.NET MVC 2?
;-) Here's a list another developer has found: http://www.mustap.com/phpzone_post_73_top-10-php-mvc-frameworks.
The #1 solution he recommends is Symfony
Why not use mono? I believe you can directly use your asp.net mvc skills and deploy to your apache servers.
http://www.mono-project.com/Main_Page
There are a number of PHP MVCs to look at:
CakePHP
Expression Engine
Kohana
Zend Framework
Kohana is the only one I've done work with and I found it fairly easy to get started. It's open source and specifically created to support PHP 5.2+ so it has a clean, object-oriented codebase.
Related
What is most similar PHP framework to Pylons?
I mean mostly ideology of programming.
Being primarily a Python developer, and having used Pylons, TurboGears, and Django, I would whole heartedly, 100% recommend Kohana 3.x. To be completely honest I am not a huge fan of PHP, even though it is the language of choice at my current employer. Given the choice I would use Python and Pylons. But, using Kohana is just about the best framework I could hope for from PHP. I hope I am not biases, considering I work with two developers on the Kohana development team. ;-)
PHP and Python are very different. As such, there is no real equivalent of Pylons in PHP. But, I would also say there is no real equivalent of Kohana in Python
Methyl, Great php framework is Codeigniter, fully documented. Also there is Kohana, if you want php5 features.
Regarding your question, Since benchmarking PHP vs Pylons they are comparing smarty with pylons, it might be similar.
I would go for Codeigniter or Kohana. Behance.net is one of the sites build on Codeigniter.
I used Pylons a few years ago. I don't think that there is any web framework in PHP very similar to it.
However, I find that Symfony encourages several web development patterns used in Pylons. For example, in ORM, templating, testing, configuration files, MVC, etc. Some other MVC frameworks that can be compared to Pylons are CakePHP (which is inspired in Ruby on Rails) and the Zend Framework (one of the largest, with lots of components to be extended).
i am looking for a new php(5) framework it must be lightweight(x<500kb), oop, have orm, active record built in, simple to learn, fast to use, active community and dev.
I need it for small, personal app development.
My php skills are quite low and i have .net background. I have previously used LightVc+cough and codeIgnitor php frameworks.
There are so-many frameworks there and it is quite hard to find the best.
I have checked the other threads here but they are to old to consider sustainable.
Thanks for your time.
I think you dig out the http://www.phpframeworks.com/. It has details about each and every accepted framework.
Code Igniter is very popular and also supports PHP4: http://codeigniter.com/
Unlike .NET and miscellaneous other programming languages, you really don't need a framework to write a PHP application. In fact, I'd advise against it. Learn the language, not a framework.
For someone with low PHP skills I'd say codeigniter although it doesn't have ORM built-in (it has a sort of lightweight active record class), but there are tutorials on how to use Doctrine (a good PHP ORM solution) with it.
However if you want a PHP5 only framework (as in written to take full advantage of PHP5) then I'd suggest looking at Kohana (a PHP5 only fork of codeigniter), Yii or Zend framework.
For class, I would like a to use PHP MVC framework very similar to ASP.NET MVC with NHibernate. I am very comfortable with ASP.NET MVC. I need to use PHP and MySQL. I would not like to be concerned with the SQL to save me time. I would like to just design my PHP model classes and controllers without all of that data-access logic behind it that I would have to write.
Any suggestions? Thanks.
Also, I'm very limited on what I can install on the server. For instance, I can't upgrade PHP or run other installers. I want something I can drop in.
I prefer Zend Framework MVC components combined with Doctrine if really want great power. but for something simple try CaKePHP as it has its own simple ORM implementation, and the framework is built to be the php version of Ruby on Rails.
My personnal preference for "MVC Framework" would probably be Zend Framework -- though it's not the only possible choice (I'm thinking about symfony too, for instance).
About the "not writing SQL" part, I would use Doctrine, which is a great ORM Framework.
It's actually the default ORM Framework of symfony, and can be used with Zend Framework quite easily.
I suggest Symfony. It uses Doctrine (which is inspired partly by Hibernate) too, but it is integrated deeper with Symfony than Zend Framework. Symfony provides a number of helper classes which really help automate things with Doctrine (my favorite is sfDoctrinePager). Zend Framework is a good choice, but I recommend looking at Symfony first. I would avoid the other PHP MVC frameworks as they tend to be less flexible, and if you're coming from another language you may have your own preferences on how to attack a certain problem - Symfony and ZF will both give you leeway in this sense.
I have to develop a CMS for a friend of mine, nothing commercial...
I'd like to take this opportunity to learn a php framework, to see if it would be suitable for future (and more complex) developments, or at least to steal some nice ideas...
SO I'd like to easily implement a content management system and at the same time have a look at a modern php framework (one of the rails inspired ones, or at least implementing MVC, which I think covers them all...)
I've heard of http://www.digitaluscms.com/, built with zend framework, and http://radiantcms.org/, but that is ruby on rails (I'd prefer php for ease of deployment and hosting...)
If you want a CMS built with a real Framework, I've heard (just today, actually) of Diem, which is built upon symfony (and uses some components of Zend Framework).
Maybe Sympal, also based on symfony, could interest you too.
If you want to learn, and work with symfony, one of those two might be the perfect match for you.
Still, as those two are not as popular as Drupal (or Joomla, or whatever other well-known CMS you can think about), I would probably not use them for any "real" site -- at least, not before studying them for a while.
For a framework, I would recommend Code Igniter wholeheartedly. It's MVC based, super-lightweight and it reminds you of Rails a lot. You can check out a screencast of a hello world application here: http://codeigniter.com/tutorials/
In regards to a CMS that could be http://expressionengine.com/, it's a popular CMS built on top of Code Igniter. I don't really like it as a CMS, but you were asking about a good platform to build on, so that would probably be a great bet.
The most common PHP frameworks are Symfony and CakePHP - I don't know CakePHP so much, but personally Symfony is too big and bloated for my taste, although very powerful.
The most common used CMSes are of course: WordPress, Joomla and Drupal. There are endless other systems available, but most of them don't really have a great platform to build on.
Good luck!
Others have mentioned various pre-built CMS applications. If you want to build your own in an existing PHP framework, check out CakePHP or symfony.
http://cakephp.org/
http://www.symfony-project.org/
But really, you should just learn Django, because it's so awesome.
A free CMS built on CodeIgniter is PyroCMS. The demo is currently down but installer is so freaking simply you could have it running in a few minutes.
Modular, multi-lang, UTF-8 throughought and pretty easy to skin.
Unlike other CMS' I have seen built on frameworks, PyroCMS doesn't touch the core framework at all, which means future upgrades of CodeIgniter will be easy.
you should take a look at silverstripe - besides the fact hat you really should read about what a framework nowadays can deliver, so some basic knowledge about Rails and Django is absolutely essential to put yourself in a position of beeing able to decide yourself what is good for you and what is not.
One most important thing ignored is RESTful-ness - many CMS or Frameworks still not support it or at least do it very complicated. Yuo need to read about REST to understand, why you want a framework or / and CMS that suppirts REST.
Talking about Joomla here is, of course, a joke.
Use Joomla. It probably won't teach you much but you will get a very nice system. Professional level even. Joomla has a MVC framework but most of what you do will be configuration. But really who wants to do a cms any more anyway? So many of them out there.
All kidding aside, Joomla is written in php, scales nicely and has a nice admin interface for the client/end user. It is also used all over the place.
If you really want to learn a usable framework try to write the cms in zend or codeigniter. those are beautiful frameworks.
If you really want to experiment a popular PHP framework while developing a simple CMS, look for a real CMF.
The only one I know at this time is Symfony2 CMF. It's a set of Symfony bundles providing popular CMS features like the Node concept, blocks, menus, dynamic routing (for routing to newly created nodes), etc.
Using a CMF instead of a CMS prevents you to configure your application only using a big administrative back-end and make you to understand the framework behaviors. As a consequence, you will be able to use the framework (Symfony in my example) even for a non CMS related project !
Using a CMS like Wordpress or Drupal (which is built on top of Symfony) will hide you the framework.
P.S: Actually, Symfony CMF is only compatible with Symfony 2. But beta versions of the bundles are already available for Symfony 3. Anyway, there is a LTS version of Symfony 2 whose bug fixes support ends in 2018 and security support in 2019 !
I am in the phase of learning Zend Framework for PHP development, I have been doing 'dirty' PHP programming for about 2 years now and I have learnt quite a bit from my mistakes.
I have been introduced to Ruby On Rails, it is a great framework and Ruby is quite an interesting language too, but not everyone wants their web sites to be in RoR, at least not all of my clients.
Hence as a result I do a lot of PHP. Having worked on RoR, I find Zend Framework to provide very similar functionality and environment and hence I am really excited about the same.
However I am interested to know if there are any 'generator' scripts that help you along the process to generate / automate common tasks such as project structure creation, model creation, controller creation, just like those in RoR?
If such a thing already exists, great, otherwise I will go ahead and build such scripts myself as I am very certain they will come in very handy, especially for me.
Zend Tool is your friend!
i have made several code snippets and file types in editor ( netbeans ) to help me with automation.
You could look into zend studio that has a built in integration for zend framework that work quite well, but its commercial and would mean switching IDE's wich is always a burdain
I am working on a code generator for Zend Framework that could be useful to you. It is based off of the Qcubed code generator. Check it out at http://clintberry.com/2010/08/zend-framework-code-generator-with-scaffolding/
This is the best tutorial I found. It explains how to start using Zend Framework step-by-step
Zend Framework Tutorial