Grails值得吗? [英] Is Grails worth it?

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

问题描述



值得使用Grails吗?我试图开发一个相对简单的数据库驱动的Web应用程序。我的专长是Java,所以Grails自然是一个不错的选择。起初我想过使用Spring,JPA和Hibernate,但之前我曾经使用它,并且遇到了各种繁琐的配置和编码工作。 Grails宣称自己正在解决这个问题。



对于Grails而言,我最大的挫折就是所有不起作用的小事情。我的意思是,它不会像直觉上认为的那样工作。边缘很粗糙。我经常遇到问题。有时候,这是我缺乏对Grails的理解 - 其他时候我发现了合法的Grails错误。



一个主要问题是缺少良好的Eclipse集成。有一个Groovy和Grails插件,但除语法高亮之外,它没有什么其他功能。从Java调用Groovy,反之亦然是非常痛苦的配置。没有良好的IDE支持是一个很大的失望。



我会坐下来试图开发我的web应用程序。在一天结束时,我意识到我已经花了大约85%的时间来调试与Grails相关的问题。如果它不是Eclipse问题,那么它是急切加载在视图中提取 a>,一对多关系奇怪的空文件错误行为一个奇怪的属性/获取器错误 - 它只是继续下去。这仅仅是我今天遇到的问题的一个例子。我最后一次与Grails坐在一起,产生了大量不同的问题。



我有时会怀疑它是否值得。我很好奇,如果别人经历过这个。有人真的使用Grails来高效地开发Web应用程序吗?是否还有其他的快速网站开发框架,我应该考虑?

我们有一个12人的团队,从0.6B开始学习Grails的开发人员,我们仍然在开发基于Grails的项目。我不愿意回到Java,我们都很高兴能够打破如何快速获得Grails应用程序的快感。



这是一场艰苦的斗争,这并不容易,而且还有沮丧。



考虑到我们正在进行的努力,我们很快就会遇到问题。

我听说过好几位擅长Java的开发人员试图深入Grails项目的深层复杂咒语。我们避开了所有Java,进入了纯粹的Grails和Groovy。我们确保我们开始变得简单,尽可能以可管理和实用的方式构建复杂性。我们不敢潜入最深处,并希望我们的Java知识足以承载我们。

我们最终创造了一些巨大而复杂的东西,它的功能非常出色,并且比编写纯Java / Spring / Hibernate版本的速度快得多。那些没有体面的IDE支持,并且在bug比今天糟糕的情况下。

关于Eclipse支持,唯一真正用于Grails / Groovy的IDE是Intellij - Eclipse的支持很落后,可悲的是:我是一个Eclipse爱好者,远不是Intellij转换器 - Grails / Groovy支持让所有其他东西都受到打击。


是的,与Spring相比,Grails可能还不成熟。或休眠。我敢打赌,在他们存在的头一年内,他们同样充满了问题。

就这样,把责任交给你,注意你把复杂性降到绝对最低限度,仔细测试(在我们看来)逐渐小心逐步建立复杂性。

一旦将Spring / Hibernate包含在堆栈中,Java就没有快速代码解决方案。 Grails所体现的复杂性反映了Spring / Hibernate自身的复杂性。如果你觉得你花时间用纯Java做的更好,那么我就不会反驳了。我仍然有我的WTF,但现在我的学习曲线很陡峭,我想我会继续坚持Grails。 p>

This is half rant, half question.

Is it worth using Grails? I'm trying to develop a relatively simple database-driven web application. My expertise is in Java, so naturally Grails seemed like a good choice. At first I thought of using Spring, JPA and Hibernate, but I’ve used that previously and have run into all sorts of tedious configuration and coding work. Grails advertises itself as solving this.

My biggest frustration with Grails is all of the little things that don't work. What I mean is that it doesn't work as one would intuitively think it should. It's very rough around the edges. I run into problems constantly. Sometimes it's my lack of Grails understanding — other times I've discovered legitimate Grails bugs.

One major issue is the lack of good Eclipse integration. There is a Groovy and Grails plugin, but it doesn't do much other than syntax highlighting. Calling Groovy from Java and vice versa is very painful to configure. Not having good IDE support is a major bummer.

What happens is I sit down trying to develop my web application. At the end of the day I realize that I've spent about 85% of the day debugging Grails-related issues. If it isn't Eclipse problems then it's eager loading, fetching in the view, one-to-many relationships, weird empty file bug behavior, a weird property/getter bug — it just goes on and on. This is just a sample of the issues I ran into today. My last sit-down with Grails yielded a whole bunch of different issues.

I sometimes wonder if it's worth it. I'm curious if others have experienced this. Are there people actually using Grails to productively crank out a web application? Are there other frameworks for rapid web development that I should be considering?

解决方案

We had a team of 12 people all seasoned senior Java devs who learnt Grails from 0.6B and we are all still working on projects based on Grails. I wouldn't go back to Java willingly, and we are all relieved to have broken the back of how to get somewhere quick with a Grails app.

It was a struggle, it was not easy and there was/is frustration.

Nevertheless we delivered something very quickly given our ongoing efforts.. There are bugs, many which have workarounds.

I have heard of several instances of developers who are good at Java trying to dive into deep, complex incantations of Grails projects. We eschewed all Java and went pure-Grails and Groovy. We made sure we started simple, built up the complexity as manageably and as practically as possible.. We dared not dive in the deepest end and hope that our Java knowledge was enough to carry us.

We had eventually created something huge and complex that worked fabulously and did so far faster than writing pure Java/Spring/Hibernate version; and thats without decent IDE support and a far worse situation in terms of bugs than today.

As regards Eclipse support, the only real IDE to use for Grails/Groovy is Intellij - the Eclipse support is way behind, sadly: I was an Eclipse lover and am far from being an Intellij convert - the Grails/Groovy support blow everything else away though.

Yes, Grails is immature compared to Spring perhaps. Or Hibernate. And I would wager that in the first 1.5 years of their existence they were equally as fraught with issue.

That being as it is, places the onus on you, to take care that you keep complexity to the absolute minimum, to carefully test-first (in our opinion) and build up to complexity gradually and with care.

There is no fast code solution with Java once you involve Spring/Hibernate in the stack. The complexity Grails embodies is a reflection of Spring's / Hibernate's own complexity. If you feel that you time is better spent doing it with pure Java, I wouldn't argue otherwise.. I still have my WTFs but now that the steep learning curve is behind me I think I will stick w Grails some more.

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

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