PHP MVC/ORM Frameworks that are Hyper PHP (HipHop)

2019-05-31 13:43发布

问题:

Is there a good list of the PHP MVC/ORM Frameworks that will work with Facebook's HipHop?

回答1:

First of all, you should know that currently HipHop does not have full PHP 5.3 support and you cannot use all extensions.

Second , if you are going to build an application which is comparable in size and userbase to facebook ( which i honestly doubt ), then using ORM would be one of the best ways how to sink the project.

I have no intentions of repeating the same song & dance about ORMs again , so , read this earlier comment.

And the last: in large project people do not use canned frameworks. They write one in-house and then use it, because large scale project have very specific requirements, while popular mvc frameworks tend to have everything-but-kitchen-sink approach for adding features.

And if you are not building project that is as large as Facebook, then you do not need HipHop.



回答2:

Unless you actually have a performance problem that can be directly attributed to PHP's performance, then I'd strongly advise avoiding HipHop. It can certainly (if used properly) handle extremely high traffic, but it also isn't fully compatible with PHP. As has already been stated, not all PHP extensions work with HipHop.

If you are having performance issues, then there are other alternatives you can look at before having to resort to HipHop. First, review the performance of your scripts, determine the bottlenecks and optimize them. This is the part of the application you have the most control over and therefore the place where you should start. Interaction with external resources, especially databases and remote servers, are a good starting point as this is where operations tend to have the most time-expense. Database performance can be improved by reducing the query load and wise choice of indexes for the tables (Hint, ORM tends to produce very sub-optimal query patterns). You can also offload especially expensive operations to cron-jobs to be run offline and have the online script just queue the operation.

If this doesn't provide enough of a performance boost, then there's APC which caches PHP code in a "byte code" (for want of a better term) that doesn't have to be parsed before it can be run by the Zend Engine. This provides a performance boost. There are also other things you can do such as caching with memcache, caching results and so on to gain further performance boosts.

If you still haven't gotten enough performance, then, and only then, should you consider HipHop. You should consider it a last resort, not a first resort. You also shouldn't start to worry about optimizing a project until such time as it's demonstrably suffering from performance issues.

Never do premature optimization.



标签: php hiphop