Re: GSoC database modeler [Luis Ochoa]

Lists: pgadmin-hackers
From: Luis Ochoa <ziul1979(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: GSoC database modeler [Luis Ochoa]
Date: 2010-08-16 20:05:11
Message-ID: AANLkTino52F36XKP28-fNbK-OwBfoEMfHZw8z5paLH=4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Hi, this is my patch for GSoC 2010 database designer for pgAdmin, I hope it
likes you, I have done a lot of work to create this modeler, but even with
all that work, is unfinished and lacks of a lot of things, but I believe
that it will be ready in a professional way in a few months.

This is a patch for the git repository, it have been tested at windows &
linux.

you can watch in action (windows) here:

http://www.youtube.com/watch?v=RbXIuyTIpJ0

Regards, Luis.

Attachment Content-Type Size
gsoc.zip application/zip 115.2 KB

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Luis Ochoa <ziul1979(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-16 20:25:47
Message-ID: 4C699ECB.60106@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Le 16/08/2010 22:05, Luis Ochoa a écrit :
> Hi, this is my patch for GSoC 2010 database designer for pgAdmin, I hope it
> likes you, I have done a lot of work to create this modeler, but even with
> all that work, is unfinished and lacks of a lot of things, but I believe
> that it will be ready in a professional way in a few months.
>

I think it can be merged in less than a few months, but you're right
there are still a lot of work to do.

> This is a patch for the git repository, it have been tested at windows &
> linux.
>

One big item on the "work to do list" is compiling and testing with Mac
OS X. Merge depends on it.

> you can watch in action (windows) here:
>
> http://www.youtube.com/watch?v=RbXIuyTIpJ0
>

Great video.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com


From: Thom Brown <thom(at)linux(dot)com>
To: Luis Ochoa <ziul1979(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-16 20:40:08
Message-ID: AANLkTi=T+BRXybt+QCxoUY6OdNLb8Ef9ufQYEKxJJue0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

On 16 August 2010 21:05, Luis Ochoa <ziul1979(at)gmail(dot)com> wrote:
> Hi, this is my patch for GSoC 2010 database designer for pgAdmin, I hope it
> likes you, I have done a lot of work to create this modeler, but even with
> all that work, is unfinished and lacks of a lot of things, but I believe
> that it will be ready in a professional way in a few months.
>
> This is a  patch for the git repository, it have been tested at windows &
> linux.
>
> you can watch in action (windows) here:
>
> http://www.youtube.com/watch?v=RbXIuyTIpJ0
>
> Regards, Luis.
>

Hi Luis,

Nice progress. :) I notice that if you create a new table and then
create a foreign key on it from another table, the datatype on the new
table is undefined. Couldn't that default to the same datatype as the
primary key? (but obviously if the PK is serial/bigserial then it uses
int/bigint)

I still think one thing which definitely needs changing are the
controls. Most of them cover a very small pixel area and as such make
it tricky to click on and prone to missing them (or at least it would
be for me). Although I appreciate you're still in the middle of
working on everything and are just working on functionality rather
than presentation.

Also, could the play button (which currently shows the SQL) just say
"SQL" on it? And for it to appear in a separate panel in the same
window? Sort of like results currently do for the SQL Query Editor in
PgAdmin. In fact, maybe if the pane is open and you make changes to
the diagram, it could update the pane contents in real time?

--
Thom Brown
Registered Linux user: #516935


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Luis Ochoa <ziul1979(at)gmail(dot)com>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-16 21:26:26
Message-ID: 4C69AD02.3080509@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Le 16/08/2010 22:40, Thom Brown a écrit :
> On 16 August 2010 21:05, Luis Ochoa <ziul1979(at)gmail(dot)com> wrote:
>> Hi, this is my patch for GSoC 2010 database designer for pgAdmin, I hope it
>> likes you, I have done a lot of work to create this modeler, but even with
>> all that work, is unfinished and lacks of a lot of things, but I believe
>> that it will be ready in a professional way in a few months.
>>
>> This is a patch for the git repository, it have been tested at windows &
>> linux.
>>
>> you can watch in action (windows) here:
>>
>> http://www.youtube.com/watch?v=RbXIuyTIpJ0
>>
>> Regards, Luis.
>>
>
> Hi Luis,
>
> Nice progress. :) I notice that if you create a new table and then
> create a foreign key on it from another table, the datatype on the new
> table is undefined. Couldn't that default to the same datatype as the
> primary key? (but obviously if the PK is serial/bigserial then it uses
> int/bigint)
>

I think we need to get rid of the "undefined" pseudo-type. I would like
to change the "Add column" menu item to show a dialog with a text box to
enter the name of the column and a combobox to choose the type (and
precision too in case of varchar and numeric type).

> I still think one thing which definitely needs changing are the
> controls. Most of them cover a very small pixel area and as such make
> it tricky to click on and prone to missing them (or at least it would
> be for me).

Well, I also think we should get rid of them. Every action should start
within the contextual menu. No Add or Delete button. And I don't really
like the "double click" to rename an object. We should use the
contextual menu once again

> Although I appreciate you're still in the middle of
> working on everything and are just working on functionality rather
> than presentation.

Actually, it's the end of the GSoC. I think Luis still wants to work on
it, and I really hope so.

> Also, could the play button (which currently shows the SQL) just say
> "SQL" on it?

Yes, that would be best. The "play" button is the execute button on the
Query Tool. Quite confusing.

> And for it to appear in a separate panel in the same window?

We'll probably have to get rid of the notebook and have two panes, one
to draw the schema, one to see the SQL. They can both have a toolbar. On
the draw pane, we could have load, save, sql buttons. On the SQL pane,
we could have save, run, open query tool.

> Sort of like results currently do for the SQL Query Editor in
> PgAdmin. In fact, maybe if the pane is open and you make changes to
> the diagram, it could update the pane contents in real time?
>

Yeah, could be possible.

The last item we should not forget is a reverse engineer button. I've
read some parts of the code Luis wrote, and I think it should be pretty
easy to do. AFAICT, it's a one day job, considering all the foundations
built by Luis.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com


From: Luis Ochoa <ziul1979(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-17 02:44:41
Message-ID: AANLkTikK+PoC98PXF9cicQhYnaZ6Ao4zdiVtAeXR4Tsx@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

On Mon, Aug 16, 2010 at 5:26 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info>wrote:

> Le 16/08/2010 22:40, Thom Brown a écrit :
> > On 16 August 2010 21:05, Luis Ochoa <ziul1979(at)gmail(dot)com> wrote:
> >> Hi, this is my patch for GSoC 2010 database designer for pgAdmin, I hope
> it
> >> likes you, I have done a lot of work to create this modeler, but even
> with
> >> all that work, is unfinished and lacks of a lot of things, but I believe
> >> that it will be ready in a professional way in a few months.
> >>
> >> This is a patch for the git repository, it have been tested at windows
> &
> >> linux.
> >>
> >> you can watch in action (windows) here:
> >>
> >> http://www.youtube.com/watch?v=RbXIuyTIpJ0
> >>
> >> Regards, Luis.
> >>
> >
> > Hi Luis,
> >
> > Nice progress. :) I notice that if you create a new table and then
> > create a foreign key on it from another table, the datatype on the new
> > table is undefined. Couldn't that default to the same datatype as the
> > primary key? (but obviously if the PK is serial/bigserial then it uses
> > int/bigint)
> >
>

In fact that's normal behavior but I changed a last minute first datatype to
serial and I'll check what happened ( a bug sorry :( ), Fk is from same
type as pk and you can't change for obvious reasons (except for special kind
like serial for bigint).

