How to build n-layered web architecture with PHP?

青春壹個敷衍的年華 提交于 2019-12-01 08:43:25

Everything you want to do is possible with Zend Framework. It follows an MVC architecture and has things like the Zend_Soap component for your services.There is no reason to build some multi-language application when you can keep it all within PHP. Why do you want to use Java so badly?

Gordon

From your description I understand the existing application runs on a LAMP stack. PHP integrates nicely into the LAMP stack and scales well with it. Why do you want to migrate this to a Java ecosystem? Reimplementing the business logic in Java means you throw away the essential working part of the existing app. If there already is a working business layer and DAL, why start from scratch again? Wouldn't refactoring be the smarter (and cheaper) alternative?

In addition, you claim J2EE will provide much better robustness and maintainability. How so? Maintainability is mainly a matter of code architecture and coding style. I am not aware of any pattern in Fowler's PoEAA that cannot be implemented in PHP as well. PHP also provides mature frameworks for UnitTesting, Continuous Integration, ORM, Dependency Injection, Message Queues, Webservices, Deployment, etc. to support your application development.

Sure, Java is compiled and supports multithreading and has a history in enterprise software architecture and I am not denying that it has language features PHP doesn't have. But the question is, do you need them for this project? And let's not forget that a programming language does nothing on it's own. It's the developer who creates the application and J2EE Spaghetti code is still Spaghetti Code.

Just my 2c though :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!