PHP开发人员寻找相当于为Java EE架构解决方案 [英] PHP developer looking for solutions equivalent to Java EE architecture

查看:80
本文介绍了PHP开发人员寻找相当于为Java EE架构解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个PHP开发人员,我了解Java EE技术,我想实现这种技术(n层,EJB,JPA ...)用PHP和所有与什么(MySQL和Apache的......)的到来。

I am a PHP developer, I read about Java EE technologies and I want to implement such technologies( n-tier, EJB, JPA...) with PHP and all what coming with (MySQL, Apache...).

推荐答案

不要

PHP不是Java。编写PHP code像你编写Java code是的的,适得其反。这很可能使code以后的维护者想伤害你。

PHP is not Java. Writing PHP code like you'd write Java code is silly and counterproductive. It's very likely to make future maintainers of the code want to hurt you.

需要坚持的对象? 使用ORM

需要一个多层体系结构?如果你有关注适当分离设计你的code,你已经得到了那里的路9 /十分之。

Need a multi-tier architecture? If you design your code with proper separation of concerns, you've already gotten 9/10ths of the way there.

EJB的?每次我读了维基百科的文章,他们在不同的描述。可重用的组件?随着标准化的接口是什么,分布式应用程序和数据持久性?有用的,是的,但是这不是PHP。奥姆斯和一个好消息/工作队列将完成这项工作。

EJBs? Every time I read the Wikipedia article, they're described differently. Reusable components? With a standardized interface for what, distributed applications and data persistence? Useful, yeah, but that's not PHP. ORMs and a a good message/work queue will get the job done.

底线:对于绝大多数的PHP脚本,你不需要任何企业级技术。如果你这样做,你做错了什么,你不是已经有overarchitected的应用程序,或者你选择了错误的平台。

The bottom line: For the vast majority of PHP scripts, you will not need any "enterprise technologies." If you do, you're doing something wrong: either you've having overarchitected the application, or you've chosen the wrong platform.

通过拾取a现代的PHP框架,并从那里建立自己的应用程序。如果你从Java的到来,那么Zend框架会显得最少国外。 Kohana的,Symfony和codeIgniter都是值得的。避免蛋糕现在。

Start by picking a modern PHP framework, and build your application from there. If you're coming from Java, then Zend Framework will seem the least foreign. Kohana, Symfony and CodeIgniter are all worthwhile. Avoid Cake for now.

保持简单的,你不能出差错。

这篇关于PHP开发人员寻找相当于为Java EE架构解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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