I have experience with Joomla and have modified and wrote some simple Joomla extensions. I don't have experience using one of the popular PHP frameworks (such as CakePHP), but I was thinking about using the Joomla framework because I'm familiar with Joomla. How would I use the Joomla framework for a software project instead of using regular Joomla and writing the extensions needed for it to extend it's capabilities? Thanks!
The basic idea is that you:
Get a copy of either the whole framework or just the packages you need+dependencies (from github or composer) or use the older copy that is shipped with the CMS,
Bootstrap your application (JApplicationWeb or JApplicationCli).
Write your code using the MVC structure provided.
The big difference with writing a totally independent application is that you are doing just that, you need to build everything in the application whereas in the CMS there are already a lot of things in place. (The good part of that is that you can make new code with no legacy concerns.) For example, if you look at the JIssues project you'll see that they had to think about things like authentication. So as you would expect writing a simple application is simple, writing a complex one is complex.
You can see many examples of framework applications around, ranging from the ones found in the CLI folder of your CMS installation to JIssues, and of course the three web applications in the CMS are all examples of applications on the framework.
The Joomla Framework is intended (among other things) to be the platform upon which you can build a web-application. The framework is like the frame of one of those motorcycles they build on "American Choppers." It provides the backdrop so that you can hit the ground thinking about your app without worrying about User Authentication, database connection, and a thousand other things like those that get in the way of bringing your app to its potential audience.
If you're trying to extend Joomla, the current edition is what you should be using.
Related
I've been using Wordpress for the past 4 years for developing small and medium websites. Now I have an enterprise project and I'm considering using Phalcon PHP framework.
My enterprise project will be handling a large amount of users and will be publishing articles with images. This is why I still want to use some sort of CMS.
I think framework like Phalcon is great for service and business layers, but it lacks the GUI / services found in various CMS's like Wordpress. I know Phalcon Eye is in development, but it's in very early development stage (I think).
Can Phalcon MVC be used alongside any CMS? If yes, wouldn't the speed of Phalcon bee compromised by much slower CMS? (And what CMS is recommended?)
Update
The first version of my enterprise project is currently using WP for handling user registration, page / template handling, articles etc. But that's just a small part of the solution. All other code is custom and I've realized that should use a solid framework like Phalcon, Laravel, Sympfony etc.
Update 2
What if I use a framework like Phalcon for my custom code, present data and form handling. Then I build a Wordpress service that will retrieve articles from WP DB's. That way I would not need to use wordpress for presentation, but I can use WP for handling articles, images and maybe even users. Bad idea?
You can use Yona CMS (built with Phalcon), whose code is hosted on GitHub, with modular structure and great speed of Phalcon Framework.
There are few large projects working on this CMS.
Using an existing CMS for the admin and writing a phalcon frontend for it is a very intriguing idea I have pondered on and off over the years. (I haven't done it yet because I have a custom CMS to maintain, which I am not sure how to replace with WP or joomla etc)
I think it would be possible to have a site that is much faster than a WP site by using phalcon, but I think the tradeoff is no WP plugins will work, and the more PHP you use to make them work, the more you erode the benefit of phalcon and you might have well just used WordPress.
I have never used Phalcon 2.0 with Zephir, so can't comment on that.
----- extra comment stuff----
I see a comment about updating phalcon, which I thought I would address you can update phalcon with 3 or 4 commands (or a single shell script), and it only takes affect when you restart your webserver. Apache can do a graceful restart which shouldn't affect any of your users.
Whether phalcon is harder to update than a framework written in PHP file comes down to your update method. Updating phalcon with git is far quicker, easier and safer than FTPing individual files for example. Naturally using git for both I don't see much of a difference, just as long as the webserver is clever enough to not open the php file just as you are copying it of course...
re: speed - phalcon is very fast (upto 10x faster than zend framework v1 IMO, YMMV), it might not be as fast as node depending on what you are doing, but if your PHP is far better than your JS and your Server Admin has never used node - like me then the difference in speed it didn't look like it was worth the extra effort.
I think as per your requirement you should go for a CMS, Phalcon does not provide you the functionalists of a CMS, it has it's own advantages. If you are using wordpress and not satisfied with its performance then there are many other popular CMS solutions available in PHP like Joomla or Drupal, you can look into that also, and choose the best that fits in your requirements.
Only a CMS based on phalcon, like phalconeye, may get the benefits of phalcon's speed.
If you want speed, avoid Drupal, that not where it is the better.
We currently use MySource Matrix CMS for large projects, Wordpress CMS for small projects and Zend Framework for bespoke applications...
I'm not trying to confuse and compare a CMS to a framework, that has been done before :-)
I want to identify a few CMSs for review that have foundations in strong (preferably independent) PHP frameworks.
The only one I have looked at is SilverStripe CMS and Sapphire Framework.
We have many clients that have a CMS for internet and/ or extranet and then various other bespoke applications that are then integrated via various means to look like they're in the CMS.
I believe it will be more productive and beneficial to have a common framework between these branches so they can be natively merged.
Hope this makes sense.
PS. I have used custom assets in MySource Matrix and specific modules in other CMS but you feel you are working for the CMS not the application you are building.
Have you looked at Expression Engine? Its built on top of the CodeIgniter MVC framework, and may provide a lot of flexibility for having parts of the site be managed content, and branching out into more application type stuff using CI when needed. Not free, but all my colleagues that use it, swear by it (so much so that I'll actually consider it for the next project that fits this profile). There are also add-ons for many of the commons problems you're likely to want to solve.
And while not PHP, the Django framework is also a nice cross between CMS and App Framework, with some really great features like DB Migrations, etc. I can honestly say that Learning Python made me a better PHP Programmer, and the projects I've done with django were fun and fast to code. Not to start a holy war, but I describe Django as Drupal without all the clutter (and yes I've worked with Drupal enough to respect and fear it at the same time ~ too much friction in the Drupal dev process for my taste).
Even if I didn't get clearly what you are looking for I was just searching for a CMS that is not bundled with a propietary PHP framework and it should also be fast, simple coded, ordered and flexible to extend.
After a lot of search I found OctoberCMS. It uses Laravel PHP framework and it's intended for wevdevelopers/programmers, may be in a future it will also support more WYSIWYG edition. Right now it's very fast and easy to extend via MVC implementations or plugins.
It has a nice code and structure to work as programmer. If you like to create content via HTML+CSS and you don't care about WYSIWYG, then this could be a great alternative.
It's a very different approach compared to other CMS bundles. I'm not saying it's better, just different.
With their slogans:
The PHP framework for web artisans
http://laravel.com
The platform that gets back to basics
https://octobercms.com
Have you tried Drupal? We have used it as a CMS and also integrated it with things like Microsoft Dynamics and UPS Worldship. It's pretty flexible like that.
I wouldn't call sapphire and independent framework for the simple fact you'll have a hard time finding many apps written in sapphire alone - sapphire pretty much is silverstripe. Theres also the issues of silverstripe using an ajax powered admin interface for much of its own functionality meaning you have to adhere to these to keep the same look and feel with the bespoke work you want to add.
What is the difference between a PHP framework and a CMS? It just unclear to me what the difference is.
Thanks!
CMS = Content Management System.
Framework = Collection of tools, source code, methodology and idioms.
You can build a CMS with a PHP Framework, but you can't build a PHP Framework with a CMS.
Also, a CMS doesn't have to be built in PHP, but a PHP framework will be (most often).
A framework helps you create applications by providing solutions for common tasks, but a cms is an application. You can use a framework to create a cms.
There are also a few cms'es claimin to also be frameworks (or have framework capabilities):
Modx
Drupal
If you haved worked with one of the typical frameworks (CodeIgniter, CakePhp, and others), there are for sure quite different to work with a cms like Modx or Drupal, but they are flexible cms'es that are fearily easy to extend with new features!
A Framework is something designed to help programmers build applications, and possibly CMSes.
examples are CakePHP, CodeIgniter, and Kohana.
a CMS can be used by someone with no real programming expierience. examples are WordPress, Joomla, and Drupal.
A content management system is used to manage content. The content can be differentiated according to types, like custom post types for WordPress. You can create a CMS using a framework or code from scratch.
A framework can be thought of as collection of packages to speed up development (compared to coding from scratch).
Now, you mentioned that you want to make your own framework. You can create a framework from scratch, or use open source means, like Composer or Symfony components, to build your framework. Just remember that as a developer, you are responsible for making sure that any open source components you include in your system has been reviewed for security. You can do line-by-line review, which can be difficult (e.g. 5,000+ files on a lumen installation), or any other means based on established protocols of your organization or laws.
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 !
Ruby on Rails has a bunch of plugins which extend the normal scaffolding:
Lipsiadmin
Hobo
Streamlined
ActiveScaffold
Does the PHP community have anything similar? phpmyadmin is great, but it doesn't have any way to control the presentation of the data. You always get all of the data in its presentation format. These Rails frameworks are a little more user friendly.
Edit: My original question was not very clear. I'm not looking to compare PHP and Rails. I'm also not looking for an all purpose general framework. I'm looking for something just like the four pieces of software I listed above, but written in PHP. The admin software I listed above generates a crud interface for you based on your configuration. The configuration includes which tables you'd like to show, what operations you can do to the table, and who can see the information. The software does the rest, from writing the SQL to processing the request to generating the interface.
I would look at Zend, CakePHP, CodeIgniter or Kohana. See if they have an addon or plugin that can do it.
The problem with the four pieces of software you listed is that they extend Rails. When you say "PHP," there is nothing to extend in the same sense. (I really doubt you want a PHP module that does this.) You don't need a PHP addon, you need a [framework] addon.
Any of the frameworks I or Jonathan listed are similar to Rails. Kohana in particular has an addon module called Auto Modeler that may do what you need.
have you looked at pear: http://pear.php.net/
It's important to stress the difference between a language and a framework here. PHP is not itself a framework with modules. PHP is a language, like C or Python.
There are several website frameworks that have been written in PHP. The most popular would probably be Drupal though there are several that I've looked at over the last year that seem similarly capable:
CakePHP
CodeIgniter
Joomla!
Symfony
Zend
PhpMyAdmin is not a module or a framework. It is a separate, stand-alone web application for database administration, written in PHP. It won't be a component in any strategy for presentation of data on a website.
Symfony may be a "general framework", but it has scaffolding you can use as a complete application if your needs are simple. You define your model in a YML config file, and can then generate CRUD modules based on this model. The code generation is also customizable by editing other YML config files. All without writing any PHP code. But should the need arise, you have the option to extend the scaffolding with PHP and the complete framework.
See the Symfony docs on code generation.
A framework called ATK also claims a good code:functionality ratio ("An application in 10 lines of code").