Development
DataMapper development has switched to the Git SCM. Please see using git to learn how to contribute. To check out “tip” DataMapper anonymously:
1 git clone git://github.com/sam/dm-core.git
If you have a github account, log in, and fork Sam’s Repo. When you think you’re ready, send Sam a “pull request”.
Coding Conventions and Considerations
When contributing any code to DataMapper, please follow these guidelines.
- Spec first. Spec thoroughly. (DataMapper is written with Rspec)
- Parentheses around parameter lists for methods
- Two space indent – not tabs!
- Documentation is required (use the official documentation style)
Consider following the code optimization tips page on the wiki.
Running the Benchmarks
DataMapper is built for speed and comes with a benchmarking suite to help us keep it that way. In order to run the suite, make sure you have the following things installed:
- data_objects 0.9.0
- do_mysql 0.9.0
- faker
- active_record (for comparison)
You’ll then need a data_mapper_1 and data_mapper_2 database setup in your MySQL and Postgres installations and accessible via your DB’s root user. For more connection information and settings, crack open script/performance.rb.
DataMapper will auto-migrate the databases into the proper state for benchmarking and then generate 10,000 rows to play with.
Then, simply:
1 script/performance.rb
The most recent official performance ratings can be found in PERFORMANCE.