Grails(现在)值得吗? [英] Is Grails (now) worth it?

查看:98
本文介绍了Grails(现在)值得吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个重复,但是,自从Grails世界发生了很大变化以来,这个问题在一年多以前就被问过了,因为Eclipse支持IDE,所以请不要盲目关闭它。



我认为答案是肯定的,并开始着手新项目 Grails 1.2.0 ,并调用Groovy / Grails中的 STS Eclipse集成



我认为这个问题值得在Grails进化一年后重新审视,当时答案肯定是混合的。 b
$ b因此,作为一名经验丰富的Java Web开发人员,我有这些问题,并且很感谢我的假设:




  • Grails现在是否值得与Ruby或自己推出?

  • 是否克服了它的错误开始?
  • 它真的能带来快速的发展收益吗? (我承认我现在挣扎了,我已经超越了广泛的基线配置,使我的定制应用程序不是列表和面向页面的)

  • 它是否表现真实世界生产应用?
  • Eclipse插件是否比它更好,适合用途?
  • 编辑:
    我正在学习,我有一些重要的抱怨要与框架一起生活 - 而不是框架能力本身。我加入了这些,因为我认为他们应该是考虑因素,并且基于我的经验和意见,并可能帮助正在尝试决定是否参加Grails的人。我也可能表现出我对这个框架缺乏经验,所以这些都不是意味深长的批评。我是一位经验丰富的开发人员,这就是我发现的:



    调试确实很难。事实上,这几乎是不可能的,特别是作为框架中的初学者,这是您最需要可靠的调试器朋友的时候。我已经花费了更多的时间,比我应该跟踪代码的某些部分中的语法错误问题来处理引起堆栈中某处静默失败的域字段。



    记录是非常可怕的。你有两种模式,没有用处和无用的东西。我的调试日志在单页请求后为128Mb,并且不包含有关我的错误的信息。在我看来,整个日志记录需要在框架中重新考虑。



    STS Eclipse IDE具有边际价值。除语法高亮以外,它没有多大用处。你不能调试代码,所以它是一个荣耀的编辑器。代码提示是不完整的,并且据我所知,根本没有GSP支持。它也是我桌面上最慢的Eclipse插件 - 启动大约2分钟。这是令人震惊的缓慢。我已经恢复到了一个文本编辑器(你会注意到所有的在线教程视频也是这样)以及一些自定义的语法高亮。



    我有一些严重的问题关于表现。有点言过其实,但我已经发现自己正在调整数据库,因为休眠。也许这是可以预料的,但我真的必须保持我的领域模型简单,以便为约定产生性能查询。



    最后一个约定是你的逻辑领域模型和您的物理数据库模型应该是相同的并不是一个聪明的默认设置,并且不可能在现实世界中成为事实。我知道你们可以将两者分开,但是这会造成一定程度的复杂性,我认为如果这些公约得到延伸,我们可以避免这种复杂性。没有足够的关于作文的文献和你需要做的,以使其在实践中工作

    解决方案

    现在我已经使用Grails超过4个月了,我会尝试给你我个人对Grails及其可用性的感受。


    Grails现在是否值得与Ruby或其他自己的产品进行比较?


    当然,答案不是'是'或'否',而是取决于。这取决于你的需求(你是否需要进入Java世界?),还有你的偏好(你更喜欢面向领域的开发,你更喜欢Groovy ......)?
    但是,我可以回答说,Grails是Rails的一个严重替代品。我相信无论您的Rails应用程序是什么,您都可以使用Grails来完成。但取决于项目的性质,它可能需要更多或更少的时间。同样,如果你熟悉Rails,但不熟悉Grails,Rails是更安全的选择。


    $ b


    它是否克服了它的错误开始? p>

    。如果你看看我的初始信息(在这个网站或其他网站上),我抱怨了很多关于Grails的bug。但是,您只需要记住Grails在边缘有点粗糙(比如,不要过多使用域继承),并且一旦您熟悉框架,就不会遇到太多不好的惊喜。我并不是说Grails不是越野车。它肯定比Rails更多。但是,它比更有用。对此的建议是:尽量少使用插件。因为他们中的很多人都是越野车,有些人彼此不兼容。所以,除非你确定grails插件是最新的,非侵入性的和被测试的(自己),否则不要包含grails插件。


    它真的能带来快速的开发好处吗? 你几乎不需要处理数据库设计。由于使用了Convention over Configuration,所以从一开始几乎为您完成配置。您的应用程序很容易维护。我看到的唯一缺点是前端开发并不像其他技术(如Rails或ASP)那样丰富


    它是否执行真正的世界生产应用程序?

    我不能说,因为我仍然没有去我的网站生活,但我很自信,因为 sky.com 正在使用Grails,并且这些网站吸引了大量流量 - 每天约有700万美元的页面浏览量。性能再次取决于您的应用程序架构和设计决策。


    Eclipse插件是否比它更好,适合用途?


    不知道。我使用的是IntelliJ,但据我所知在Grails领域发出的抱怨消息,我认为它并不比一年前好。

    我希望它有帮助。

    >

    I know this is a duplicate, however, the Grails world has moved on considerably since that question was asked more than a year ago, as has the IDE support in Eclipse, so please don't just blindly close it.

    I thought the answer was yes and have embarked on a new project with Grails 1.2.0 and have flirted with the Groovy/Grails bits of the STS Eclipse Integration.

    I think the question deserves revisiting after a year of Grails evolution, when the answer was definitely mixed.

    So, as an experienced Java web developer I have these questions and would appreciate my assumptions being challenged:

    • Is Grails now worth it vs. Ruby or roll your own?
    • Has it overcome its buggy start?
    • Does it really confer rapid development benefits? (I admit I am struggling now I am past the extensive baseline configuration to make my bespoke app which is not list and page oriented)
    • Does it perform for real world production apps? (It feels heavy)
    • Is the Eclipse plug-in better than it was and fit for purpose? (I think not yet)

    Thanks

    EDIT: I am learning as I go and I have a couple of significant gripes to make about living with the framework - rather than framework capabilities themselves. I am adding these because I think they should be considerations and are based on my experience and opinion, and may help someone who is trying to decide whether to go grails. I may also be showing my lack of experience with the framework, so none of this is meant as out and out criticisms. I am an experienced developer and this is what I have found:

    Debugging is really hard. In fact it is almost impossible, especially as a beginner in the framework, which is when you need your trusty debugger friend the most. I have spent way more time than I ought to tracking down problems of syntactical errors in some part of the code to do with referring to domain fields which cause silent failures somewhere in the stack.

    Logging is frankly awful. You have two modes, "nothing useful" and "an inordinate amount of useless stuff". My debug log was 128Mb after a single page request and contains nothing about my error. The whole issue of logging needs reconsideration in the framework in my opinion.

    The STS Eclipse IDE is of marginal value. Other than syntax hilighting it is not much use. You can't debug the code so it is a glorified editor. The code hints are patchy and there is no GSP support at all as far as I can see. It also is the slowest Eclipse plug-in I have on my desktop - by about 2 minutes to start up. It is shockingly slow. I have reverted to a text editor (which you'll notice all the online tutorial videos do too) and some custom syntax hilighting.

    I have some serious concerns about performance. A bit too early to say, but I am already finding myself tweaking the database because of hibernate. Perhaps that's to be expected, but I am really having to keep my domain model simple for the conventions to yield performant queries.

    And one last one, the convention that your logical domain model and your physical database model should be identical is not a smart default and unlikely ever to be the case in the real world. I know you can separate the two, but it creates a degree of complexity which I think could be avoided if the conventions were extended. There is inadequate documentation about composition and what you need to do to make it work in practice.

    解决方案

    I have been using Grails more than 4 months now and I will try to give you my personal feeling about Grails and its usability.

    Is Grails now worth it vs Ruby or other roll your own?

    Of course, the answer is not 'Yes' or 'No' but it depends. It depends on your requirements (do you need to be in the Java World?), on your preferences as well (do you prefer the domain-oriented development, do you prefer Groovy...)? However, I can answer that Grails is a serious alternative to Rails. I believe that whatever is your Rails application, you can do it with Grails as well. But depending on the nature of your project, it might take more or less time. Again, if you are familiar with Rails but not with Grails, Rails is the safer option.

    Has it overcome its buggy start?

    Yes. If you take a look at my initial messages (in this website or others), I was complaining a lot about Grails bugs. But, you just need to remember that Grails is a little rough on the edge (not too much use of domain inheritance ,for instance) and once you are familiar with the framework, you don't experience too much bad surprises. I am not saying that Grails is not buggy. It is certainly more than Rails. But also, it is more usable than buggy. A piece of advice for that : use as few plugins as possible. Because many of them are buggy and some are not compatible among themselves. So, do not include grails plugin unless you are sure that the grails plugin is up-to-date, non-intrusive and tested (by yourself).

    Does it really confer rapid development benefits?

    Yes. You almost do not need to deal with DB design. Configuration is almost done for you from the beginning thanks to Convention over Configuration. Your application is easily maintenable. The only drawback I see is front-end development that is not as rich as other technologies (like Rails or ASP)

    Does it perform for real world production apps?

    I cannot say because I still didn't go my website live but I am pretty confident since sky.com is using Grails and the sites attract significant traffic - around 7 million page views per day . Again performance depends a lot on your application architecture and design decisions.

    Is the Eclipse plug-in better than it was and fit for purpose?

    No idea. I am using IntelliJ but I guess it is not much better than one year ago according to complaining messages I see on the Grails realm.

    I hope it helps.

    这篇关于Grails(现在)值得吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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