An Army of Small Libraries
Ted Patrick, known on twitter as @adobeted, recently released two interesting as3 libraries: FDOT and Tubes. This is not unique to Ted. People constantly develop amazing solutions to common problems. The problem is that it is hard to find these solutions. Unless the developer already has a large following, his code usually dies in obscurity. Someone facing a common problem will either develop their own solution, or find a stale solution on google. Ted has been proposing that someone create a standard as3 library. I would like to recommend an alternative.
Update - I’ve begun work on this at flashlib.org
Update - I’ve listed the planned features and made a FAQ page
The Standard Library
As far as I understand, Ted means someone should create one swc file containing many classes to solve a wide variety of problems. The advantages of this approach are that people can download the library and use the best solutions available without having to hunt around.
There are several disadvantages, though.
-
The library will grow stale because the maintainers don’t have an infinite amount of time to check out new stuff. It will have momentum at first, but will become less relevant over time.
-
Many good ideas will not be included. The library can only include robust solutions, preventing one person from beginning something and another finishing it. Someone unknown may have a good solution that never gets in because it doesn’t quite meet standards.
A Better Approach
The monolithic library is a temptation that should be avoided. A better approach is to keep libraries focused and small. This makes it easier to mix and match solutions to exactly fit your project’s needs.
However, we still need a way to find these small solutions. I propose a community site dedicated to finding good libraries and classes. At first glance, I think it should have the following features.
-
Links to projects rather than hosting them
-
List of alternative projects
-
Ratings and comments
-
Community editable project pages
-
Reputation System
This will solve the same problems without the disadvantages. With a democratic approach, the very best will naturally rise to the top, people can extend each other’s work, and the authors don’t even need to directly participate for it to be effective.
If this idea gains enough steam, I volunteer to create the site. What do you think? What other features should it have?






My Ruby cohorts rave about how community-focused the RoR community is in general and how GitHub has facilitated this in many ways. I've really appreciated this, and as a primarily AS3 dev, I'm using the site to find and publish open-source libraries. I hope to see more AS3 projects on there.
My public repos are here: http://github.com/lukesh/
Am I missing something?
@Nate - We could definitely extend an existing site. This would require a major overhaul of either of those, however, so I'm not sure the maintainers would be up to it. RIAForge, I believe, only hosts projects, meaning that it will miss many of them. OSFlash focuses on large-scale frameworks. I want to encourage small, focused solutions to problems. (Like finding the very best StringUtils class)
Github doesn't have a rating system but you can judge the quality of each project by the number of its followers.
@Steve - That is an awesome idea. It could include full usage examples too. Nice!
I posted a screen shot of FPG, you just type names and it downloads from many sources (gcode, github, osflash, sourcefrg ) via a managed index/directory of libs. Instead of one mainline, you can quickly assemble libs from all over.
There are issues with it:
1. Metadata format for index
2. Cross-site Scripting injection
3. name management
4. package collisions
5. dependencies to other libs
This solution is very similar to what I built in IFBIN years ago but is simpler.
Would love to get your thoughts on these issues. Great post.
Cheers,
Ted :)
Package collisions are an issue, but some guidelines and downrating for poorly packaged frameworks could be enough to encourage people to use unique packages.
As for dependencies, Library Projects can reference other swcs. They get compiled into the final swc. If someone were to then include the dependency in their project again, it still works (although I'm not sure how). Obviously the derivative libraries are large if each one includes all of its dependencies, but I don't think the compiler puts multiple copies of the code into the final swf, does it?
http://toolbox.protohq.com/underware
Would love to get some feedback on how it might be of help in solving this issue.
I'm not sure I agree with what I'm getting in the zip though. It's a fla and some actionscript. I was thinking people would download precompiled library projects. It's been way too long since I've used flash, it uses swcs too, right?
@Ben, The project's properties would be editable by whoever posted it (usually the author) or anyone who has a high enough reputation. I want to make sure project owners don't need to be involved.
That way, we can index every project in existence and the site could become a one-stop shop for solutions.
The .swc idea is awesome and analogous to the current .zip format.
Would need to figure out how to compile an .swf of a package to include it in the .swc. Will give it some thought.
start with one namespace, and have "stable versions" of classes and packages, under which various revisions get voted on to be merged with the "official" trunk.