-
Notifications
You must be signed in to change notification settings - Fork 17
Directory structure
Taranis uses the following technologies:
- Perl (5) for the server core, using mod_perl
- Javascript in the browser, with jQuery
- CSS3 in the browser (very little)
- (Perl's) Template Toolkit to template web pages
- PostgreSQL database
- Ajax JSON, browser uses Javascript, server in Perl
- Maintenance script 'taranis'
The core is written in Perl, using mod_perl inside Apache2. At the moment, that's not the preferred choice: it's much easier and faster to implement a website in Perl using an fcgi interface to a separate daemon. For instance, Mojolicious or Dancer behave better.
The server implementation can be found in "pm/" (should have been "lib/"). Modules in "pm/Taranis/Command*" implement the 'taranis' maintenance script. Modules in "pm/Taranis/Install/" support the installation process.
Templates and responses to Ajax calls may order the browser to load Javascript modules, which can be found in "webinterface/include/js/".
It's a shame that this directory mixes external javascript components with Taranis specific components. Also, at least 90% of all Javascript code is used for Ajax calls to fetch page fragments. There is too little abstraction, so far too much code to maintain.
The process looks like this:
- Some browser event gets triggered, for instance a click on a button which should open a popup.
- The browser creates a popup to later display the information in
- Javascript creates an Ajax call for "/load/analyze/assess2analyze/displayAssessAnalysis"
- server-side "scripts/index.pl" detects this is an Ajax call ("/load") and compiles on demand the file "mod_analyze/assess2analyze.pl"
- then it calls function "displayAssessAnalysis()" in that script file.
- the function returns html fragments, values, and a list of javascript libs which support the created html
- The browser's javascript loads the javascript libs and
- Then it connects the HTML fragments to the dom
- Finally, it connects some events to the loaded html
images/taranis-logo-medium.png ©NCSC-NL, License: EUPL-1.2