Improve phpPgAdmin ergonomy GSoC 2010
From PostgreSQL wiki
Benefits to the PostgreSQL and phpPgAdmin Community
Improved ergonomics phpPgAdmin will make users feel more comfortable using this application. The code is also cleaner, thus, developers will have greater ease in making changes, which can easily attract more developers to contribute to phpPgAdmin. In some operations Ajax helps to make this happen.
A better quality of use, will cause the phpPgAdmin has more users and possibly more developers as well.
Ajax: locks, process, query results will use Ajax. Thus, the transactions will be faster, and only small portions of the screens will need to have their content reloaded.
Navigation: I intend to make use of Ajax to provide for the phpPgAdmin the possibility of navigation on foreign keys. Thus, you the user will can 'walk' on the relationships.
Documentation: A documentation about was developed will be made too, with results, and what could be improved.
This is the project's timeline
April 27: Meeting. I intend to plain with him what I need to study in the Community Bonding Period;
April 30 until May 24: Weekly meeting for explaining what I am doing, what I will do in the next week, my doubts and impediments. I intend during this time start coding the idea, and showing for my mentor my code and examples to him analisys.
May 24: Official start code. Start code on locks page;
May 28: Meeting with the mentor. Submission my first code to evaluate;
June 4: Meeting with the mentor. Start code on processes page;
June 8: Meeting with the mentor. In this date I intend to start the Foreign key Browsing in pure XHTML;
June 11: Meeting with the mentor. Week to continue the code of Foreign Key Browsing;
June 18: Meeting with the mentor. Week to continue the code of Foreign Key Browsing;
June 25: Meeting with the mentor. Week to continue the code of Foreign Key Browsing;
July 2: Meeting with the mentor. Start creation of the mid-term evaluations. Finish the first step on browsing Foreign Key, in pure XHTML. Start to implement with Ajax;
July 9: Meeting with the mentor. Revision of the mid-term evaluations. Week to continue the code of Foreign Key Browsing with Ajax;
July 12: Submitting of the mid-term evaluations;
July 16: Meeting with the mentor. Finish the Ajax on Foreign Key Browsing;
July 23: Meeting with the mentor. I will show a Beta Version about was implemented. Start the creation of the final documentation;
July 30: Meeting with the mentor. Revision all what implemented;
August 6: Meeting with the mentor. Final revision about was implemented;
Augusto 13: Meeting with the mentor. Finish application;
August 16: Apllication submitting;
April 30 until May 24 - Community Bonding Period:
During the Community Bonding Period, I talked a lot with my mentor, Jehan-Guillaume de Rorthais, and also with other developers of phpPgAdmin community, about my activities. In my first activity, I had to create a development environment, to use during the Google Summer of Code.
It is composed of:
* Operation System Linux Ubuntu; * Apache; * PHP; * Postgresql (postgresql-7.4.26, postgresql-8.0.24, postgresql-8.1.20, postgresql-8.2.7, postgresql-8.3.9, postgresql-8.4.3, postgresql-9.0beta1); * Scripts to make tests;
I am also using the plugins of Firefox:
* Firebug * Web Developer * Selenium
The reason I need to use all these versions of Postgresql is regression testing. In other words, what I developed using a versão of PostgreSQL, must work with other. Because exists a lot of DBA's that use the phpPgAdmin to manager their databases PostgreSQL.
I also created a script to recover my development environment. This is very important because it is only three months of work very well planned, where any unexpected can be a big problem.
During this period, I also learned to use a new system for version control, the GIT. I have experience with Subversion (SVN), and I have already worked with Mercurial and CVS. I have already had contact with GIT before, but nothing very professional. It is not very different from SVN, and my mentor helped me a lot during my adaptation with GIT. Certantly this is another positive point in my career.
May 24 until 31 - Lock page ergonomy
I worked on improving the screen locks of phpPgAdmin.
My activities were making only the locks (locks), they were recharged, and it occurred at a given time, automatically.
Using Ajax, every X seconds, the locks are now updated automatically. The user can also interrupt the update, you just have to click on the image of 'Stop,' and then 'Start' if he wishes to continue updating the data.
The update time is defined in the phpPgAdmin configuration file.
Since this screen can contain many records, was added a link in the bottom, so, the user can be directed to the top of the page where the buttons and links operations are found.
Because this is my first patch, the other phpPgAdmin developers made suggestions for improvements, and little by little I'm becoming more familiar with the methodology and the codification of phpPgAdmin.
If the user clicks on 'Stop icon', the refresh is stopped:
June 1 until 8 - Processes page ergonomy
During the second week of GSoC (01/06 to 08/06), I worked into the processes page of phpPgAdmin. The screen of processes now has the same functionality implemented in the locks page.
This week I also realized improvements in what has been implemented so far, following suggestions of my mentor, Jehan-Guillaume de Rorthais, and developer community. The experience and goodwill of them are helping me a lot in my activities. The phpPgAdmin community is to be congratulated.
It is very similar to the Locks page refresh. Auto refreshing only the 'Prepared transactions' and the 'Processes'.
If the user clicks on 'Stop icon', the refresh is stopped:
June 10 until July 15 - Browsing on Foreign Keys (xHTML version)
I am worked on a new feature inside the phpPgAdmin.
With this functionality, the user will be able to navigate recursively through foreign data from the table browsing page.
This will add links on foreign key. When the user clicks on a foreign key, it will display the referenced record data just below the current line, with link on its own foreign key as well.
July 15 until August 16 (finish) - Browsing on Foreign Keys (Ajax version)
After the first patches, my mentor (Mr. Jehan-Guillaume's Rorthais) sent me some test cases that I have not had contact in my academic life yet. Databases with multiple foreign fields in the same column, table names, schemas and columns with special characters. Other developers also contributed ideas and suggestions.
The greatest difficulty we encountered in making this patch was that, when a new line (representing the record to be displayed) was inserted, the main table was stretched as the size of the new record, it unconfigure the layout. Then my mentor and I opted for making the records (rows FK) float above the other rows, recursively nested.
In the testDatabase1.sql and testDatabase2.sql can be found examples of weird databases, that can be used, but its use is not advice.
Student: Leonardo Augusto Sápiras
Mentor: Jehan-Guillaume de Rorthais