Joomla,CMS,Mambo.. VS write PHP

I’m a student,i studied about PHP but i didn’t understand one question.
i asked my friend but they can’t answer me,
Why we have to PHP if we can use Joomla,CMS,… for make web we want,cause Joomla,CMS have good security,but if we write code, we have to use long time,
I have one project is Web looking job,my friend asked me “why do you use Joomla? if you write code,it’s easy for hack your web”
could you tell me what should i do?and what’s different between write PHP by self and use Joomla,CMS…
and can i make my code have security look like use Joomla
I hope you will understand me

Thank you very much

Exactly.

if have little different : add hand-coded to CMS(it’s help save time and get my wish)

With some CMS’s this is easier said than done :wink: Once again, MODx is particularly good about letting you easily add custom code. (There’s a tradeoff of course - too much to get into here.)

if don’t have plugin: hand-coded

Something I think all developers should know how to do even if they plan to use a CMS.

I think a good way is learn Hand-coded PHP about make CMS and if my web don’t have plugin,i still can add my code to CMS for my wish,it’s mean
if have plugin: use CMS(it’s help save time and good result)
if have little different : add hand-coded to CMS(it’s help save time and get my wish)
if don’t have plugin: hand-coded

Welcome Lung!

This answer is far from complete, but here is the way I see it:

Advantages of a CMS such as Joomla:

  1. Security - as you mentioned in a partial answer to your own question. Popular CMS’s are tested constantly in thousands of installations. As long as you keep them updated, you shouldn’t have to worry about security holes in the code as much as you would with your own custom code.
  2. Pre-made functionality. Hand-coding something like a shopping cart or blog - and making it secure - is incredibly difficult and seems kind of silly when most CMS’s have free plugins or addons to do exactly the same thing better.
  3. Client-maintainability / collaboration. CMS’s are designed to be friendly for your clients to use in performing basic updates to their own sites, particularly if the client has a number of people working in concert on the task. Developing this sort of interface yourself is very hard.

Advantages of hand-coded PHP:

  1. Flexibility of code. Using pre-made plugins is convenient, but it can also be limiting - particularly if there is no plugin for what you want to accomplish. When hand-coding PHP, you are limited only by your imagination and skill.
  2. Flexibility of appearance. Most CMS’s are quite difficult to template (MODx being a notable exception). This is not an obstacle if you’re satisfied with a canned template, but if you plan to develop a unique look and feel, hand-coding is easier, IMHO.

Finally, having PHP skills is often important even if you use a CMS: most of them are developed in PHP, and sooner or later, you will probably need to modify some code to make it work the way you want. I, for instance, have been hacking away at VirtueMart all day :slight_smile:

I suggest you try out MODx, which is an elegant cross between hand-coding and a traditional CMS. I recommend it highly.

Hope this helps.