Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
N-Tier Design Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00753308
Message ID:
00753690
Views:
18
Kevin,

A couple of flaws I see in your design. Why is the form storing a dataset when that is the business object's job? Let the form hold a reference to the business object.

Secondly, why does the textbox have any idea how the business object is holding its data? The business object should expose an interface that the textbox uses to get to data. That interface can be protected by the business object even when the business object changes its data source.
* Form's Load
This.oBiz = Createobject("BizCustomer")
* Textbox Init
This.Value = Thisform.oBiz.GetField("Name")
* Textbox Valid
IF NOT Thisform.oBiz.PutField("Name",This.Value)
   Wait window Thisform.oBiz.GetLastError()
   RETURN 0
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform