[Pharo-project] Platform class
Hi all, in Tweak there is a hierarchy of CPlatform classes (CPlatformWindows etc) that provide a central place to add platform specific requests and avoid having the current platform detection code all over the system So instead of coding ExternalClipboard>>interfaceClass with all the gory details of platform detection you could just write Platform current externalClipboardClass We also used this in Sophie in connection with the FileLocations and URI package, supporting things like Platform current tempDirectoryURI Platform current userDirectoryURI etc What do people think about introducing something similar (category System-Platform) in Pharo? Michael
I like that I really think that we need to have infrastructure support to control the complexity. I like the OBPlatform idea. After the question is how much layers do we need. I imagine that we should not have that much one this is well done. Does the Platform code you suggest conflicts with some existing ones that could be merged/migrated into. Stef On Jan 8, 2009, at 8:00 PM, Michael Rueger wrote:
Hi all,
in Tweak there is a hierarchy of CPlatform classes (CPlatformWindows etc) that provide a central place to add platform specific requests and avoid having the current platform detection code all over the system
So instead of coding ExternalClipboard>>interfaceClass with all the gory details of platform detection you could just write
Platform current externalClipboardClass
We also used this in Sophie in connection with the FileLocations and URI package, supporting things like
Platform current tempDirectoryURI Platform current userDirectoryURI etc
What do people think about introducing something similar (category System-Platform) in Pharo?
Michael
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Stéphane Ducasse wrote:
I like that I really think that we need to have infrastructure support to control the complexity. I like the OBPlatform idea. After the question is how much layers do we need. I imagine that we should not have that much one this is well done. Does the Platform code you suggest conflicts with some existing ones that could be merged/migrated into.
OBPlatform seems to try to abstract the "Smalltalk platform", whereas the platform class I had in mind abstracts the Hardware/OS platform. Using a similar name certainly will lead to confusion, so the question is what else to call an OS abstraction layer. Other than OSAbstractionLayer ;-) Michael
On Fri, Jan 9, 2009 at 4:30 PM, Michael Rueger <m.rueger@acm.org> wrote:
Using a similar name certainly will lead to confusion, so the question is what else to call an OS abstraction layer. Other than OSAbstractionLayer ;-)
OperatingSystem? -- Damien Cassou http://damiencassou.seasidehosting.st
Ok BTW I tried to load the second version of packages you published and I got problem with MC loading related to some network methods. I have to redo it calmly and check if this is not necessary to load first the first version. Did you try to load your package in Pharo? Stef On Jan 9, 2009, at 4:30 PM, Michael Rueger wrote:
Stéphane Ducasse wrote:
I like that I really think that we need to have infrastructure support to control the complexity. I like the OBPlatform idea. After the question is how much layers do we need. I imagine that we should not have that much one this is well done. Does the Platform code you suggest conflicts with some existing ones that could be merged/migrated into.
OBPlatform seems to try to abstract the "Smalltalk platform", whereas the platform class I had in mind abstracts the Hardware/OS platform.
Using a similar name certainly will lead to confusion, so the question is what else to call an OS abstraction layer. Other than OSAbstractionLayer ;-)
Michael
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Damien Cassou -
Michael Rueger -
Stéphane Ducasse