Sending/Receiving Character Strings To/From TCP/IP Server
Sending/Receiving Character Strings To/From TCP/IP Server
Hello Folks,
I would like to use OpenOffice Base screens as front ends to a family of Multi-value databases.
Such databases are inherently multi-user, very fast, and very flexible.
They are also character-based. Only some have odbc or jdbc protocols.
I know the TCP/IP connection and login protocols, but being totally new to OpenOffice, I am unsure how to program the TCP/IP socket connection and TCP/IP send and receive sequences.
The idea is that I would simply control my own I/O communication with the databases. The communication would be variously, sending commands to the database to run native programs, receiving data to display or print, sending records to be written or receiving records just read.
The concept is quite simple, and I have already achieved it in a less visually acceptable GUI environment.
I just lack the technique in Base.
All advice would be appreciated. (Please also refer to my thread Automatic Program Conversion.)
Thanks,
Peter H.
I would like to use OpenOffice Base screens as front ends to a family of Multi-value databases.
Such databases are inherently multi-user, very fast, and very flexible.
They are also character-based. Only some have odbc or jdbc protocols.
I know the TCP/IP connection and login protocols, but being totally new to OpenOffice, I am unsure how to program the TCP/IP socket connection and TCP/IP send and receive sequences.
The idea is that I would simply control my own I/O communication with the databases. The communication would be variously, sending commands to the database to run native programs, receiving data to display or print, sending records to be written or receiving records just read.
The concept is quite simple, and I have already achieved it in a less visually acceptable GUI environment.
I just lack the technique in Base.
All advice would be appreciated. (Please also refer to my thread Automatic Program Conversion.)
Thanks,
Peter H.
- DrewJensen
- Volunteer
- Posts: 1734
- Joined: Sat Oct 06, 2007 9:01 pm
- Location: Cumberland, MD - USA
Re: Sending/Receiving Character Strings To/From TCP/IP Server
Not sure Base would be the choice here - at least not with the data aware controls. You are not talking about making a jdbc or odbc connection right?
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Re: Sending/Receiving Character Strings To/From TCP/IP Server
Hi Drew,
Thanks for the reply.
No, I'm not talking about making a jdbc or odbc connection.
I'm talking about directly sending and receiving character strings via a TCP/IP connection.
It is closer to OLE DB in concept, with the OLE DB ability to cater for multi-dimensional ("rich") data. (See http://ftp.sas.com/techsup/download/v8papers/odbcdb.pdf.)
As an example for your understanding, imagine a "phantom" or non-displaying program sitting in a database environment waiting for instructions. I send a string telling it to read a particular record from a nominated file and send it to me. I then manually populate the Base screen fields from the record. Vice versa when I want to write a record. For "batch" runs I tell the control program to run the particular program, and all processing is done in the database environment without any jdbc or odbc overhead. For screen based reports ("enquiries"), I just populate a multi-line text field in a standard display format (using data I asked the control program to send).
The data bases I use allow this. It is all much faster than using odbc or jdbc.
I just need Base to provide the front end forms.
For Base to suit my purposes, I need to be able to do the above, and hopefully be able to automatically generate Base forms as in my related post.
Failing that, is there any GUI facility that you are aware of that I should investigate?
Thanks again for your help.
Regards,
Peter H.
Thanks for the reply.
No, I'm not talking about making a jdbc or odbc connection.
I'm talking about directly sending and receiving character strings via a TCP/IP connection.
It is closer to OLE DB in concept, with the OLE DB ability to cater for multi-dimensional ("rich") data. (See http://ftp.sas.com/techsup/download/v8papers/odbcdb.pdf.)
As an example for your understanding, imagine a "phantom" or non-displaying program sitting in a database environment waiting for instructions. I send a string telling it to read a particular record from a nominated file and send it to me. I then manually populate the Base screen fields from the record. Vice versa when I want to write a record. For "batch" runs I tell the control program to run the particular program, and all processing is done in the database environment without any jdbc or odbc overhead. For screen based reports ("enquiries"), I just populate a multi-line text field in a standard display format (using data I asked the control program to send).
The data bases I use allow this. It is all much faster than using odbc or jdbc.
I just need Base to provide the front end forms.
For Base to suit my purposes, I need to be able to do the above, and hopefully be able to automatically generate Base forms as in my related post.
Failing that, is there any GUI facility that you are aware of that I should investigate?
Thanks again for your help.
Regards,
Peter H.
Re: Sending/Receiving Character Strings To/From TCP/IP Server
Peter you seem to be attempting to roll back some of the best advances of networking in the past 15 years. I am just not sure what you are trying to achieve by not layering this over one of the standard database connector protocols or even one of the HTTP layers. If it's bandwidth that you are concerned about, then compressed HTML or XML will be far more bandwidth efficient than a role-your-own delimited format. Applications such as "Folding at Home" which probably ship more serious data around the Internet than virtually anything else that I can think of still use HTTP.
If you really want do this then of course it's your privilege, and I am not trying to stop you. What I am suggesting is that I don't think that you can really expect OOo to support this easily. Yours is a pretty rare request nowadays.
If you really want do this then of course it's your privilege, and I am not trying to stop you. What I am suggesting is that I don't think that you can really expect OOo to support this easily. Yours is a pretty rare request nowadays.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
- DrewJensen
- Volunteer
- Posts: 1734
- Joined: Sat Oct 06, 2007 9:01 pm
- Location: Cumberland, MD - USA
Re: Sending/Receiving Character Strings To/From TCP/IP Server
Well, from your description I would say you just described an application based on XFORMS. Once the data is sent from the browser ( or an XForm in OpenOffice.org ) to the server how you get it into or out of the database is up to you assuming you use cgi.
I am assuming the overhead you are referring to in jdbc and odbc has to do with connection sessions and state retention - so again a move to a distributed system using xforms usually means a move to a stateless connection - each transfer being singular in nature or a single transaction to the database if you would.
Anyway, as you may know OpenOffice.org 2.x includes support for creating xForms directly - these are run as a normal OpenOffice.org document type - not exported to a stand alone format for inclusion in a web server - or at least that never seemed to work very well. The continued development for xForms in the package has, it seems and I believe, and if true unfortunately, come to a grinding halt, why I don't know. Still the framework is there I suppose.
But still you would have a web server in the mix and maybe you don't want that.
I am assuming the overhead you are referring to in jdbc and odbc has to do with connection sessions and state retention - so again a move to a distributed system using xforms usually means a move to a stateless connection - each transfer being singular in nature or a single transaction to the database if you would.
Anyway, as you may know OpenOffice.org 2.x includes support for creating xForms directly - these are run as a normal OpenOffice.org document type - not exported to a stand alone format for inclusion in a web server - or at least that never seemed to work very well. The continued development for xForms in the package has, it seems and I believe, and if true unfortunately, come to a grinding halt, why I don't know. Still the framework is there I suppose.
But still you would have a web server in the mix and maybe you don't want that.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Re: Sending/Receiving Character Strings To/From TCP/IP Server
Hi Folks,
Thanks for your feedback.
My intention was to retain over 30 complex programs in their native database environment, as opposed to re-program them in another language. I was looking for a neater front end (GUI) to drive them.
If my understanding is correct, there seems to be no way to generate OpenOffice forms programatically (and therefore no way to easily convert the screens I have - see post in Forms area), and no direct TCP/IP communication facilities or OLE DB facilities (meaning that the the handling of multi-dimensional "rich" data is problematical, if possible at all).
It looks like Base does not have the facilities I need.
It is a pity, because I appreciate the effort that has gone into developing OpenOffice, I really like Writer and Calc, and I was hoping to find what I needed within the OpenOffice suite.
Thanks again for your help.
Peter H.
Thanks for your feedback.
My intention was to retain over 30 complex programs in their native database environment, as opposed to re-program them in another language. I was looking for a neater front end (GUI) to drive them.
If my understanding is correct, there seems to be no way to generate OpenOffice forms programatically (and therefore no way to easily convert the screens I have - see post in Forms area), and no direct TCP/IP communication facilities or OLE DB facilities (meaning that the the handling of multi-dimensional "rich" data is problematical, if possible at all).
It looks like Base does not have the facilities I need.
It is a pity, because I appreciate the effort that has gone into developing OpenOffice, I really like Writer and Calc, and I was hoping to find what I needed within the OpenOffice suite.
Thanks again for your help.
Peter H.
- DrewJensen
- Volunteer
- Posts: 1734
- Joined: Sat Oct 06, 2007 9:01 pm
- Location: Cumberland, MD - USA
Re: Sending/Receiving Character Strings To/From TCP/IP Server
But there are ways to generate ODF files programmatically - more then a few choices actually.
ODF Toolkit, with I believe a Python implementation
DOReport using java
odf-xslt for using php from a command line
To name a few.
ODF Toolkit, with I believe a Python implementation
DOReport using java
odf-xslt for using php from a command line
To name a few.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Re: Sending/Receiving Character Strings To/From TCP/IP Server
Thanks, Drew.
I'll explore these references.
Regards,
Peter H.
I'll explore these references.
Regards,
Peter H.
Re: Sending/Receiving Character Strings To/From TCP/IP Server
When I read your post, like Drew, I thought of XForms as a possible solution. XForms is from my limited understanding backend independent, but it appears that in OOo, the implementation of XForms was somewhat incomplete, and so of rather limited usefulness.
If all you want to do is feed data to a Writer or Calc document that will look like a form or a report, that you can then display from OOo, this is indeed possible. There are, I believe, already a few CMS systems that use this kind of paradigm, and even ERP programs that do this. ODF documents can be programmed from many languages these days, including Java, Delphi, Python, OOREXX, Perl, Ruby, PHP (a new PHP-XSLT module was released this week or late last week), but you still have to get to know the UNO API, and no doubt others of which I'm currently unaware.
http://search.cpan.org/dist/OpenOffice-OODoc/
http://ooolib.sourceforge.net/
http://www.maygill.com/maygill_cms?100&oobmain&en&&
http://www.linuxjournal.com/article/7236
https://rubyforge.org/projects/rubyodf/
Alex
If all you want to do is feed data to a Writer or Calc document that will look like a form or a report, that you can then display from OOo, this is indeed possible. There are, I believe, already a few CMS systems that use this kind of paradigm, and even ERP programs that do this. ODF documents can be programmed from many languages these days, including Java, Delphi, Python, OOREXX, Perl, Ruby, PHP (a new PHP-XSLT module was released this week or late last week), but you still have to get to know the UNO API, and no doubt others of which I'm currently unaware.
http://search.cpan.org/dist/OpenOffice-OODoc/
http://ooolib.sourceforge.net/
http://www.maygill.com/maygill_cms?100&oobmain&en&&
http://www.linuxjournal.com/article/7236
https://rubyforge.org/projects/rubyodf/
Alex