Object-Oriented-Pages: Difference between revisions
Embeddedrf (talk | contribs) No edit summary |
|||
| (26 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
'''*Top document has the following:''' <br><br> | '''*Top document has the following:''' <br><br> | ||
<html> <br> | <html> <br> | ||
| Line 11: | Line 12: | ||
</head> <br><br> | </head> <br><br> | ||
<body Onload=Object_Function_1(p1,p2...); Object_Function2(q3,q4...);> <br> | [http://www.webreference.com/programming/javascript/onloads/ <body Onload=Object_Function_1(p1,p2...); Object_Function2(q3,q4...);>] <br> | ||
<---HTML_Template_File_N---> .....---> This can now be constructed on the fly and left in an HTML file | Makes possible varying templates for different pages | |||
</body> <br> | </body> <br> | ||
</html> | </html> | ||
<hr> | |||
*1- replace <---HTML_Template_N---> with string replacement function in PERL ...will be easy to place this string and make it obvious where the replacement will happen. | |||
== Example HTML Template File == | |||
[[Image:Top_Template_Example_1.jpg|thumb|left]] | |||
*Use unique characters to allow parsing agent to find substitution locations | |||
*Full file names with pathes to the agent can | |||
**fetch the OBJECT | |||
**parse the OBJECT | |||
**substitute SUB-OBJECTS in correct locations | |||
**Add the SCRIPT's to the head and form ONBODY string with onbody=function1();function2(); concatenation | |||
**Until no unique characters are found GoTo beginning of parsing loop: This allows the OBJECTS to be parsed the same way | |||
**After all the OBJECTS are replaced by fixed files: Generate any dynamic content and substitute into document | |||
'''Observations:''' | |||
1- in all cases the overhead head / body / html tags are stripped off for uniformity. Top level object is embedded in a OVERHEAD TAGSET to make the page shippable. | |||
2- ONBODY-TAG , SCRIPT-SET , HTML-MAINBODY must be shipped as variables to this OVERHEAD-TAGSET adding function | |||
== Compiler-Functions-Summary== | |||
'''HTML Tear Down''' | |||
* InLineHTML => gets the contents of a file and reads it into a string | |||
* OverHeadTagStripper => Input=InLineHTML Output= Strips the page overhead and outputs | core HTML | JavaScript | body tag | => JSCRIPT & BODYTAG accumulated in global variables | |||
**StripHTML - everything between <body XXX...> </body> returned | |||
'''SUBOBJECT substitution''' | |||
*Substitute the PAGEOBJECT PARAMETERS for the FIELDS embedded in the PAGEOBJECT | |||
**Call must look like SUBSTITUTE( PAGETEXT,SUB-1,SUB-2.....SUB-N ) <-- substitute the [---File:XYZ.html---] or [---Dyn:FUNCTIONNAME---] | |||
== Development-System-Notes == | |||
*PERL regex tester | |||
*fully integrated server with all software and no need to upload after mod to code | |||
Latest revision as of 14:36, 16 May 2008
Top Document Schematic[edit]
*Top document has the following:
<html>
<head>
<script src=Object_1_Script.js language=javascript type=text/javascript></script>
<script src=Object_2_Script.js language=javascript type=text/javascript></script>
</head>
<body Onload=Object_Function_1(p1,p2...); Object_Function2(q3,q4...);>
<---HTML_Template_File_N---> .....---> This can now be constructed on the fly and left in an HTML file | Makes possible varying templates for different pages
</body>
</html>
- 1- replace <---HTML_Template_N---> with string replacement function in PERL ...will be easy to place this string and make it obvious where the replacement will happen.
Example HTML Template File[edit]

- Use unique characters to allow parsing agent to find substitution locations
- Full file names with pathes to the agent can
- fetch the OBJECT
- parse the OBJECT
- substitute SUB-OBJECTS in correct locations
- Add the SCRIPT's to the head and form ONBODY string with onbody=function1();function2(); concatenation
- Until no unique characters are found GoTo beginning of parsing loop: This allows the OBJECTS to be parsed the same way
- After all the OBJECTS are replaced by fixed files: Generate any dynamic content and substitute into document
Observations:
1- in all cases the overhead head / body / html tags are stripped off for uniformity. Top level object is embedded in a OVERHEAD TAGSET to make the page shippable. 2- ONBODY-TAG , SCRIPT-SET , HTML-MAINBODY must be shipped as variables to this OVERHEAD-TAGSET adding function
Compiler-Functions-Summary[edit]
HTML Tear Down
- InLineHTML => gets the contents of a file and reads it into a string
- OverHeadTagStripper => Input=InLineHTML Output= Strips the page overhead and outputs | core HTML | JavaScript | body tag | => JSCRIPT & BODYTAG accumulated in global variables
- StripHTML - everything between <body XXX...> </body> returned
SUBOBJECT substitution
- Substitute the PAGEOBJECT PARAMETERS for the FIELDS embedded in the PAGEOBJECT
- Call must look like SUBSTITUTE( PAGETEXT,SUB-1,SUB-2.....SUB-N ) <-- substitute the [---File:XYZ.html---] or [---Dyn:FUNCTIONNAME---]
Development-System-Notes[edit]
- PERL regex tester
- fully integrated server with all software and no need to upload after mod to code