There are three kinds of basic distribution of XPLATFORM; plugin distribution, XPLauncher distribution, and exe distribution. You can make a more improved distribution method by combining any of these three together.
Plugin distribution
Plugin distribution is used when running runtime while having XPLATFORM embed on a web browser. This means XPLATFORM Engine is performed within a web browser.
Files for distribution
Service administrator has to manage several files for distribution.
Following is an example directory structure of a distribution server.
Plugin distribution flow
Following shows the flow of XPLATFORM distribution within a web browser.
Here when XPLATFORM engine installs all these components and objects, it serves the functions of XPLATFORM runtime. In the next chapter all the files that appear in this diagram will be explained.
SampleStart.html file
SampleStart.html is the first HTML file a web browser executes to drive XPLATORM engine. The name of the file can be designated freely by the developer.
Type in http://127.0.0.1/SampleStart.html in the web browser to approach the relevant file.
Following is an example.
<HTML> <HEAD> <TITLE> Web Browser Embed XPLATFORM Sample Page </TITLE> <SCRIPT LANGUAGE="javascript"> function fn_load() { // Designate the ADL route of service. XPLATFORMAXCtrl.xadl = "http://127.0.0.1/XP_Service/ SampleADL.xadl"; -- // Set key value of service. // It has to be the only value among the services on the url. XPLATFORMAXCtrl.key = "XP_Sample"; -- // Designate the PATH where the components on the user’s PC will be saved. // Generally this PATH value is not designated. // If not designated, it will be designated to "%USERAPP%\TobeSoft\XPLATFORM2009\Component\” // Refer to Appendix A.Alias route for %USERAPP% value. //XPLATFORMAXCtrl.componentpath = "D:\\TOBESOFT\\#05.Project\\#02. XPLATFORM"; // Designate whether the size of XPLATFORM will change variably to the size of the web browser or not. // If not, it is true. // When it is false plugin width and height value of the web browser will be applied. XPLATFORMAXCtrl.autosize = true; // Designate the number of thread XPLATFORM Engine uses. // If not designated, it will be five. // If there are many CPUs of the user’s device, it is good to designate a high value. // This function is only used for communication process so in the case of wanting to use many communication at the same time, if you increase the number, //you will get a faster response. However, in the case of the network itself //being slow you will not get the wanted effect even after increasing the number. // XPLATFORMAXCtrl.commthreadcount = 10; // It is used to change error information XPLATORM engine outputs. // When not designated, the basic error information of XPLATFORM engine will be output. // Generally it is not designated. //XPLATFORMAXCtrl.errorfile = "D:\\#01.TOBESOFT\\#05.Project\\error.log"; // After XPLATFORM application program has been shut down, designate whether to do exit() event or not. // Designate. // If not designated it is true and exit() occurs. //XPLATFORMAXCtrl.handleflag = false; // Run XPLATFORM engine. XPLATFORMAXCtrl.run(); } </SCRIPT> </HEAD> <BODY onload="fn_load()"> <SCRIPT LANGUAGE="javascript"> document.write('<OBJECT ID="XPlatformAXCtrl" classid=":43C5FE00-DD32-4792-83DB-19AE4F88F2A6" width="90%" height="90%" CodeBase="http://127.0.0.1/XPLATFORM9_SetupEngine.cab#VERSION=2011,10,4,1"> </SCRIPT> </BODY> </HTML>
SampleADL.xadl file
SampleADL.xadl contains the application program distribution and execution environment settings information to run sample application program. This file is managed by UX-Studio.
Following is an example of SampleADL.xadl.
<ADL version="1.0"> <TypeDefinition url="default_typedef.xml"/> -------------------------- (1) <GlobalVariables url="globalvars.xml"/> ------------------------------ (2) <Application id="XP_Sample" codepage="utf-8" language="Korean" …> ---- (3) <Layout> ------------------------------------------------------------- (4) <MainFrame id="mainframe" …> <ChildFrame formurl="Base::SampleForm.xfdl"…/> ----------------------- (5) </MainFrame> </Layout> </Application> <Script><![CDATA[ ]]></Script> </ADL>
You can see the following contents through the file above.
You will see that component distribution information is defined by default_typedef.xml.
You will see the global variables used in application program are saved on globalvars.xml
You will see that the ID of application program is XP_Sample.
You will see the application model is single frame form by looking at how only one layout exists under MainFrame and ChildFrame. Single Frame means a similar form to SDI form.
You will see the screen form output on the screen at first is “SampleForm.xfdl”
There are many kinds of information on application program other than this. We suggest you not to edit yourself as this file is supervised by UX-Studio. Detailed explanation on each components is dealt in the chapter “XPLATFORM application program structure” in the Developer’s guide.
default_typedef.xml file
default_typedef.xml contains component distribution information needed to run sample application program. Also, it is used to distribute additional components developed by the developer.
Following is an example of default_typedef.xml.
<?xml version="1.0" encoding="utf-8"?> <TypeDefinition> <Components> <Component type="Bin" id="Div" classname="Div" module="XComCmp" version="1000"/> --- (1) <Component type="Bin" id="Button" classname="Button" module="XComCmp" version="1000"/> … … <Component type="Bin" id="Splitter" classname="Splitter" module="XComCmp" version="1000"/> <Component type="Bin" id="GroupBox" classname="GroupBox" module="XComCmp" version="1000"/> <Component type="Bin" id="ProgressBar" classname="ProgressBar" module="XComCmp" version="1000"/> <Component type="Bin" id="Activex" classname="ActiveX" module="XAxCmp" version="1000"/> <Component type="Bin" id="Dataset" classname="Dataset" module="XPLATFORMLib" version="1000"/> </Components> <Services> <Service prefixid="Base" type="form" url="./Base/Win32/" cachelevel="dynamic" codepage="" language="" version="" communicationversion=""/> --- (2) </Services> <Update> <Item systemtype="win32" url="http://127.0.0.1/ XP_Components "/> --- (3) </Update> </TypeDefinition>
You can see the following contents through the file above.
This information contains the distribution information of Div Component.
Following are the detailed descriptions.
Div Component is the component being distributed.
XComCmp.dll is required for Div Component.
The version of Div component in XComCmp.dll is 1000.
Alias name for form url is defined.
When designation form name afterwards, if you designate ‘base/form name’ then the url is replaced by “http://127.0.0.1/XP_Service/Base/Win32/Form명”.
Designates the position for where the component files for distribution are.
dll files for components need to exist in the url http://127.0.0.1/XP_Components.
We suggest that you do not edit yourself as this file is automatically produced in UX-Studio.
Following is a screenshot of managing default_typedef.xml on UX-Studio.
XPLauncher distribution
XPLauncher distribution is not done through web browser but is used when running application program only through XPLATFORM Runtime The difference from exe distribution is that it is not performed on XPLATFORM Runtime directly but on XPLauncher.
Files for distribution
Service administrator manages several files for distribution. Following is an example directory structure of distribution server.
XPLauncher distribution flow
Following is the flow of distributing XPLATFORM through XPLauncher.
Here, when XPLATFORM engine installs all components and objects it serves the functions of XPLATFOM Runtime.
Starting from the next chapter each file that appears in this diagram will be explained.
SampleStart.html file
Unlike plugin distribution, this file is an HTML file exclusively used for the set up of XPLATFORM. The name of this file can be designated by the developer.
Approach the file by connecting to http://127.0.0.1/SampleStart.html on a web browser.
The following is an example of this file.
<HTML> <HEAD> <TITLE> XPLATFORM Install Sample Page </TITLE> </HEAD> <BODY> <SCRIPT LANGUAGE="JavaScript"> document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID: 43C5FE00-DD32-4792-83DB-19AE4F88F2A6" width="90%" height="90%" ' +'"CODEBASE="http://127.0.0.1/XPLATFORM9_SetupEngine.cab#VERSION=2011,10,4,1" onError="fn_onError()"> ' + '</OBJECT>'); </SCRIPT> </BODY> </HTML>
XPLATFORM Engine is installed by registering <SCRIPT LANGUAGE="JavaScript"> ~ </SCRIPT> without any other special execution instructions.
SampleLauch.html file
SampleLaunch.html is an HTML file to drive XPLauncher. The name of the file can be designated by the developer.
Approach the file by connecting to http://127.0.0.1/SampleLaunch.html on a web browser.
Following is an example of this file.
<HTML> <HEAD> <TITLE> XPLauncher Sample page </TITLE> <SCRIPT LANGUAGE="javascript"> function fn_load () { XPLauncher.launch(); -- (4) } </SCRIPT> </HEAD> <BODY onload="fn_load()"> <SCRIPT LANGUAGE="javascript"> document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID:A99F2782-BD5F-4BDB-ACF0-EBE0C59920D9" width="90%" height="90%" ' +'"CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2009,3,23,1" onError="fn_onError()" >'-- (1) + '<PARAM NAME="key" VALUE=" XP_Sample ">'-- (2) + '<PARAM NAME="xadl" VALUE="http://127.0.0.1/XP_Service/ SampleADL.xadl">'-- (3) + '</OBJECT>'); </SCRIPT> </BODY> </HTML>
You can see the following contents through the file above.
Install XPLauncher.
Set the key value of the service.
(Has the same function as the part of SampleStart.html.)
Designate service ADL route.
(the same function as the part of SampleStart.html.)
Run XLPATOFRM Engine through XLauncher.
Integration of SampleLauch.html and SampleStart.html
The previously explained SampleLaunch.html and SampleStart.html can be integrated into one file.
In XPLauncher, ActiveX file for XPLauncher exists(XPLATFORM9_XPLauncher.cab), but it also exists in XPLATFORM Engine set up file (XPLATFORM9_SetupEngine.cab). So you can run XPLauncher by simply installing XPLATFORM Engine.
The reason for providing ActiveX file(XPLATFORM9_XPLauncher.cab) for XPLauncher because in the case of installing XPLATFORM engine with exe file, this can support the execution method on web browsers.
Following is an example of the integrated file. In the case of running this file
<HTML> <HEAD> <TITLE> XPLauncher execution </TITLE> </HEAD> <BODY onload=" XPLauncher.launch()">-- (3) <SCRIPT LANGUAGE="javascript"> document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID:43C5FE00-DD32-4792-83DB-19AE4F88F2A6" width="90%" height="90%" ' +'CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2011,10,4,1" onError="fn_onError()" >'-- (1) + '</OBJECT>'); document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="A30D5481-7381-4dd9-B0F4-0D1D37449E97" '-- (2) +'CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2011,10,4,1" onError="fn_onError()" >' + '<PARAM NAME="key" VALUE=" XP_Sample ">' + '<PARAM NAME="xadl" VALUE="http://127.0.0.1/XP_Service/ SampleADL.xadl">' + '</OBJECT>'); </SCRIPT> </BODY> </HTML>
Install XPLATFORM Engine. Here, XPLauncher is also installed.
XPLauncher only sets CLASSID without codebase.
Run XPLauncher.
SampleADL.xadl file
It is the same as SampleADL.xadl file of plugin distribution.
default_typedef.xml file
It is the same as default_typedef.xml file of plugin distribution.
exe distiribution
exe distribution does not distribute cab file and is used in the case of manually installing XPLATFORM engine, and then running application program.
This way is generally used for file downloading or CD distribution. However as the XPLATFORM components for UI output are distributed through http server, http server for distribution needs to be managed.
Files needed for distribution
There is no server for engine distribution, but service administrator needs to manage several files for service UI and distribution of components.
Following is an example directory structure of a distribution server.
exe distribution flow
Following is the XPLATFORM distribution flow that runs exe file.
Here, when XPLATFORM engine installs all components and objects, it serves the functions of XPLATFORM runtime.
Running XPLATFORM on the setup command line
Run XPLATFORM Engine on the MS Windows command line.
Typing in as the following on the command line, it is the same as running XPLATFORM engine through XPLauncher.
"C:\Program Files\TOBESOFT\XPLATFORM\9.2\XPLATFORM.exe" -K “XP_Sample” -X "http://127.0.0.1/XP_Service/SampleADL.xadl"
When you look at the contents of this command line,
- It designates key value using K option. It does the same role as the part of SampleLaunch.html. -It designates ADL route using X option does the same role as the part of SampleLaunch.html.
Files needed for distribution
Exe distribution does not require html files as plugin distribution or XPLauncher distribution does.
It only requires files for running application programs after XPLATFORM Engine is installed. It requires files such as SampleADL.xadl and default_typedef.xml. In other words, the files that are downloaded or installed after XPLATFORM Engine is running are identical regardless of the type of distribution.
Shortcut icon distribution
This method creates shortcut icons for users that approach through web server for the first time, and from then on is used when running application programs through shortcut icons. It is a combined form of XPLauncher distribution and exe distribution.
Files needed for distribution
Following is an example directory structure of a distribution server.
XPLauncher distribution flow
Following is the flow of distributing XPLATFORM through XPLauncher.
Each file appearing in this diagram will be explained in the next chapter.
MakeShortcut.html file
MakeShortcut.html contains the contents of installing XPLATFORM Engine and creating shortcut icon to run application program. The file name can be designated by the developer.
Approach the file by connecting to http://127.0.0.1/MakeShortcut.html on a web browser.
Following is an example of the file.
<HTML> <HEAD> <TITLE>Make shortcut Sample Page </TITLE> <SCRIPT LANGUAGE="javascript"> function fn_make_shortcut() { XPLauncher.key = " XP_Sample "; XPLauncher.xadl = " http://127.0.0.1/XP_Service/ SampleADL.xadl "; XPLauncher.makeshortcut("XPショートカット", " http://127.0.0.1/SampleIconImage.ico", "desktop"); } </SCRIPT> </HEAD> <BODY onload="fn_make_shortcut()"> <SCRIPT LANGUAGE="javascript"> document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID: 43C5FE00-DD32-4792-83DB-19AE4F88F2A6" width="90%" height="90%" ' +'"CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2011,10,4,1" onError="fn_onError()" >' + '</OBJECT>'); document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID=" A30D5481-7381-4dd9-B0F4-0D1D37449E97" ' +'"CODEBASE="http://127.0.0.1/XPLATFORM9_XPLauncher.cab#VERSION=2011,10,4,1" onError="fn_onError()" >' + '<PARAM NAME="key" VALUE=" XP_Sample ">' + '<PARAM NAME="xadl" VALUE="http://127.0.0.1/XP_Service/ SampleADL.xadl">' + '</OBJECT>'); </SCRIPT> </BODY> </HTML>
On the user’s device that has approached this page on a web browser, a shortcut icon called ‘execute shortcut icon’, and when you run the shortcut icon, XPLATFORM engine will execute.
Distribution of 3rd party module
When using a 3rd party’s product on XPLATFORM Runtime the particular file can be used only if made as a cab file.
Making 3rd Party module
As XPLATFORM uses the same cab setup technique as web browsers, cab files made to be installed and run on web browsers can be installed and run on XPLATFORM.
However, please note that only cab files with the signature of certified institutions can be used.
Using 3rd Party module
Using 3rd Party module made as a cab file is simple. When developing form in UX-Studio, it uses OCX Component and you only need to register the url of the cab file in the codebase property value of the relevant component.