Code Bank

Code Bank was built out of my need for a good snippet management system some where to store my most common and reusable classes or snippets. I've looked into existing ones and never found one that I liked or had the features I wanted. Many get the job done, but have a rather clunky interface and for that matter ugly. Since I originally released it well over a year ago now, Code Bank has become my most successful application with 400+ installs.

When Code Bank is first launched the Server Select screen is displayed, similar to that of the MySQL GUI Tools. The server select screen remembers all of the previous servers, but only the ones which a successful connection to the server and successful login is made. The first thing Code Bank does when you hit the login button is the connection attempt to see if the server address is correct, then a login attempt is made. If the user successfully connects and authenticates to the server the application transitions to the main screen.

The main screen is where 90% of the action happens, from there you can search snippets based on title, description, or tags. You can select snippets which are categorized based on languages and they will be displayed to the right with full syntax highlighting thanks to SyntaxHighlighter. When a snippet is displayed all of the information about that snippet is also displayed, this is information like the creator, last modifier, when it was last modified, as well as it's title and description. Once a snippet is displayed you have the ability to copy, export, print, edit and even delete the snippet right from the main screen. Possibly one of the most important and most useful features is also displayed on this screen, the revision dropdown.

Code Bank has a rather simple implementation of a version control style system, each time a change is made to a snippet that version is added to the database while the old version is kept. This in effect gives you the ability to see the previous versions of a snippet and do all the functionality you could with the "head revision" except for editing that revision. This feature steams from my use of subversion for personal projects and at work and how much I value it as a development tool. Code Bank even has a compare view allowing you to compare between revisions of a snippet of code which is available with both a server and local database.

Code Bank has full support for a local database, with all the features of using a server for storing the database minus only a few features. One of which is user authentication which frankly didn't really need to be used in a local database, only reason it's there in the server model is so that users have their name bound to their submissions. The other is the Intellectual Property notice feature again something that is not really needed in a local database.

With the release of 2.0 I added only few new features and tweaks to many existing, the largest and most complex change to Code Bank's source was adding support for multiple languages using my i18n library. I also added away to clean up your server history, since somewhere around version 1.3 I added support for database updates Code Bank no longer deletes the database containing the server history every time a new release comes out. So now in 2.0 you can remove individual entries from the server list.

Many users requested that there be away to get around the session time out, prior to 2.0 if your session timed out you would get bumped back to the login screen and everything you were looking at gets reset back as if the application just opened. Now in 2.0 when your session expires a dialog appears asking you to enter the password for the logged in user once the password is entered correctly the user is returned to where they left off. Of course with a local database this does not apply the user is simply left logged in until the application is closed. In the future I plan to have it setup so that the user can enable a heartbeat of sorts, so every 10-15 min a request would be sent to the server to keep the session alive. If the session has expired then the current dialog would be presented asking the user to re-enter their password.

Also with the release of 2.0 I wrote a web client for the server, it relies heavily on jQuery and the use of the Zend_Json_Server which allowed me to ever so slightly tweak of copy of the amf endpoint to use the Zend_Json_Server class instead. Giving me the ability with relative ease access this new endpoint for use in a web client. The web client provides all of the same features as the desktop client however it is limited to access only the current server. It uses one html file rather then having the UI be served every time the user makes a request, obviously this does pose a few security concerns in that all of the admin user interface and jQuery powering them is exposed to the user. However the burden of security was not only given to the client side code but the server-side has been greatly hardened to account for this as well.


Screenshots

Login (Server Selected)Code ViewEdit Snippet
Login (Server Selected)Code ViewEdit Snippet
New SnippetPreferencesServer Admin (Manage Users)
New SnippetPreferencesServer Admin (Manage Users)
Change PasswordIntellectual Property EditorCompare View
Change PasswordIntellectual Property EditorCompare View
Intellectual Property AgreementServer History ManagerSession Expired Lock Screen
Intellectual Property AgreementServer History ManagerSession Expired Lock Screen
Web Client LoginWeb Client IP AgreementWeb Client Code View
Web Client LoginWeb Client IP AgreementWeb Client Code View
Web Client Edit SnippetWeb Client Compare RevisionWeb Client New Snippet
Web Client Edit SnippetWeb Client Compare RevisionWeb Client New Snippet
Web Client Change PasswordWeb Client Manage UsersWeb Client Manage IP Agreement
Web Client Change PasswordWeb Client Manage UsersWeb Client Manage IP Agreement

Post your comment

»
 

Comments

No one has commented on this page yet.