> I think we need to get rid of the "undefined" pseudo-type. I would like
> to change the "Add column" menu item to show a dialog with a text box to
> enter the name of the column and a combobox to choose the type (and
> precision too in case of varchar and numeric type).
>

I believe it too "undefined" should go away, and we can use a default
datatype for column if user wants to change just select another...

Add column at table can bring a dialog, I think to do that but for time
reasons I didn't do it.

> > I still think one thing which definitely needs changing are the
> > controls. Most of them cover a very small pixel area and as such make
> > it tricky to click on and prone to missing them (or at least it would
> > be for me).
>
>
It is just a initial UI design it can be changed, but you always have two
options to do that:

fast-> graphically
normal->contextual menus

> Well, I also think we should get rid of them. Every action should start
> within the contextual menu. No Add or Delete button. And I don't really
> like the "double click" to rename an object. We should use the
> contextual menu once again
>

I really don't support this idea, because I use modelers all the time and
the main idea of why I like to create a new one was:

I like to do modeling as fast as I can, but bringing a window for every
action puts everything slower (with little changes when modeling), but when
you are entering columns at first time I believe a dialog with grid style
will be better (I thought to do that but for time reasons again)

My idea is two ways of entering data to models: graphically & using
properties like dialogs, people must choice what to use in what moment.

