OOP notes

zhaozj2021-02-16  45

I saw the InstantObject's AVI demonstration that it was a good thing, but if you can't use this library structure, there is still other solutions. ------------ Do to separateize the interface? How to develop and use DELPHI DataWare Controls? The object's properties and interface energy association synchronization It is best to have a class similar to TDataSet inherited to manage objects, so that the object's properties of the object are synchronized to the interface and can use a lot of DB VCL control programmers for Delphi. What can the property be more than OO? --------- How does the business class are separated from the data operation class?

This is a business class TuseManager = Class (TBaseManager) publicprocedure adduser (auser: tuser); procedure deleteuser (AUser: tuser); Procedure ModifyUser (auser: tuse);

This is a data control class tuserdataManager = class (tbasedataManager) publicProcedure deleteuser (auser: tuse);

END;

Implement ... Procedure TuserManager.deleteuser (auser: tuser) Beginwith TuserDataManager.create DobeginRevokeUserRight (auseUserLog (auser); deleteuser (ause); end;

... Procedure TuserDataManager.deleteuser (auser: tuser) beginsql: = format ('delete from table_user where userid =% s', [auser.userid]); xxx.execute;

This is not OO, I haven't thought about it.

转载请注明原文地址:https://www.9cbs.com/read-19040.html

New Post(0)