OpenThought Changelog                         
                                                        eric at
* An internal code change that shouldn't affect most people
** An optional feature has been added that is probably worth checking out
*** This is a new feature that will likely require a change in your code

Changes since 0.70

* Made a correction to OpenThought-httpd-mod_perl2.conf which caused browsers
to only see a blank screen when running under mod_perl 1.9x/2.x.

* Restructured the demo app, modules and templates are no longer in a directory
reachable by a browser.

Changes since 0.64

* Changed the installation system to use Module::Install.

* The demo was still using the deprecated SendParameters JavaScript functions,
changed them to CallUrl.

* Added more tests to the test suite.

* If you had a group of radio buttons, and none was checked, you would get a
JavaScript error.  This was in part due to the use of <= instead of < in the
for loop that checked the radio buttons.  Whoops :-)

* Some compatability updates to the frame template

* Updated the text displayed when an unsupported browser loads an OpenThought

* Improved the installation.  Directories in the config files are now updated
at installation time with the proper paths.

* Bump up the required version of OpenPlugin to 0.10.  This version fixes a
number of bugs, and also includes support for Apache 2.

* Bump up the required version of OpenThought::XML2Hash to 0.57.  There were
some nasty bugs floating around in 0.56.

* The & character wasn't being escaped properly, and may have caused an error
any time that character was being sent to the server.  This has been corrected.

* Events which update a portion of the screen, as opposed to events which
download a complete new HTML interface, are no longer added to the browsers
history.  That means the back button will only move you from screen to screen,
instead of stepping through each screen update.

* You can't use "about:blank" in IE6 while using SSL without a getting nasty
error message about using an insecure page.  Argh.  So, the commFrame (the
hidden frame) now grabs it's blank page from the server, which makes IE6 happy.
It only has to do that once, when the app loads for the first time.  That's
not too bad.

** You can now update HTML in IE4.  Previously, this only worked in W3C
compatible browsers (such as IE5+, Netscape 6+, and Mozilla).  Updating HTML
still does not work in Netscape 4.x, let me know if you would like to implement
that :-)  Of course, updating fields, javascript, and such works fine in
Netscape 4, just not HTML.

** Major updates to the documentation.

** A debug frame has been implemented to assist in debugging your applications.
It remains dormant until you enable it in the config file.  After enabling it,
a new, resizable frame will appear at the bottom of your browser, where you can
see all sorts of debugging information being sent.  This idea was suggested by
a kind person at the OpenThought presentation during YAPC::Canada::2003. I
should have gotten his name at the conference as this was a great idea.  This
is still a bit experimental, some issues still need to be worked out.

** You can now add local Apache changes to the file

*** OpenThought now has a concept of events.  It can be called with one of three
events, based on what the browser needs back.  An event is either "init", "ui",
or "data".  The "init" event is the first event to occur, and happens when the
browser needs the base application files.  The "ui" event occurs every time the
browser wants to display a new user interface (usually HTML).  A "data" event
occurs every time the browser has sent us a request in the background, this is
where we can update the browser without reloading the page.

*** To go with the new events concept, there is a new method called "event".
The "event" method determines which event the application has been called with,
and using parameters you pass in, calls the appropriate function.  You should
no longer attempt to figure out how your application was called by using the
"OpenThought" GET parameter.  Use this new "event" method instead.

*** To determine the current event type, there is a new method called

*** If no item in a select list is checked, it makes much more sense to return
the empty string than -1.  The value -1 could often be a legitimate value
within a select list, making it near impossible to test for it.  So, select
lists which are unchecked now return the empty string.

*** The httpd include files which enable mod_perl have gone through a
significant change.  Instead of being written in Perl, they are now straight
Apache syntax.  The Perl was flexible, but often hard to understand or add to.
They should now be more straight forward.  It will now also work in Apache 2.

