Don't Fear the Platform

412 views

Published on

Don’t Fear the Platform. Integrating GemStone and OS X. Eli Green, ESUG 2010, Barcelona, Spain

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
412
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Don't Fear the Platform

  1. 1. Don’t Fear the Platform Integrating GemStone and OS X
  2. 2. Mac OS X • Programming Language: Objective-C • Libraries: Cocoa (Foundation / AppKit)
  3. 3. Objective-C The Good • Superset of C • Smalltalk message passing semantics • Class extensions • Optional compile-time type checking
  4. 4. Objective-C The Bad • Not everything is an object • Blocks were not added until OS X 10.6 • Garbage collection is optional • become: is nowhere to be found
  5. 5. Cocoa The Good • Well-designed views (widgets) • Interface Builder • CoreData for local applications
  6. 6. Cocoa The Bad • No network-ready data store
  7. 7. GsKit Goals • Make GemStone object instances first-class citizens in the Objective-C runtime • Be simple
  8. 8. GemStone Browser
  9. 9. GsKit Usage GSConnection * con = [GSConnection new]; BOOL success = [con connectToStone:@"!tcp@localhost#server!seaside" asUser:@"DataCurator" withPassword:@"swordfish" usingService:@""]; id anAssociation = [con execute:@" 'ice cream' -> 'gelato' "]; [anAssociation key]; // @"ice cream" [anAssociation value]; // @"gelato" [anAssociation class]; // GSProxy // Estem en Catalunya, doncs... [[anAssociation key:@"helado"] value:@"gelat"]; [anAssociation displayString]; // @"'helado'->'gelat'"
  10. 10. GsKit Implementation • Immutable types are copied: • String > NSString • Number > NSNumber • Boolean > NSNumber (what the...?) • Collections are specially wrapped: • Dictionaries are wrapped in GSDictionary • OrderedCollections are wrapped in GSArray • All other objects (for now) are “GSProxy”
  11. 11. Demonstration
  12. 12. Unresolved Issues • Boolean values • Objective-C can’t tell a bool from a number! • Lack of Interest
  13. 13. Future Features • Multi-user Change Notification • Automatically persisting ObjC classes • Just storing instance variables, logic would stay in Objective-C • Dynamically create ObjC proxy classes • Magritte?
  14. 14. A Smalltalk Sandwich

×