website/index.txt in contextr-0.0.3 vs website/index.txt in contextr-0.1.0

- old
+ new

@@ -1,129 +1,61 @@ -h1. Context-oriented Programming in Ruby +h1. contextr h1. &#x2192; 'contextr' h2. What -TODO +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":http://groups.google.com/group/contextr - any hint is appreciated + h2. Installing -Nothing more than typing - <pre syntax="ruby">sudo gem install contextr</pre> h2. The basics -In your code use +In your code use -<pre syntax="ruby">require 'rubygems' +<pre syntax="ruby">require 'rubygems' require 'contextr'</pre> and ContextR will be ready to use. + h2. Demonstration of usage -<pre syntax="ruby"> -require "rubygems" -require "contextr" +Please see the examples/ folder in the source distribution for example uses -class Person - attr_accessor :name, :address, :university +h2. Forum - def initialize name, address, university - self.name = name - self.address = address - self.university = university - end +"http://groups.google.com/group/contextr":http://groups.google.com/group/contextr - def to_s - "Name: #{name}" - end -end +h2. Other resources -class University - attr_accessor :name, :address +* "ContextR API documentation":http://contextr.rubyforge.org/rdoc +* "RubyForge Project Page":http://rubyforge.org/projects/contextr +* "COP at SWA at the HPI":http://www.swa.hpi.uni-potsdam.de/cop/ More information on other context-oriented programming libaries as well as papers and theoretical work can be found at the COP page of Prof. Hirschfeld's software architecture group at the HPI +* "Author‘s Development Blog - The Ruby Ahead":http://www.nach-vorne.de +* "ContextR Statistics on ohloh":http://www.ohloh.net/projects/5037 - def initialize name, address - self.name = name - self.address = address - end - def to_s - "Name: #{name}" - end -end +h2. How to submit patches -class Person - layer :address, :education +Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above. - address.post :to_s do | n | - n.return_value += "; Address: #{address}" - end +The trunk repository is <code>http://contextr.rubyforge.org/svn/trunk/</code> for anonymous access. - education.post :to_s do | n | - n.return_value += ";\n[Education] #{university}" - end -end - -class University - layer :address - - address.post :to_s do | n | - n.return_value += "; Address: #{address}" - end -end - - -hpi = University.new( "Hasso-Plattner-Institut", "Potsdam" ) -somePerson = Person.new( "Gregor Schmidt", "Berlin", hpi ) - -puts -puts somePerson -ContextR::with_layers :education do - puts - puts somePerson - - ContextR::with_layers :address do - puts - puts somePerson - - ContextR::without_layers :education do - puts - puts somePerson - end - end -end -puts -</pre> -The above code prints: - -<pre> -Name: Gregor Schmidt - -Name: Gregor Schmidt; -[Education] Name: Hasso-Plattner-Institut - -Name: Gregor Schmidt; Address: Berlin; -[Education] Name: Hasso-Plattner-Institut; Address: Potsdam - -Name: Gregor Schmidt; Address: Berlin -</pre> - -You may find other examples in the <code>examples</code> folder. - -h2. Other resources - -* "ContextR API documentation":http://contextr.rubyforge.org/contextr -* "RubyForge Project Page":http://rubyforge.org/projects/contextr -* "Author's Development Blog - The Ruby Ahead":http://www.nach-vorne.de -* "ContextR Statistics on ohloh":http://www.ohloh.net/projects/5037 - h2. License -This code is free to use under the same terms as Ruby +This code is free to use under the terms of the "Ruby license":http://www.ruby-lang.org/en/LICENSE.txt. h2. Contact -Comments are welcome. Send an email to "Gregor Schmidt":mailto:ruby@schmidtwisser.de +Comments are welcome. Send an email to "Gregor Schmidt":mailto:ruby@schmidtwisser.de.