*** You should no longer manually call the deserialize method, unless you're
doing something unusual with it (which probably isn't the case).  It will be
called for you by OpenThought's new() constructor.

*** The names of the run time settings have been updated to include
underscores.  The settings autoclear, maxselectboxwidth,
fetchstart, fetchdisplay, fetchfinish, and runmodeparam are now know as
auto_clear, max_selectbox_width, fetch_start, fetch_display, fetch_finish,
and runmode_param.  This makes them more consistant with the config file, and
they're also more readable.

*** The key named "run_mode_param" in the config file is now known as

*** The deprecated "SendParameters" JavaScript function has now been removed.
You should use "CallUrl" instead.

*** The function "get_application_base" is just far too much to type.  It is
now called "init".  Using "get_application_base" will continue to work for now,
but is deprecated.

*** The default OpenThoughtRoot is no longer under Apache's DocumentRoot.  We
get bonus points for security here.  Next release, expect to see the default
location for templates and modules be different from the OpenThoughtRoot.

Changes since 0.63

* Radio buttons in some versions of Mozilla weren't working.  Included a fix to
handle the fact that some versions of Mozilla don't return a value for the
object.type call when the object is a radio button.

* Fixed an issue where checkboxes in some cirsumstances would always return a
true value, even if they weren't checked.

* Updated the documentation to make various sections more clear

* Try and handle some errors more gracefully

* Fixed a number of issues that were keeping Konqueror from working.

* Fixed problems with the test suite which would cause it to fail on certain

* A variety of code cleanup

* Removed deprecated log() calls

* JavaScript code sent from the server to the browser is now encapsulated
within a JavaScript "with" to make sure it's executed within the right
namespace (that is, the content frame).  This should be much better than the
previous method.

** You can now define what values are returned for true and false when a
checkbox is checked / unchecked.  The default is 1 or 0, but there might be
reasons to change that to something like "true" and "false", or something

** The application title can now be set.  Simply set the title in the HTML you
create (which is loaded into the content frame), OpenThought will use that to
set the title of the root application.

** Passing in a reference to an array with one or two elements to a select list
now adds a single line to the end of that select list.  Previously, you needed
to pass in an array of arrays, and it would always erase the current contents
unless you set the autoclear parameter to 0.

Changes since 0.62

* Fixed another taint mode problem some were experiencing by explicitely
setting the path in the file.

* If "Prefix" isn't set or passed into OpenThought, it now tries to figure the
Prefix out using the location of the config file parameter passed in to

* Fixed problems that kept the demo from working under standard CGI.

* Updated the instructions for a CGI install, following them exactly would have
produced a syntax error.

* Fixed a problem where _escape_javascript wasn't working correctly

* Made CGI installs easier, hopefully.

Changes since 0.61

* Updates to the demo code and config files to make OpenThought work with
changes done to OpenPlugin

** In addition to being able to update form fields, you can now send updates to
HTML code to the browser.  This currently works in browsers supporting the
'innerHTML' method.

** The contents of any HTML within an id tag can now be sent to the server,
just like the values of form fields.

** Of course, updates to the documentation

*** The syntax for calling OpenPlugin's new() method is slightly different.
Instead of: $OP = OpenPlugin->new( config_src = /blah, { apache_req = $r } ), it
is now: $OP = OpenPlugin->new( config => { src = /blah }, request => { apache
=> $r })

Changes since 0.60

*** Redid the directory structure to conform to the Filesystem Hierarchy
Standard, version 2.2.  You may need to update your config files to point to
the new locations, particularly the 'include' line in your httpd.conf which
includes the OpenThought httpd config file.  Just pay attention to the messages
during the installation process and you'll be fine :-)

*** Hrm.. I'm just not happy with the XML config file.  I like the heirarchy it
provides, and certain other features, but it's just not particularly easy to
read through.  I changed it to an Apache style .conf, which handles a lot of
the heirarchy issues as well as xml, but comes across as being easier to read.
Lets try this one out and see if I like it :-)

** Modified the installation instructions to work with both mod_perl and CGI

** Modified the documentation to better explain how to go about using
OpenThought under a CGI environment.

*** Seperated the OpenPlugin configuration directives into their own
configuration file.

* Got rid of one of the last package vars

* Moved OpenThought::XML2Hash into a seperate package

* Added 7 new tests to the test suite

Changes since 0.57

* Fixed several bugs relating to select list behaviour.

** Better handling of blank fields in the XML to Hash conversion process.  When
deserializing, a blank field now generates a hash key, with a value of the
empty string.  Previously, no hash keys were generated for blank fields.  But
many applications may need those blank values.

