Client Server Interaction

From KallestadWiki

Jump to: navigation, search

Contents

Overview

The expected implementation of the framework is that the server side of the street is a web server, the client is a web browser. This is by no means a restriction on implementation methodologies, but it does play a role in the expected communication structure.

The Server expects to receive a command, and will act on the commands it receives. The server expects that multiple instances of itself will be running at any given instant.

The Server can handle a variety of input data structures, but all of the input data ends up being interpreted and laid out within the framework as a common object. Whether your input structure is a URI, a JSON structure, an XML document, or some combination of these elements, the end result is that the input information is parsed into a data structure and analyzed for event processing.

Commands

There are essentially two global command options, do and out. One defines what you want the server to accomplish with your provided data set. The other provides the data structure for your expected return data.

There is no default for the do command. If no do command is provided, or a do command does not match an existing command, an error is returned in the specified or default output format, along with an HTTP level error code (500)

The default output format is user definable.

Both do and out can be hooked so that additional functionality can be defined external to the framework itself.

do

The primary command parameter is 'do'. This is a required element for all transactions. The do parameter defines the action you want to take for a given transaction. Various do parameter values imply other required transactional elements which are defined on the pages that more clearly define the functions. These pages are linked in the below table:

nq  => Named Queries
si  => SQL Insert
su  => SQL Update
sd  => SQL Delete
ws  => Web Service
new => New Object
upd => Update Object
del => Delete Object
obj => Handle Object
lis => List Object
uq  => Update Object by Query

Do commands are permissions based. Any given command can be made public, permissioned based on user group, or made an administrator only command.

out

The out command specifies the desired output format.

json => Javascript Object Notation
html => Output a web page
text => Output text
xml  => Output XML

The out command can be extended if you have provided functions that hook into the output function.

Kallestad Development Framework Topics

Personal tools