application design opinion

Started by
4 comments, last by Stani R 16 years, 9 months ago
Hi, I want to build a scalable and modular application to manage patient data for a doctors office. With modular I mean there should be support for more than one medical specialty, thus, each specialty would have its own dll, or something like that. My problem is how to handle the database operations when I have this kind of "plugin" structure. Should all the insert/update/delete/select operations be on the core application side? Or be defined in each module? Plus, database operations would be very related to the UI, meaning the data to insert/select is given/showed on textboxes, etc, which means lots of hardcoding in each module... or is there a better way to do it? Can anyone help me with some directions, or paradigms I should follow for this type of application? Or, if you're kind enough, some more specific examples? Thank you very, very much
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Advertisement
Model-View-Controller comes to mind. In your case model is the object-oriented data model abstracting the database with patient data, the view are the various UI forms, and the controller is the logic code gluing everything together, performing queries on the database at the request of the UI. It's not particularly pretty but it does support some sort of separation of responsibility and it does work. Your code just might be all over the place as a result :) (Although this might be more of a problem for me due to a slightly limited understanding of MVC)
Quote:Original post by lightbringer
Model-View-Controller comes to mind. In your case model is the object-oriented data model abstracting the database with patient data, the view are the various UI forms, and the controller is the logic code gluing everything together, performing queries on the database at the request of the UI. It's not particularly pretty but it does support some sort of separation of responsibility and it does work. Your code just might be all over the place as a result :) (Although this might be more of a problem for me due to a slightly limited understanding of MVC)



hmmm... I'm seeing what I think is a problem in applying this pattern to my application: according to MVC pattern, it should be the model to have the access to the database, however, in my case, the database will be different for each View, meaning either the View would have to access directly to the database (which seems wrong), or.......?

Thanks again
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
The question is, do different medical specialists need radically different information about their customers? I would try to see if you can abstract that information. My naive first assumption would be that patient data can't be all that different, but you're in a much better position to evaluate this for yourself.

If everything is really different, then you will have to have some kind of modular model system I suppose. But the way I see it, the model should still be abstracting the database.
Quote:Original post by lightbringer
The question is, do different medical specialists need radically different information about their customers? I would try to see if you can abstract that information. My naive first assumption would be that patient data can't be all that different, but you're in a much better position to evaluate this for yourself.

If everything is really different, then you will have to have some kind of modular model system I suppose. But the way I see it, the model should still be abstracting the database.



Any ideas on how I should abstract the database for different views?

thanks
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Well, you could begin by identifying the pieces of data that are common to them all. As far as the actual implementation is concerned, this is a pretty domain-specific question in my opinion. I've never written such an application, either, so my advice is understandably limited.

This topic is closed to new replies.

Advertisement