When I started at the company we had 2 big process that were running in cobol ( well pretty much any way, the team had started rewritting large portions of the first project in Java before I joined ). Over the 3 years that I have been here we have completely removed the cobol from the first process. Now I am working on removing the cobol from the second process. The first thing that we relalized is that the heart of the 2 applications is exactly the same, of course it was litterally 2 copies of the same files with different names in the cobol code. So we want to reuse the heart of Project A that has already been rewritten, I'm not about to go copying and pasting the files like the cobol was. So we decided that we would create Project C which is nothing more than refactoring out the chunk of A that will be reused by B.
Project A was written when Java was first starting to be used here at the company and used a homegrown framework for Database connections, logging, and most importantly our Domain/Entity objects. This framework is a very slow memory hog that is difficult to work with from a coding perspecitive. All of the new code we currently write is using EJB 3 ( Hibernate for batch proccesses like these ) along with a little bit of our own framework that is more just a wrapper for the actual frameworks we use instead of all of our own crap code.
So that left us a few options:
- Write Project B using the old framework ( framework is so out-dated that this was quickly ruled out.
- Rewrite Project A using our new framework ( this is an eventual goal, but this would take at least 3-4 months with no customer benifit, so this was also quickly ruled out )
- Write Project C as a webservice running somewhere that could be called by both A & B ( These proccess take roughly 1 hour to run today, and would make roughly 60-70 million times, sounds like a preformance problem to me )
- Copy & Paste all the "reusable" code into project B and modify it to use our new framework. ( do I even need to say why we ruled this out )
- Use a dynamically typed Language ( groovy was my preference going in ).
So Groovy it is. Everything I read talks about Groovy being completely compatible with Java, so we'll start with renaming all of the files from .java to .groovy and go from there. I anticipate that this will not be as smooth as I dream, but hopefully not too bad. Stay tuned.

No comments:
Post a Comment