Posts Tagged ‘active record’

Commit Access

Friday, May 2nd, 2008

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.

Saying Goodbye to ActiveRecord

Thursday, May 1st, 2008

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?

0.4.6: The Obligatory ‘Blog’ Demo – Take 2

Friday, April 18th, 2008

This post has moved to the wiki @ http://wiki.mackframework.com/index.php/Blog%20Tutorial

Release 0.4.5

Monday, April 14th, 2008

Well, here it is! The release you all were waiting for, the one that finally gives migration support to Mack! That’s right, now whether you use ActiveRecord or DataMapper, you can use the familiar rake task ‘db:migrate’ to run your migrations. Yippie! The scaffold generator will also generate a migration for you, assuming you have ORM support enabled.

There’s still some work to go on this, like the ability to pass in command line args to the task to build the full migration for you, but it’s a start! It’s now pretty easy to get your app going.

Also in this release is a rewrite of the distributed routing functionality. It’s now been rewritten to use Rinda. This is going to be the standard for all the distributed functionality that will be coming Mack over the next couple of months. As more functionality lke this is developed, the more it will be wrapped in nice, easy to use APIs.

There’s also been some tidying up here in there in the code tree. For example, new applications don’t get generated with a boot.rb file. Looking at it, there’s really no need for it, since everything is done with Rake tasks.

Overall, I’m very happy with the release, and I feel that this release definitely makes Mack a VERY useable framework because of the migration support. Enjoy!

Changelog:

  • Removed boot.rb file. It was unnecessary.
  • When a new Mack application is generated the Rakefile that gets generated is stamped with the Mack gem version used to create it. This ties the project to that gem. This can, of course, be upgraded as new Mack gems come out, but it’s a good way of tying your app to a specific revision of Mack.
  • Added support for migrations for both ActiveRecord and DataMapper. DataMapper migration support requires DataMapper 0.3.0 gem. Please keep in mind, though, that DataMapper 0.3.0 has a serious bug in it, which may prevent you from using it. Please see http://www.mackframework.com/2008/04/09/horrible-bug-in-datamapper-030/ for more information.
  • Rewrote distributed routing support to use Rinda inside of plain old DRb. This makes for an almost zero configuration usage.
  • Added: mack_ring_server binary to start a Rinda ring server for use with distributed routing.
  • Sqlite3 is now the default database for Mack applications configured with ORM support.
  • Added a test helper method, rake_task, to aid in the testing of Rake tasks.
  • Added: rake generate:migration name=<migration_name>
  • Added: rake db:migrate
  • Added: rake db:abort_if_pending_migrations
  • Added: rake db:rollback
  • Added: rake db:version
  • Added: rake mack:ring_server:start
  • Added: rake mack:ring_server:stop
  • Added: rake mack:ring_server:restart
  • Added: rake mack:ring_server:services:list
  • gem: application_configuration 1.2.2
  • gem: daemons 1.0.10

    Migration support almost there.

    Thursday, April 10th, 2008

    Now that I’m back on track with DataMapper, I’ve got migration support for both it and ActiveRecord just about done. In addition to the actual rake task, db:migrate (btw), I had to set up a good way to test rake tasks, something I’ll share at a later date, but needless to say it’s included with Mack. I also had to deal with the pain in the ass-ness of dealing with two VERY different ORMs, in the same test system! Let me tell you, that sucked!

    Good news is that things seem to be working, at least going in the ‘up’ direction anyway. I still need to write the ‘down’ direction revert stuff. Hopefully, that shouldn’t take too long now that I have a good way of testing the task and the migration stuff.

    Unfortunately, I feel as though as soon as I release this stuff, which should be by the end of this weekend, DataMapper 0.9.0 will be out, and I’ll have to re-write most of the DataMapper stuff because the API is changing so radically. I guess I’ll just have to deal with that when the time comes.

    In the meantime I’ll let y’all know when migrations are done and out there in the wild.