doukan1258 2013-12-26 18:43
浏览 144
已采纳

我对j2ee和php感到困惑[关闭]

As a developer going through web development I would like to know if J2EE or PHP is better for building web sites.

My initial thoughts were that J2EE was better because it is Java based but upon reading several articles I read that PHP might be easier and more focused with regard to web development.

On this topic I have another query, whilst looking at different articles on web design and construction I came across websites that claimed to be built in J2EE, Java and Ruby. Is J2EE the same as Java? Or is it something completely different.

  • 写回答

3条回答 默认 最新

  • douken7402 2013-12-26 19:02
    关注

    First of all, there is no J2EE anymore. There is Java EE. One profile in Java EE is the web profile. So while Java EE has a bunch of complex, enterprise-level stuff in it, you just use the piece you need.

    However, it isn't even like Java EE is the choice for developing web applications in Java. It is the standard, but people have enjoyed great success with open-source frameworks like Spring MVC. If you expand your scope beyond Java to all JVM languages, you have Grails (in Groovy) and Play (in Java but also in Scala) at your disposal as well. Both are extremely good.

    And then there are so many other non-JVM options like Zend (PHP) as you say but also Rails, Django (Python), etc.

    So to truly appreciate what's "better," you need to consider a lot of things:

    • Your comfort and productivity with the language
    • Your comfort and productivity with the "ecosystem"--i.e. accessing third-party libraries to help you with various tasks, ease of mocking and testing, boilerplate code and mundane tasks being abstracted away, ease of implementing caching and minifying web assets, etc.
    • Ability to find help online through a vibrant community
    • Your requirements. If you need to access Amazon S3 buckets, for example, and your language or third-parties libraries in that language have poor S3 support, you should avoid it. Similarly, if you need to use Neo4J as a data store but there is poor support, move on.

    There is no "right" answer to this question. I would suggest the options approach described in Lean Software Development. Do some research to narrow your choices to three. Then get a site up and implement a representative feature with all three choices. The less appropriate choices for you will eliminate themselves and leave the best choice for you.

    As for your last question, Java is a programming language; Java EE is an enterprise software platform utilizing the Java language and the JVM (with multiple profiles as mentioned). The Ruby part of the application you mentioned was probably utilized with JRuby, which enables you to run Ruby on the JVM via JSR 223.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?