Monday, June 28, 2010

Stock code generator

Was able to successfully create a code generator in Ruby.  Currently, the generator creates 4 types of files:
- .JAVA files for each object in the following format:
package ;

public class {
  private _;

  public get(){
    return this._;
  }

  public void set( value){
    this._ = value;
  }
}

Due to the fact that some of the object will have to be immutable, some keys will have to be added to the code generator to validate that the correct object type is being generated.

- .SQL file for the DB creation
- .JAVA files for the repositories.
- ERD diagram view Ruby tK.

It has been a struggle learning Ruby.  If I had to go back and recreate all of my code, I would probably pick a language I already know (JAVA, C#, PHP, etc.) and use that language for my generator.  That's not to say that Ruby is a bad language; however, I am more of a traditional learner and "learning by doing" did not work out for me too well.

Now, onto developing the framework for the app, and starting tomorrow, starting my "one algorithm per day" development.

No comments:

Labels