Archive for October, 2008

What I like to call BDC

First off let me explain the move from my old blog to here at wordpress. Firstly I have learned a great deal since I originally wrote the app I was using to blog from and felt it was in dire need of a rewrite. That and I will soon be moving my blog and would like to launch the rewrite once I get things squared away.

Now onto BDC… What is BDC? Well it’s something I was thinking about while trying to become a little more proficient with Rspec and stories. Basically it would be a file that you can place in your rails app that explains what you basically want the app to do and from there uses a generator to go through the “story” and create the models, controllers and views from that. Let’s see if I can post and example of what a “story” would look like.

class ExampleBlogStory < BehaviorDrivenCreation :: Base

A user which requires a
login that has between 4 and 6 characters
password that has between 6 and 8 characters
email that is valid
and has
many posts
many comments
one Profile

A post which requires a
title
body
and has
many comments
and belongs to
a user

A comment which requires a
email that is valid
comment
and belongs to a
post
user

end

This story would create a user, post, and comment model that

  1. use validations for the requirements
  2. Create the model associations for users, posts, and comments
  3. Create the necessary migrations
  4. create the standard crud controllers and views for each model.

I don’t know if it would be possible but it could really give a project a head start as well as set a direction for development and give a good working base to start with. I think it would at least make for a good plugin or gem… Just my two cents let me know what you think.

Add comment October 15, 2008


Tags

archiving BDC blogging git github heroku rails rblog ruby ruby on rails rubyonrails web development

Del.icio.us Links

Blogroll

Recent Posts

Recent Comments

Archives

Blog Stats

Meta

RSS RBlog Commits

Flickr Photos

dogTagLogo

twitter

waterdroprss

coffeerss

feed

bbRSS128

globe

deglasslogo

DE_Template

DE SS

More Photos

Spam Blocked