In Listing 17, we've added an argument called
groups and given it a
List<Group> type -- notice the slight variation of using square brackets instead of angle brackets for the generic definition. Then we used a
@for loop to just iterate over the collection and display the names.
In this overview we've unpacked three Java microframeworks at a brisk pace. In my opinion, Spark is the quickest and easiest to get into, followed by Ninja, and finally Play. That being said, moving into non-trivial features and enterprise quality of service will reveal a lot more of the thinking behind each framework and what each has to offer. Different levels and types of REST/JSON support, enterprise middleware integration, persistence, testing support, and production deployment are all key differentiators between these frameworks.
Next up, keep an eye out for three deep dives, where we'll explore the mechanics of each framework in a real-world enterprise application development scenario.
Until then, happy coding.
Sign up for CIO Asia eNewsletters.