Refactoring, hibernate y GeneXus
Your data model was near perfect when your application was first
written. Since then, it has evolved. You've hacked, you've denormalized, and, as a result, you've spent countless hours in meetings ranting about the fixes you need to put in place.
Yet, you're ambivalent. Despite your cogent arguments, you're loath to putting together the "change-all-your-data-all-at-once" plan. It's just too risky. There are countless applications that directly read from and write to your database--you can't change all of them at once! If only you could only fix your data model one piece at a time, and one application at a time.It's a typical scenario, really. Over time, IT organizations at small, medium, and large enterprises create disparate applications that access vital data stored in a centralized database. And slowly, moderately ill-designed data models start dragging down performance, scalability, and the overall efficiency of an organization.
In this article, we will show readers how to upgrade their faulty schemas and data models without affecting existing applications or processes. By using the latest technology from Hibernate (version 3.0 and up)--along with a combination of database views, stored procedures, and standard design patterns--application developers and data architects can repair a faulty data model, one piece at a time.
Steps to Follow
Here's how we'll do it:
- Dream up an improved data model: Agree on what's wrong with the current model and how you could fix it
- Develop database views: Based on the current (faulty) model, these views reflect how you would like your data model to be
- Develop stored procedures or "instead of" triggers: These will replace a standard table insert
- Develop POJOs, Hibernate mappings, and DAOs: Represent your new data model and tie it to your views
- Test, test, test: Prove your data model right
Luego explica todo lo que hay que hacer para lograr cumplir estos pasos.
Cuando veo todos estos pasos y lo que hay que hacer para lograr estos cambios, es cuando mas valoro a las reorganizaciones de GeneXus y la regenerción de código de los programas generados.
Comentarios
Publicar un comentario
1) Lee el post
2) Poné tu opinión sobre el mismo.
Todos los comentarios serán leidos y la mayoría son publicados.