Do you know of any tool that would do like Ruby on Rails' Scaffolding (create simple CRUD pages for any particular class to allow quickly populating a database with dummy data), only which used Java classes with Hibernate for database access, and JSP/JSF for the pages?
你知道任何像Ruby on Rails'Scaffolding那样的工具(为任何特定的类创建简单的CRUD页面以允许用虚拟数据快速填充数据库),只使用带有Hibernate的Java类进行数据库访问,以及JSP / JSF对于页面?
It is a drag when you are programming one part of an application, but need data that can only be added with another part that is not ready yet, or very cumbersomely by directly inserting it into the DB.
当您编写应用程序的一部分时,这是一个拖累,但需要的数据只能添加到尚未准备好的另一部分,或者通过直接将其插入数据库非常麻烦。
7 个解决方案
#1
5
Grails is a very nice Rails-like framework built on top of Spring MVC. For persistence, they use GORM, which is basically an ActiveRecord-like framework built on top of Hibernate. Pretty slick.
Grails是一个非常好的Rails类框架,构建在Spring MVC之上。对于持久性,他们使用GORM,它基本上是一个基于Hibernate构建的类似ActiveRecord的框架。非常漂亮。
If you already have Hibernate entities, they can actually be used immediately in Grails with no additional work.
如果您已经拥有Hibernate实体,它们实际上可以立即在Grails中使用而无需额外的工作。
#2
4
You can try Telosys Tools, an Eclipse plugin for code generation (scaffolding) working from an existing database with customizable Velocity templates. It's very simple and easy to use.
您可以尝试使用Telosys Tools,这是一个用于代码生成的Eclipse插件(脚手架),可以使用可定制的Velocity模板在现有数据库中工作。它非常简单易用。
The tutorial for code generation with Spring MVC and Spring Data is here : https://sites.google.com/site/telosystutorial/
使用Spring MVC和Spring Data生成代码的教程如下:https://sites.google.com/site/telosystutorial/
See also : http://tools.telosys.org/
另见:http://tools.telosys.org/
Eclipse Marketplace : http://marketplace.eclipse.org/content/telosys-tools
Eclipse Marketplace:http://marketplace.eclipse.org/content/telosys-tools
#3
2
I'm a little late on this one but it popped up in the "Related" links →
我在这个问题上有点晚了,但它出现在“相关”链接→
JBoss Seam and it's Seam Gen tasks are exactly what you are looking for (Hibernate + JSF). You can generate an entire web app from a Hibernate fronted database in seconds.
JBoss Seam和它的Seam Gen任务正是你正在寻找的(Hibernate + JSF)。您可以在几秒钟内从Hibernate前端数据库生成整个Web应用程序。
#4
1
you can use grails. Grails tries to be Groovy on Rails -- uses Rails behind the scene for scaffolding, etc. Since you can pretty much write full scale java code in a groovy class, you can have the CAKE and EAT IT too.
你可以用grails。 Grails试图在Rails上使用Groovy - 在场景后面使用Rails进行脚手架等等。因为你可以在groovy类中编写完整的Java代码,你也可以拥有CAKE和EAT IT。
#5
0
Grails is somewhat different from Rails, even though it was based on Rails and has a similar feel. Grails uses spring to help wire your services together. The environment is not only dynamic (with Groovy) but also allows you to use Java (static environment) as well. It is really cool, especially if you're coming from a java environment. The Grails folks took the Rails idea and expanded it using the Domain Driven Model. Rails is still data model centric where you have to deal a lot with the database to create your objects (which is called a model), where as Grails allows you to design applications using the true domain object model where you deal with objects from the domain class' perspective instead of the database.
Grails与Rails有些不同,尽管它基于Rails并且有类似的感觉。 Grails使用spring来帮助您将服务连接在一起。环境不仅是动态的(使用Groovy),而且还允许您使用Java(静态环境)。这真的很酷,特别是如果你来自java环境。 Grails的人们采用了Rails的想法,并使用Domain Driven Model扩展了它。 Rails仍然是以数据模型为中心的,你必须处理很多数据库才能创建你的对象(称为模型),而Grails允许你使用真正的域对象模型设计应用程序,你可以在这里处理来自域的对象类的透视而不是数据库。
#6
0
There is a good tutorial here on how to do this in Netbeans. I've used this wizard before with good results. Out of the box you can select which persistance framework to use and the JSF pages it produces are quite nice and clean.
这里有一个关于如何在Netbeans中执行此操作的好教程。我之前使用过这个向导,效果很好。开箱即用,你可以选择使用哪个持久性框架,它生成的JSF页面非常好,干净。
#7
#1
5
Grails is a very nice Rails-like framework built on top of Spring MVC. For persistence, they use GORM, which is basically an ActiveRecord-like framework built on top of Hibernate. Pretty slick.
Grails是一个非常好的Rails类框架,构建在Spring MVC之上。对于持久性,他们使用GORM,它基本上是一个基于Hibernate构建的类似ActiveRecord的框架。非常漂亮。
If you already have Hibernate entities, they can actually be used immediately in Grails with no additional work.
如果您已经拥有Hibernate实体,它们实际上可以立即在Grails中使用而无需额外的工作。
#2
4
You can try Telosys Tools, an Eclipse plugin for code generation (scaffolding) working from an existing database with customizable Velocity templates. It's very simple and easy to use.
您可以尝试使用Telosys Tools,这是一个用于代码生成的Eclipse插件(脚手架),可以使用可定制的Velocity模板在现有数据库中工作。它非常简单易用。
The tutorial for code generation with Spring MVC and Spring Data is here : https://sites.google.com/site/telosystutorial/
使用Spring MVC和Spring Data生成代码的教程如下:https://sites.google.com/site/telosystutorial/
See also : http://tools.telosys.org/
另见:http://tools.telosys.org/
Eclipse Marketplace : http://marketplace.eclipse.org/content/telosys-tools
Eclipse Marketplace:http://marketplace.eclipse.org/content/telosys-tools
#3
2
I'm a little late on this one but it popped up in the "Related" links →
我在这个问题上有点晚了,但它出现在“相关”链接→
JBoss Seam and it's Seam Gen tasks are exactly what you are looking for (Hibernate + JSF). You can generate an entire web app from a Hibernate fronted database in seconds.
JBoss Seam和它的Seam Gen任务正是你正在寻找的(Hibernate + JSF)。您可以在几秒钟内从Hibernate前端数据库生成整个Web应用程序。
#4
1
you can use grails. Grails tries to be Groovy on Rails -- uses Rails behind the scene for scaffolding, etc. Since you can pretty much write full scale java code in a groovy class, you can have the CAKE and EAT IT too.
你可以用grails。 Grails试图在Rails上使用Groovy - 在场景后面使用Rails进行脚手架等等。因为你可以在groovy类中编写完整的Java代码,你也可以拥有CAKE和EAT IT。
#5
0
Grails is somewhat different from Rails, even though it was based on Rails and has a similar feel. Grails uses spring to help wire your services together. The environment is not only dynamic (with Groovy) but also allows you to use Java (static environment) as well. It is really cool, especially if you're coming from a java environment. The Grails folks took the Rails idea and expanded it using the Domain Driven Model. Rails is still data model centric where you have to deal a lot with the database to create your objects (which is called a model), where as Grails allows you to design applications using the true domain object model where you deal with objects from the domain class' perspective instead of the database.
Grails与Rails有些不同,尽管它基于Rails并且有类似的感觉。 Grails使用spring来帮助您将服务连接在一起。环境不仅是动态的(使用Groovy),而且还允许您使用Java(静态环境)。这真的很酷,特别是如果你来自java环境。 Grails的人们采用了Rails的想法,并使用Domain Driven Model扩展了它。 Rails仍然是以数据模型为中心的,你必须处理很多数据库才能创建你的对象(称为模型),而Grails允许你使用真正的域对象模型设计应用程序,你可以在这里处理来自域的对象类的透视而不是数据库。
#6
0
There is a good tutorial here on how to do this in Netbeans. I've used this wizard before with good results. Out of the box you can select which persistance framework to use and the JSF pages it produces are quite nice and clean.
这里有一个关于如何在Netbeans中执行此操作的好教程。我之前使用过这个向导,效果很好。开箱即用,你可以选择使用哪个持久性框架,它生成的JSF页面非常好,干净。