2008/10/19 Andrea Francia <[EMAIL PROTECTED]>

> The FileSystemFactory is declared as:
>
>  public interface FileSystemFactory {
>      /**
>       * Create user specific file system view.
>       */
>      FileSystemView createFileSystemView(User user) throws FtpException;
>  }
>
> Its name is FileSystemFactory but it creates FileSystemViews instead of
> FileSystems?
> Should be renamed FileSystemViewFactory ? I think for no.
> What represents a FileSystemFactory? I think a single FileSystem that can
> be viewed (differently) from different users.



>
>
> The fact that the designer choose the Factory Class pattern for this piece
> of the system it's important but, I think, it's more important names the
> classes for what they represents. We can always document the fact that we
> choose the Factory Class pattern in the class javadocs.
>
> I think the right name for FileSystemFactory is FileSystem.
>


  I think your suggestion about FileSystemFactory not being an adequate name
makes sense. I don't know, though, if FileSystem would be the best name. I
cannot think of anything better myself but I I'd prefer that the name
indicated that "FileSystem" class mission is to create different views
depending on the user (as you explained).

So, any other ideas? what do you think ?




>
> In the FtpServerFactory there is a similar names inconsistence that would
> be automatically resolved if we rename FileSystemFactory :
>
>  public class FtpServerFactory {
>      public FileSystemFactory getFileSystem() { ... }
>      public void setFileSystem(FileSystemFactory fileSystem) { ... }
>  }
>
> A getter/setter pair that get/set the fileSystem property.
>
> I propose the following the folling renaming:
>
> FileSystemFactory --> FileSystem
>
>
> In addition I think that the createFileSystemView() method name could be
> simplified:
>     FileSystemFactory#createFileSystemView() --> FileSystem#createView()




> --
> Andrea Francia
> http://andreafrancia.blogspot.com/2008/07/colinux-linux-dentro-windows.html
>
>

Reply via email to