OpenThought Changelog                                   http://openthought.net
                                                        eric at openthought.net
Key:
* 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.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
systems.

* 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
similar.

** 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 demo.pl 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
OpenPlugin.

* 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
installations.

** 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
applications.

* 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
system.

** 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 demo.pl 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
OpenThought_Config.pm 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 OpenThought-HTML-Server.pl and
OpenThought-WDDX-Server.pl, 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 OpenThought_HTML.pm, renamed OpenThought_WDDX.pm to WDDX.pm, and
renamed OpenThought_Config.pm to Config.pm.

* 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 OpenThought.pm - 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 OpenThought_Config.pm 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
future...

* 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
Apache::DBI.

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

Changes since 0.31
------------------

*** There is now a startup.pl 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 WDDX.pm) 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
feature.

* Redid the 'new' method in OpenThought.pm 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
mod_perl.