fundamentally users, data sources and queries.
a user can create data sources
a user can view and modify the description and definition of data sources that he or she has created
if a data source is shared, other users can view its description (but not its definition) and write queries against it
a user can create queries against available data sources
if a query is shared, other users can view its description (and definition, but not its data source unless the data source is also shared)
if a query is shared and its associated data source is shared, other users can execute the query to retrieve results
to provide the simplest means of sharing data from an arbitrary source with others on the web
think of this as a minimal, RESTful means of running arbitrary queries against arbitrary data sources, in order to make it easy to share data with others
with a nod toward the Unix tradition and starting with one of the simplest examples using warden (for user authentication) and sinatra,
echo "tmp/*" >> .gitignore
mkdir tmp
git clone https://gist.github.com/8043506.git tmp/gist
cp tmp/gist/gistfile1.rb fudq.rbfrom there you can follow the commits
and here’s a working list of things yet to be done
- [ ] FIX flash messages are not visible (after adjusting layout and css)
- [ ] consider refactoring buttons for form posts
currently:
form method='post' action=url('/') input type='input' name='user[name]' placeholder='abc' input type='input' name='user[password]' placeholder='secret' input class="button blue" type='submit' value='authenticate'
alternatively: SO - http post with anchor tags
- might make app more dependent on javascript
- might make code more compact
- [ ] move login/logout to right nav (navBeta)
- [ ] need a more sane page layout and a little css love not sure why or what for teh css @import within a style tag, but to pull that off in slim keep in mind make sure you do not escape the HTML (take care)
- [ ] query titles should not be links when not authenticated
- [ ] improve table css (listing queries, data sources), make pretty
- [ ] FIX save data source is busted error at /d/2 757: unexpected token at ‘{“user”=>”guest”,
- [ ] set javascript includes protocol http/https accordingly
- [ ] create sandbox pg database and fudq data source (for admin user shared)
- [ ] “run” link on query page, return data to div
- [ ] figure best way to delete or disable a data source (w/o orphaned queries)
- [ ] consider save and share results
- [ ] create a data source in order to query the fudq git repository considering git as a nosql database, demonstrate a query against it in fudq
- [ ] create data source to query locus via shell
- [ ] integrate slickgrid on query page
- [ ] new (or register) user process, post username, email, password, confirm
- [ ] need to get some unit tests (but start with the model)
- [ ] rake task to initialize (or migrate) database
- [ ] create hash of user password (maybe with crypto-js)
- [ ] allow for query input args (ala parameterized views, table-valued functions)
- [ ] resolve “SECURITY WARNING: No secret option provided to Rack::Session::Cookie.” because I’m a sloppy developer…running with scissors
- [ ] DRY up slim fo data_source and query checkbox and select lists
- [ ] DRY up save query and data source logic
- [ ] handle streaming results, queries against nosql datasources
- [ ] break up the app into multiple files, modularize…growing need for a framework consider reproducible (tangle/weave) org file that keeps all the code along with the documentation consider SO - using sinatra w/ multiple files also read Sinatra Best Practices
