As I mentioned a couple days ago, the
Rdbadmin application has been revised. The general goals of the revision was to make the app more maintainable and remove a few bugs.
Specific goals were:
- Access the host server via the new Rdb.js module, instead of $.ajax and custom code.
- Make the application portable, so that it can be loaded from other servers under other domain names.
- Move all html out of the javascript modules into the html host page itself. This makes a css 'skin' designer's job easier, as all the html elements are there in the page to see.
- Move all the javascript out of the html host page, and into javascript files.
- All javascript is to conform to jslint expectations.
- Minimize the number of globals. The former version included a global object for each form and a few more, with references to those globals scattered all over.
These were all accomplished, with exceptions here and there. There is still a smidgen of login and initialization code in-line in the html file, and the javascript files still have some $('<option>') elements here and there, so the html/js separation is not pristine. JSlint compliance was with a custom configuration, not the default.
In addition to the above items, an
additional couple of features wer added:
The table structure page now includes, in addition to the table columns and indexes, a list of constraints. There is a new form to add or drop constraints for a table. I also removed the 'primary key' and 'unique' columns from the table edit, as those constraints will be handled by the
Constraints form. Eventually, they will be added back in.
Also, each form now features an
SQL display box. As the form is filled in, the app continuously generates and displays the SQL that will perform the desired action. When filling in a create table form, for example, the SQL box will display the 'CREATE TABLE tablename...' code that will be sent to the server to generate the table. This might be useful to new programmers to understand how SQL syntax goes, and might help experienced programmers understand what
, exactly, the form is doing.
Most forms include an 'Edit SQL' button, which will load the displayed SQL into the SQL editor for refinement and submission to the server. The
PostgreSQL syntax for various operations, such as creating tables, is more capable and feature-rich than the RdbAdmin interface, so for some less common requirements, you might need to drop to the SQL editor to get what you need.
There is a login page now, if none of the automated login approaches work. The app can be loaded with a non-authenticated role in the URL, and that role will be used for the database connection, otherwise it presents a login app, for entry of email and password. When the app is loaded from Rdbhost itself, a cookie-based login is attempted, for users that have already logged in to Rdbhost itself.
The code is at:
http://www.rdbhost.com/downloads/rdbadmin-0.8.zip
The latest code will always be available from subversion, at:
http://www.assembla.com/code/rdbadmin/subversion/nodes