new plugin architecture in phppgadmin and what to -

24
New plugin architecture in phpPgAdmin and what to expect from it Jehan-Guillaume de Rorthais Leonardo Augusto Sápiras PostgreSQL Conference Europe 2011

Upload: others

Post on 12-Mar-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

New plugin architecture in phpPgAdmin and what to

expect from it

Jehan-Guillaume de RorthaisLeonardo Augusto Sápiras

PostgreSQL Conference Europe 2011

PgConf 2011 2

Presentation

● Jehan-Guillhaume de Rorthais ● PhpPgAdmin developper and administrator● E-mail: [email protected]● IRC: ioguix

● Leonardo Augusto Sápiras● Student at FACCAT● E-mail: [email protected]● IRC: asleo

PgConf 2011 3

Google Summer of Code (GSoC)

What is it?

How to participate?

http://www.google-melange.com/gsoc/homepage/google/gsoc2011

PgConf 2011 4

FISL, Brazil 2011, GsoC Students

PgConf 2011 5

PhpPgAdmin History

● Inspired by phpMyAdmin● Called “WebDB” in early 2000

● It was supposed to be database agnostic● Created by Dan Wilson

● Rewrote in 2002 by Christopher Kings-Lynne● PostgreSQL only● Support PostgreSQL advanced objects (Schema in 7.3)

● Two official developers and Admin● A bunch of occasional contributors

PgConf 2011 6

PhpPgAdmin Presentation

PgConf 2011 7

phpPgAdmin and GSoC

2006phpPgAdmin Improvements by John Jawed 2007Full Text Search in PostgreSQL GUI tools by Ivan Zolotukhin 2010Improve phpPgAdmin ergonomy by Leonardo Sápiras 2011New Plugin Architecture by Leonardo Sápiras

PgConf 2011 8

Past Plugin Architecture

● Contributed by SpikeSource (acquiered by Black duck)● First version in 2005● Only one plugin: Slony 1.1● Basic plugin interface● Very intrusive code● No maintainers anymore...

PgConf 2011 9

A new Plugin Architecture

We need a REAL plugin architecture

● No intrusive code● Full integration in phpPgAdmin● Easy to set up

PgConf 2011 10

A new Plugin Architecture

Plugins are extensions we don't want in phpPgAdmin core

● Not a PostgreSQL feature● Third party project plugin● A plugin from a company

PgConf 2011 11

How to create a Plugin?

No code intrusion, it just adds code using at least:

● One dedicated folder● Contains all the plugins files● Same folders hierarchy

● One class● “hooks” == links● “actions” == html code

More informations:http://phppgadmin.sf.net/doku.php?id=devs/plugins_documentation

PgConf 2011 12

phpPgAdmin structure

PgConf 2011 13

Plugin Architecture

A plugin can optionally have:

• More classes• Images• Translation• Its own configuration files• Javascript• Css

PgConf 2011 14

Plugin Architecture

• One script to deal with the plugin requests• A plugin manager instanciates plugins• The manager registers the plugins hooks and actions• One abstract class that plugins must extends

PgConf 2011 15

How to use a plugin?

In conf/config.inc.php:/** Plugins management * Add plugin names to the following array * to activate them example: * $conf['plugins'] = array( * 'Example', * 'Slony' * ); */$conf['plugins'] = array( 'Example', 'AnotherPlugin');

PgConf 2011 16

Existing Plugins

● Example● Covers all the features from the plugin architecture● No real phpPgAdmin feature

● Report● Old phpPgAdmin core feature● Become first real plugin

Usefull examples to start a new plugin.

PgConf 2011 17

Projects lining up...

Projects that are already waiting for this new plugin architecture:

● New Slony Plugin● PgPool● Crud● Designer● E-maj● PostGIS Visualizer ?

PgConf 2011 18

Designer

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

PgConf 2011 19

Things to do

Improve the documentationFix the plugin configuration fileIntegration/dependency between plugins ?

PgConf 2011 20

Can I contribute?

Source: https://github.com/phppgadmin/phppgadmin

Maillist: [email protected]

IRC: #phppgadmin

PgConf 2011 21

Demo...

PgConf 2011 22

Feedback

Give us a feedback about this presentation at

http://2011.pgconf.eu/feedback/

PgConf 2011 23

Questions

?

New plugin architecture in phpPgAdmin and what to

expect from it

Jehan-Guillaume de RorthaisLeonardo Augusto Sápiras

PostgreSQL Conference Europe 2011