> Although I appreciate you're still in the middle of
> > working on everything and are just working on functionality rather
> > than presentation.
>
> Actually, it's the end of the GSoC. I think Luis still wants to work on
> it, and I really hope so.
>
>
UI is just for showing base classes for drawing and modeling working, not a
real window for modeler, it should be changed :D

> > Also, could the play button (which currently shows the SQL) just say
> > "SQL" on it?
>
> Yes, that would be best. The "play" button is the execute button on the
> Query Tool. Quite confusing.
>
> > And for it to appear in a separate panel in the same window?
>

This is really a sandbox for modeler, just like a test of base classes of
the modeler and graphical library, because this gsoc project created two
things:

- A graphical framework for doing modeler and drawing like applications.
-The modeler using the generic framework for graphics.

Real one UI should come later.

We'll probably have to get rid of the notebook and have two panes, one
> to draw the schema, one to see the SQL. They can both have a toolbar. On
> the draw pane, we could have load, save, sql buttons. On the SQL pane,
> we could have save, run, open query tool.
>
>
My idea is one pane for every model, we can open one or more at same time.
SQL can be show in other way...

> > Sort of like results currently do for the SQL Query Editor in
> > PgAdmin. In fact, maybe if the pane is open and you make changes to
> > the diagram, it could update the pane contents in real time?
> >
>
>
Just a test, that notepad is just to show results and must be changed at
real one ;)

> Yeah, could be possible.
>
> The last item we should not forget is a reverse engineer button. I've
> read some parts of the code Luis wrote, and I think it should be pretty
> easy to do. AFAICT, it's a one day job, considering all the foundations
> built by Luis.
>
>
It shouldn't be harder to do it, but there is a lot of things and bugs to
fix before it can be profesionally used.

Regards, Luis.


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Luis Ochoa <ziul1979(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-24 20:33:58
Message-ID: 4C742CB6.4020208@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Le 17/08/2010 04:44, Luis Ochoa a écrit :
> On Mon, Aug 16, 2010 at 5:26 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info>wrote:
> [...]
>> I think we need to get rid of the "undefined" pseudo-type. I would like
>> to change the "Add column" menu item to show a dialog with a text box to
>> enter the name of the column and a combobox to choose the type (and
>> precision too in case of varchar and numeric type).
>>
>
> I believe it too "undefined" should go away, and we can use a default
> datatype for column if user wants to change just select another...
>

Having a default datatype will be a burden. Which one should we choose,
and why? and I'm sure lots of people will complain it's not their
prefered datatype.

> Add column at table can bring a dialog, I think to do that but for time
> reasons I didn't do it.
>

Will do.

>> > I still think one thing which definitely needs changing are the
>>> controls. Most of them cover a very small pixel area and as such make
>>> it tricky to click on and prone to missing them (or at least it would
>>> be for me).
>>
> It is just a initial UI design it can be changed, but you always have two
> options to do that:
>
> fast-> graphically
> normal->contextual menus
>

Fast, graphically? you must be kidding :) the icon area is so small I
have a real hard time to use it.

>> Well, I also think we should get rid of them. Every action should start
>> within the contextual menu. No Add or Delete button. And I don't really
>> like the "double click" to rename an object. We should use the
>> contextual menu once again
>>
>
> I really don't support this idea, because I use modelers all the time and
> the main idea of why I like to create a new one was:
>
> I like to do modeling as fast as I can, but bringing a window for every
> action puts everything slower (with little changes when modeling), but when
> you are entering columns at first time I believe a dialog with grid style
> will be better (I thought to do that but for time reasons again)
>
> My idea is two ways of entering data to models: graphically & using
> properties like dialogs, people must choice what to use in what moment.
>

I wasn't saying to use the properties dialog we have. I wanted to say we
should simply have a dialog with one or two controls (name, or name and
datatype). With a dialog with a simple name to type, it's as quick as
what you have, and much more usable (click enter and it validates your
typing, click esc and it cancels your typing, buttons are more easy to
click, UI is way more visible and understandable).

> > Although I appreciate you're still in the middle of
>>> working on everything and are just working on functionality rather
>>> than presentation.
>>
>> Actually, it's the end of the GSoC. I think Luis still wants to work on
>> it, and I really hope so.
>>
>>
> UI is just for showing base classes for drawing and modeling working, not a
> real window for modeler, it should be changed :D
>

