开发者

What is the best way of extracting information from a existing database without having the complete entity structure in a new java application?

The current application that I'm involved in is somewhat a monster with a very complex entity structure and a very tight co开发者_运维知识库upling to the Seam framework.

In a couple of weeks I will begin refactoring this monolith, but before that I need to create a small application that will collect some information from the database connected to the monster application and export it.

My problem is that the entity structure is a mess and refactoring out this to a separate module is not an option since it would take to much time. To copy paste the structure into my new application is also not an option because of the complexity.

In the new application I'm currently using Spring framework and Hibernate.

So my question is:

What is the best way of extracting the information I need from the existing database without having the complete entity structure in my new application?


What data do you need to export, and in what format? Do you really need an ORM layer, or can you just use Spring JDBC to query the tables directly? What is the lifespan of your small application, and how likely is it to mutate into a large application? I'd recommend doing something quick and simple with SQL, then swapping it out for your refactored 'monolithic' application when that's done. If you separate interface from implementation, the swapping need not be too difficult.


If it makes sense in the larger scheme, you can use this new application has a starting point for your refactoring of the larger domain model.

Nothing says you have to map the entire database in order to use it via Hibernate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