"I'm about to embark on developing active content (database driven, and web services) for the first time for my website and I have grown to love PHP. Knowing that there are other web development platforms available, and noticing some disdain for PHP in some circles, I'm curious to know which platforms slashdotters prefer along with the reasons why. Before I get started into heavy development I would like to get some opinions and more facts. Why shouldn't I use PHP?"
So lets actually look at the question:
1. Developer has grown to love PHP.
2. Developer is adding active content for the first time.
3. Developer wants to get "the one right truth" before heavy development.
Conclusion: Developer has forgotten the very basic rule of coding: You will throw it away and recode it.
Repeat: You will throw it away and recode it.
If you ever forget that, you do not know how to code.
How do you write the best, high quality code? Answer: You understand the problem. How do you understand a problem? Answer: You write something that looked good initially, failed, and then understood why it failed.
My recommendation: Write a proof of concept -- a small scale demo, something a little more than a mock-up.
Learn from that, and then write the next version. This second version is first written in "english", or "file cards (*)", or "text files". Then it is re-written in some programming language.
This version is the first real version (you just thew away version zero). This is the version that you expect to work. And, in the process, you'll understand exactly what you are trying to do.
The process is no different for a desktop program, an HTML-output report generator, or an HTML/Javascript (with or without async) /CSS/Dom manipulation input and output program.
The goals of programming, of a functioning program, are something along these lines:
1. Work correctly.
2. Work as expected.
3. Work securely.
4. Work fast enough.
(you may switch the order of the last three.)
Ideally, you want:
5. Work quickly.
6. Work with few resources consumed.
Programmer time is a resource. Maintenance time is a resource. Disk space and CPU time are also resources.
Security may be a pain, or impossible, in languages like PHP. Even if your code is 100% perfect, if you are using frameworks, you may have pain. Remember: We just had recent disclosure that most web development systems used some type of hash on the input data as part of their function, said input data was 100% under attacker control, and attackers could do major hash table collision attacks with very little resources consumed, and no way for the developer to counter it.
You love PHP? Fine. Use that for your first trial. Don't fall in love with your first trial.
*: Programming by file cards: This is a way to identify your classes and objects / primary data structures and operations. Get a bunch of file cards -- either 3x5 or 4x6, primarily based on how small you can still write legibly. On each card, you identify one data structure or class, and the primary operations you think you want to perform. If those operations require the use of other data structures/classes, you identify what you want to do with/to those structures.
If a class's requirements -- including what other people want to do to it -- gets too big for your file card, break it up into parts.