Re: django and WorkBench

Alfredo Kojima <[email protected]> Sat, 09 Jun 2007 10:22:02 -0300
Newsgroups gmane.comp.db.mysql.mycc
Message-ID <[email protected]>
Hi Carl!

Carl Karsten wrote:
> I am working with django (python web framework http://djangoproject.com) 
> which "works best" if you define your data like this:
> 

[snip]

> In the past, I have used my data modeling tool (like MySql Workbench) as 
> the primary.  I am hoping to continue.  What I envision is using 
> Workbench to define my model, then somehow generate the class code.  The 

Nice! That'd be a good use for Workbench indeed.

> problem is the django class code supports more than what Workbench 
> supports.  see: http://www.djangoproject.com/documentation/model-api/
> 

Can you give some examples of what is missing? If these things belong
to a generic data model, we will look into adding support for that.
If they're specific to django models, you can add custom data fields
to the model objects.

> So, before I got looking at the xml that Workbench uses to represent a 
> model or any other such fun, has anyone started down this path?
> 

A couple of notes:

1- Workbench has a powerful plugin system, which includes support for Python.
That is the preferred path to write such functionality, so it's not necessary
to understand or even touch the model XML files directly. What is useful to
understand are the XML files with meta-information about internal representation
(the struct.*.xml files), but then, in the GRT shell you can have a friendlier
view of their contents.

2- We're currently refactoring the Workbench a great deal, so some of the
internals are being changed. It should be possible to migrate a plugin from the
currently released WB to the new one without too much work, but they won't work
directly. So if you want to start working on that, I encourage you to and will
help you as I can. Otherwise, I'd advise to wait for the 1st public release
of the refactored WB later this year.

3- There is some preliminary info on writing plugins at
http://forge.mysql.com/wiki/MySQL_Workbench_Plugins and
http://forge.mysql.com/wiki/MySQL_Workbench

but some of the info will become obsolete when the new WB is released,
specially how some of the code will look like, the "Object Tree" structure
and some other things.
However, most of the concepts will still be valid, so it may still have some
use.


Cheers,
Alfredo

-- 
Alfredo Kojima, Senior Software Engineer, Developer Tools
MySQL AB, www.mysql.com
Buenos Aires, Argentina

Are you MySQL certified?  www.mysql.com/certification

-- 
MySQL GUI Tools Mailing List
For list archives: http://lists.mysql.com/gui-tools
To unsubscribe:    http://lists.mysql.com/[email protected]