contextr
Get Version
1.0.2What
ContextR is a library supporting context-oriented programming.
Version 1.0.1
This version includes the latest changes, that were introduced when finishing the thesis. Nothing, that changes the usage, performance or API, just minor refactorings inside the library.
Version 1.0.0
Along with my Master’s thesis ending and my lightning talk at euruko
2008, the first stable release of ContextR will be
published. To reflect its status the version number reaches 1.0. You may find
documentation and examples in the test
directory or on in your Browser on
this website.
Version 0.1.9
This is a review release. Again, lots of things changed, but I think to the better. There will be more coverage with the 0.2.0. Until then, have a look at the shiny new online documentation
Version 0.1.1
In this release we have added code examples, that also act as tests. See this blog article for more information. This brought vast feature coverage with test.
An RSpec was added to allow even more test coverage.
Object#extend
allows definition of class side context dependent behaviour.
There have been minor changes to the reflection API. To fetch the currently
active layers use ContextR::active_layers
and you will get an array of symbols
representing them. ContextR::layers
gives all already defined layers, but they
are not necessarily active or have been.
Version 0.1.0
This is the first release of ContextR after the 0.0.3 release. Since then a full redesign took place. The API changed entirely so make sure to not use this release with older code.
We think, that the new API is more powerful and allows better code to be written with ContextR. Unfortunately it has some issues as well, but we consider them as less relevant than the other way around. If you have any problems or question concerning these changes, feel free to use the new mailing list – any hint is appreciated
Installing
sudo gem install contextr
The basics
In your code use
require 'rubygems' require 'contextr'
and ContextR will be ready to use. ContextR should work on Ruby 1.8 and JRuby.
Prerequisites
To get ContextR running, you won’t need anything but rubygems
and the
contextr
gem
To run all tests and documentation generation you will need the following gems:
rake
hoe
rspec
maruku
markaby
literate_maruku
Demonstration of usage
See the online documentation for usage examples and some meta information or have a look at the other resources below.
Forum
http://groups.google.com/group/contextr
Other resources
COP related
- COP at SWA at the HPI More information on other context-oriented programming libraries as well as papers and theoretical work can be found at the COP page of Prof. Hirschfeld’s software architecture group at the HPI
ContextR related
Miscellaneous
If context-oriented programming does not fit your needs to handle your cross-cutting concerns, have a look at aspect-oriented programming. There is a feature rich implementation for Ruby named aquarium. Alternatively you may find interest in feature-oriented programming. If all that does not help, feel free to drop me a note and tell me, what you are trying to achieve.
How to submit patches
Read the 8 steps for fixing other people’s code and for section 8z: Email the project owner, use the e-mail address below.
The repository is browseable via github. To get a copy to your machine use:
git clone git://github.com/schmidt/contextr.git
License
This code is free to use under the terms of the Ruby license.
Contact
Comments are welcome. Send an email to Gregor Schmidt.
24th April 2008
Theme extended from Paul Battley