* Internal updates to make OpenThought work with OpenPlugin 0.05

*** Syntax with some OpenPlugin routines has changed slightly.  This includes
the Datasource, HttpHeader (simply sending an outgoing text/html header is
unchanged), Cookie, and Param plugins.

*** The 'deserialize' function no longer fetches the full session for you, it
only returns the session id.  It's then up to you to decide whether or not you
wish to open and validate the session.

** The demo application has been redone to reflect some changes and additions
to OpenPlugin.  A new module called OpenPlugin::Application has been created,
which models CGI::Applications behaviour.  In fact, it's basically just
CGI::Application retrofitted to use OpenPlugin instead :-)  Using
OpenPlugin::Application is now the recommended method for creating OpenThought

* Some minor changes to httpd-OpenThought.conf to make sure OpenPlugin, and all
the desired plugins/drivers, are loaded at Apache startup time.

* Make XML2Hash die if it wasn't passed any input

** Addition of the runmodeparam setting, which works in conjunction with
OpenPlugin::Application to set the name of the run mode parameter to be used

** OpenThoughtData and OpenThoughtRoot can now be passed in to the constructor
new(), which overrides the variables set up in http-OpenThought.conf.

** Added a new JavaScript function 'FetchHtml()'.  It is capable of directly
loading a new HTML Document into the content frame.  It's parameters function
exactly like that of 'SendParameters()'.

** Now works with Konqueror version 3.0.0

** OpenThought can now work under standard CGI, as well as mod_perl

* Ack! Found a bug that caused values being sent to serialize() which evaluated
to 'false' to be set to the empty string (so the number "0" would evaluate as
the emply string, "").  This is now fixed.

* Got rid of a bunch of 'Uninitialized variable' warning messages

** Checkboxes can now also be set to false using the strings 'False' and 'FALSE'

*** The SendParameters JavaScript function has been renamed.  I know this is a
big pain in the rear for existing code, but it had to be done.. the existing
name really doesn't make sense anymore.  The new function is named
'CallUrl()', which is really what it's doing.  For this release, however, I'll
leave the old method in tact for backwards compatability.  If you wish, you can
simply use:
  # perl -pi -e 's/SendParameters/CallUrl/' *.html
from the command line to change this function call in all your html files.

** Lots of updates to the documentation

Changes since 0.56

** You can now pass url GET parameters when using the 'url' function.

* Restructured the internals of OpenThought / OpenThought::Serializer to make
future expansion easier.

** Whenever serializing options or settings, they are serialized, and then
executed, in a particular order.  This order is now customizable with the
'order' parameter.

Changes since 0.52

With the addition of several of the features added to this release,
particularly the 'url' parameter, OpenThought has moved beyond being an
application engine, for a single application.  OpenThought now provides a full
environment for applications, and groups of applications, and provides the
capabilities for tieing them together.  It manages sessions between them all,
and does so automatically.

** A new settings function has been added, allowing you to alter any settings
within the currently running OpenThought application.  There are methods for
both temporarily and permanantly changing settings.  Previously, the only
method for changing settings was doing so in the config file, before the
application was loaded.

** Previous select list behaviour was to always clear the existing data before
adding new data.  A new option, autoclear, has been added to allow you to alter
that behaviour.  Upon setting that to false, existing data in select lists is
preserved, and any new data is appended to the list instead of overwriting it.

** New url parameter allows for easy switching between html documents.  All
your base files that are loaded remain the same -- meaning your session and
such are preserved -- what changes is the user interface, when using this
option.  It first expires the cache associated with the form elements in the
existing page, and then loads the new page you requested.

* Fixed a bug that was causing some browsers to crash intermittantly.

** In addition to the existing abilty to add items to a select list, you can
now select (highlight) an item in an existing list.

*** The method used to select a radio button has changed, and is now much
cleaner and simpler.  It is very much like that used by text elements now.
You'll have to update any existing code that manipulates radio buttons.

** Instead of only being able to send values of form elements to the server,
you can now also send expressions in a key=value format.

Changes since 0.41

(version 0.41 went through a major overhaul)

** Instead of handling Sessions, Authentication, Databases, and all that sort
of thing within OpenThought, it's all now been moved into a reusable component
called OpenPlugin.  OpenPlugin has been designed to be a generic method of
handling all sorts of goodies that every web application framework needs.. so
no more rewriting things that everyone else has already done.

