From: Kovalenko D. <dmi...@gm...> - 2011-03-29 10:53:41
|
Hi people I can't read all your messages in this debate But I can say next simple things (forgive me my bad english) 1. At current time, you (FB Developers) do not has any real expirience with object-based interfaces. I right? :) 2. Object-based interfaces should use the refcount. Without this thing, you get the multiple problems. And clients of these interfaces, also. 3. Try think about replace of your Version to normal QueryInterface. If you do not understand now, you understand in future. Five years ago, you did not understand the meaning of benefits of refcount :) I wrote to Alex about the real problems with current "Version" method. 4. Last release of transaction-object with active (but not prepared) transaction should make the rollback this transaction. Without any errors. Last release of connection with active connection should make the detach from database. Without any errors. 5. Addref/Release should be thread-safe (use Interlocked functions). In common case - all methods of all interfaces should be thread-safe. 6. Interface method should return the new object through OUT-parameter like (T** ppObject). In ideal - you should return the pointer to BASE-interface. Do not return (T*) from interface method. This is way for create the mistakes in client code. 7. Do not work with interfaces directly. Use the smart pointers with correct implementation :-) Regards, Kovalenko Dmitry www.ibprovider.com PS. Use doxygen for documentation of your interfaces and prefix "IFB_" for interface names :)))) |