Hi, Im from University of Moratuwa, Sri Lanka and I'm really exited on getting a chance to contribute with phpMyAdmin since it's a really popular software. Im interested in developing the idea : *Export relations scheme to other formats. * *It will be very useful if the relations schemes can be exported to other formats such as dia files, which are much more suitable for inclusion in documents.* *I have experience in working with PHP and MySQL. i have been using these languages for my University projects.* *Please provide me further info on this project, I appreciate all the assistance I can get because I want to participate in GSoC 2010 with a project for this community.*
Thanks
Kishanthan a écrit :
Hi, Im from University of Moratuwa, Sri Lanka and I'm really exited on getting a chance to contribute with phpMyAdmin since it's a really popular software. Im interested in developing the idea : *Export relations scheme to other formats. * *It will be very useful if the relations schemes can be exported to other formats such as dia files, *which are much more suitable for inclusion in documents.** **I have experience in working with PHP and MySQL. i have been using these languages for my University projects.** ****Please provide me further info on this project, **I appreciate all the assistance I can get because I want to participate in GSoC 2010 with a project for this community.**
Thanks
Kishanthan.T
Do you have specific questions about what is on the ideas list for this project? "further info" is a bit vague ... we won't build your proposal at your place...
Hi Marc,
Here is a draft proposal for the idea : Export relations scheme other formats
After doing some studies on this idea I came across is that exporting to SVG and EPS formats is possible with the use of some PHP libraries available.
Be fore going in to the details on first we will see what is a SVG and EPS.
SVG According to W3C, SVG is a standard for XML based "Scalable Vector Graphics". Due its nature being XML, it is easy to generate. It is a open standard, easy to debug and user readable. XML always has the disadvantage of large files, compared with the information which is contained. But, as vector graphics formats don't need to describe each pixel, but shapes which may be far bigger. Common SVG graphics are mostly smaller then similar images which use a bitmap format. As SVG is XML it is easy to define your own or include details from other namespaces directly in your SVG document. The most important use of SVG format is that it is a better solution image scalability requirement. Because in SVG, the image data represented as vector paths and can therefore be scaled up to a higher resolution without any distortion or quality loss.
EPS Encapsulated Post Script (EPS) is a standard file format for importing and exporting Post Script files. It is usually a single page Post Script program that describes an illustration or an entire page. The purpose of an EPS file is to be included in other pages. Sometimes EPS files are called EPSF files. EPSF simply stands for Encapsulated Post Script Format. An EPS file can contain any combination of text, graphics and images. Since it is actually a Post Script file, it is one of the most versatile file formats that are available. EPS-files usually contain a small preview image that is used to visualize the content of the file. This is done so that applications don’t need a Post Script interpreter to display the content of the EPS file.
First we will look at creating a SVG file. We can create a SVG file with the use of PHP Document Object Model[1] or eZ Components[2]. Both of these are open source general purpose PHP components libraries. Document Object Model (DOM) is an extension that allows us work with XML documents through the DOM API. So with the use of this DOM API we can create a SVG file with the given data. In ez Components it uses a SVG driver to create SVG files. The driver gets the image primitives from the renderer and creates the final SVG image.
But from what I have found is that for EPS there is no PHP libraries which directly output the EPS file. So I thought of first to create a file with known format(eg - .pdf) and then convert that to EPS format.
My questions: 1)Is there any libraries other than what I have mentioned above, which can be used? If so can you direct me those resources? 2)Please provide feedback on this draft proposal, on the decisions I have made? So that I can come up with a better one.
[1] http://www.php.net/manual/en/intro.dom.php [2] http://ezcomponents.org/introduction/overview
Thanks in Advance.
Hi
Dne Mon, 29 Mar 2010 02:36:06 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
Here is a draft proposal for the idea : Export relations scheme other formats
After doing some studies on this idea I came across is that exporting to SVG and EPS formats is possible with the use of some PHP libraries available.
Sure, these both are basically text formats.
But from what I have found is that for EPS there is no PHP libraries which directly output the EPS file. So I thought of first to create a file with known format(eg - .pdf) and then convert that to EPS format.
Well I guess such conversion would cause even more troubles. Creating postscript manually is not that hard, and once you create some abstraction layer for generating schema, it should be quite straightforward to generate postscript for that.
[1] http://www.php.net/manual/en/intro.dom.php [2] http://ezcomponents.org/introduction/overview
Using external library when there is an alternative available directly in PHP should have good reasons.
Hi Michal, I thought of implementing classes for each format with some methods for rendering the primitives (line, text, box, etc) and subclasses for each format to implement these methods. I also think that 'creating a file with known format and converting that to EPS' would cause more trouble. We can use the PostScript Document Creation Module of PHP to create postscript files. And from the external libraries which i have mentioned, i thought of using the DOM extension of PHP for the creation of SVG files. Since SVG is a XML format it will be easy to operate on it with DOM extension.
From what i have learnt by going through the source is that exporting
files(eg - PDF) are done on-the-fly without requiring external extensions. Are you suggesting me to do like that for these formats?
Regards,
Hi
Dne Tue, 30 Mar 2010 11:39:51 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
I thought of implementing classes for each format with some methods for rendering the primitives (line, text, box, etc) and subclasses for each format to implement these methods. I also think that 'creating a file with known format and converting that to EPS' would cause more trouble. We can use the PostScript Document Creation Module of PHP to create postscript files.
I don't know how good is it in drawing as it is something you don't need much in documentation.
And from the external libraries which i have mentioned, i thought of using the DOM extension of PHP for the creation of SVG files. Since SVG is a XML format it will be easy to operate on it with DOM extension.
Using DOM can help, generating XML manually is also an option (we do this for XML and OpenDocument exports.
From what i have learnt by going through the source is that exporting
files(eg - PDF) are done on-the-fly without requiring external extensions. Are you suggesting me to do like that for these formats?
Well if it can be done with reasonably small amount of code, then it is prefered. If you would have to implement lot of code, it is better to use existing libraries.
Hi Michal, Thanks for the information.
On Tue, Mar 30, 2010 at 1:55 PM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Tue, 30 Mar 2010 11:39:51 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
I thought of implementing classes for each format with some methods for rendering the primitives (line, text, box, etc) and subclasses for each format to implement these methods. I also think that 'creating a file with known format and converting that
to
EPS' would cause more trouble. We can use the PostScript Document Creation Module of PHP to create postscript files.
I don't know how good is it in drawing as it is something you don't need much in documentation.
Do you have any suggestion on creating a postscript file other than what i have mentioned above? If so can you direct me to those resources.
And from the external libraries which i have mentioned, i thought of
using
the DOM extension of PHP for the creation of SVG files. Since SVG is a XML format it will be easy to operate on it with DOM extension.
Using DOM can help, generating XML manually is also an option (we do this for XML and OpenDocument exports.
From what i have learnt by going through the source is that exporting
files(eg - PDF) are done on-the-fly without requiring external
extensions.
Are you suggesting me to do like that for these formats?
Well if it can be done with reasonably small amount of code, then it is prefered. If you would have to implement lot of code, it is better to use existing libraries.
Using existing libraries will have an advantage of writing small amount of
code , so i prefer to use some external libraries for this project.
Thanks,
Hi
Dne Tue, 30 Mar 2010 15:15:57 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
Do you have any suggestion on creating a postscript file other than what i have mentioned above? If so can you direct me to those resources.
I don't have any experiences with this. Quick googling reveals some links:
http://www.koders.com/php/fidEA8BDDEB11481C34BA2A0775B0E9AF5DAB0AC95B.aspx http://php.net/manual/en/book.ps.php
Using existing libraries will have an advantage of writing small amount of code , so i prefer to use some external libraries for this project.
As long as you find something properly maintained and in good shape, there is no problem in including external libraries.
Hi, I didn't clearly understand the feature request at here[1] , it says that exporting the schema to xml Dia format. Is the request is to create a xml format of dia?
Hi
Dne Thu, 1 Apr 2010 14:58:22 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
I didn't clearly understand the feature request at here[1] , it says that exporting the schema to xml Dia format. Is the request is to create a xml format of dia?
It means to create XML file in format for Dia program - http://projects.gnome.org/dia/
Ok , so we have to create a XML file in format which can be opened by the Dia program.
Thanks, Kishanthan.T
Hi, I found that without any compression applied , Dia is just another XML file. So we can use the DOM extension for the creation of Dia file.
Any suggestion on this?
Kishanthan.T
Hi
Dne Thu, 1 Apr 2010 20:48:59 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
Hi, I found that without any compression applied , Dia is just another XML file. So we can use the DOM extension for the creation of Dia file.
Any suggestion on this?
Yes, of course you can.
Hi, I have submitted my proposal to http://socghop.appspot.com/. Please give feedback on any for changes that have to be made.
Thanks,
Kishanthan.T
Hi
Dne Fri, 2 Apr 2010 17:38:37 +0530 Kishanthan Thangarajah kshanth2101@gmail.com napsal(a):
I have submitted my proposal to http://socghop.appspot.com/. Please give feedback on any for changes that have to be made.
You seem to have confused general export feature with relation schema, what is separate functionality.
Hi Michal, Thanks for letting it know, all this time i was thinking on extending the general export feature. Now i realized it is the relation schema export feature that has to be extended.
But i thing the solution that i have submitted can also be used for this. That is to implement a base class for rendering the schema, and a set of methods to render the primitives. And subclasses for each format to implement these methods.
Any suggestion?
Thanks and regards,
Hi, I resubmitted my proposal with some changes made to it. I would appreciate if any feedback can be provided. Thanks, -- Kishanthan.T