Continued development...
This commit is contained in:
parent
c5ec0732a1
commit
6ff2713abe
BIN
Debug/main.cpp.o
BIN
Debug/main.cpp.o
Binary file not shown.
@ -5,17 +5,19 @@ Debug/main.cpp.o: main.cpp ../ServerCore/includes ../ServerCore/EPoll.h \
|
||||
../ServerCore/IPAddress.h ../ServerCore/SessionFilter.h \
|
||||
../ServerCore/Command.h ../ServerCore/ConsoleServer.h \
|
||||
../ServerCore/TCPServerSocket.h ../ServerCore/Service.h \
|
||||
../ServerCore/CommandList.h ../ServerCore/EPoll.h \
|
||||
../ServerCore/Exception.h ../ServerCore/File.h ../ServerCore/Log.h \
|
||||
../ServerCore/IPAddress.h HTTPService.h ../ServerCore/Service.h \
|
||||
HTTPSessions.h HTTPRequest.h ../CoreUtils/PString.h \
|
||||
../CoreUtils/includes ../CoreUtils/IMFMessage.h ../CoreUtils/PString.h \
|
||||
../CoreUtils/IMFHeader.h ../CoreUtils/IMFRequest.h \
|
||||
../CoreUtils/IMFBody.h ../CoreUtils/IMFRequest.h \
|
||||
../CoreUtils/IMFResponse.h ../CoreUtils/IMFMessage.h HTTPPageList.h \
|
||||
../ServerCore/Session.h __index.h HTTPPage.h HTTPSession.h __script.h \
|
||||
../ServerCore/CommandList.h ../ServerCore/IPAddressList.h \
|
||||
../ServerCore/EPoll.h ../ServerCore/Exception.h ../ServerCore/File.h \
|
||||
../ServerCore/Log.h ../ServerCore/IPAddress.h HTTPService.h \
|
||||
../ServerCore/Service.h HTTPSessions.h HTTPRequest.h \
|
||||
../CoreUtils/PString.h ../CoreUtils/includes ../CoreUtils/IMFMessage.h \
|
||||
../CoreUtils/PString.h ../CoreUtils/IMFHeader.h \
|
||||
../CoreUtils/IMFRequest.h ../CoreUtils/IMFBody.h \
|
||||
../CoreUtils/IMFRequest.h ../CoreUtils/IMFResponse.h \
|
||||
../CoreUtils/IMFMessage.h HTTPPageList.h ../ServerCore/Session.h \
|
||||
__index.h HTTPPage.h HTTPSession.h ../JET/Variables.h __script.h \
|
||||
__editview.h __style.h __setupadmin.h __favicon_ico.h __welcome.h \
|
||||
__mainmenu.h __newview.h HTTPHandler.h ../ServerCore/Command.h
|
||||
__mainmenu.h __newview.h __configure.h HTTPHandler.h \
|
||||
../ServerCore/Command.h
|
||||
|
||||
../ServerCore/includes:
|
||||
|
||||
@ -51,6 +53,8 @@ Debug/main.cpp.o: main.cpp ../ServerCore/includes ../ServerCore/EPoll.h \
|
||||
|
||||
../ServerCore/CommandList.h:
|
||||
|
||||
../ServerCore/IPAddressList.h:
|
||||
|
||||
../ServerCore/EPoll.h:
|
||||
|
||||
../ServerCore/Exception.h:
|
||||
@ -99,6 +103,8 @@ HTTPPage.h:
|
||||
|
||||
HTTPSession.h:
|
||||
|
||||
../JET/Variables.h:
|
||||
|
||||
__script.h:
|
||||
|
||||
__editview.h:
|
||||
@ -115,6 +121,8 @@ __mainmenu.h:
|
||||
|
||||
__newview.h:
|
||||
|
||||
__configure.h:
|
||||
|
||||
HTTPHandler.h:
|
||||
|
||||
../ServerCore/Command.h:
|
||||
|
@ -12,21 +12,16 @@ namespace http {
|
||||
coreutils::PString request1(request);
|
||||
HTTPRequest httpRequest(request1);
|
||||
|
||||
core::Log(core::LOG_DEBUG_2) << "Host value is " << httpRequest.getHeader("Host");
|
||||
core::Log(core::LOG_DEBUG_3) << "Request: " << request;
|
||||
|
||||
HTTPSession *httpSession = ((HTTPService &)session->service).httpSessions.findSessionByHeader(httpRequest);
|
||||
|
||||
std::stringstream content;
|
||||
if(((HTTPService &)session->service).pageList.processRequest(httpRequest.request.getURI(), session, httpSession, httpRequest, content)) {
|
||||
httpRequest.response.setProtocol(httpRequest.request.getProtocol());
|
||||
if(((HTTPService &)session->service).pageList.processRequest(httpRequest, session, httpSession, content)) {
|
||||
httpRequest.response.setCode("200");
|
||||
httpRequest.response.setText("OK");
|
||||
data << httpRequest.response.getResponse(content.str());
|
||||
}
|
||||
|
||||
else {
|
||||
httpRequest.response.setProtocol(httpRequest.request.getProtocol());
|
||||
httpRequest.response.setCode("404");
|
||||
httpRequest.response.setText("Not Found");
|
||||
data << httpRequest.response.getResponse(content.str());
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
namespace http {
|
||||
|
||||
bool HTTPPageList::processRequest(std::string request, core::Session *session, HTTPSession *httpSession, HTTPRequest &httpRequest, std::stringstream &data) {
|
||||
bool HTTPPageList::processRequest(HTTPRequest &httpRequest, core::Session *session, HTTPSession *httpSession, std::stringstream &data) {
|
||||
httpRequest.response.setProtocol(httpRequest.request.getProtocol());
|
||||
for(auto *page : pages) {
|
||||
if(page->check(request)) {
|
||||
page->processCommand(request, session, httpSession, httpRequest, data);
|
||||
if(page->check(httpRequest.request.getURI())) {
|
||||
page->processCommand(httpRequest.request.getURI(), session, httpSession, httpRequest, data);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -15,7 +16,6 @@ namespace http {
|
||||
void HTTPPageList::add(HTTPPage &page, std::string name) {
|
||||
page.name = name;
|
||||
pages.push_back(&page);
|
||||
|
||||
}
|
||||
|
||||
void HTTPPageList::remove(HTTPPage &page) {}
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "__welcome.h"
|
||||
#include "__mainmenu.h"
|
||||
#include "__newview.h"
|
||||
#include "__configure.h"
|
||||
|
||||
namespace http {
|
||||
|
||||
@ -28,9 +29,10 @@ namespace http {
|
||||
add(welcome, "/welcome");
|
||||
add(mainmenu, "/mainmenu");
|
||||
add(newview, "/newview");
|
||||
add(configure, "/configure");
|
||||
}
|
||||
|
||||
bool processRequest(std::string request, core::Session *session, HTTPSession *httpSession, HTTPRequest &httpRequest, std::stringstream &data);
|
||||
bool processRequest(HTTPRequest &httpRequest, core::Session *session, HTTPSession *httpSession, std::stringstream &data);
|
||||
|
||||
void add(HTTPPage &page, std::string name = "");
|
||||
|
||||
@ -49,6 +51,7 @@ namespace http {
|
||||
__welcome welcome;
|
||||
__mainmenu mainmenu;
|
||||
__newview newview;
|
||||
__configure configure;
|
||||
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,7 @@ CurrentFileName :=
|
||||
CurrentFilePath :=
|
||||
CurrentFileFullPath :=
|
||||
User :=Brad Arant
|
||||
Date :=10/07/19
|
||||
Date :=01/08/19
|
||||
CodeLitePath :=/home/bradarant/.codelite
|
||||
LinkerName :=/usr/bin/x86_64-linux-gnu-g++
|
||||
SharedObjectLinkerName :=/usr/bin/x86_64-linux-gnu-g++ -shared -fPIC
|
||||
@ -36,7 +36,7 @@ ObjectsFileList :="HTTPServer.txt"
|
||||
PCHCompileFlags :=
|
||||
MakeDirCommand :=mkdir -p
|
||||
LinkOptions :=
|
||||
IncludePath := $(IncludeSwitch). $(IncludeSwitch). $(IncludeSwitch)../ServerCore/ $(IncludeSwitch)../CoreUtils
|
||||
IncludePath := $(IncludeSwitch). $(IncludeSwitch). $(IncludeSwitch)../ServerCore/ $(IncludeSwitch)../CoreUtils $(IncludeSwitch)../JET
|
||||
IncludePCH :=
|
||||
RcIncludePath :=
|
||||
Libs := $(LibrarySwitch)ServerCore $(LibrarySwitch)CoreUtils $(LibrarySwitch)pthread $(LibrarySwitch)uuid
|
||||
|
@ -24,6 +24,7 @@
|
||||
<File Name="__mainmenu.h"/>
|
||||
<File Name="__newview.h"/>
|
||||
<File Name="HTTPRequest.h"/>
|
||||
<File Name="__configure.h"/>
|
||||
</VirtualDirectory>
|
||||
<Dependencies Name="Debug"/>
|
||||
<Dependencies Name="Release"/>
|
||||
@ -42,6 +43,7 @@
|
||||
<IncludePath Value="."/>
|
||||
<IncludePath Value="../ServerCore/"/>
|
||||
<IncludePath Value="../CoreUtils"/>
|
||||
<IncludePath Value="../JET"/>
|
||||
</Compiler>
|
||||
<Linker Options="" Required="yes">
|
||||
<LibraryPath Value="../ServerCore/Debug/"/>
|
||||
|
@ -6,7 +6,6 @@ namespace http {
|
||||
sessionId = "";
|
||||
}
|
||||
|
||||
|
||||
HTTPSession::HTTPSession(std::string sessionId) {
|
||||
this->sessionId = sessionId;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define __HTTPSession_h__
|
||||
|
||||
#include "includes"
|
||||
#include "Variables.h"
|
||||
|
||||
namespace http {
|
||||
|
||||
@ -12,13 +13,12 @@ namespace http {
|
||||
HTTPSession(std::string sessionId);
|
||||
std::string getSessionId();
|
||||
|
||||
jet::Variables sessionVariables;
|
||||
jet::Variables cgiFormVariables;
|
||||
// jet::Variables sessionVariables;
|
||||
// jet::Variables cgiFormVariables;
|
||||
|
||||
private:
|
||||
std::string sessionId;
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
41
JETServer Concepts.aux
Normal file
41
JETServer Concepts.aux
Normal file
@ -0,0 +1,41 @@
|
||||
\relax
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Basic Concepts}{5}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.1}Sessions}{5}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.2}Views}{5}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}View Data Sources}{6}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.3}View Components}{6}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.4}Forms}{7}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.5}Image Library}{7}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.6}Work Flow Networks}{7}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.7}Requests}{7}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.8}Business Entities}{8}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.9}Microservice Methods}{8}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.10}URIs}{9}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {1.11}Packages}{9}}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {2}ServerCore Network Platform}{11}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {3}User Interfaces and Tools}{13}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3.1}View Layout Editor}{13}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3.2}Business Entity Editor}{13}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3.3}Storyboard Editor}{14}}
|
||||
\@writefile{toc}{\contentsline {chapter}{\numberline {4}JET Tag Reference}{15}}
|
||||
\@writefile{lof}{\addvspace {10\p@ }}
|
||||
\@writefile{lot}{\addvspace {10\p@ }}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.1}CALL}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.2}COMMENT}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.3}DATABASE}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.4}EXCLUDE}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.5}EXTRACT}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.6}FOR}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.7}IF.. ELSE}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.8}IFNOROW... ELSE}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.9}IFROW... ELSE}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.10}SYSTEM}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.11}TAG}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.12}WHILE}{16}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4.13}WHILEROW}{16}}
|
101
JETServer Concepts.log
Normal file
101
JETServer Concepts.log
Normal file
@ -0,0 +1,101 @@
|
||||
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2019.5.23) 22 JUL 2019 15:39
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
%&-line parsing enabled.
|
||||
**"JETServer Concepts.tex"
|
||||
(./JETServer Concepts.tex
|
||||
LaTeX2e <2017-04-15>
|
||||
Babel <3.18> and hyphenation patterns for 5 language(s) loaded.
|
||||
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
|
||||
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
|
||||
(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo
|
||||
File: bk10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
|
||||
)
|
||||
\c@part=\count79
|
||||
\c@chapter=\count80
|
||||
\c@section=\count81
|
||||
\c@subsection=\count82
|
||||
\c@subsubsection=\count83
|
||||
\c@paragraph=\count84
|
||||
\c@subparagraph=\count85
|
||||
\c@figure=\count86
|
||||
\c@table=\count87
|
||||
\abovecaptionskip=\skip41
|
||||
\belowcaptionskip=\skip42
|
||||
\bibindent=\dimen102
|
||||
)
|
||||
(./JETServer Concepts.aux)
|
||||
\openout1 = `"JETServer Concepts.aux"'.
|
||||
|
||||
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
|
||||
LaTeX Font Info: ... okay on input line 3.
|
||||
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
|
||||
LaTeX Font Info: ... okay on input line 3.
|
||||
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
|
||||
LaTeX Font Info: ... okay on input line 3.
|
||||
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
|
||||
LaTeX Font Info: ... okay on input line 3.
|
||||
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
|
||||
LaTeX Font Info: ... okay on input line 3.
|
||||
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
|
||||
LaTeX Font Info: ... okay on input line 3.
|
||||
[1
|
||||
|
||||
|
||||
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2
|
||||
|
||||
] (./JETServer Concepts.toc
|
||||
LaTeX Font Info: External font `cmex10' loaded for size
|
||||
(Font) <7> on input line 2.
|
||||
LaTeX Font Info: External font `cmex10' loaded for size
|
||||
(Font) <5> on input line 2.
|
||||
)
|
||||
\tf@toc=\write3
|
||||
\openout3 = `"JETServer Concepts.toc"'.
|
||||
|
||||
[3] [4]
|
||||
Chapter 1.
|
||||
[5
|
||||
|
||||
] [6] [7] [8] [9] [10
|
||||
|
||||
]
|
||||
Chapter 2.
|
||||
[11] [12
|
||||
|
||||
]
|
||||
Chapter 3.
|
||||
|
||||
Underfull \vbox (badness 7759) has occurred while \output is active []
|
||||
|
||||
[13]
|
||||
[14]
|
||||
Chapter 4.
|
||||
|
||||
Underfull \vbox (badness 10000) has occurred while \output is active []
|
||||
|
||||
[15
|
||||
|
||||
]
|
||||
[16] (./JETServer Concepts.aux) )
|
||||
Here is how much of TeX's memory you used:
|
||||
247 strings out of 494880
|
||||
2776 string characters out of 6179601
|
||||
54663 words of memory out of 5000000
|
||||
3647 multiletter control sequences out of 15000+600000
|
||||
7069 words of font info for 25 fonts, out of 8000000 for 9000
|
||||
36 hyphenation exceptions out of 8191
|
||||
23i,4n,19p,479b,141s stack positions out of 5000i,500n,10000p,200000b,80000s
|
||||
</usr/share/texlive/texmf-dist/fonts/type1/pub
|
||||
lic/amsfonts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/am
|
||||
sfonts/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts
|
||||
/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cms
|
||||
l10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pf
|
||||
b>
|
||||
Output written on "JETServer Concepts.pdf" (16 pages, 100694 bytes).
|
||||
PDF statistics:
|
||||
76 PDF objects out of 1000 (max. 8388607)
|
||||
52 compressed objects within 1 object stream
|
||||
0 named destinations out of 1000 (max. 500000)
|
||||
1 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||
|
BIN
JETServer Concepts.pdf
Normal file
BIN
JETServer Concepts.pdf
Normal file
Binary file not shown.
BIN
JETServer Concepts.synctex.gz
Normal file
BIN
JETServer Concepts.synctex.gz
Normal file
Binary file not shown.
211
JETServer Concepts.tex
Normal file
211
JETServer Concepts.tex
Normal file
@ -0,0 +1,211 @@
|
||||
\documentclass[10pt]{book}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{titlepage}
|
||||
\begin{center}
|
||||
\vspace*{1cm}
|
||||
|
||||
\textbf{JETServer Concepts}
|
||||
|
||||
\vspace{0.5cm}
|
||||
JETServer Concepts
|
||||
|
||||
\vspace{1.5cm}
|
||||
|
||||
\textbf{Bradford M. Arant Sr.}
|
||||
|
||||
\vfill
|
||||
|
||||
A whitepaper on an advanced microservices development environment\\
|
||||
for the cloud
|
||||
|
||||
\vspace{0.8cm}
|
||||
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\chapter{Basic Concepts}
|
||||
|
||||
In this chapter we will cover the components that make up the JETServer environment.
|
||||
|
||||
\section{Sessions}
|
||||
|
||||
Sessions provide a congruent and flowing state management for a connected browser. The states of various elements are stored and kept as a part of the session information so a browser refresh will not disrupt the work flow intended by the application logic.
|
||||
|
||||
The Session Id is maintained on the browser as a cookie. The cookie is issued to the browser on the very first response from the first request to the server.
|
||||
|
||||
All API interactions are identified as being part of a session. A browser can only have one session per domain. Sessions can support multiple window instances and is basically the authorization token. The server can issue a new Session Id in a response to the browser at any time which will reset the cookie being created to maintin the Session Id.
|
||||
|
||||
The session mechanism will attempt to maintain a \emph{state} of the interaction of the request objects present in the view port of the browser. Session variables also maintain a server based data environment for the session. Session variables are available to the views and microservice methods using the \$[:\emph{variable-name}] syntax.
|
||||
|
||||
As requests are placed the request URI is saved to the http session. If needed, perhaps because of a refresh, the page state can be recreated from the saved URI list. Other data and state information can be stored to the session as well.
|
||||
|
||||
\section{Views}
|
||||
|
||||
Views are document sections that can be placed into the page. Views can be static or can contain dynamic data elements. Views can also contain other views in a nested fashion.
|
||||
|
||||
Views are implemented as <DIV> elements within the HTML document structure.
|
||||
|
||||
Views can be used to define overall page layouts by putting other Requests into a view.
|
||||
|
||||
Other more advanced graphical elements can be created by combining views into a 'view group'.
|
||||
|
||||
Views have layout style specifications for the elements contained within them. Absolute layout allows a WYSIWYG layout with precise pixel location. Linear layouts line things up either vertically or horizontally. Proportional layouts use percentages so that they scale and constraint layouts are similar but offer greater flexibility in controlling the expansion/compression of the elements in the display area.
|
||||
|
||||
Views that have URIs attached to them are considered document level views and will be triggered when the browser makes a get request to the URI.
|
||||
|
||||
TABLE elements can also be specified in a view.
|
||||
|
||||
Javascript code can be attached to components within the view or to the view itself. Custom components can be built that plug into the layout tool environment and can be designed into the application environment with prebuilt behaviors. Complex display control can be constructed using these tools.
|
||||
|
||||
\subsection{View Data Sources}
|
||||
|
||||
Data is available to be displayed and represented that is only available when the views are rendered. Sources of this data are as follows:
|
||||
|
||||
\begin{enumerate}
|
||||
|
||||
\item Set variable performed in the view code or from a previously run process in the same transaction to name a piece of data for later use.
|
||||
|
||||
\item CGI data received in the request as form-data is available to the request handler. Use the [:variable-name] syntax to ensure that CGI data is the source of the data.
|
||||
|
||||
\item Session variables provide access to persistent storage that survives for the duration of the session.
|
||||
|
||||
\item A data result table that was retrieved from an mySQL buffer.
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
Standard variable syntax of just using variable-name will perform a search for a variable regardless of its type but prioritized by the following order:
|
||||
|
||||
|
||||
|
||||
|
||||
\section{View Components}
|
||||
|
||||
Views may utilize HTML constructs to assemble part of its implementation. The use of <IMG>, <FORM>, <INPUT>, <TEXTAREA> and a significant list of other items can be contained within a view.
|
||||
|
||||
The view can contain javascript that is used to interact with these components.
|
||||
|
||||
\section{Forms}
|
||||
|
||||
Using the INPUT tag within a FORM tag allows the submission of the related form data to the server to be processed as a POST request. A BUTTON can perform this activity and request a microservices method and pass the form data along as a parameter to the request.
|
||||
|
||||
BUTTONs are attached to server side microservice methods.
|
||||
|
||||
\section{Image Library}
|
||||
|
||||
Significant content can be provided in the form of images and are used as part of a design. The image library is not intended to be a photo cataloguing function but is designed to provide image support to the view elements such as logos. Catalogues can be accomplished through other means and usually tie into an external database system of some kind.
|
||||
|
||||
\section{Work Flow Networks}
|
||||
|
||||
JETServer is a complete work flow engine capable of delivering extremely sophisticated work flow requirements on various business data sets. Performing various activities on business entities creates needs for scheduling follow-ups and other automatic processed based upon very long time delays or other triggers that cause the need for more immediate action.
|
||||
|
||||
Work flow processes are initiated on a particular business entity and stick to the entity throughout the definition of the work flow process. At any one time there could be many work flow tags running on any one piece of data at a time.
|
||||
|
||||
Work flow processes can be initiated on a button press using the initiateWorkFlow API call. They are attached to a business entity and they may trigger other work flow processe on other entities related to various activities. Work flow process are very powerful trackers where things otherwise may slip through the cracks. Watch dog work flows can be ceated to ensure all activities are being handled and performed to avoid stale data situations.
|
||||
|
||||
Work Flow Networks are developed using a graphical flow chart style workbench that allows the business process analyst to snap together activities that are to be performed by automated process and/or user interaction. Work Queue objects are available to design work lists for users to interact with items requiring intervention. Users can review various work queues and perform the requested activities to complete the work flow requirements.
|
||||
|
||||
\section{Requests}
|
||||
|
||||
Requests are view 'placeholders' that can be used to make a request to the server and have the response be displayed in the viewport of the request. Requests are the fundamental building block to creating extended content pages.
|
||||
|
||||
When specifying a request in a view the URI must be specified. As the view is rendered to the response buffer on the server it will submit the request to the specified URI and when the response is received the placeholder will be replaced with the response data.
|
||||
|
||||
The requests made to the server are microservices method calls. They are not the URIs mentioned in other parts of this document and are intended to address the microservice method's address space. Since JETServer uses a technique of providing the URI to the microservice method it can provide a unique link designed for that session only with a timestamp embedded resulting in a secure interaction environment that eliminates stale access to API calls.
|
||||
|
||||
Requests are implemented as <DIV> elements with an id tag that provides the name of the request.
|
||||
|
||||
A request response will contain HTML document data that will be replaced as the innerHTML of the request 'placeholder'. Variables specified in the view will be rendered and the HTML is attached to the document structure where the request exists.
|
||||
|
||||
The document content of the response may contain a script tag which contains javascript that executes immediately after the HTML is attached to the document.
|
||||
|
||||
\section{Business Entities}
|
||||
|
||||
Business entities provide the framework in which to hang all thiese views and logic. Business entities allow for the description of account, customers, products, inventories and any other associated data elements that may be used in business logic consideration.
|
||||
|
||||
Instances of business entities are considered entity objects or entity instances. Interaction with business entities is performed using an object style interface and JETServer uses mySQL underneath to perform the persistent storage operations.
|
||||
|
||||
Views are associated with a business entity combined with a microservice method to create functionality.
|
||||
|
||||
\section{Microservice Methods}
|
||||
|
||||
JETServer uses a microservices style architecture and provides access to backend services through an API set that is designed to interact with the various view components of the application.
|
||||
|
||||
Microservice methods are oriented around the business entity structure and are used to provide information query handling as well as the add, update and delete functionality of new business entity instances.
|
||||
|
||||
Microservice methods can also be used to provide lists of objects that can be further used in modifying or removing instances.
|
||||
|
||||
Applications can be designed that employee various business logic entities. Views that define forms for adding new customers or information on books or some other data entity can be specified and attached to the business entity. Common lists of objects that have filters applied can be retrieved and views selected for presentation of the data.
|
||||
|
||||
\section{URIs}
|
||||
|
||||
A URI provides an external access string to be mapped to a site view. When a browser submits a GET request to a URI that is mapped to the server then it will return the resulting site marker forcing the session to check its current state and send the appropriate information.
|
||||
|
||||
The URI may be specified as \emph{complete} or \emph{partial}. Partial URI specification will match the pattern check but will also pass additional parameters not specified into the view so that it may parse the content and provide the appropriate display result.
|
||||
|
||||
\section{Packages}
|
||||
|
||||
Packages provide extensibility to the JETServer environment by allowing custom tools, applications, themes, templates, entities and components to be added to the server and utilized in the presentation. Installed packages are provided a root namespace and all related content must be contained and extended by this root path namespace.
|
||||
|
||||
Packages can contain many things including full application request flows that can be integrated into other work flows or used as is.
|
||||
|
||||
Local code is setup automatically in a default package named 'local'. The local package is always searched first when resolving names to finding objects.
|
||||
|
||||
The system itself maintains a package space which is where the tools and control logic are kept. This space is static within the JETServer executable and is not modifiable.
|
||||
|
||||
You can create an empty package and give it a namespace and write custom items into that package space. This package space can then be saved and distributed on the JETStore if it provides useful utility to others.
|
||||
|
||||
It is intended to provide a JETStore for the user to browse for registered packages of all kinds from themes to full application work flows. It is hopeful that someday there will be a rich environment for providing tools and applications for the JETServer system.
|
||||
|
||||
\chapter{ServerCore Network Platform}
|
||||
|
||||
JETServer is utilizing the ServerCore library to implement the TCP networking requirements. Using the Linux operating system and the epoll system architecture JETServer delivers high performance networking with extreme control.
|
||||
|
||||
Written in C++ JETServer is designed for performance at all levels of the technical implementation. Using the core namespace along with the http namespace to create the basic core functionality JETServer provides a framework in which to create complete work flow patterns required to build complex applications.
|
||||
|
||||
\chapter{User Interfaces and Tools}
|
||||
|
||||
\section{View Layout Editor}
|
||||
|
||||
The View Layout Editor provides a WYSIWYG interface for combining HTML elements to formulate the presentation. Style sheet activities and parameters are automatically maintained as elements are manipulated in a graphical environment. Previews provided by various automatic layout objects including absolute mode which allows WYSIWYG placement of elements.
|
||||
|
||||
Development of a theme editor provides ability to allow user to set various themes for the graphical elements of the design. Ability to view the layouts using various theme data configurations provides a useful thematic testing environment.
|
||||
|
||||
The designed view layouts can be saved to create a view library and are usually associated to an entity and placed into the workflow storyboard.
|
||||
|
||||
In order to create a subfunctionlity within a view you can add the request object into the view layouts. As these layouts are rendered to the browser they willmake their subsequent requests to the server keeping the event chain alive for the initiating or root request object.
|
||||
|
||||
\section{Business Entity Editor}
|
||||
|
||||
The Business Entity Editor provides a work management area to create and maintain business entity related data and the relationship between them. A repository provides for linking together data description elements with views and work flow elements to create a feature rich base to construct highly capable work flows for business and function.
|
||||
|
||||
\section{Storyboard Editor}
|
||||
|
||||
The Storyboard Editor provides the designer the ability to layout the pages and their components and design the flow relationships between the elements. As designs require extending the control elements of various views the storyboard editor keeps track of the request branching and allows the designer to maintain control over the hierarchical flow elements of the UI design.
|
||||
|
||||
The design approach provides the ability to layout \emph{request} objects and associate various URI elements to these internal request objects to generate a complete presentation of the elements.
|
||||
|
||||
Various views can be layed out in the storyboard. Storyboards are based around the request object as each request object will perform a request activity which may result in a chain of further request events.
|
||||
|
||||
\chapter{JET Tag Reference}
|
||||
|
||||
JET tags can be used within views as well as microservice methods to build business logic.
|
||||
|
||||
\section{CALL}
|
||||
\section{COMMENT}
|
||||
\section{DATABASE}
|
||||
\section{EXCLUDE}
|
||||
\section{EXTRACT}
|
||||
\section{FOR}
|
||||
\section{IF.. ELSE}
|
||||
\section{IFNOROW... ELSE}
|
||||
\section{IFROW... ELSE}
|
||||
\section{SYSTEM}
|
||||
\section{TAG}
|
||||
\section{WHILE}
|
||||
\section{WHILEROW}
|
||||
|
||||
\end{document}
|
32
JETServer Concepts.toc
Normal file
32
JETServer Concepts.toc
Normal file
@ -0,0 +1,32 @@
|
||||
\contentsline {chapter}{\numberline {1}Basic Concepts}{5}
|
||||
\contentsline {section}{\numberline {1.1}Sessions}{5}
|
||||
\contentsline {section}{\numberline {1.2}Views}{5}
|
||||
\contentsline {subsection}{\numberline {1.2.1}View Data Sources}{6}
|
||||
\contentsline {section}{\numberline {1.3}View Components}{6}
|
||||
\contentsline {section}{\numberline {1.4}Forms}{7}
|
||||
\contentsline {section}{\numberline {1.5}Image Library}{7}
|
||||
\contentsline {section}{\numberline {1.6}Work Flow Networks}{7}
|
||||
\contentsline {section}{\numberline {1.7}Requests}{7}
|
||||
\contentsline {section}{\numberline {1.8}Business Entities}{8}
|
||||
\contentsline {section}{\numberline {1.9}Microservice Methods}{8}
|
||||
\contentsline {section}{\numberline {1.10}URIs}{9}
|
||||
\contentsline {section}{\numberline {1.11}Packages}{9}
|
||||
\contentsline {chapter}{\numberline {2}ServerCore Network Platform}{11}
|
||||
\contentsline {chapter}{\numberline {3}User Interfaces and Tools}{13}
|
||||
\contentsline {section}{\numberline {3.1}View Layout Editor}{13}
|
||||
\contentsline {section}{\numberline {3.2}Business Entity Editor}{13}
|
||||
\contentsline {section}{\numberline {3.3}Storyboard Editor}{14}
|
||||
\contentsline {chapter}{\numberline {4}JET Tag Reference}{15}
|
||||
\contentsline {section}{\numberline {4.1}CALL}{16}
|
||||
\contentsline {section}{\numberline {4.2}COMMENT}{16}
|
||||
\contentsline {section}{\numberline {4.3}DATABASE}{16}
|
||||
\contentsline {section}{\numberline {4.4}EXCLUDE}{16}
|
||||
\contentsline {section}{\numberline {4.5}EXTRACT}{16}
|
||||
\contentsline {section}{\numberline {4.6}FOR}{16}
|
||||
\contentsline {section}{\numberline {4.7}IF.. ELSE}{16}
|
||||
\contentsline {section}{\numberline {4.8}IFNOROW... ELSE}{16}
|
||||
\contentsline {section}{\numberline {4.9}IFROW... ELSE}{16}
|
||||
\contentsline {section}{\numberline {4.10}SYSTEM}{16}
|
||||
\contentsline {section}{\numberline {4.11}TAG}{16}
|
||||
\contentsline {section}{\numberline {4.12}WHILE}{16}
|
||||
\contentsline {section}{\numberline {4.13}WHILEROW}{16}
|
37
__configure.h
Normal file
37
__configure.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef ____configure_h__
|
||||
#define ____configure_h__
|
||||
|
||||
namespace http {
|
||||
|
||||
class __configure : public HTTPPage {
|
||||
|
||||
int processCommand(std::string request, core::Session *session, HTTPSession *httpSession, HTTPRequest &httpRequest, std::stringstream &data) override {
|
||||
|
||||
data << "<form name=\"configure\" action=\"setupadmin\" method=\"POST\">" << std::endl;
|
||||
data << " <div class=\"window\"><h1>System Configuration</h1>" << std::endl;
|
||||
data << "" << std::endl;
|
||||
data << " <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">" << std::endl;
|
||||
data << " <div>Web Domain Name:</div>" << std::endl;
|
||||
data << " <input type=\"text\" name=\"domainname\" size=\"30\">" << std::endl;
|
||||
data << " </div>" << std::endl;
|
||||
data << " <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">" << std::endl;
|
||||
data << " <div>View Directory:</div>" << std::endl;
|
||||
data << " <input type=\"text\" name=\"viewdirectory\" size=\"30\">" << std::endl;
|
||||
data << " </div>" << std::endl;
|
||||
data << " <div style=\"border: 1pt solid white; padding: 3px; margin-bottom: 5px;\">" << std::endl;
|
||||
data << " <div>Image Library Directory:</div>" << std::endl;
|
||||
data << " <input type=\"password\" name=\"imagelibrary\" size=\"30\">" << std::endl;
|
||||
data << " </div>" << std::endl;
|
||||
data << " <br><br>Session Id: " << httpSession->getSessionId() << "" << std::endl;
|
||||
data << " <br>The configuration has not yet been established for this web site.</p>" << std::endl;
|
||||
data << " <input type=\"button\" onmousedown=\"process('/mainmenu','setupadmin', 'main'); return true;\" name=\"button1\" value=\"Update Configuration\">" << std::endl;
|
||||
data << " </div></form>" << std::endl;
|
||||
|
||||
httpRequest.response.addHeader("Content-Type", "text/html");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -14,10 +14,11 @@ namespace http {
|
||||
std::stringstream &data) override {
|
||||
|
||||
data << "<div>" << std::endl;
|
||||
data << " <div style=\"background: #448; color: #fff; width: 400px; margin: 5px; padding: 5px;\">" << std::endl;
|
||||
data << " <div style=\"background: #448; color: #fff; width: 400px; margin: 5px; padding: 5px; cursor: pointer;\"" << std::endl;
|
||||
data << " onmousedown=\"getPage('/configure','main');\">" << std::endl;
|
||||
data << " <span>Setup Server Parameters</span>" << std::endl;
|
||||
data << " </div>" << std::endl;
|
||||
data << " <div style=\"background: #448; color: #fff; width: 400px; margin: 5px; padding: 5px;\"" << std::endl;
|
||||
data << " <div style=\"background: #448; color: #fff; width: 400px; margin: 5px; padding: 5px; cursor: pointer;\"" << std::endl;
|
||||
data << " onmousedown=\"getPage('/newview','main');\">" << std::endl;
|
||||
data << " <span>View and Layout Designer</span>" << std::endl;
|
||||
data << " </div>" << std::endl;
|
||||
|
@ -100,7 +100,7 @@ namespace http {
|
||||
data << " " << std::endl;
|
||||
data << " </div> " << std::endl;
|
||||
data << "" << std::endl;
|
||||
data << " <script>alert('Loading...'); init(); return true;</script>" << std::endl;
|
||||
data << " <script>init();</script>" << std::endl;
|
||||
|
||||
httpRequest.response.addHeader("Content-Type", "text/html");
|
||||
return 0;
|
||||
|
22
__script.h
22
__script.h
@ -21,8 +21,7 @@ namespace http {
|
||||
|
||||
data << "function getPage(url, receiver) {" << std::endl;
|
||||
data << " serverSend(url, \"GET\", receiver, null, function(data, receiver) {" << std::endl;
|
||||
data << " var panel1 = document.getElementById(receiver);" << std::endl;
|
||||
data << " panel1.innerHTML = data;" << std::endl;
|
||||
data << " insertAndExecute(receiver, data);" << std::endl;
|
||||
data << " });" << std::endl;
|
||||
data << "}" << std::endl;
|
||||
|
||||
@ -30,19 +29,18 @@ namespace http {
|
||||
data << " var formElement = document.querySelector(\"form[name='\" + formName + \"']\");" << std::endl;
|
||||
data << " var formData = new FormData(formElement);" << std::endl;
|
||||
data << " serverSend(url, \"POST\", receiver, formData, function(data, receiver) {" << std::endl;
|
||||
data << " var panel1 = document.getElementById(receiver);" << std::endl;
|
||||
data << " panel1.innerHTML = data;" << std::endl;
|
||||
data << " insertAndExecute(receiver, data);" << std::endl;
|
||||
data << " });" << std::endl;
|
||||
data << "}" << std::endl;
|
||||
|
||||
// data << "var setInnerHTML = function(elm, html) {" << std::endl;
|
||||
// data << " lm.innerHTML = html;" << std::endl;
|
||||
// data << " Array.from(elm.querySelectorAll("script")).forEach( oldScript => {" << std::endl;
|
||||
// data << " const newScript = document.createElement("script");" << std::endl;
|
||||
// data << " Array.from(oldScript.attributes)" << std::endl;
|
||||
// data << " .forEach( attr => newScript.setAttribute(attr.name, attr.value) );" << std::endl;
|
||||
// data << " newScript.appendChild(document.createTextNode(oldScript.innerHTML));" << std::endl;
|
||||
// data << " oldScript.parentNode.replaceChild(newScript, oldScript);" << std::endl;
|
||||
data << "function insertAndExecute(id, text) {" << std::endl;
|
||||
data << " idresolved = document.getElementById(id);" << std::endl;
|
||||
data << " idresolved.innerHTML = text;" << std::endl;
|
||||
data << " var script = idresolved.getElementsByTagName(\"script\");" << std::endl;
|
||||
data << " for(var ix=0;ix<script.length;ix++) {" << std::endl;
|
||||
data << " eval(script[ix].text);" << std::endl;
|
||||
data << " }" << std::endl;
|
||||
data << "}" << std::endl;
|
||||
|
||||
httpRequest.response.addHeader("Content-Type", "text/javascript");
|
||||
|
||||
|
49
game inventory concept.tex
Normal file
49
game inventory concept.tex
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
Skills
|
||||
Skilled Objects
|
||||
Items
|
||||
|
||||
The system provides for a mechanism to exercise various skills which is a script structure. Exercising a skill creates an interaction between a player initiating the skill upon another object which can be another gameobject which may even be created as a result f exercising the skill.
|
||||
|
||||
In the functioning of exercising a 'skill' there is a process that occurs and the definition of the skill will determine which elements are used and
|
||||
|
||||
The technique of building this out will be based upon abstractions. Action abstractions can be, but not limited to, the following:
|
||||
|
||||
1. Exchanging an item with another player or NPC.
|
||||
2. Exchanging part of an item if allowed by the item. Currency can be implemented in this abstraction.
|
||||
3. Casting a spell.
|
||||
4. Battle with another player.
|
||||
5. Teaching a skill to another play or NPC.
|
||||
6. Building an object from raw materials like smithing, cooking, etc.
|
||||
7.
|
||||
|
||||
Each of these are abstractions of the process of initiating a skill.
|
||||
|
||||
Skills are also objects that can be passed from player to player or to other gameobjects. This means that you can 'teach' the skill to another entity. Skills can be also very instantaeous or they may take alot of time to go through their processes. In this manner skills can have timed values associated with them.
|
||||
|
||||
Do we need an overloading functionality so the same skill selection can run on different targets and will run different skill based upon target?
|
||||
|
||||
Steps of skill resolution.
|
||||
|
||||
Is target accepted by this skill.
|
||||
Summate whether the required elements exist. If not then start denied skill.
|
||||
|
||||
|
||||
|
||||
Add newly created item to inventory or drop at location displacement.
|
||||
|
||||
\chapter{Performing Actions}
|
||||
In game the player will right click on a 'target'. The target will present a list of actions that can be performed on the target in relation to the player.
|
||||
|
||||
|
||||
\chapter{Tables}
|
||||
The game inventory of stuff is defined in a table called 'items'. z
|
||||
|
||||
An 'item_instance' table is created that is used as a many-to-many cross reference table to tie ownership of object instances to gameobjects such as Players and NPCs.
|
||||
|
||||
A 'npcs' table is created to define the names and locations of the NPCs in the game.
|
||||
|
||||
|
||||
|
||||
|
||||
|
7430
jetserverblockdiagram.tex
Normal file
7430
jetserverblockdiagram.tex
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user