May 6th, 2008 — General, Releases, Updates
I know I’ve been talking about this release for a while now, and here it finally is. There’s some good bug fixes in here, a few new rake tasks, and some other little things like that.
The biggest thing, however, is what’s been causing a stir online now for the past few days, I’ve split out the ORM support into separate gems. I’m not going to go over it again, you can find all the details here: http://www.mackframework.com/2008/05/04/orms-and-mack/
Needless to say this is a good release to get, if not for the bug fixes alone, but for the great db:create rake tasks that are now in there. Thanks, again, to Darsono Sutedja for his great contributions.
Changelog
- Added rake db:create and db:create:all rake tasks.
- Refactored out constants, such as MACK_ROOT and MACK_ENV and made them into Mack::Configuration.env, Mack::Configuration.root, etc…
- Added test:stats and test:coverage Rake tasks.
- Removed support for ActiveRecord and DataMapper and moved them into their own gems.
- Fixed a bug where yields in ERB weren’t giving the desired results.
- DataMapper database.yml file can now be nested, and is generated as such.
- Cleaned up some tests, and refactored the HTML generation stuff.
- Fixed a bug with the scaffold generating ‘bad’ methods instead of ‘post’
- Made error_messages_for more compatible with DataMapper.
- Fixed a bug loading url.rb and uploaded_file.rb found by Phil Darnowsky
- [dsutedja] Render method (in controller_base) now accepts response status code.
- gem: mack_ruby_core_extensions 0.1.23
- gem: genosaurus 1.1.4
- gem: datamapper 0.3.2
- gem: rcov 0.8.1.2.0
- gem: mack-data_mapper 0.5.0
- gem: erubis 2.6.0
May 6th, 2008 — General, News
For those of you who haven’t yet switched to Mack (and why not?) the new Advanced Rails Recipes book is now shipping from the Pragmatic Programmers. The book features 84 recipes for build apps using Ruby on Rails. It just so happens that two of these recipes happen to be written by yours truly. That’s right, I’m now a published author. :)
I suggest that everyone get yourself a copy of the book, read it top to bottom, then head on over to GitHub and incorporate some of what you’ve just learned into Mack.
Anyway, I just want to give a quick shout out to my boy Mike Clark who compiled and edited the book. He’s a great guy and he did a great job. Thanks Mike!
May 4th, 2008 — General, News
So a lot has been made in the last few days about my decision to drop ActiveRecord’s native support in Mack. People have asked why can’t I keep what I already have in regards to support for ActiveRecord, and why can’t I support Sequel. So, I’ve decided to compromise.
In the next version of Mack, which should be out in the next day or two, I’ve broken out support for ActiveRecord and DataMapper into their own gems, http://github.com/markbates/mack-orm/tree/master. That means you’ll be able to still use ActiveRecord, if you want. The default ORM, however, will be DataMapper. That’s what you’ll get out of the box with Mack.
Now, keeping with my original post, I’ll be actively maintaining the mack-data_mapper gem, and when I can I’ll make similar changes to the mack-active_record, but I’m not promising anything. Now the good thing here is that since the repos for these gems are on GitHub, anyone can contribute changes/additions to them. I’ve even put a stub in there for Sequel support, that’s definitely something someone else will have to support.
This also has a nice advantage in keeping the Mack core clean and simple. Hopefully this will all lead to faster development time turn around for Mack.
It’s also worth noting that when I talk about ‘native’ support, all I mean is some Rake tasks and some generators. There’s nothing stopping anyone from using ANY ORM with Mack. You could even create your own, if you really wanted to.
Here’s to hoping this makes everyone happy!
May 2nd, 2008 — General
So after my post about dropping ActiveRecord for DataMapper, I’ve received some very interesting feedback, mostly good, which is great. The best comment I received was from Sam Smoot, lead developer of DataMapper. Sam offered to give me commit access to the DataMapper repos on GitHub.
I took Sam up on his offer and I’ve already made several contributions. This is GREAT news for the Mack Framework. When the best technologies start working in concert, only good things can happen.
I’m really excited about what’s happening with DataMapper 0.9.0, and I know it’s only going to make Mack a better framework. I’ve already started working on upgrading Mack to use, the yet unreleased, DataMapper 0.9.0 code base.
I’ll keep you all posted.
May 1st, 2008 — General, News
I’ve been wrestling with this for a while now, and I’ve finally made my peace with it. I’ve decided to remove native support for ActiveRecord from Mack. From now on it’ll be DataMapper by default, out of the box. This was not an easy decision to make. Essentially it boils down to one of the key tenants of Mack, use the best of breed technologies to build a best of breed framework. I truly feel that DataMapper, especially when it hits the 0.9.0 release, is the best ORM, and persistence, system out there. I also feel that it is a natural fit for the Mack framework.
The other reason why I made the decision was time. It’s very time consuming to constantly maintain two different, and with 0.9.0 extremely different, ORMs. There are plenty of features that I could’ve done faster, had I only been supporting the one ORM.
Now I know I might come under fire from some people for this, but it’s a decision that I think is best for the framework. If some enterprising developer out there wants to build a plugin, or a gem, that adds ActiveRecord support, then I’m all for it! Please do!
The question you’re probably asking yourself now, is when will this be happening. It’ll be happening in the next release of Mack, probably the end of this week or the beginning of next week.
Again, I’m sorry for those of you were hoping to use ActiveRecord with Mack. Check out DataMapper, I’m sure you’ll be happy with it.
Comments?