= Explanation of the changes of patch 1110-1111

What this patch is all about.
Due to a general cleanup and preparation for further extension there has been a
lot of moving of code into more appropriate positions.
Another goal was the reimplementation of Global, away from OpenStruct to the
faster Struct.
Some smaller improvments will follow on both areas, but as with the last
Controller refactoring, this aimed to be finished as soon as possible to get
Ramaze bulletproof again before the next release.


== Ramaze
=== What happened to the module

The whole module has now only two methods, :startup and :shutdown

startup sends .startup to the classes in
Ramaze.trait[:essentials]
shutdown sends .shutdown to these classes.

Other methods changed:

force_start
  removed -> not used anywhere and easily done with a passed option.

execute
  removed -> there may be a replacement coming though.

kill_threads
  delegated -> this is handled over the shutdown of the responsible classes now.

setup_controllers
  delegated -> has been moved to Controller::startup

init_sourcereload
  delegated -> moved to SourceReload::startup

init_global
  delegated -> moved to Global::startup

init_adapter, run_adapter, test_connections, connection_possible
  delegated -> moved to Adapter::startup

require_adapter
  delegated -> is now the mask Global.adapter

parse_port
  delegated -> is now the mask Global.ports


== Global
=== New functionality and layout

Global is now a Struct instead of an OpenStruct, which means two things:
The general API is hardened now, assigning new accessors is not as simple as
just setting them via method_missing anymore.
The GlobalStruct::DEFAULT hash defines what contents the Struct has.
This has on one hand a improved performance, on the other hand it unifies the
API for further versions, collecting the setting of Global accessors into one
place.
We could add method_missing in further revisions if need arises.
The other important improvement is the masking of internals of Global. This means
that we can now define a method over the internal value and present something
different than it actually contains. Also hooks on setting a value are now
possible.

Controller.trait[:ramaze_public] has moved here as Global.public_root to match
the Controller.public_root setting.


== Controller
=== template_root and public_root

These are no traits anymore. Now the resolution of templates should be a little
bit faster, but more importantly they will give you a warning when setting a
path that does not exist.
To remove the 'self.' boilerplate they take an optional argument and act as
getter only if no argument is given.


== Cache
=== Unified API for new Caches

We now take advantage of the ages-old idea of having a unified Ramaze::Cache to
spawn new instances of caches instead of relying on Global.cache.new which posed
many problems with configuring them.
To retrieve a new cache, simply use Cache.new now, setting Global.cache will
define which class is used for this. You can set strings/symbols like :memory,
:memcached or :yaml.

Cache also specifies a unified API, at the moment consisting of:
#[](key), #[]=(key, value), #clear, #delete(*keys)

To make interacting easier, all keys are stored/retrieved as strings
automatically so you can use either symbols or strings to access values.


== Adapter
=== Adapter::( startup | shutdown )

The stuff from Ramaze has moved here, it basically still works the same way.
However, we are now wrapping less threads around one adapter, which may or may
not affect performance.


== Request
=== Outsourcing of methods to Rack

Following methods have been moved to the latest version of Rack:
#fullpath #[](key), #[]=(key, value), #values_at(*keys), #referer/#referer

=== Change from module to subclass

== Response
=== Change from module to subclass

Same as Request


== STATUS_CODE
=== Usage of Rack::Utils::HTTP_STATUS_CODES

We are now using the hash from Rack, assigned to Ramaze::STATUS_CODE and have
removed ramaze/http_status.rb
The major change is that the keys are now strings like
"Not Found" or "Internal Server Error". Most of the time guessing will work.


== Informing
=== Added #debug? for WEBrick, set to false.
