Re: [Patch] PGAdmin 4 JSON Handling

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Ronan Dunklau <ronan(dot)dunklau(at)dalibo(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Subject: Re: [Patch] PGAdmin 4 JSON Handling
Date: 2015-04-16 14:32:18
Message-ID: CA+OCxozxuA__1obs13c0YEyTT1hTBbqDPbPZ14yMSV8WbvqMiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, Apr 16, 2015 at 2:44 PM, Ronan Dunklau <ronan(dot)dunklau(at)dalibo(dot)com> wrote:
> Le jeudi 16 avril 2015 11:40:14 Dave Page a écrit :
>> On Thu, Apr 16, 2015 at 11:19 AM, Ronan Dunklau
>>
>> <ronan(dot)dunklau(at)dalibo(dot)com> wrote:
>> > Le jeudi 16 avril 2015 15:46:51 Ashesh Vashi a écrit :
>> >> Hi Ronan,
>> >>
>> >> On Thu, Apr 16, 2015 at 2:49 PM, Ronan Dunklau <ronan(dot)dunklau(at)dalibo(dot)com>
>> >>
>> >> wrote:
>> >> > Hello.
>> >> >
>> >> > I'm trying to dive into the PGAdmin 4 codebase, and one low hanging
>> >> > fruit
>> >> > that
>> >> > I saw was the handling of JSON data.
>> >> >
>> >> > The first patch is really trivial, and allows PgAdmin4 to run on system
>> >> > with
>> >> > case sensitive filesystems.
>> >> >
>> >> > JSON data should be returned to the client using an application/json
>> >> > MIME-
>> >> > TYPE. Flask already provides an easy way to generate JSON response,
>> >> > with
>> >> > its
>> >> > jsonify function.
>> >> >
>> >> > This patch does not change anything architecturally, it just ensure
>> >> > that
>> >> > the
>> >> > get_nodes method of each hook returns JSONizable objects, instead of
>> >> > building
>> >> > them manually.
>> >> >
>> >> > Moreover, there was a function already in place to return JSON document
>> >> > according to a certain layout (everything under "data", with metadata
>> >> > attached
>> >> > along the way), which was not used by the ACi tree. This patch also
>> >> > changes
>> >> > this format to ensure the json responses returned by the application
>> >> > are
>> >> > consistent.
>> >>
>> >> Thanks for the patches.
>> >> These changes are already been done in my current development work, which
>> >> is still a WIP. (Hence - it has not been checked-in/shared.)
>> >>
>> >> Thanks any way.
>>
>> Oh, they are?
>>
>> > Is there a public branch where I can see this WIP ?
>>
>> I assume it's all on his laptop. We (the pgAdmin project) have never
>> published WIP branches that I can recall, except for GSoC projects.
>>
>> > As for the other proposals regarding the structure of the javascript code
>> > and the module / hooks API, do you have any comment ?
>>
>> It's been on my personal TODO for a little while to sort out that code
>> into a proper OO class hierarchy as you suggest. Is that something you
>> would like to take a look at Ronan? I won't be touching it for quite a
>> while as I'm overloaded at the moment (which is why I asked Ashesh to
>> help out).
>
> Ok, I'm in the process of doing just that, I'll post a patch as soon as I have
> something.

Cool, thanks.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Prasad 2015-04-16 16:07:40 Re: Patch : PGPASSFILE fix
Previous Message Ronan Dunklau 2015-04-16 13:44:17 Re: [Patch] PGAdmin 4 JSON Handling