[baseten-users] Portable Distributed Objects

Daniel Brajkovic daniel at brajkovic.com
Tue Jun 16 07:35:07 EEST 2009


I've been experimenting a lot over the last 24 hours. I would REALLY  
like to build a client-server app. I did just discover that the folks  
who make DayliteCRM are doing just that with PostgreSQL.  I would love  
to know how. And they have an iPhone app that syncs with the Server as  
well.

Here's what I've learned. If local objects are delegates of vended  
objects or vice versa, there are issues to be dealt with. Also, I had  
much success with vending BXDatabaseContext. Got it to load and  
display data. It was easy and did not require any changes to your  
Framework. EXCEPT, PDO does not play well with bindings or KVO.  So I  
would have to hand program all the controllers and notifications  
(which I have not really done much of). And your framework is far  
beyond my programming (hacking) abilities.

Just seems like it should be easier to encapsulate in Cocoa the PG  
server so that it would be accessible via networked clients.

Any other thoughts?



On Jun 15, 2009, at 11:23 PM, Tuukka Norri wrote:

> Hi!
>
> Daniel Brajkovic kirjoitti 14.6.2009 kello 23.45:
>> ConnectionMonitor  (this is interesting and probably related to my  
>> problem below, when I launch the client before I get the error, It  
>> says that I a total of 3 connections which means three separate  
>> instances of PGTSConnection
>> I can't figure out WHY it's creating 3 separate connections???)
> In manual commit mode, two connections are needed. Also, if you have  
> SSL mode set to prefer, which is the default, BaseTen sets libpq's  
> SSL mode to require at first. If that fails, another connection is  
> attempted, unless the first one failed because of a bad certificate.
>
>> So my client gets hung up (because I have no timeout set) when  
>> BXPGInterface executes this call in the - (BOOL) validateEntities:  
>> (NSArray *) entities error: (NSError **) outError   method
>>
>> 	NSDictionary* classDict = [[mTransactionHandler connection]  
>> deserializationDictionary];
> The classDict maps PostgreSQL types (NSStrings) to Cocoa classes  
> (Class objects). It's needed outside the database layer to make  
> BXAttributeDescription able to respond to -attributeValueClassName  
> and -attributeValueClass. The problem seems to be that classes don't  
> implement NSCoding, which is needed for DO. I think you could  
> resolve this by adding a category to NSObject that implements  
> NSCoding; according to documentation categories of the root class  
> are available in class objects. I think you shouldn't do this,  
> though, but have a higher-level object vended instead.
> -- 
> Best regards,
> Tuukka Norri
> MK&C
>
>
> _______________________________________________
> baseten-users mailing list
> baseten-users at lists.basetenframework.org
> http://lists.basetenframework.org/mailman/listinfo/baseten-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://lists.basetenframework.org/pipermail/baseten-users/attachments/20090615/6cca8a47/attachment.bin>


More information about the baseten-users mailing list