** Now works with Opera 6

** Installation is now much simpler.

* OpenThought no longer uses a Java applet to communicate with the server; it
is now using hidden frames.  Everthing now loads much faster, it uses
less RAM, and browsers no longer need that Java plugin to work.  This should
make OpenThought compatable with more browsers.

** Now works with Mozilla 0.8+.

*** The OpenThought Config file has been redone (again).  It is now using XML.
To keep things small and fast, the Config parser is an OpenThought module which
is very minimal, and directly uses XML::Parser.

*** Individual application config files are no longer used.  OpenThought
figures out on it's own where your form elements are located in your document.

* OpenThought no longer uses WDDX, but uses a plain/generic XML format.  While
WDDX was fun, it took up more RAM then I had hoped to make OpenThought require.
Additionally, while the WDDX implementations for Perl and Javascript are
reasonably fast, using plain XML in this case is much faster :-)

* Did some tweaking to help push the throughput a bit faster.  At this point in
time, with the demo application -- from the moment I click a button in an
OpenThought application, to the time the form elements are filled in with text,
I am regularly getting around 26ms for that round trip on a 667Mhz desktop

** Now have a _much_ better way of taking data and getting it to the browser.
Instead of having only one opportunity to send a packet back to the client, we
can do it any time throughout the life of the instance of the OpenThought
application, and we can send data as many times as we like.  Given a properly
set up program, we now really have the ability to use persistant http
connections, simply by not allowing the OpenThought application to quit.
However, there are plans for better persistant connections in the works which
would use less resources.

*** Reworked much of the API, make sure you read the docs :-)

* Redid the entire directory structure.  While doing so, I managed to find --
and squash -- several pesky bugs that wanted to be tied to a particular layout.

*** Now use hashes instead of arrays to work with the data structures that are
sent to and from the browser (for most elements, anyway).  I think you'll
really like this feature :-)

Changes since 0.40

*** We're now using a new Config file format, which uses an 'ini' style.  The
reason for this is that there is a very advanced module 'Config::IniFiles',
which will allow us to modify config parameters on the fly, amongst other
things.  You should only have to change 1 line in your application in order to
make it function for you, if you're using items from the config file in your
application.  See the file for an example.

** Within the config file, you may now define an unlimited amount of database
sections.  This will allow you to use as many databases as you desire within
your applications.

*** Changed how the login templates are defined.  You now can set it up similar
to the way you set up the standard template.. you'd define each element that
exists that you want to have sent to the server.  This allows you to be a bit
more creative when putting together login templates.

*** Changed the test that is done during user authentication to be more open.
Instead of requiring that you send it a username and password - and that there
are username and password fields defined in your database - you tell it on the
fly which parameters to authenticate against.  This would allow you to name
your fields anything you want, and have as many of them as you desire.  This
would allow you, for instance, to add in a 3rd parameter called 'domain'.
Then, if the username, password, and domain all didn't match, the login would
not be successful.  See the demo app for an example.

Changes since 0.33

*** Changed the names of several configuration directives in the to be less redundant.

*** Added a configuration option in the config file to enable or disable
persistant database connections, which is off by default.  There is no longer a
need to uncomment/comment any code.

***** Major reconstruction in the OpenThought API and Layout.  This really
pushes us forward in the advancement of OpenThought, but will completely break
all existing applications.  Sorry :-)  It's definatly for the better though,
and I think you'll like it.  The changes are far to much to put here - but to
sum up, you are no longer calling and, you now directly call your application, and control
everything from there.  There are functions available to you to make that
simple to do.  Basically, OpenThought now acts more like a module and less like
an application.

* Removed, renamed to, and
renamed to

* Reduced the memory footprint OpenThought uses by over 50k per Apache process

* All sorts of internal changes to gain more code reuse, significantly cleaner

*** All the database related function names have changed

** Now tested OpenThought on a Perl 5.005 system, and fixed a few small bugs to
get it to run properly on these older versions of Perl.

** Created add and remove user features, finger_user, and encrypt (for
encrypting passwords)

** New parameter 'param_name' sent to the server on WDDX requests

