4. Semester rapport :
Produkt rapporten -
Proces rapporten -
Bilag -
Term ordbog -
Tidsplan
1 - Vores dokumentationDette afsnit indenholder vores dokumentation udfærdiget og designet til Pro-Filer. 1 Vores dokumentation 1.1 Xml 1.1.1 Profiler xml 1.1.2 Profiler dtd 1.1.3 Profiler xsl 1.1.4 Profiler css 1.1.5 Profiler Tag Lister 1.1.6 Profiler js 1.2 Interesante klasser og metoder 2 Ekstern dokumentation 2.1 MySQL 2.2 Web application benchmarks 1.1 - XmlXml har egenskaber der egner sig storartet til et projekt af denne art, da man kan bruge de mange muligheder, der er, til at standardisere en tekst efter en tildelt metode template(DTD). Vi har udviklet understående eksempel på en opbygnings struktur med alle tilknyttede typer dokumenter. Dette i form af DTD, XSL, CSS og det egentlige XML dokument. Grundet ressourcemangel er dette ikke indkoorporeret i systemet med en Java-XML parser, men kunne i det fremtidige produkt være en metode til at håndtere dokumentstyringen. 1.1.1 - Profiler xml<?xml version="1.0" standalone="yes"?><?xml:stylesheet href="04.0_profiler.css" type="text/css"?> <!DOCTYPE profiler SYSTEM "02.0_profiler.dtd"> <profiler> <documentheader> <title>title element nested in documentheader</title> <subtitle> subtitle element nested in documentheader </subtitle> <subheader>subheader element nested in documentheader</subheader> <scope> <paragraph> <line>line element double nested in documentheader_scope_paragraph</line> </paragraph> </scope> <paragraph> <line>line element nested in documentheader_paragraph</line> </paragraph> </documentheader> <documentbody> <title>title element nested in documentbody</title> <scope> <paragraph> <line>line element double nested in documentbody_scope_paragraph</line> </paragraph> </scope> <subbody>subbody element nested in documentbody</subbody> <paragraph> <line>line element nested in documentbody_paragraph</line> </paragraph> </documentbody> <documentfooter> <title>title element nested in documentfooter</title> <scope> <paragraph> <line>line element double nested in documentfooter_scope_paragraph</line> </paragraph> </scope> <paragraph> <line>line element nested in documentfooter_scope_paragraph</line> </paragraph> </documentfooter> <info> <development_manager>Profiler Netsolutions©</development_manager> <development_team>Gruppe5</development_team> <position/> </info> <!-- the exact same thing as above --> <documentheader> <title>title element nested in documentheader</title> <subtitle> subtitle element nested in documentheader </subtitle> <subheader>subheader element nested in documentheader</subheader> <scope> <paragraph> <line>line element double nested in documentheader_scope_paragraph</line> </paragraph> </scope> <paragraph> <line>line element nested in documentheader_paragraph</line> </paragraph> </documentheader> <documentbody> <title>title element nested in documentbody</title> <scope> <paragraph> <line>line element double nested in documentbody_scope_paragraph</line> </paragraph> </scope> <subbody>subbody element nested in documentbody</subbody> <paragraph> <line>line element nested in documentbody_paragraph</line> </paragraph> </documentbody> <documentfooter> <title>title element nested in documentfooter</title> <scope> <paragraph> <line>line element double nested in documentfooter_scope_paragraph</line> </paragraph> </scope> <paragraph> <line>line element nested in documentfooter_scope_paragraph</line> </paragraph> </documentfooter> <info> <development_manager>Profiler Netsolutions©</development_manager> <development_team>Gruppe5</development_team> <position/> </info> </profiler> 1.1.2 - Profiler dtd<!--============= Profiler Text Markup =============================--><!--========== Profiler document standard ==========================--> <!ELEMENT profiler (documentheader, documentbody, documentfooter, info?)> <!ELEMENT documentheader ( title+, subtitle?, line*, subheader*, scope+, paragraph+, source_file? ) > <!ELEMENT documentbody ( title+, subtitle?, line*, scope+, subbody*, paragraph+, source_file? ) > <!ELEMENT documentfooter ( title+, subtitle?, line*, scope+, subfooter*, paragraph+, source_file? ) > <!ELEMENT info ( development_manager, development_team, position ) > <!ELEMENT title (#PCDATA)> <!ELEMENT subtitle (#PCDATA)> <!ELEMENT subheader (#PCDATA)> <!ELEMENT subbody (#PCDATA)> <!ELEMENT subfooter (#PCDATA)> <!ELEMENT scope (paragraph+)> <!ELEMENT paragraph (line+, source_file?, index*)> <!ELEMENT line (#PCDATA)> <!ELEMENT source_file (#PCDATA)> <!ELEMENT index (#PCDATA)> <!ELEMENT development_manager (#PCDATA)> <!ELEMENT development_team (#PCDATA)> <!ELEMENT position (#PCDATA)> <!--======== Profiler single command integrated entities ==========--> <!ENTITY amp "&#038;" > <!ENTITY copy "©" > <!ENTITY add "@" > <!ENTITY tab "	" > <!--============= Profiler Tag Markup =============================--> <!ELEMENT BR EMPTY > <!-- forced line break --> 1.1.3 - Profiler xsl<?xml version='1.0' ?> 1.1.4 - Profiler cssprofiler { font-family: Tahoma, HandelGothic BT, Frugal Sans, Eurostile Extended; } title { display: block; height: 10px; padding: 3px; background :#000000; color: "white"; font-weight: bold; font-size: 14pt; } subtitle { display: block; font-size: 14pt; } documentheader { display: block; margin-left: 14; padding: 3px; font-size: 12pt; color: "maroon"; } documentbody { display: block; padding: 3px; margin-left: 16; font-size: 12pt; color: "maroon"; } subheader, subbody { background :#F0F0F0; font-size: 14pt; margin-left: 40; } documentfooter { background :#FFFFFF; display: block; padding: 3px; margin-left: 16; font-size: 8pt; color: "maroon"; } subfooter { display: block; margin-left: 25; font-size: 10pt; } documentfooter title { background :#FFFFFF; display: block; padding: 3px; margin-left: 16; font-size: 8pt; color: "maroon"; } documentfooter paragraph { background :#FFFFFF; display: block; margin-left: 25; font-size: 8pt; color: "maroon"; } documentfooter scope paragraph { background :#FFFFFF; display: block; margin-left: 25; font-size: 8pt; color: "maroon"; } scope { font-size: 12pt; color: "black"; } paragraph { display: block; margin-left: 12; font-size: 12pt; color: "black"; } line { font-size: 10pt; color: "black"; } info { display: block; margin-left: 550pt; font-size: 8pt; color: "maroon"; } 1.1.5 - Profiler Tag ListerXML Tag ListerProfiler.xml benytter sig af følgende tags : Dette er lavet med nedentstående JavaScript!!! 1.1.6 - Profiler jsfunction findTagsPresent() { var arrayOfPieces = new Array() arrayOfPieces = gXMLString.split(" ") numberOfPieces = arrayOfPieces.length var tagsPresent = new Array() var tagsPresentCounter tagsPresentCounter = 0 for (i=0; i<numberOfPieces; i++) { if ((arrayOfPieces[i].indexOf("<") == 0) && (arrayOfPieces[i].indexOf(">") == (arrayOfPieces[i].length-1)) && (arrayOfPieces[i].indexOf("</") == -1)) { // If that's the case, then we've found an opening tag. var arrayLength arrayLength = tagsPresent.length var foundIt foundIt = false for (j=0; j<arrayLength; j++) { if (tagsPresent[j] == arrayOfPieces[i]) { foundIt = true break } } if (foundIt != true) { //And if that's the case, it's not already in tagsPresent tagsPresent[tagsPresentCounter] = arrayOfPieces[i] tagsPresentCounter++ } } } return tagsPresent } function writeListOfTagsPresent() { var listOfTags listOfTags = findTagsPresent() listLength = listOfTags.length document.write("<UL>") for (i=0; i<listLength; i++) { document.write("<LI>") var tagStringLength tagStringLength = listOfTags[i].length var strippedTagString strippedTagString = listOfTags[i].substring(1, (tagStringLength-1)) document.write(strippedTagString) } document.write("</UL>") } 1.2 - Interesante klasser og metoderMostly removed in the online version.
2 - Ekstern dokumentationDette er dokumentation, som vi ikke selv har kreeret, men som er hentet fra eksterne
sourcer. 2.1 - MySQLFrom http://MySQL.org/doc.html
Raw Data for Heavy Transaction Load
Raw Data for Heavy Client Load
2.2 - Web application benchmarks
METHODOLOGY
BENCHMARK CODEASP PerlScript <%@LANGUAGE=PerlScript%> <%$Response-> Write("Hello "); %> World # Apache::ASP no sessions config: # PerlSetVar NoState 1 # PerlSetVar StatScripts 0 # # Apache::ASP sessions SDBM_File # PerlSetVar StateCache 1 # PerlSetVar StateDir /tmp/hello # PerlSetVar AllowApplicationState 0 # # Apache::ASP sessions DB_File # PerlSetVar StateCache 1 # PerlSetVar StateDir /tmp/hello # PerlSetVar AllowApplicationState 0 # PerlSetVar StateDB DB_File # # testing sessions with ab: because ab does not # parse cookies, set: # PerlSetVar SessionQuery 1 # and call the test script like # script.asp?session-id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # so a new session won't be created each request. # This is more reflective of real world use where most # people use cookies, so the old session will be reused # after the first request. # ASP VBScript <%@LANGUAGE=VBScript%> <% Response.Write("Hello ") %>World C CGI Executable #include <stdio.h> void main( void ){ printf("Content-Type: text/html\n\n"); printf("Hello "); printf("World!"); } C Apache Module // alot more code to actually compile, // see modperl archives for code under subject // Re: mod_perl vs. C execution time. // From: Ask Bjoern Hansen module MODULE_VAR_EXPORT hello_module; static int hello_handler(request_rec *r) { r->content_type = "text/html"; ap_send_http_header(r); ap_rputs("Hello ",r); ap_rputs("World!",r); return OK; } Embperl [- print OUT "Hello "; -]World ## Optimized with: ## PerlSetEnv EMBPERL_OPTIONS 8083 ## PerlSetEnv EMBPERL_DEBUG 0 ## For user sessions on Win32, in %udat, config: ## PerlModule Apache::Session::Win32 ; ## PerlSetEnv EMBPERL_SESSION_CLASS Win32 ## ## Please note that print OUT is atypical use in Embperl, but is ## the mechanism similar to ASP's ->Write() that you can use ## from other modules, when decomping routines out of the main script. ePerl #!/usr/local/bin/perl <: print "Hello "; :>World HTML Hello World Jolt // enhydra compiles this into a servlet. <JOLT JAVADEF> void setJoltFields(JoltPage page) throws Exception { page.data.set("world", "World!"); } </JOLT> Hello <JOLT JAVACALL="setJoltFields"> </JOLT> (@world@) Java Servlet import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Hello extends HttpServlet { public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out; // set content type and other response header fields first response.setContentType("text/html"); // then write the data of the response out = response.getWriter(); out.println("Hello"); out.println("World"); out.close(); } } JSP Java <%@ page language='java' session='false' %><% out.print("Hello "); %>World JSP JavaScript <%@ page language='javascript' session='false' %><% out.write("Hello "); %>World Mason <%perl>print "Hello ";</%perl>World # Apache *.conf PerlRequire /tmp/mason_handler.pl AddType text/html .mas # mason_handler.pl package HTML::Mason; use HTML::Mason; my $parser = new HTML::Mason::Parser; my $interp = new HTML::Mason::Interp ( parser=>$parser, comp_root=>'/usr/local/proj/link/site/hello/', data_dir=>'/tmp' ); my = new HTML::Mason::ApacheHandler (interp=>$interp); sub handler { $ah->handle_request(shift); } 1; ModPerl Handler package Apache::bench; sub handler { my($r) = shift; $r->content_type('text/html'); $r->send_http_header(); $r->print('Hello '); $r->print('World'); 200; } 1; Perl CGI use CGI; my $cgi = CGI->new(); print $cgi->header(); print "Hello "; print "World"; Perl Raw CGI ## does not "use CGI" which can kill normal cgi apps that don't ## cache module loading the way mod_perl and perlex do. print "HTTP/1.1 200 OK\n"; print "Content-Type: text/html\n\n"; print "Hello "; print "World";PHP <?echo "Hello "?> World RXML <pike> output("Hello "); </pike>World SSI Include ## hello.static is the Hello World static html file <!--#include file="hello.static"--> Velocigen Perl <perl> print "Hello "; </perl>World |