Hello Again,

Application Creation in this email refers to the process of creating a
Xap Application in the HTML code.

Currently there are several ways of doing this but in general it looks
as follows.

<script>
        function onload(){
                var session = Xap.createSession( "../../", "index.xal",
other variables );
        }
</script>

1.) Currently the application initialization process for XAP consists of
the Xap.createSession function. This function is responsible for
creating an initial application within the HTML.  If developers want to
create multiple applications they can use the Xap.defineSession
function. The naming of these methods seems unintuitive and tied to
server based terms. People may not be using server sessions. If users
want to embed multiple application in a single HTML page to create a
Mashup there isn't a way 

2.) Both defineSession and createSession can take a variable list of
arguments that are not configurable in the XapConfig.xml file.  
3.) It is also not possible to create a Xap application that with out a
UI.  This makes it difficult for developers to use just xModify against
the HTML DOM in their application.  

4.) Two different methods for creating and defining application,
createSession(), defineSession().  

5.) There isn't a top level Application object that developers interface
with to perform global Application related functions.

Suggestions to fix issues:

1.) Have just one Xap.createApplication function that will under the
covers be responsible for creating the session information.
2.) Xap.createApplication will take an object that allows users to
specify just the parameters they want to configure. For Example:

var config = {
        startPage: "index.xal",
        context: "../../",
        scanPage: true
        ...

Xap.createApplication(config);  // This will tie tightly my
recommendation for change the configuration.  All property names of the
config object above exactly match the property names of the Xap
configuration file.

3.) Make the startPage and scanPage parameters optional.  This will
create an application that can be easily used with an UI less
application or application that is using the xModify functionality
against the HTML dom.

4.) Create an application object (Xap.application.Application) that
handles more of the global data structures such as configuration,
session creation and possible ease of use functionality for connecting
HTML actions to Xap event handling.


End result of the changes would be as follows.
<script>
        function onload(){
                var config = {
                        startPage: "index.xal",
                        context: "../../",
                        scanPage: true
                }
                var application = Xap.createApplication(config);
        }
</script>

Bob (Buffone)

Reply via email to