Hello guys, I'm curious about that. As far as I know, having 10,000+ daily visitors, a script should have framework. Now, I want to build a website but without zend or other frameworks. Is it possible or real? Let's say, how can a simple php handle 10K++ visitors daily?? If it's possible, then why to use frameworks? Thanks in advance for your oppinions
Usually a script build in simple php would be handled easier by the server than a script build in any framework. Any framework would need more resources(CPU and memory)
Hi David, Th reason to use framework is that theoretically you should write less code. Depending by the site, it is not always true. Anyhow the frameworks will add some CPU overhead. The problem with the number of visitors is if they come all in the same time/second or if they are nicely spread over the entire day. BR, Marcel
It should not be a real big problem! most databases and webservers can handle with ease 10k - 100k of visitors a day... the only thing you need to do is optimalize your site...
it all depends on the style of writing scripts, database queries and the power of the server... for example: P4 2.4 / 4 GB RAM / 4*250 GB Raid 10 had hit a 20-22mln per day. Unique visitors in 2mln/day.
Given that frameworks are often LARGER than custom code, incur MORE overhead, and are a crutch for the inept, I'm left wondering just where the **** you got the idea a framework is better with more traffic. At best they are a sleazy shortcut used by the inept -- at worst they are bloat that decreases performance and leaves you at the mercy of some other developers choices. I do not advocate the use of frameworks in ANY interpreted language -- I don't care if it's PHP with trash like codeignitor, templating asshattery like Smarty, javascript idiocy like mootools or jquery, or HTML/CSS idiotic BS like YUI, Grid960 or LESS. They all do more harm than good, and people are dumber for these even existing -- The end result is most always bloated slow, halfit garbage that often defeat the entire point of using the underlying technologies. This sums up my opinion of web frameworks quite nicely
Until we know your actual business requirements and your time/financial budgets for meeting those requirements there's alot we can't say. Will the site be serving up cachable articles or doing complex calculations for each of those 10,000 visitors? Even a low traffic site running openx will crash the server and find themselves booted off shared hostgator hosting (for instance). So sure you can deliver the site without using one - but you cut the security aspect down to the most basic protection and I believe that is a good reason to use a library/framework/cms as there will be a group of people working to ensure the security is good enough. In some cases, like WordPress (cms) it also makes you a target and that needs to be taken into account too. The key reason people use frameworks, I believe, is that they can deliver a product to their client on time and on budget more easily than if they recreate the wheel.
a PHP script that is not on a framework is lighter, and can handle traffic. Traffic handling is usually dependent on database access, so you must optimize database access. You may also use some web servers like litespeed and varnish plugins to increase performance.
Already answered many times, but frameworks are generally a bad thing. I've used them before (sometimes heavily) and have phased out the practice to only things personally used by me (and not redistributed, I use a graphing API for analytics for instance.) It is a time saver, but you usually do not need most of the functions which a framework used - rendering it unnecessary. In PHP you don't even have the excuse of functions to save time really - since everything you can dream of is already function. file_get_contents(), function_exists(), levenshtein(), trim(), rtrim() and ltrim() are all functions. Hell, there's even a similar_text() function. What more do you want? I can read an RSS feed with one function. No other language lets you do that off the bat. Facebook compiles their PHP to C. It is optimized as f**k. Unfortunate about the lack of that on the frontend though.
Frameworks are often necessary to offload complex issues and make development easier, while it's true that they add another overhead, they also can have tons of features that help performance for traffic heavy sites ( load balancing, cdn etc ). What it really comes down to is that if you're writing a highly interactive site, that is dynamic ( needs constant code updates ) then a framework is definitely the way to go. As to how much users raw vs framework, thats generally a web server issue unless the framework is horribly coded ( and the same can happen with your raw code ).
If you are not using any framework then write well optimized queries and short codes instead of long queries. I reckon any PHP script can handle any amount of users if you Optimize it correctly.