In the last feature preview I discussed the new and improved Spring MVC scaffolding that is coming in Skyway Builder 6.3.  In this feature preview, I want to review one of the enhancements we made to the Spring DSL.  We’ve added a new abstraction called a Model Package.  While there’s always been a way in Skyway Builder to specify the package name that should be used for the generation of Spring DSL artifacts, the Model Package gives you more fine-grained control.

In Java application development it is common to use packages for organizing and namespacing Java resources according to their functionality. The Spring DSL abstracts the development of many different types of application components (i.e. controllers, services, DAOs, domain objects, etc…), but there still needs to be a mechanism for the developer to group related Spring DSL artifacts. Furthermore, the developer often wants to control the package names that are ultimately emitted in the generated code.  A Model Package is a Spring DSL artifact for namespacing and grouping related Spring DSL components.  A model package can contain any top-level Spring DSL elements, including other model packages. Model packages correlate directly to Java packages (and UML packages).

modelpackage

In regards to the Spring MVC scaffolding that I previewed in my last blog post, the Spring MVC scaffolding will also scaffold model packages.  The most basic scaffolding example using the Spring DSL is to create a model package (i.e. com.skyway.featurepreview.domain) and a domain object (Foo).  When you scaffold the Foo domain object, Skyway Builder will automatically create the model packages for the other layers of the application (i.e. com.skyway.featurepreview.web, com.skyway.featurepreview.service, com.skyway.featurepreview.dao), and the Spring DSL artifacts will be generated into the appropriate model packages.  If the model package for the domain object ends with “.domain”, then the Spring DSL will create “.dao”, “.service” and “.web” model packages at the same level as the “.domain” model package.  This is a fairly typical convention for package names in a Spring MVC application, but the developer can, of course, move the artifacts to other packages if needed.

Please remember that this is a feature preview.  Skyway Builder 6.3 should be available near the end of August.  To stay in the loop on the upcoming 6.3 release, please follow us on Twitter, become a fan of Skyway Builder on Facebook, or join the Skyway Community. As one of the many benefits of joining our community, you will automatically receive product announcements and updates.

Skyway Builder 6.3 Feature Preview Series

    Bookmark and Share

    Tags: , , , , ,

    Leave a Reply