It's not a sin, of course, to write this kind of application. I think it's a good way to go given conditions :
- The executable/script is well-established
- There's no library that wrap the functionality in a modular way
- You have little time on your hand

Which ideally can be made more modular and testable architecture like below :


If you have the resources and chance your 2-tier application can be made to evolve like the above. You start by extracting the executable into library step by step until all the necessary logic are on the lib and the script is merely a caller to it. Once you have library, you can link your application to it which make your app relatively cleaner and more cohesive.
Still, despite my preference for cleaner, more cohesive application, Script/Executable-Based Application is quite an interesting approach to rapidly develop something and/or reuse an established CommandLineInterface.
No comments:
Post a Comment