Model inheritance with Merb no comments

Posted by stephane Thu, 21 Feb 2008 21:16:00 GMT

from help on irc#merb

I had recurrent issue about inherit a model class from another one in Merb, using ActiveRecord or DataMapper. As it’s ‘magicly’ done on Rails I though the same way in Merb, but the last one load model class in alpha order. then what you have to do is to load the first class with a require:

in your first file:

class Page < ActiveRecord::Base
end

then in second add the require:

require 'page'

class ActivePage < Page
end

Simply using ruby…

Radiant to Merb no comments

Posted by stephane Sun, 17 Feb 2008 19:33:00 GMT

Merb is a (future) great framework. Radiant is good CMS. And they have so much in common. I’m curious about porting Radiant to Merb then I started the challenge. For people interested in the same challenge, I set up a repository. Then please feel free to participate.

[update]

I got invited on github then I cloned the git repository to http://github.com/sbusso/merb_radiant/tree/master

Action plan:

Merb is a framework equivalent to Action Pack. It can use Active Record. For generator we can use Rubigen, it s an extract of RailsGenerator.

For this we will use:

  • Radiant trunk r742
  • Merb (core and more) 0.9.0
  • Merb helpers 0.9.0
  • Merb ActiveRecord 0.9.0
  • ActiveRecord 2.0.2
  • Rubigen 1.2.0

The repository tree was build with:

  • Hoe (modified) generated skeleton
  • Merb application
  • Radiant source

1. Move Radiant base:

  • use plugins as gem:
    • radius 0.5.1
    • highline 1.4.0
    • rubypants 0.2.0
  • use other plugins as ruby libraries:
    • redcloth
    • bluecloth
  • using active record: nothing to do
  • radius and other ruby libs: nothing to do
  • replace RailsGenerator with Rubigen (Radiant bin)
  • work on initializer
  • desactivate extension dependencies (first step we move only the base)
  • manage Controller and libraries using controllers
  • check routes management
  • work on views to replace Rails specific code

2. Replace extension system with gems:

  • first, activate gem with only code features
  • second, deal with extension providing assets

Merb 0.9.0 - only for developer 2 comments

Posted by stephane Thu, 14 Feb 2008 21:02:00 GMT

Following the next version of Merb, I’m a bit surprised by the way this new version came out:

Merb 0.9.0

Help of developers is needed for going on 1.0, then install it and try it.

Included :

  • merb-core
  • merb-action-args
  • merb-assets
  • merb-gen
  • merb-haml
  • merb-mailer
  • merb-parts
  • merb-more
  • merb
then
merb-gen myapp