dbTalk Databases Forums  

Pavuk IDF v2.2 - Database retrieval in JSON WITHOUT the need for PHP

comp.databases.pick comp.databases.pick


Discuss Pavuk IDF v2.2 - Database retrieval in JSON WITHOUT the need for PHP in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bill Crowell
 
Posts: n/a

Default Pavuk IDF v2.2 - Database retrieval in JSON WITHOUT the need for PHP - 11-05-2010 , 02:58 PM






The challenge for connecting MV databases to web forms is extracting
the data from the database and sending it back to the browser. This is
typically done using a JSON or XMLHTTPrequest back to an Apache server
to invoke a specific PHP script. This script, in turn, queries the
database and returns a string of data to the web server which sends it
back to the client. The connection of PHP to a MV database is not a
trivial task.

Pavuk IDF v2.2 has a new feature to enable the direct retrieval of MV
database queries in one step from the form. This feature returns
virtually any query string as a JSON array with a syntax that is
familiar to MV programmers. The existing dictionary tags are used for
labels.

NOTE: Do not click on this link!
An example in a web form:
https://www.pavuk.com/json.qsp&query=sort customers by lname by fname
with state eq "NC" lname fname city&limit=25

This returns a JSON response containing the report information sorted
just as stated with the tags of "lname" and "fname" to be used in the
form. It also has a handy limit of the first 25 responses.

This directly interfaces web forms with the MV query processor.

Many other extensions to the json.qsp responder are planned as well as
an XML version.

For more information, check www.pavuk.com
Bill Crowell, bcrowell (AT) pavuk (DOT) com

Reply With Quote
  #2  
Old   
frosty
 
Posts: n/a

Default Re: Pavuk IDF v2.2 - Database retrieval in JSON WITHOUT the need for PHP - 11-10-2010 , 10:00 AM






"Bill Crowell" <bcrowell (AT) pavuk (DOT) com> wrote

Quote:
The challenge for connecting MV databases to web forms is extracting
the data from the database and sending it back to the browser. This is
typically done using a JSON or XMLHTTPrequest back to an Apache server
to invoke a specific PHP script. This script, in turn, queries the
database and returns a string of data to the web server which sends it
back to the client. The connection of PHP to a MV database is not a
trivial task.

Pavuk IDF v2.2 has a new feature to enable the direct retrieval of MV
database queries in one step from the form. This feature returns
virtually any query string as a JSON array with a syntax that is
familiar to MV programmers. The existing dictionary tags are used for
labels.

NOTE: Do not click on this link!
An example in a web form:
https://www.pavuk.com/json.qsp&query=sort customers by lname by fname
with state eq "NC" lname fname city&limit=25

This returns a JSON response containing the report information sorted
just as stated with the tags of "lname" and "fname" to be used in the
form. It also has a handy limit of the first 25 responses.

This directly interfaces web forms with the MV query processor.

Many other extensions to the json.qsp responder are planned as well as
an XML version.

For more information, check www.pavuk.com
Bill Crowell, bcrowell (AT) pavuk (DOT) com
This is excellent. =`:^)

What's on the browser side?

Ruby on Rails? Active Record?

--
frosty

Reply With Quote
  #3  
Old   
Bill Crowell
 
Posts: n/a

Default Re: Pavuk IDF v2.2 - Database retrieval in JSON WITHOUT the need for PHP - 11-11-2010 , 09:09 AM



On Nov 10, 11:00*am, "frosty" <fros... (AT) bogus (DOT) invalid> wrote:
Quote:
"Bill Crowell" <bcrow... (AT) pavuk (DOT) com> wrote in message

news:5f2a5fe2-ee02-4e01-b4db-a2a4eaf93fd2 (AT) j25g2000yqa (DOT) googlegroups.com...





The challenge for connecting MV databases to web forms is extracting
the data from the database and sending it back to the browser. This is
typically done using a JSON or XMLHTTPrequest back to an Apache server
to invoke a specific PHP script. This script, in turn, queries the
database and returns a string of data to the web server which sends it
back to the client. The connection of PHP to a MV database is not a
trivial task.

Pavuk IDF v2.2 has a new feature to enable the direct retrieval of MV
database queries in one step from the form. This feature returns
virtually any query string as a JSON array with a syntax that is
familiar to MV programmers. The existing dictionary tags are used for
labels.

NOTE: Do not click on this link!
An example in a web form:
https://www.pavuk.com/json.qsp&query=sortcustomers by lname by fname
with state eq "NC" lname fname city&limit=25

This returns a JSON response containing the report information sorted
just as stated with the tags of "lname" and "fname" to be used in the
form. It also has a handy limit of the first 25 responses.

This directly interfaces web forms with the MV query processor.

Many other extensions to the json.qsp responder are planned as well as
an XML version.

For more information, checkwww.pavuk.com
Bill Crowell, bcrow... (AT) pavuk (DOT) com

This is excellent. * =`:^)

What's on the browser side?

Ruby on Rails? *Active Record?

--
frosty
What is on the browser side is totally up to the developer. As I
understand Ruby on RAILS, that is the SERVER side - another technology
to compete with PHP and PERL.

I'm using the JSON responses to populate ExtJS data stores. Most
modern browsers will eval() JSON responses. Other JS frameworks such
as JQuery should be able to use the JSON responder in Pavuk.

You have to look at the total picture. You have a web form that has
some Javascript. That JavaScript has a URL that calls the server using
XMLHTTPrequest - a request inside the form that does not require
sending the entire form data. That URL typically invokes a PHP script
on the server which then queries the database and returns a response
formatted in JSON or XML back to the browser. The JS then takes the
return data and displays it for the user.

What this means is that there must be tight coordination between the
person developing the forms and the PHP programmer who is writing the
database queries. This also means that the web server tends to fill up
with thousands of PHP scripts, all requiring maintenance and all with
potential security problems.

When we look at the Query processor in the MV environment, it knows a
lot about the data because our dictionaries are strong. In Pavuk, we
also have the master database that holds the schema for all of the
databases in the account. There is no compelling need to actually
write a PHP script to access MV databases with Pavuk since the query
is simply part of the URL.

The part of the example I gave with &query=..... is the part that
would normally be contained in a PHP script.

At this point, I've just started. There are many new things coming.
One point of particular interest is integrating Pavuk and OpenQM to
connect to MySQL data sources in addition to local databases.

Thanks

Bill

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.