Thursday, August 02, 2012

R.I.P. FileDirectory

Pharo now finished switching from old "FileDirectory" to the new "FileSystem" for the not yet released Pharo 2.0. Expect a  much cleaner API covered with many tests.

I'm sure people may lament that Pharo is too radical and not backward compatible - but Pharo's vision can only be accomplished if the platform moves forward quickly, throws away ugly code and gets cleaner and cleaner.

I switched some of my packages to the new Filesystem, others from ReferenceStream (which is also removed in 2.0) to its replacement "Fuel" very easily. The quality and maintainability is much better and I'm sure we are on the right track.

So whats next? Morphic ;)

4 comments:

Unknown said...

For someone outside smalltalk world, that does it mean? Developer packages can be stored in the filesystem?

Sean DeNigris said...

FileSystem is a pleasure to work with, especially compared to FilDirectory, which was incredibly obtuse.

"So whats next? Morphic ;)"

Well... we can dream ;-) But so many things have been cleaned, we're running out of things to help us avoid it, lol!!

Brian T. Rice said...

I approve!

Torsten said...

@Jose: in this context "FileDirectory" is the "old" way how to access file directores and files from Squeak and Pharo (Pharo up to version 1.4.)

This old API was not very well tested, partly bad code, made problems on different platforms, ...

So it was now replaced in Pharo 2.0 with a cleaner and new implementation called "FileSystem". Sure this can be improved even further - but it is a good step towards a better and cleaner system. I hope that Squeak may take this step also so that both system can continue to share packages.

Independent from that: you can already store your code as packages (*.mcz metacello files, a zip archive) in the file system.

If you want to map your code directly into filesystem to use Github or Subversion, ... then have a look at Dales "FileTree" project.

https://github.com/dalehenrich/filetree

It allows you to store the Monticello packages in the filesystem similar to Java, Ruby, ...

Also read http://www.stic.st/wp-content/conferences/2012/Wednesday/1415-Practical_Git_for_Smalltalk-Henrichs.pdf for details

Currently FileTree uses the old filedirectory api.
One of the next steps will be that
FileTree uses the new "FileSystem" API in Pharo 2.0 so it is based on a more solid playground.