Advice On Frame Work VS. Raw Php

I’ve been designing websites for years now, and have rather recently decided to take study in Programming Languages to increase my work flow opportunities.

Throughout the short course of my studies, I’ve noticed that there are offerings similar to what I’m used to in regards to Javascript. For example, Jquery, Mootools, Yahoo Yui, and the likes all offer libraries that make things easier in terms of turn around time, but they all come with the basic exchange of loading more code/file size into your website than you really want or need.

With Php, I know that there are libraries in the same respect. Zend and Symfony for example are two. I would like a bit of insight as to whether or not frameworks are really worth it, and how much they really slow down a website/increase server costs.

Thanks for any help you may provide :smile:

I have tried using a php framework in the past, but always have scrapped it once I got started. I supposed if I had no choice, such as working on a team or for a client that insisted on having a framework, I might had used one. However, I just found it as an extra layer that was in between me and what I wanted to accomplish. What I mean by that this, it seems to me your learning another language or set of commands on top of PHP itself, but that just might be me.

2 Likes

I think there are two performance considerations you need to think about: downloading and execution.

For downloading, the popular libraries such as jQuery are hosted on CDNs, and if a lot of sites use the same CDN (which is common) then a user at your site likely won’t have to download jQuery at all, because they would have already downloaded it when they visited some other site.

For execution, we can measure that, and it seems to take 5 or so milliseconds. Not enough to be perceivable.

In short, there’s lots of code, yes, but computers are fast. Don’t get too hung up on performance when there’s no practical benefit. Focus instead on making your code easy to write and easy to maintain.

1 Like

This is also another one of my hangups that I didn’t mention @Pepster. It does seem like it’s like learning a new language in a sense.

I’m not certain if you perhaps misunderstood the question @Jeff_Mott. While I did mention having knowledge of what libraries do for Javascript, I only made that mention to reference that because of that experience I know what libraries are in Php to an extent. I’m fairly certain that a CDN will not work for Php libraries, and they need hosted on the backend of a server.

Am I misunderstanding your answer, or do you misunderstand the question?

Since PHP runs on the server ALL of the available frameworks are effectively available without any delay for downloading. I think that’s the comparison Jeff was trying to make by mentioning CDNs - that the biggest disadvantage of JavaScript frameworks (download time when you don’t use CDNs) doesn’t exist for server side languages.

1 Like

I misunderstood your question. :blush: thought you were asking about performance for JavaScript libraries.

1 Like

:smile: No problem. If I was asking that, then it would have been a fantastic answer! :laughing: It’s the thought that counts :thumbsup:

Does having the additional coding from a Php library cause for any additional use of bandwidth/transfer that is not really needed? Server costs are also another of my concerns, and why I ask. Thanks to everyone who has answered so far :smile:

I think that the server load isn’t really a concern. A php framework runs on the server and does not generate additional transfer since the output is still html/css/whatever and that doesn’t change.
What you gain from using a framework its development speed. I started using the Yii framework a few years back and since then I’m able to develop things much faster and more structured.
I’m never looking back and loving it every day.

If I may suggest a framework it would be Yii. I hear good things about Laravel and Symphony2 as well.

1 Like

Thank you for the answer and suggestion @slatius