Friday, May 21, 2010

CSS skins on RdbAdmin

Those of you who consider our default Rdbadmin 'look' to be unattractive, can now provide your own css 'skins' for your own accounts.

The admin program now checks for a query in the lookup.queries table called 'css'. If found, that query is requested and the contents used as a css style-sheet for the page. If none is found, the default stylesheet is used.

Two demonstrations:

The Stackoverflow account now has a look suggestive of the stackoverflow site.
A baseball data account has a distinctive green theme.

The baseball account has a logo image as part of its theme, and the theme is self-contained within the account. To accomplish this, I created a table in the lookup schema to hold the css stylesheet and the image file. I called this table 'pseudofiles', as it serves individual fields as though they were files. The css data and the image file went into separate records in the table, and the lookup.queries table gained an entry to retrieve the css, and another entry to retrieve the image file. The entries resembled:
tag: css
query: SELECT "body" FROM "lookup"."pseudofiles" WHERE "name" = 'css'
format: binary:text/css
nopermit: {} (empty set)
So the browser loads the rdadmin/main.html page, and embedded javascript loads the css stylesheet. The stylesheet contains a background image url, and that url includes a query for the background image. The result looks like this.

The stackoverflow account uses a slightly different approach. The 'stylesheet' was a one-liner, completely embedded in the lookup.queries query.

SELECT "@import url(http://www.freshfaves.com/css/stackoverflow.css);"
The real css style information is then stored in a regular file on the freshfaves.com server, and loaded by @import. This approach has the merit of keeping the true styles in a relatively easily edited format, but also the penalty of having to involve another server.




minor grammatical and line-break editing 10 June

Friday, May 7, 2010

TechZing



TechZing, a podcast by Justin Vincent and Jason Roberts, has reviewed Rdbhost in their latest edition.


The review was a rambling half hour of the 90 minute podcast, and was quite interesting. The principal lesson I drew from it, is that it can be difficult to clearly communicate your USP (Unique Selling Proposition) for a web business.

Thank you to Mr Vincent and Mr Roberts for spending some time reviewing. I enjoy each of your podcasts, and this one no less.

What is my USP?

'SQL over HTTP, demand priced' .

Some competitors offer the webservice (HTTP) with a proprietary query language, and others provide the SQL database without the webservice interface. Demand pricing, with no minimum price, is not offered by any of them, that I know about. I do not use that USP phrasing in the website anywhere, because it is just too geeky; I try to phrase the website presentation from more of a 'what good is it?' perspective.




Monday, May 3, 2010

Rdbadmin now supports file fields

Rdbadmin is our online database manipulation tool. It provides handy tools to create and edit tables, indexes, and views, but also provides for arbitrary free-form SQL (PL/pgSQL) queries.


The pages that support inserting records into tables and editing records have been enhanced to allow file uploads as field values. Any arbitrary data that you can put into a file, you can put into a database field using Rdbadmin.


The SQL panel has been enhanced similarly, in providing 8 argument fields. The SQL can include substitution parameters '%s'; these parameters are replaced, in sequence, with the values of fields 'arg000', 'arg001', etc. The field values are quoted appropriately to avoid SQL injections, and the fields can be file uploads as above.


The last improvement to report in this post is that the field in the SQL panel for entering the free-form queries now has syntax-coloring. The coloring is provided by CodeMirror and a plsql syntax file.


As always, comments are welcome.




http://marijn.haverbeke.nl/codemirror/