grails stats
gives various code statistics for a given Grails project.
Typical output can look like something along the lines of:
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 4 | 183 |
| Domain Classes | 8 | 264 |
| Jobs | 1 | 10 |
| Services | 4 | 297 |
| Tag Libraries | 2 | 63 |
| Unit Tests | 17 | 204 |
+----------------------+-------+-------+
| Totals | 36 | 1021 |
+----------------------+-------+-------+
I'm curious about the typical division of code between the various artifacts in Grails projects (such as the ratio LOC(controllers) / LOC(services), etc.).
Please share the grails stats
output of your largest Grails project to contribute your statistics to this question.
Grails removes the need to add configuration in XML files. Instead, the framework uses a set of rules or conventions while inspecting the code of Grails-based applications. For example, a class name that ends with Controller (for example BookController ) is considered a web controller.
Grails is an extremely popular open source web application framework powered by the Groovy programming language and based on the Java Virtual Machine (JVM). The software community has given a big thumbs-up to Grails due to its smart features.
GORM is the data access toolkit used by Grails and provides a rich set of APIs for accessing relational and non-relational data including implementations for Hibernate (SQL), MongoDB, Neo4j, Cassandra, an in-memory ConcurrentHashMap for testing and an automatic GraphQL schema generator.
My current project:
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Controllers | 67 | 7665 |
| Domain Classes | 101 | 3736 |
| Jobs | 3 | 45 |
| Services | 61 | 6158 |
| Tag Libraries | 34 | 2357 |
| Groovy Helpers | 54 | 3356 |
| Java Helpers | 1 | 65 |
| Unit Tests | 227 | 24224 |
| Integration Tests | 70 | 10908 |
| Scripts | 2 | 77 |
+----------------------+-------+-------+
| Totals | 620 | 58591 |
+----------------------+-------+-------+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With