Re: [Patch] PGAdmin 4 JSON Handling

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

On Thu, Apr 16, 2015 at 4:10 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> 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?
>
Yes - they're in my WIP. :-)

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> > 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).
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Sanket Mehta 2015-04-16 13:00:46 Re: Patch : PGPASSFILE fix
Previous Message Dave Page 2015-04-16 10:40:14 Re: [Patch] PGAdmin 4 JSON Handling