Hacker News new | ask | show | jobs
by zdw 5708 days ago
News flash: A programming language requires knowledge of it's standard library of functions, and can be used in less than clean/optimal ways.

PHP is where it is because it's easy to install, works fairly well, has a huge/comprehensive built in library, and is usable by many types of people. It also has solid documentation on it's website.

If you're really worried about this, use a framework, or templating engine. Smarty is a relatively lightweight solution for splitting logic from presentation, and also handles caching for you.

1 comments

Thanks, I'll consider using Smarty. How about running background processes? What's the accepted way to implement them?
I don't think you can. PHP doesn't really run in a server like Java and .NET do. Zend does have a Server product (http://www.zend.com/en/products/server), I never tried it but it might offer background processes. I normally just use cron to trigger a url.
Or you can use cron to run a script written in PHP.