I did quite some work on it. Mostly to understand your code. But also to
make a few changes. All warnings are fixed on my repo. I also did some
indentation enhancements. And I reworked the UI: no wxSplitterWindow,
use of two panes (one for the designer, one for the sql text), change
the rename of the table, etc.

Everyt thing is here: http://github.com/gleu/pgadmin3/commits/ticket225

>> > Also, could the play button (which currently shows the SQL) just say
>>> "SQL" on it?
>>
>> Yes, that would be best. The "play" button is the execute button on the
>> Query Tool. Quite confusing.
>>
>>> And for it to appear in a separate panel in the same window?
>>
>
> This is really a sandbox for modeler, just like a test of base classes of
> the modeler and graphical library, because this gsoc project created two
> things:
>
> - A graphical framework for doing modeler and drawing like applications.
> -The modeler using the generic framework for graphics.
>
> Real one UI should come later.
>

Yeah, I'm working on it.

>> We'll probably have to get rid of the notebook and have two panes, one
>> to draw the schema, one to see the SQL. They can both have a toolbar. On
>> the draw pane, we could have load, save, sql buttons. On the SQL pane,
>> we could have save, run, open query tool.
>>
>>
> My idea is one pane for every model, we can open one or more at same time.
> SQL can be show in other way...
>

Too much work for now. I keep the notebook with only one page. The
multi-pages can be done in another patch.

>> > Sort of like results currently do for the SQL Query Editor in
>>> PgAdmin. In fact, maybe if the pane is open and you make changes to
>>> the diagram, it could update the pane contents in real time?
>>>
>>
>>
> Just a test, that notepad is just to show results and must be changed at
> real one ;)
>
>> Yeah, could be possible.
>>
>> The last item we should not forget is a reverse engineer button. I've
>> read some parts of the code Luis wrote, and I think it should be pretty
>> easy to do. AFAICT, it's a one day job, considering all the foundations
>> built by Luis.
>>
>>
> It shouldn't be harder to do it, but there is a lot of things and bugs to
> fix before it can be profesionally used.
>

RE will be done in another patch. Right now, I'm trying to get something
commitable. I feel there's more and more work to do on it before
acheiving a commitable state.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Luis Ochoa <ziul1979(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-24 20:41:13
Message-ID: 4C742E69.7080004@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Le 24/08/2010 22:33, Guillaume Lelarge a écrit :
> [...]
> RE will be done in another patch. Right now, I'm trying to get something
> commitable. I feel there's more and more work to do on it before
> acheiving a commitable state.
>

BTW, here is what I have so far:
http://lelarge.info/~guillaume/tmp/dd20100824.png

I'll work this week full time on it. (well, full-time, depends on a few
other things, like new bugs and other community work... but my main goal
this week is this GSoC project).

--
Guillaume
http://www.postgresql.fr
http://dalibo.com


From: Luis Ochoa <ziul1979(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC database modeler [Luis Ochoa]
Date: 2010-08-24 21:08:06
Message-ID: AANLkTikJ-x03kR1tL1fTKozPNLW9HLPYvMdU7mLGsmzY@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

On Tue, Aug 24, 2010 at 4:33 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info>wrote:

> Le 17/08/2010 04:44, Luis Ochoa a écrit :
> > On Mon, Aug 16, 2010 at 5:26 PM, Guillaume Lelarge
> > <guillaume(at)lelarge(dot)info>wrote:
> > [...]
> >> I think we need to get rid of the "undefined" pseudo-type. I would like
> >> to change the "Add column" menu item to show a dialog with a text box to
> >> enter the name of the column and a combobox to choose the type (and
> >> precision too in case of varchar and numeric type).
> >>
> >
> > I believe it too "undefined" should go away, and we can use a default
> > datatype for column if user wants to change just select another...
> >
>
> Having a default datatype will be a burden. Which one should we choose,
> and why? and I'm sure lots of people will complain it's not their
> prefered datatype.
>

I can be setting that user would change if he like it.

> > Add column at table can bring a dialog, I think to do that but for time
> > reasons I didn't do it.
> >
>
> Will do.
>

Something like a property dialog that you sent me before it would be great.

>
> >> > I still think one thing which definitely needs changing are the
> >>> controls. Most of them cover a very small pixel area and as such make
> >>> it tricky to click on and prone to missing them (or at least it would
> >>> be for me).
> >>
> > It is just a initial UI design it can be changed, but you always have
> two
> > options to do that:
> >
> > fast-> graphically
> > normal->contextual menus
> >
>
> Fast, graphically? you must be kidding :) the icon area is so small I
> have a real hard time to use it.
>
>> Well, I also think we should get rid of them. Every action should start
> >> within the contextual menu. No Add or Delete button. And I don't really
> >> like the "double click" to rename an object. We should use the
> >> contextual menu once again
> >>
> >
> > I really don't support this idea, because I use modelers all the time and
> > the main idea of why I like to create a new one was:
> >
> > I like to do modeling as fast as I can, but bringing a window for every
> > action puts everything slower (with little changes when modeling), but
> when
> > you are entering columns at first time I believe a dialog with grid style
> > will be better (I thought to do that but for time reasons again)
> >
> > My idea is two ways of entering data to models: graphically & using
> > properties like dialogs, people must choice what to use in what moment.
> >
>
> I wasn't saying to use the properties dialog we have. I wanted to say we
> should simply have a dialog with one or two controls (name, or name and
> datatype). With a dialog with a simple name to type, it's as quick as
> what you have, and much more usable (click enter and it validates your
> typing, click esc and it cancels your typing, buttons are more easy to
> click, UI is way more visible and understandable).
>

