2

Brief Background

I'm investigating the potential of investing in Agile Toolkit for a future project. I like its approach and it's largley perfect for my needs - with the possible exception that I may have misinterpreted its support for models that originate from SQL.

I prefer to work with standard tools (e.g. visual modelers) to build and maintain my database. I also build as many of the constraints as possible directly into the SQL (lots of - unimportant, personal - reasons).

Generate Agile Toolkit Model from SQL

According the the Agile Toolkit documentation, Atk4 allows you to "create SQL first and generate models." (My emphasis.) But I have found nothing that allows me to generate an Atk model from the SQL.

Has anyone done this? How robust is the generated model? (E.g. Will it make "non-null" SQL fields "mandatory" in the Atk model? Will it generate derived relationships from the SQL foreign keys? etc...)

My fear is that I'm misinterpreting the documentation. Perhaps it meant to say that you could "create the SQL first and then create the models" (i.e. earlier in the paragraph, "create" means "manually code" and "generate" means "auto-generate").

I'd appreciate any and all thoughts.

Cliff Chaney
  • 414
  • 5
  • 13
  • "Other ORM engines implement model definition through YAML. We believe that it's limiting to what you can do and requires more learning and typing. While Agile Toolkit does not endorse code generation, there are add-ons which will create Models for you based on your database or even allow you to visually design your models." (from http://new2.agiletoolkit.org/intro/1) -- Said that - there are implementation for generating Models out of SQL, @jancha can provide a proper answer. Are you looking for version 4.2? – romaninsh Mar 19 '12 at 19:28
  • to add on your endeavor, before proceeding into auto-generating your models from sql, i suggest you read on the [models documentation](http://www2.agiletoolkit.org/learn/understand/model) and its sections first with close attention to the [database consideration](http://www2.agiletoolkit.org/learn/understand/model/db) chapter, especially if you already have an existing database and will use agiletoolkit version 4.1.3 or prior. – Open Technologist Mar 20 '12 at 05:53
  • @OpenTechnologist, that's in relation to 4.1 only. The 4.2 is much more flexible and generator should be compatible. – romaninsh Mar 20 '12 at 13:16

1 Answers1

2

Here is the generator page:

to use, create a new page in your application and extend if from this class.

romaninsh
  • 10,606
  • 4
  • 50
  • 70