** Created some new accessor functions in - get_param_group,
get_parameters, get_session_id, and get_request_type... to be used instead of
the generic get_params that had been previously used..

*** The error function does not require you to create an object now, you can
display an error in 1 function call now.

** Mucho documentation updates.

** Now includes a Makefile.PL, which handles installing all the CPAN module
prerequisites for you, and copies the OpenThough modules into place.  You still
have to do some work though.

Changes since 0.32

** Added a new database module, which offers a database abstration layer,
allowing you to use any database supported by Perl's DBI.  The functions 'new',
'do', 'query', and 'finish' have all been added.  DB configuration can be done
in the file.

** User Authentication is now usable.  You may authenticate against anything
supported by Perl's DBI, including a number of databases and even text files.
Passwords are stored in the database or text file using md5.  Also, *no*
passwords are sent over the wite in clear text.  OpenThought uses a Challenge
Response system.  When the user first connects to an application, they are
given a hash.  When the user types in their password, the hash is appended to
the password, and an MD5 message digest is then generated using the combined
password and hash.  That message digest is what is sent to the server.  To use
authentication, you'll need to edit your database or text file, add the user
manually, and put in a md5'd password.  You can see the file passwd that comes
with this distribution for an example.  Look for more info on this in the

* Various code cleanup

** Added more comments to the demo application

** Dropped the Perl 5.6.0 requirement, it was only saving us 12K per server.
If you think it's worth it to keep Perl 5.6.0 to save 12K, please let me know.

** Added a new Log module along with a logfile just for OpenThought data - you
no longer have to share with the apache error log.  The Log module is very
small and simple - just call it using the method 'log_message("My Message
Here")' to have any message logged to the OpenThought log.  In addition, you'll
need to change the owner of the log dir to that of the httpd process (the same
as the session dir).

** OpenThought now supports persistant database connections if you install

** More additions to the documentation.  I'll make it prettier soon, I promise

Changes since 0.31

*** There is now a file that can be used to load all the necessary
modules for OpenThought to run at Apache startup time.  This saves time and
RAM.  See the INSTALL file for specifics on how to do this - the lines you had
originally added to your httpd.conf need to be edited.  You also need
Apache::Server installed.

***** There is a problem when using XML::Parser 2.30 with Apache!  It causes
Apache to segfault under certain circumstances.  The problem is because
XML::Parser (which is needed by now uses the shared library version of
expat.  However, many systems have expat compiled into Apache too.  Apache then
see's both versions, gets really confused, and quits.  There are two possible
fixes.  First, the newbie lazy way, is to just install the older version of
XML::Parser, version 2.29, that is now included in the distribution.  The
second, manly, alpha-geek, uber-hacker way of fixing the problem is to
recompile apache, and specify "--disable-rule=EXPAT" when running the configure
script.  Did I mention that the second way is better? But either will end up
fixing the problem.

** Extended the session support.  session_object is no longer supported, and
has been replaced by session_store, session_value, and session_erase, each of
which is documented in the OpenThought.pod file (perldoc OpenThought.pod).

*** OpenThought will not start now unless it's using mod_perl.

* Test to make sure the session dir really is writable by the httpd process

** Lots of updates to the documentation

Changes since 0.3

** Created a changelog :-)

*** Applications built using OpenThought are now called as a method instead of
as a subroutine.  This means there is an extra parameter to account for.  See
the "run" method which is part of the demo application for an example on how to
deal with this.

* All error generation code should now be using the error module.

*** Changed the name of the template "openthought-javascript-template.js" to
"openthought-standard-template.js" since there are now multiple javascript
based templates.  Make sure you update the TMPL_INCLUDE line in your
application template.

* Major internal changes to the standard template, added new parameters to
ParamGen and ElementGen

** There is now a way to have a field automatically focused for you when the
browser receives a WDDX packet.  In your application, whenever you are
returning the values of $fieldnames, $fieldtypes, and $data, adding a fourth
parameter containing the name of the field to be focused will invoke this new

* Redid the 'new' method in to take optional parameters

* Can now display custom error messages on the error template.. but thats more
for internal use since applications built on openthought are using WDDX

** Lots of documentation updates and new comments in the code

* OpenThought won't feed you the HTML Template now unless you're running under