Permalink
Browse files

more docs

  • Loading branch information...
1 parent e61dc7d commit 4eb16d381bb6a116cba8ec12c74bc31b3d1f42c7 @Fiedzia committed Apr 10, 2010
Showing with 88 additions and 41 deletions.
  1. +16 −9 INSTALL
  2. +36 −11 README
  3. +36 −21 code_hacking.txt
View
@@ -1,22 +1,29 @@
+Fang of Mongo (Fom) requirements:
-Fang of Mongo (Fom) requires:
+1. python, pythons-setuptools
+2. django
+3. pymongo (mongo bindings for python)
+4. access to mongodb
-1. python, pythons-setuptools (to install pymongo)
-2. django (ubuntu: aptitude install python-django)
-3. pymongo (mongo bindings for python, easy_install pymongo
-4. access to mongodb, get it from mongodb.org if you dont have it
- (it also may already be in your distro repository).
+Ubuntu 10.04 shortcut for getting it all:
+ sudo aptitude install python-setuptools, mongodb, python-django
+ sudo easy_install pymongo
+older releases will require adding mongodb repository,
+see http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
+
+If you want some sample database content to play with,
+Fom comes with freedb.org music album collection in json format/
+See fangofmongo/fangofmongo/tools/sampledata/freedb.json.
-Fom will much more usefull if you have some existing data in mongodb
I am using it on linux, but there is a chance that any unix-like os will work as well.
to install Fom, just unpack source somwhere,
and in file fangofmongo/settings.py:
set FOM_PLUGIN_DIR and MEDIA_ROOT - both contain absolute paths
- you may also set TIMEZONE to your location, but it is not required
+ set TIMEZONE to your location
go to fangofmongo directory and run:
./manage.py runserver
now point your browser to http://localhost:8000/fangofmongo/
-If you have installed mongodb locally then just click proceed and enjoy it,
+If you have installed mongodb locally then just click proceed and enjoy it.
View
@@ -6,29 +6,54 @@ user interface.
Curren status:
Fang of mongo is actually rather proof of concept for mongo ui then anything working properly.
-Expect all kinds of bugs and limitations.
+Expect all kinds of bugs and limitations. This is work in progress.
For installation instruction, see INSTALL file
To get the idea of code internals, see code_hacking.txt
Project goals:
- allow users to easily explore mongdb content
- and any metainformation it may provide
+ - allow users to easily explore mongdb content
+ and any metainformation it may provide
+ - Long term goal is to being able to perform any operation that can be done using mongodb console
-Roadmap (in order of importance):
+TODO (in order of importance):
- display collection content in nicely formatted way
- allow to easily filter and sort data
- - unittests
- - data edition
- - collection and db operations (create, remove)
- - data export to usefull format (html, json, csv, xml)
- - database operation (defining/creating indexes, setting replication,
- sync time and whatever is possible)
+ - make sure fom works correctly (by creating unittests and usable dataset)
+ - rethinking plugin interface
+ - CRUD operations
+ - collection and db operations
+ - data export (html, json, csv, xml)
+ - support for database credentials
- user management
- implement some form of mongo console
-
+UI comments (thanks matt):
+
+ 1.) Look at jquery ui autocomplete for the searches.
+ 2.) Less draggable area dont allow it to cover the top menu.
+ 3.) Wider text boxes with larger font.
+ 4.) More margin between elements (pretty much everywhere)
+ 5.) Effects / transitions between panes.
+ 6.) Ive always though YAML has the best way to cleanly show
+ collections. http://yaml.org/spec/1.0/#id2489726 If that can be
+ extended so that every array or object can be shown or hidden by the
+ user that would be a huge win.
+ 7.) If your going with the whole draggable idea, why not make it so
+ that you can open more than one collection at once and be able to
+ minimize them.
+ See: http://desktop.sonspring.com/ for ideas.
+
+ Down the road ideas:
+ 1.) Completely themeable using the theme roller with all the pre-built
+ themes as an option right in the page itself.
+ 2.) Drag and drop query builder with all of the special variables
+ ($set, $unset ect...) similar to the MySQL workbench query builder.
+ 3.) Full set of CRUD operations to perform on the database.
+
+
+
author: Maciej Dziardziel (fiedzia@gmail.com)
View
@@ -6,50 +6,65 @@ complicated javascript ui.The whole concept of this application is experimental
and there is probably a lot to improve in it.
-1. Django parts
+1. General overview
- On serwer side, see fangofmongo/fom/views.py and urls.py.
+ Fang of Mongo is a web based GUI for mongodb.
+ Being web applications it is made of:
+
+ - server part, written in python using django and mongodb drivers.
+ this part is responsible for providing mongo interface for clients,
+
+ - client part, written in javascript (+few html templates)
+
+2. Django parts
+
+ On server side, see fangofmongo/fom/views.py and urls.py.
Fom defines few views which either show its user interface
(mainly start page and page with fom user interface)
- or access mongodb (^rest.*). The first ones will return rendered html templates,
+ or access mongodb (all ^rest.* urls). The first ones will return rendered html templates,
the latter json with returned data. There is really nothing complicate there.
-2. User interface
+3. User interface
- My assumption is that Fom is build from independent components (like database list, collection list)
- which communicate with each other by sending messages via message bus.
+ The goal was to build UI from independent components (like database list, collection list)
+ which communicate with each other by sending signals via message bus.
+
+ When user will perform any action on one of components, it will send singal to bus informing others
+ and allowing them to respond to action.
- A component may send signal to the bus, bus will pass it to all listeners
- and if one of components decide that this signal requires some action, it is free to do it.
For example if you click on database in database list, it will send signal "database_selected".
- When collection list will receive that signal, it will send ajax request to get list of collecions
- from database. Returning set odf collections will also be seen as message to sent bus (collection_list_reveived)
+ When Collection list will receive it, it will send ajax request to get list of collecions
+ for selected df. Returning set of collections will also be send as a signal ("collection_list_reveived")
and any interested component may use it (like collection list will use it to present it to the user).
So we have:
- a message bus. If you write component it will likely be interested in receiving some messages,
- so it has to call listen method of messagebus object.
+ so it has to call listen method of message bus object.
- - a set of components, like database list, collection list. collection info and others
+ - a set of components, like database list, collection list, collection info and others.
+ Most of then is available as plugins.
- mongo_ajax object for accessing mongo via ajax calls.
- understanding those ideas, you will be able to modify existing code
- or - better - create your won components. You cen create them eitter
- by subclassing existing ones (if you want enhance or replace them) or creating
+ or even create your own components. You can create them either
+ by sub-classing existing ones (if you want enhance or replace them) or creating
entirely new functionality.
- There are also some ui elements that simplify creation of commonly used ideas (like list of items)
+ There are also some ui elements that simplify creation of commonly used ideas (like dialog with a list of items)
-3. Few words about plugins
+4. Few words about plug-ins
- A plugin is just xml file, and may contain:
- - some metainformation like name or wersion
+ A plug-in is just xml file (with .fomxml extension), and may contain:
+ - some meta-information like author, name or version
- js code
- - html and css code that will be embedded in page.
+ - html and css code
+
+ Basically all those resources are just inserted into ui page. fangofmongo/plugins/sample_plugin.fomxml_template
+ contains example. See fangofmongo/fom/handle_plugins.py for more information about how plug-ins are processed.
- Becouse even core fom functionality like listing databases and collection has been separated to plugins,
- you are free to enhance or replace them with better ones, just by adding new plugins
+ Because even core fom functionality like listing databases and collection has been separated into plug-ins,
+ you are free to enhance them or replace with better ones.

0 comments on commit 4eb16d3

Please sign in to comment.