Sign in to follow this  
FreJa

application design opinion

Recommended Posts

FreJa    154
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

Share this post


Link to post
Share on other sites
lightbringer    1070
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)

Share this post


Link to post
Share on other sites
FreJa    154
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

Share this post


Link to post
Share on other sites
lightbringer    1070
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.

Share this post


Link to post
Share on other sites
FreJa    154
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

Share this post


Link to post
Share on other sites
lightbringer    1070
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this