Altering way of fast editing (double click on column) with somekind of new
dialog is a good choice but main problem and explanation about what I do is
that dd/draw folder was written in a generic way, and we shouldn't alter it
to our designer, instead we should derivate a new class from
ddDrawingView.cpp that allow to do all that new dialog for editing. I was
thinking on do that, but at that time I don't have enough time for it, I'm
going to do this at next few days.

> > > Although I appreciate you're still in the middle of
> >>> working on everything and are just working on functionality rather
> >>> than presentation.
> >>
> >> Actually, it's the end of the GSoC. I think Luis still wants to work on
> >> it, and I really hope so.
> >>
> >>
> > UI is just for showing base classes for drawing and modeling working, not
> a
> > real window for modeler, it should be changed :D
> >
>
> I did quite some work on it. Mostly to understand your code. But also to
> make a few changes. All warnings are fixed on my repo. I also did some
> indentation enhancements. And I reworked the UI: no wxSplitterWindow,
> use of two panes (one for the designer, one for the sql text), change
> the rename of the table, etc.
>

Main graphic engine is based on hotdraw if you can find docs about it maybe
help you to understand it in an easier way.

UI at GSoC was terrible just works like a container to test framework and
database designer classes, it must be changed to a better one :D

>
> Everyt thing is here: http://github.com/gleu/pgadmin3/commits/ticket225
>
> >> > Also, could the play button (which currently shows the SQL) just say
> >>> "SQL" on it?
> >>
> >> Yes, that would be best. The "play" button is the execute button on the
> >> Query Tool. Quite confusing.
> >>
> >>> And for it to appear in a separate panel in the same window?
> >>
> >
> > This is really a sandbox for modeler, just like a test of base classes of
> > the modeler and graphical library, because this gsoc project created two
> > things:
> >
> > - A graphical framework for doing modeler and drawing like applications.
> > -The modeler using the generic framework for graphics.
> >
> > Real one UI should come later.
> >
>
> Yeah, I'm working on it.
>
> >> We'll probably have to get rid of the notebook and have two panes, one
> >> to draw the schema, one to see the SQL. They can both have a toolbar. On
> >> the draw pane, we could have load, save, sql buttons. On the SQL pane,
> >> we could have save, run, open query tool.
> >>
> >>
> > My idea is one pane for every model, we can open one or more at same
> time.
> > SQL can be show in other way...
> >
>
> Too much work for now. I keep the notebook with only one page. The
> multi-pages can be done in another patch.
>
> >> > Sort of like results currently do for the SQL Query Editor in
> >>> PgAdmin. In fact, maybe if the pane is open and you make changes to
> >>> the diagram, it could update the pane contents in real time?
> >>>
> >>
> >>
> > Just a test, that notepad is just to show results and must be changed at
> > real one ;)
> >
> >> Yeah, could be possible.
> >>
> >> The last item we should not forget is a reverse engineer button. I've
> >> read some parts of the code Luis wrote, and I think it should be pretty
> >> easy to do. AFAICT, it's a one day job, considering all the foundations
> >> built by Luis.
> >>
> >>
> > It shouldn't be harder to do it, but there is a lot of things and bugs to
> > fix before it can be profesionally used.
> >
>
> RE will be done in another patch. Right now, I'm trying to get something
> commitable. I feel there's more and more work to do on it before
> acheiving a commitable state.
>
>
I now what are you saying, is like a neverending coding... you finish
something and a new one bug/feature appears ;)

Regards, Luis.