Thursday, November 29, 2018

Guide to Scripting With the Spring Framework

Scripting is one of the most popular ways to make your application adjustable for client needs at runtime. As always, this approach introduces a well-known trade-off between flexibility and manageability. This article shows the different ways you can adopt scripting in your project and how to incorporate a Spring library that provides a convenient scripting infrastructure and other useful features.

Introduction

Scripting (aka a plugin architecture) is the most straightforward way to make your application customizable at runtime. Quite often, scripting comes into your application not by design, but accidentally. Say you have a very unclear part in a functional specification, so not to waste one another day amongst additional business analysis, we decide to create an extension point and call a script that implements a stub. We will clarify how it should work later. There are a lot of well-known pros and cons for using such an approach, like great flexibility to define business logic at runtime and save a massive amount of time on redeployment. This avoids the impossibility to perform comprehensive testing and, hence, unpredictable problems with security, performance issues, and so on. The ways of scripting will be discussed further and might be helpful both for those who already decided to stick with scripting plugins in their Java application or those just now thinking about adding it to their code.



from DZone.com Feed https://ift.tt/2BDw3zU

No comments:

Post a Comment