选择语言 Groovy 与 Java 的标准是什么?
选择 groovy on grails 框架或基于普通 spring MVC 的 java 应用程序时要考虑哪些参数。
考虑一个交易网站 www.deals2buy.com 网站,其中有 - 网站内容丰富(仅图片) - 给管理员的报告 - 正常的CRUD操作 - 优惠最后几天交通繁忙 对于这种应用程序,您会选择哪种语言/技术?
提前致谢。 爱好者
What are the parameters considered in selecting groovy on grails framework or plain spring MVC based java application.
Considering a deals site www.deals2buy.com site which has
-rich content(images only) on the website
-reports for the admin
-normal CRUD operations
-heavy traffic on last days of the deals
Which language/technology would you choose for this kind of application?
Thanks in advance.
enthusiasts
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的第二点:如果您需要每一点性能,我会说直接选择 Java。但当然,考虑到您可以混合和匹配两者,从另一个调用一个,您可以在 Groovy 中工作并调用 Java 来满足所有需要性能的需求。
Groovy/Grails 将为您提供更快的周转、脚手架、gorm、更少的代码以及通常大量的语法糖。而且速度更慢。
Java 具有速度快,如果将 Java 与用于放置 Web 应用程序的各种可用容器之一进行比较,这是非常好的、成熟的管理工具(这对生产很有好处!)。
但同样,由于 Groovy 在 JVM 上运行,您应该能够在 Groovy 中进行开发,并将应用程序部署在 Java 容器中,并拥有管理工具(在本例中为 Groovy!= Grails)。
那么问题就变成:拥有良好的管理工具有多重要?您需要尽可能快的速度吗?您觉得哪种语法更舒服?生成器/gorm 将为您带来多少开发生产力(在 Java 中没有什么是您做不到的)?您打算如何表达自己的观点:JSP、JSF、任何其他模板框架还是更喜欢 groovy 模板?
My 2ct: if you need each single bit of performance I'd say go straight for Java. But of course given the fact that you can mix and match both, call one from another, you could work in Groovy and call Java for all that needs performance.
Groovy/Grails will give you faster turnaround, scaffolding, gorm, much less code and generally a lot of syntax sugar. And less speed.
Java has speed, and if comparing Java on one of the wide range of available containers to put your web app in, very good and mature management tools (which is good for production!).
But again since Groovy runs on JVM you should be able to develop in Groovy and deploy the app in a Java container and have your management tools (in this scenario Groovy != Grails).
So it will turn down to: how important it is to have good management tools? do you need all the speed you can get? which syntax do you feel more comfortable with? how much development productivity will the generators/gorm buy you (there is nothing you couldn't do in Java)? how do you plan to make your views: JSP, JSF, any other templating framework or prefer groovy templates?