4

Client-side (example)

JavaScript framework: Ember.js, AngularJS or KnockoutJS

Server-side (example)

Python-based: Flask, web2py, Django; or Ruby-based: Rails, Ramaze, Sinatra


Are there any open-source server-side libraries which can take database schemas (Models); and generate—MVVM or MVC—client-side forms?

Specifically looking for code generation of:

  • JSON HTTP RESTful API endpoints
  • Form validation with callbacks in stateless JavaScript
4

3 回答 3

0

是的,有。https://github.com/frenesim/schema_to_scaffold就是一个例子。

于 2013-05-08T17:50:16.650 回答
0

尽管我对这些库中的任何一个都没有经验,但它们似乎确实存在:

http://activescaffold.com/(基于 Ruby on Rails) https://github.com/yeoman/yeoman/wiki/Yeoman-and-Express(Express是一个 Node.js 后端)

虽然(可以说)更多的工作你也可以在 Java Spring 框架中完成: http ://www.myeclipseide.com/documentation/quickstarts/scaffoldingtutorial/scaffolding.html (https://www.youtube.com/watch ?v=T0id0xzuYBA )

GrailsPlay 框架(带有http://minuteproject.wikispaces.com/Play)似乎也能做到这一点。

然而,我会仔细权衡这种方法的利弊。除了绝对基础之外,代码生成方法几乎总是比它们的价值更麻烦。

于 2013-05-12T18:57:36.947 回答
0

这似乎更像是您要搜索的内容:http: //blog.ricodigo.com/blog/2012/10/14/announcing-the-release-of-angularjs-scaffold/

它在服务器端使用 Ruby,并在客户端使用 angularjs、bootstrap 和 font-awesome 构建应用程序。

这是代码:https ://github.com/patcito/angularjs_scaffold

于 2013-05-12T20:03:37.213 回答