J
Jack Addington
I've got a fairly simple application implementation that over time is going
to get a lot bigger. I'm really trying to implement it in a way that will
facilitate the growth. I am first writing a WinForms interface and then
need to port that to a web app. I am kinda stuck on a design issue and need
some suggestions / direction.
Basically I have a business layer that I want to use to process any
dataentry logic (row focus changes, data validation etc). I'm hoping that I
can in time just substitute a web gui for the win gui and not have much code
re-write. Anyhow my problem is how to pass message to the user back to the
GUI layer from the logic layer.
ex) GUI data object lets user change a number and it falls outside the
range.
I have subscribed to the data object's 'dataChanged' event from my logic
layer and have determined that it falls outside the acceptable range. I
basically want to display a popup message that tells the user so. Now it
seems 'wrong' to me to have a reference to system.windows.forms so I can do
a MessageDlg.Show("Bad Value ...") as obviously that won't work with the web
frontend. I don't want to raise an exception because I don't have a 'try '
clause around some sort of 'start edit' on the GUI side.
I've had thoughts that maybe I need a generic function on my frontend that
handles messages from the logic side??? Is that where an interface would
work? How do I go about making it generic so that I can re-use it for
webforms etc.
thanks so much
jack
to get a lot bigger. I'm really trying to implement it in a way that will
facilitate the growth. I am first writing a WinForms interface and then
need to port that to a web app. I am kinda stuck on a design issue and need
some suggestions / direction.
Basically I have a business layer that I want to use to process any
dataentry logic (row focus changes, data validation etc). I'm hoping that I
can in time just substitute a web gui for the win gui and not have much code
re-write. Anyhow my problem is how to pass message to the user back to the
GUI layer from the logic layer.
ex) GUI data object lets user change a number and it falls outside the
range.
I have subscribed to the data object's 'dataChanged' event from my logic
layer and have determined that it falls outside the acceptable range. I
basically want to display a popup message that tells the user so. Now it
seems 'wrong' to me to have a reference to system.windows.forms so I can do
a MessageDlg.Show("Bad Value ...") as obviously that won't work with the web
frontend. I don't want to raise an exception because I don't have a 'try '
clause around some sort of 'start edit' on the GUI side.
I've had thoughts that maybe I need a generic function on my frontend that
handles messages from the logic side??? Is that where an interface would
work? How do I go about making it generic so that I can re-use it for
webforms etc.
thanks so much
jack