是否面向PHP对象? [英] PHP Object Oriented or not?

查看:66
本文介绍了是否面向PHP对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个编写的Web应用程序的开始,没有使用PHP的面向对象功能.

I have a start of a webapp that I wrote without using the Object Oriented features of PHP.

我真的不知道返回并重写我已经完成的部分是否值得.面向对象的PHP是否值得重写一个体面的工作应用程序的全部或一部分?

I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app?

推荐答案

鉴于您的应用程序不完整,我想说将其重新构建为基于对象的应用程序可能会有所帮助.

Given that you have an incomplete app I would say that reworking it into an Object based app will probably be helpful.

要考虑的一件事是最终应用程序的预期大小.在一定的复杂度以下,除了学习经验以外,基于对象的方法可能会过大.

One thing to consider is the expected size of the end application. Below a certain complexity Object based may be overkill except for the learning experience.

我开始避开像瘟疫之类的东西,因为我在大学课堂上对它们的最初介绍很糟糕.最近我不得不从事一个在php对象中实现的项目.进行所需的更改比其他项目容易得多.从那以后,我就经常在对象模型中工作,发现它非常便于快速创建和维护.

I started out avoiding Objects like the plague because my initial introduction to them in university classes was terrible. I somewhat recently had to work on a project which was implemented in php objects. making the required changes was much easier than other projects. I have since then worked in the object model frequently and find it very handy for quick creation and easier upkeep.

这篇关于是否面向PHP对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