Have you ever come across an actual php limitation in web design?

Apart from scalability issues, has anyone here actually stumbled upon a web development problem where PHP just didn't cut it and had to switch to another language / platform?

I am interested in specific scenarios and how to handle them.

Thank.

+2


source to share


3 answers


I have been working as a PHP developer (sometimes on projects, not too small) for over 3 years now and I have never come across anything that PHP would not let me do .

Of course, you sometimes / always have to use multiple servers, another piece of software (database, reverse proxy, cache, ...); but this part of the game; -)

In fact, the best thing about PHP is its "glue" nature . What PHP does is allow you to glue stuff together, build your application using different components.
And PHP does it very well.

Sometimes you need to program in C to code a PHP extension to glue to something that nobody else has ever used (there are many PHP extensions that do this already like mysql or curl, just to say two names); but there are so many extensions that already exist that I have never had to do it - even if I do it once, or just, just for fun; -)


It's important to note that there is probably always a solution to your problems:



  • You are talking about scalability; how about caching? using multiple servers? using a reverse proxy? PHP has no problem with this.
  • And as you can see on SO (and in many places): PHP has a great community!


If I had to think about PHP not being a good fit, I would say "comet": PHP model of one process per request is not suitable for long polling, etc ...

PHP is not very good for long batches; and you often have some of these along with your web application; and using the same language allows code reuse - yet I've always found a (not too hard) solution.

Oh, and I would say, too: PHP is great for web applications ... But not so good when it comes to desktop applications - even if possible (see PHP-GTK for example).

+13


source


The only limit I have ever reached as a programmer was my own ability. I have worked on sites that were making several hundred hits a day, and maintained software for a network of sites running over 1 million One-Time / Day, and both were running the same software. There was no pressure on PHP, pressure on me was building PHP, servers and databases work together to use them correctly and do things in a scalable way.

  • Optimizing queries
  • Database optimization
  • HTTP caching
  • Memcache / APC
  • Server optimization
  • Master / Slave database setup
  • Profiling
  • Choosing the Right Amount of DB Normalization
  • Proper logging (only logging what is useful and not so much writing that it becomes useless)
  • Attention to detail
  • Appropriate testing
  • Organization of the code
  • Version control with good forking / tags
  • File servers versus web and database servers
  • Reverse proxies
  • General security (preventing SQL Injection , preventing XSS attacks , session hijacking , etc.)

All things are learned on the way to becoming a better programmer. There are very few languages ​​out there that cannot run any website on the internet without the proper hardware. Most of your job as a programmer is the best way to take advantage of this hardware.



There are things, however, that PHP is not that good in nature. Such things would include:

  • Desktop software (although possible)
  • Demons (again, maybe)
  • Small scale string manipulation (e.g. scraping sites) in a timely manner
+10


source


PHP terminates Turing, so it technically has no limits than any other language. However, there are things that are easier for me to do in other languages.

+3


source







All Articles