/    Sign up×
Community /Pin to ProfileBookmark

Frameworks vs CMS’s

I’ve been using Joomla for about 2 years, including extension development, but now I’m thinking on going a step further and either start with Drupal, or learning some PHP framework (CodeIgniter seems the most appealing after watching some video tuts).

I know the difference of both sides. Framework: a skeleton with classes and design patterns to help you build any website much faster than from scratch, CMS: an application built with its own framework which a priori is aimed at content management (articles/items).

From my experience in Joomla, you can currently code almost any extension you want, not only for content management. So what I’d like to know is whether learning a bare framework is worth it. Someone could tell me something you could do with a framework that Drupal/Joomla couldn’t?

to post a comment
PHP

10 Comments(s)

Copy linkTweet thisAlerts:
@eval_BadCode_Jan 24.2011 — Framework...[/QUOTE]

Sounds great. Try using the SPL data structures in PHP 5.1+

What can the SPL library do that Joomla can not? It can give you the freedom to develop your own ideas with very helpful interfaces and efficient data structures.

There is more than 1 way to do things-- so I'm not going to tell you that my way is best when our goals may be entirely different. I just don't see any CMS offering me what I need- so I turn to a framework. I have mostly quantitative data, where I see a CMS serving the needs of people with qualitative data.

There's no shame in code reuse-- framework or CMS.
Copy linkTweet thisAlerts:
@JazztronikauthorJan 24.2011 — But SPL is just a library as it is PEAR, isn't it? It has no framework implemented, at least a whole framework which covers everything (MVC, files, DB's, error handling, security, caching, routing, etc).
Copy linkTweet thisAlerts:
@NogDogJan 24.2011 — A framework will give you more control and flexibility. That may not be entirely true, as you can always modify a CMS's code base, write plug-ins and extensions, and so forth; but if you're going to go to all that trouble, maybe a framework would have been better in the first place.

If a CMS can handle some significant part of your project out of the box and you only need to tweak a few things, it could be a excellent choice for you. If you need to build something that is not a "typical" web site of the sort targeted by a CMS that you know how to work with, you might be better off working with a framework if you're going to write a whole bunch of custom code anyway. Heck, you could use a framework to build your own CMS for building the types of sites you plan to build in the precise way you like to build them, not depending on how the CMS authors like to build them.

Neither is better or worse than the other: it's simply deciding if you are going to build your house from prefab units, modifying them as needed; or if you just need to take a pre-made foundation and then build everything else on top of that in a more customized manner. (And most popular frameworks have all sorts of libraries available you can use, essentially blurring the lines between frameworks and CMS's.)
Copy linkTweet thisAlerts:
@JazztronikauthorJan 25.2011 — Good answer NogDog, thank you!

Regarding PHP frameworks, which one would you recommend? As previously said, I saw some CodeIgniter videotuts and I liked them a lot because it looks like a very flexible one (apparently you don't need to follow so many naming conventions such as with the Joomla framework).

I read that Symfony, although probably the most popular, has grown too old, and CakePHP is too hard for beginners.
Copy linkTweet thisAlerts:
@NogDogJan 25.2011 — The only framework I've worked much with is CodeIgniter. I tried CakePHP first, and just couldn't get a good handle on it, then tried CI. It may just be that their documentation was better -- at least at the time, that was maybe 2 years ago -- but I picked it up pretty quickly.

A number of PHP-ers I know are big fans of Zend. It probably has more tools and more flexibility, at the "cost" of being a bit at a lower level, meaning you may have to do a little bit more work. But with any of them, once you've hashed out how you like to use a give framework, just like with a CMS you'll have your own code base to add to it for the way you want to do things.
Copy linkTweet thisAlerts:
@JazztronikauthorJan 30.2011 — I will stick then to Joomla for now. If I need some type of application within it, it's likely that it is available in the huge Joomla Extensions Directory, or I could program it myself.
Copy linkTweet thisAlerts:
@eval_BadCode_Jan 31.2011 — Are some of these libraries are written in C?
Copy linkTweet thisAlerts:
@JazztronikauthorJan 31.2011 — Are some of these libraries are written in C?[/QUOTE]

Every CMS or framework previously mentioned in this thread is made in PHP.

I don't know any C/C++ framework, but there must be some for sure.
Copy linkTweet thisAlerts:
@eval_BadCode_Feb 01.2011 — The reason I ask is because I'm searching and searching through my directories trying to find the source for SPL and I keep coming back to these header files AGAIN and AGAIN.

[CODE]
-rw-r--r-- 1 root root 2451 Aug 16 16:48 php_spl.h
-rw-r--r-- 1 root root 1828 Aug 16 16:48 spl_array.h
-rw-r--r-- 1 root root 4739 Aug 16 16:48 spl_directory.h
-rw-r--r-- 1 root root 2634 Aug 16 16:48 spl_engine.h
-rw-r--r-- 1 root root 2269 Aug 16 16:48 spl_exceptions.h
-rw-r--r-- 1 root root 4934 Aug 16 16:48 spl_functions.h
-rw-r--r-- 1 root root 5321 Aug 16 16:48 spl_iterators.h
-rw-r--r-- 1 root root 1643 Aug 16 16:48 spl_observer.h
-rw-r--r-- 1 root root 1517 Aug 16 16:48 spl_sxe.h
[/CODE]


There's header files like this for all of the extensions (Zend, PDO, SQLite etc).

Found them here.

/usr/local/php5.2.14/include/php/ext/

Inside the header files it makes references to zvals and Zend. (Not a C programmer, so I can't be much more helpful).




Edit:

I have also spent a few hours looking at Zend. A framework like that sounds excellent, but I think it calls for an IDE.

I noticed a lot of these PHP classes use javadoc syntax, is there an IDE that you can recommend? I tried to compile PHPEclipse and the precomiled binaries ( both failed ) and their IRC is dead as disco (no response for 3 days!).

Any suggestions?
Copy linkTweet thisAlerts:
@NogDogFeb 01.2011 — You can get the complete PHP source code here, if that's any help: http://www.php.net/downloads.php. SPL is part of the core PHP now, so it should be in there (and it's all C[+[+]] code).
×

Success!

Help @Jazztronik spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...