在 Web 应用程序的后端使用 Java中间件中的php
我期待在后端使用 Java 开发社交网络应用程序(以支持 Cassandra 数据库的操作)和中间件中的php。这种做法有好处吗?上述策略有什么缺点吗?
是否有其他更好的选择来确保可扩展的架构?
编辑:你们认为完全用 JAVA (J2EE) 来做这件事怎么样?
I am looking forward to developing a social web application using Java in backend (to support operations from Cassandra database) & php in the middleware. Is this kind of approach beneficial ? Any downsides of the above strategy ?
Are there other better options to ensure a scalable architecture ?
Edit : What do you guys think about doing it completely in JAVA (J2EE)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
混合 PHP 和 Java 会带来一些好处:
被介绍给的开发人员
代码,因为他们必须学习
两种编程语言。
我个人提倡使用 Struts 2 MVC 架构,通过 Spring 集成来处理使用 Hibernate 或 IBatis 的数据访问,或者您可能将模型层连接到的任何服务/后端。
如果您与 PHP 紧密相关,我建议您坚持使用纯 PHP 和 MySQL,因为当您寻找其他开发人员加入该项目时,您有一个完整的社区可以帮助您进行故障排除、支持和技术帮助。
Mixing PHP and Java does a few things:
developers who are introduced to the
code, since they will have to learn
both programming languages.
I, personally, advocate the Struts 2 MVC architecture, with Spring integration to handle your data access using Hibernate or IBatis, or to whatever service/backend you may be connecting your model layer to.
If you are tied to PHP, I would suggest sticking with pure PHP and MySQL, since you have an entire community to help with troubleshooting, support, and technical help when you are looking for other developers to join the project.
缺点是产品拥有多种编程技术,从您描述的方式来看,在您完全定义程序将如何发展和改变之前,目前只有一种技术可以满足要求,而这种技术甚至还没有开始。你认为事情今天会如何发展,而不是项目完成后会如何发展。通过创建分层/多方面的程序运行时环境,您将造成调试、扩展和开发的噩梦。开始行动,然后重新定义您的需求,看看是否需要这些极其复杂的结构。
The downside is having multiple programming technologies for a product that, from the way you described it, hasn't even started yet when a single one could fit the bill for the time being until you completely define how the program is going to evolve and change. How you think things are going to turn out today it not how they will turn out when the project is finished. By creating a tiered / multi faceted program runtime environment, you will be creating a debugging, scaling, and development nightmare. Get off the ground and then redefine your requirements to see if these massively complex structures are needed.
我通常认为,如果您可以管理增加的复杂性,那么这是一个很好的方法。
好处是:
比 Java 开发更容易学习
然后,正如杰弗里·瓦格纳(Geoffrey Wagner)指出的那样,它增加了很多复杂性,您应该非常确定您需要这种设置。
I generally think it's a good approach if you can manage the added complexity.
The benefits are:
easier to learn than Java development
Then again as Geoffrey Wagner pointed out, it adds a lot of complexity and you should be very sure you need this kind of setup.