zaxebo1 / play-scalagen Goto Github PK
View Code? Open in Web Editor NEWThis project forked from asinghal/play-scalagen
Scala Code generators for Play! framework
This project forked from asinghal/play-scalagen
Scala Code generators for Play! framework
Scala code generators for the Play! framework -------------------------------------------------------------------------- This module can be used to generate Scala code. It can generate JPA based models, CRUD and associated test cases. -------------------------------------------------------------------------- Options: -------------------------------------------------------------------------- --scaffold-jpa [entity name] [attribute1:type1]* Generates the JPA based model and associated CRUD code. --model-jpa [entity name] [attribute1:type1]* Generates the JPA based model. --scaffold-siena [entity name] [attribute1:type1]* Generates the Siena based model and associated CRUD code. Note: --scaffold and --model are shortcuts to generate JPA These generators can only be used from inside a Scala Play! project. To create a new project, use the following commands: play new myproject --with scala cd myproject play scalagen:generate --scaffold <provide details of the scaffold you need to create> ========================================================================================================== Installation: ========================================================================================================== 1. Extract the contents of /dist/scalagen-0.1.zip into a local directory on the server. 2. Add the following to dependencies.yml - customModules -> scalagen repositories: - playCustomModules: type: local artifact: "/full/path/to/scalagen/directory" contains: - customModules -> * 3. Run "play deps" on the project That's it! -------------------------------------------------------------------------- Usage Examples: -------------------------------------------------------------------------- *Note*: As a prerequisite, you must install the jquery grid files before a generated scaffold can be used. It is a one time activity per project. Please run the following for the same: play scalagen:jquery 1. Generating a CRUD scaffold: -------------------------------------------------------------------------- play scalagen:generate --scaffold User name:String login:String role:Role For the lazy, the following does the same: play scalagen:g --s User name:String login:String role:Role The Siena equivalent is : play scalagen:g --ss User name:String login:String role:Role This will create a controller, view files for CRUD, model, unit tests for the model and selenium tests for CRUD operations. *Note*: The generated controllers use JQGrid for the index/ listing page and provide pagination, search and sorting of data. If you would rather use a plain HTML show all view, please pass flatHTML=true in the URL parameters. 2. Generating a JPA model: -------------------------------------------------------------------------- play scalagen:generate --model User name:String login:String role:Role For the lazy, the following does the same: play scalagen:g --m User name:String login:String role:Role This will create a JPA model and associated unit tests. -------------------------------------------------------------------------- Known Limitations: -------------------------------------------------------------------------- 1. This module can only create models for basic data types. All other data types are assumed to be many-to-one relationships. 2. The parameters passed on command line can not have space between attribute name and type. 3. The module only supports JPA via Hibernate at the moment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.