Here are the notes from the changelog regarding changes from version 1.0 to
version 2.0. Usually some days after the release there will be a news which explains all the new features in more detail. Thanks everyone for participation.
Detailed article about version 2.0
Michal
Changelog ajaxed version 2.0
- BUGFIX: ajaxed loading indicator stays fixed now even if there are scrollbars and you scroll.
- BUGFIX: lib.range previously failed float tests are now running
- BUGFIX: database tests used to run with the default DB if available.
- BUGIFX: lib.throwError had a bug calling just QS but should call page.QS
- BUGFIX: lib.detectComponent didnt work due to a wrong variable name
- BUGFIX: str.format used to have a bug when arguments contained a placeholder string
- added error handling in db.insert and db.update to get more information about an error if one happens
- updated documentor:
- support for lists added and code blocks (
) added, because docs looked a little messed up sometimes.
elements supporing lists and code blocks include:
@CDESCRIPTION, @SDESCRIPTION, @DESCRIPTION, @PARAM, @RETURN and public properties.
A list item must be on one line, and start with "- "
- Code examples are now better to read within the documentation
- due to this change some docs have been updated for better readability
- removed the class path in the documentation. it made no real sense to display this.
- default methods has not been supported yet. are marked in "italic" now
- BUGFIX: methods, properties, etc where case sensitive and it didnt recognize e.g. "Public Function" or "pUblic Property"
- BUGFIX: byVal parameters have been not correctly detected.
- removes square brackets on a methodname (reserved words)
- parameter lists have a "," now between every parameter
- use to emphasize code words (e.g. methodnames, etc.). EMPTY is emphasized automatically
- @ALIAS keyword added for methods.
- options are detected in the documentation
- added db.getRS() and db.getUnlockedRS(). those should be used instead of db.getRecordset and db.getUnlockedRecordset
because they can be used with parameters which will be sql-safe. e.g. db.getRS("SELECT * FROM user WHERE id = {0}", 1)
- added some more error checks to the db class
- added a Logger class which allows you to log all kind of things on 4 levels (debug, info, warn and error)
- by default dev env logs till level debug (as a result all levels) and live env only till error level
- logging comes with ASCII coloring which makes reading the logs easier
- lib.logger holds a ready-to-use instance .. debug with lib.logger.debug("some message")
- console has logging management
- ajaxed logs some useful information by default as debug. e.g. all page requests and database accesses are logged. Nice thing: every class logs in its own color - to outline the different components
- also warnings about e.g. obsolete methods are performed
- supports also non ascii chars.
- code-consoles in the console scroll from top to down now. this is more logic ;)
- updated str.isValidEmail() pattern to match all emails
- TestFixture
- assertInFile() and assertNotInFile added
- assertResponse() added. with this its possible now to write tests which check if pages actually respond and work
- asserts can be failed manually now by using fail() method
- info() method added.
- str.rReplace added => performs a quick regex replace on a given string
- str.format is simpler to use when having one placeholder
- instead of str.format("one {0}", array(1)) we can use str.format("one {0}", 1)
added a StringBuilder component which speeds up the common string concatenation.
- uses either a .net stringbuilder or a custom VB StringBuilder (if installed)
- is loaded by default and can be used e.g. ...
set output = new StringBuilder
output("test")
its possible to override config vars for each environment. - place a evnDEV() and/or envLIVE() sub into config.asp and override the wanted config vars
- each var which should be overriden must be configured globally first otherwise it wont be recognized
database class
- tested databases microsoft access, sqlite and ms sql server
- dbType added which tells us which database we are using
- trims all text field columns on insert() and update() to the length which is maximum allowed for the column => no error happens anymore because a field is too long
- added insertOrUpdate()
- update() is also doing batch updating now and return the number of updated records
added a lib.require method which allows us to do a check if a given class has been included. if not a friendly error is shownfriendly error raised when ajaxed.callback is used but no callback() is defined on server sideajaxed.callback supports page-parts now:
it possible get page content back on callback and update a container with it.
example: lets say we have a DIV container with ID 'c' and want to load some html from the server into it
this is also possible now with ajaxed.callback:
e.g. ajaxed.callback('partname', 'c') will load a sub called "pagePart_partname()" and put its content
into the element with the ID 'c'. if no sub found with that name then it acts like a normal callback.
added a Dropdown control.
- uses stringbuilder. can output directly or to a string
- different multiple types (checkboxes, radiobuttons)
- different datasources
str.HTMLEncode() is now a default function so its quicker to use in your views. use it to prevent XSS attacks!str.humanize() added. it makes "computer" strings more "human" readableValidator class added. It helps validating business objects!AjaxedPage.RFA() method added. It gets arrays from the request.form collectionlogger deactivated by defaultJSON:
- BUGFIX: if a dictionary contains no items then "null" is returned. used to return nothing (this is wrong according to JSONs RFC).
- BUGFIX: supports all unicode chars now (using ascw() function instead of asc()). Chinese, etc. works fine now!!
- recordsetPaging property added
- updated documentation
- toJSON() has been defined as default method. thus generation is possible with (new JSON)("some value")
- standalone test(s) added
- supports request object now (includes IStringList and IRequestDictionary support). exposes session, form, querystring, etc.
DataContainer class added - provides an abstract utility to manipulate data. supports recordset, array and dictionary
- lib.contains() is obsolete as it has been moved to DataContainer
- paginate() can be used to paginate data
Localization class introduced
- available with 'local' instance
- str.parse() parses float number with the comma according to the local settings
added str.writef() function which is a combination of write() and format()AjaxedPage.headerFooter property introduced to allow adding custom headers.added lib.requestURL() to easily request urls with IServerXMLHTTPRequestadded AjaxedPage.QFP() and AjaxedPage.RFP() methods to get values and parse them in on go.added lib.arrayize() which ensures a value to be an array.
introduced optionsHash which can be seen as an own ajaxed datatype.
- can be created using lib.options or ["O"] function
lib.newDict() got an alias ["D"] => create dictionaries only with: set d = ["D"](empty)