views:

112

answers:

3

Possible Duplicate:
Why use a framework with PHP?

Hi, usually all the projects I do I work or with my own framework or I start them from zero. Why shouldn't I do this? or is better to keep doing it this way?

I mostly work on php, what suggestions do you have to change this? cake, joomla or another one? or just keep it this way?

I'm a little untrustfull to others people code :S

Thanks and sorry for the english :D

+4  A: 

If you go with frameworks, it is easier, better, faster, stronger!

No, really. With a well-established framework you cut down your development time, you know that hard stuff has already been thought about, and you can just do what your app needs to do, without doing things that every app needs to do.

I'm a Ruby guy, so I'd vote for Rails (big) or Sinatra (small). I did work in PHP and it was just... ick. If you swing the Python way, Django (big) or CherryPy (small) would probably be the suggestions to try.

The disadvantages, not many. It is a bit slower than not using a framework, obviously. But not by much. And if there is something that a framework does not support, it can get hairy. However, there's really not much you can want that e.g. Rails does not do.

As for being suspicious of other people's code, there's really no need. It is open-source, bunch of people look at it and if there's something seriously wrong it would have gotten fixed a long time ago. If you are still suspicious, you can join them. It is a better investment of your time to help debug an existing framework than design, develop, test and debug one from scratch.

Amadan
why stronger or better? :P you don't know that for sure. If you have the time, wouldn't be better to do it all?I don't think that the people that use others people code read de 100% of the code, the usually (not all but almost all of them) read like a 50 to a 90% but never the 100% of the code.Thanks :D, any way if you are a ruby on rails you always would agree with using anothers person code :P it's the idea behind ruby on rails :P
Saikios
Two reasons. First: distributed debugging. They may not *read* 100% of the code, but they will (collectively) *use* 100% of the code. Bugs will come out. One man simply can't do the similar amount of testing coverage yourself. Or invest a similar amount of man-hours in development. Or have the same number of good ideas. The second reason is Daft Punk.
Amadan
Regarding "always" using other people's code: if it's plugins, I have been known to be dissatisfied and reimplement the given functionality. But I don't go inventing hot water and coding things better coders than me did correctly.
Amadan
+1  A: 

I do understand the whole "I want it to be all mine" principle but it goes against lean development practices. I often find myself writing things from scratch because I just want to learn but often end up only getting the "tool/framework" done instead of the project I wanted to actually complete.

Personally I've used codeigniter and I find you can do just about anything you want including rewriting things that don't meet your needs.

Ken Struys
+1  A: 

If you use a framework you can concentrate on what really counts for you. It doesn't make sense to write the authentication part, with the risk to write code that is subject to security issues, when there is already a framework that implement the authentication part.
What it's really important for you is the site, or Web application content.

There are many PHP frameworks you can use; you just need to check which one is better for you.

kiamlaluno