Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of Superfluous Libraries #1

Open
crazy2be opened this issue Jun 14, 2011 · 7 comments
Open

Lots of Superfluous Libraries #1

crazy2be opened this issue Jun 14, 2011 · 7 comments

Comments

@crazy2be
Copy link
Owner

The framework right now has lots of libraries that really don't necessarily belong with the framework, but are there as remnants of this being an internal project that started before the days of goinstall. All of the libraries that are not central to the framework should probably be moved to separate repositories if they would be useful on their own, or removed if they are no longer useful.

@crazy2be
Copy link
Owner Author

I've started moving things. The template and openid libraries will be the biggest pain, since they were pulled from somewhere (not sure where), and have since been customized to work with the current go, but not really updated. Regardless, they don't belong with the framework, since they don't really do framework-specific things (well, the template library does, but it should use the normal mustache library, not its own copy)

@crazy2be
Copy link
Owner Author

Yesterday I moved util/browser to github.com/crazy2be/browser, today I moved util/http to github.com/crazy2be/httputil and reorganized it a bit. Two down, 18 to go.

@crazy2be
Copy link
Owner Author

Today I moved util/ini to github.com/crazy2be/ini, util/json to github.com/crazy2be/jsonutil, and util/session to github.com/crazy2be/session. Most of the libraries that don't belong in the framework have now been moved out, although there's still a few (notable perms and users) that should be moved out of the framework. There's probably a few of them that should just be deleted...

crazy2be added a commit that referenced this issue Jul 2, 2011
…d to help fix issue #1, and keep the framework lean.
@crazy2be
Copy link
Owner Author

crazy2be commented Jul 2, 2011

Plans for the rest of the libraries:

  • dlog: Should be removed or changed to a module that simply has side-effects for the logging module (e.g. changes the standard prefixes). As it is now, it's just a crappy copy of the log library that provides a subset of the functionality, created because one iteration of the framework wanted to log everything to stdout rather than stderr. The distinction is irrelevant now, and, as such, so is this logging library.
  • diff: Not a real library, just a test. Might be moved to its own repo, might get deleted, might go to my project graveyard. I'm kinda surprised that a better diff library doesn't exist afaik.
  • fnotify: Will be replaced by http://github.com/crazy2be/fsmon or the standard library equivalent (if that ever gets created).
  • moduled: Staying put, this package actually belongs to the framework. Might move to wfdr/moduled, however.
  • openid: Should be replaced by one of the original openid repositories, does not belong as a builtin to the framework (especially seeing as only one module uses it, and it is not required to do openid authentication other than in that module)
  • pages: Not sure what to do with this one, it belongs with the pages module really. Maybe put it in wfdr/modules/pages? Is there some way to install these each time a module is compiled? I'll have to look into this...
  • paths: Doesn't work without generics... :(
  • perms: Should be moved to http://github.com/crazy2be/perms. Part of the framework, but also quite useful on its own.
  • picasa: Same story as pages.
  • pipes: Should be moved to http://github.com/crazy2be/pipes.
  • template: Should be modified to use upstream mustache rather than a slightly-modified copy, and should probably stay where it is.
  • user: Same story as session and perms libraries: although this is an important part of the framework, it is also quite useful on its own.

@crazy2be crazy2be closed this as completed Jul 2, 2011
@crazy2be crazy2be reopened this Jul 2, 2011
@crazy2be
Copy link
Owner Author

crazy2be commented Jul 2, 2011

user and perms libraries have been moved to http://github.com/crazy2be/user and http://github.com/crazy2be/perms respectively. Two more down!

@crazy2be
Copy link
Owner Author

dlog and diff have been completely removed. openid functionality has been moved to an external library. user and perms have been moved back into the framework, since that's really where they belong- having them as external packages was useful with the old directory layout and back in the days of goinstall.

@crazy2be
Copy link
Owner Author

Plan for other packages if different from above:

  • picasa should be removed, photos module should be rewritten to use local storage (waiting on @StarfruitInc)
  • moduled should eventually be moved into some form of API for interacting with various parts of the wfdr system. The wfdr command should call this API directly, and have little to no code within its main package.
  • pages should stay put, although it could probably do with a rename. Not sure what the best name would be, open to suggestions.
  • paths should be removed, it was an experiment that is unlikely to work in the near future.
  • perms should stay put, but needs robustness improvements and maybe an API redesign (it's quite clumsy currently). Should also be integrated better with the framework; checking for read and write permissions should be automatic, not a module developer's chore.
  • pipes can stay put for now. wfdr-deamon will probably change to listen on a TCP port in the future, to allow multiple nodes to communicate, but that's a ways off still.
  • session can stay put. Needs robustness improvements and a way to configure multiple backends (i.e. MySQL, NoSQL, FS, etc)
  • template can say put.
  • user needs further investigation. This package isn't used much in the framework, it might be dropped, or might be improved. It doesn't really have a place in it's current state.
  • wfdr- commands are staying put for now. wfdr-module-manager and wfdr-cache-monitor should probably be merged into the wfdr command from the user perspective, and have their functionality moved into a library in the long term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant