As more enterprises are migrating to off-the-shelf tools, there is increasing pressure to reduce the turnaround time on custom development. One way to do this is to use boiler plate. The next level is to use a boilerplate generator. This basically removes a lot of repeat effort and converts that process into a configuration process rather than a coding exercise.
While the flexibility you might desire is going to be lacking, the time saved is well worth the effort to get setup to do so. Over the past month, I've been working with two separate technologies to accomplish a certain degree of kick-starting the coding effort.
Spring Roo is a project that has been around for a while an is stable at version 2.0.0.RELEASE. From a script file, you can procedurally generate a Spring Framework application. Optionally employing JPA in the configuration script will also populate a target data source table structure with any models you define. For the price of setting up and understanding Spring Roo, you get a standards based API and data structure rather quickly. All you have to do is provision the empty data source if not specifying an in-memory RDBMS.
Spring Roo will also create the MVC and service layers for THYMELEAF if you want to have it spit out a UI for you. The resulting UI is far from complete but can be used to validate the API and then you are free to custom develop the remaining UI tweaks or revisions you desire.
For my needs, though, I would rather use Angular, so for this I have been looking at Angular Schematics. Schematics is a standalone tool that you can use to create a file tree of code that can be merged into a target tree. This lets you build components and features as schematics and then push them into an existing Angular CLI project.
Now, Schematics takes a bit more understanding to come to grips with, but once you understand what it is doing, and how you can take advantage of that, the power it unlocks is fairly impressive.
As icing on this two layer cake, my latest effort has been to write a front-end script that takes a short config model definition file and a few input parameters and then generate the Roo script as well as automate the execution of the Angular CLI and Schematics calls. With a carefully designed set of schematics, this provides everything you need to make a complex object repository, API and UI with maybe 30 minutes of specification work. In the past, doing this all long hand, it would probably take me 2 weeks to a few months depending on what was requested.
The take away is that now I can focus on the customizations that add value for the customer once the spun-up boilerplate API and UI are ready for them to review. The nice thing about this approach, from a long term maintenance perspective, is that I can always refine or extend the code generating tool set so it's easy to provide forward compatibility with future features and tool sets. Careful use of source code management means I can also maintain a version history and recreate past work quickly if and when needed.
Monday, December 2, 2019
Reducing Turnaround Time
A software architect by profession and maker of things by passion, Mr. Carter makes his home with his family in the Ohio wilderness. He readily shares knowledge and experiences and has interests in helping his fellow humans with basic finances and simple financial planning as well as spreading the joy of creating physical goods with practical aims. Mr. Carter can be hired for sundry needs on a sporadic, short-term basis. Email email@example.com to begin a conversation about your next project.