4 Replies - 370 Views - Last Post: 30 August 2011 - 05:53 PM Rate Topic: -----

#1 scentauri  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 63
  • Joined: 16-February 11

PHP Framework

Posted 30 August 2011 - 05:06 AM

Do you recommend using a framework when programming in PHP?

I'm currently self-employed as a web developer, but in my attempt to gain steadier work I've applied to web developer job postings in the area. I'm used to coding PHP and creating CMS that allow CRUD functionality without using a framework; however, the company I applied to develops using CakePHP and they suggested I read a book on the topic. I'm impressed by what I read/practiced so far on the framework, but I just want to know is developing using a framework better than without?

Is This A Good Question/Topic? 0
  • +

Replies To: PHP Framework

#2 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2834
  • View blog
  • Posts: 9,737
  • Joined: 08-August 08

Re: PHP Framework

Posted 30 August 2011 - 05:18 AM

It's a trade-off.
Frameworks are good for large projects, especially if other coders will be involved because they force each coder to follow their rules, making everyone's code easier to read. The disadvantage is that frameworks load lots of files that wouldn't be loaded if you wrote your own code, and that can mean slower code since hard drives are usually the slowest part of the system, even with caches.
Was This Post Helpful? 2
  • +
  • -

#3 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 943
  • View blog
  • Posts: 2,353
  • Joined: 15-February 11

Re: PHP Framework

Posted 30 August 2011 - 06:02 AM

As CTphpnwb mentioned above it's a trade off. My reasons are that most frameworks are written by experienced coders who may know of ways to better secure your web application and of course fast development. I just picked up Zend and I've done in 5 minutes what it would take 30 to 60 minutes to do. Once you can also adhere to the coding standards your code should be organized.

Frameworks usually come with some implementation of popular APIs also which is good but you don't get the experience of working directly with the API. A framework will mask a lot of the nitty gritty work for you with simple function calls etc.. I personally like the "do it myself" approach because it gives me more satisfaction.

The bad part about frameworks is that if there's a known exploit or vulnerability then every site using that version will also be vulnerable to the attack.

Ultimately businesses are requiring the knowledge of frameworks these days to increase productivity and unison among developers. I would say learn it. Extra knowledge is always good and it will make you more marketable.
Was This Post Helpful? 2
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1001
  • View blog
  • Posts: 3,555
  • Joined: 05-June 09

Re: PHP Framework

Posted 30 August 2011 - 01:28 PM

I would give this a good read.

View Postcodeprada, on 30 August 2011 - 02:02 PM, said:

I just picked up Zend and I've done in 5 minutes what it would take 30 to 60 minutes to do. Once you can also adhere to the coding standards your code should be organized.

On the flip-side, for 90% of Zend, it will take you 30-60 minutes to do what would normally take you 5. Best example of this is probably a styled form, or perhaps authentication.
Was This Post Helpful? 0
  • +
  • -

#5 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 943
  • View blog
  • Posts: 2,353
  • Joined: 15-February 11

Re: PHP Framework

Posted 30 August 2011 - 05:53 PM

Zend <- The learning curve is a pain.

@RudiVisser Most things would take longer if you're not used to the functions etc...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1