[commits] [Wiki] changed: Doc/Dev/HordeAjaxApplications

Ralf Lang (B1 Systems GmbH) lang at b1-systems.de
Wed Nov 8 08:00:44 UTC 2017


rlang  Wed, 08 Nov 2017 08:00:44 +0000

Modified page: https://wiki.horde.org/Doc/Dev/HordeAjaxApplications
New Revision:  10
Change log:  Some details about hermes/SPAs

@@ -119,5 +119,16 @@

  * When do I use a service/ajax.php handler as opposed to a  
rampage.php Controller ?
  * Imples seem to be used to return snippets? "Don't use imples; they  
are archaic and can generally be rewritten using the Ajax framework  
instead"

+++ Single Page Applications (Hermes, Imp, Kronolith)

+Single Page Applications generally try to keep the user in one  
location. Different "pages" of the app are simulated by using hash  
anchors appended to the url:  
http://www.horde.org/application/index.php#newCalendar
+
+
+
+The javascript of the application responds to these URLs by unhiding  
the appropriate part of the HTML and filling it with data, possibly  
collected via AJAX calls to the Horde server application. As long as  
the browser does not reload, application state is present in the local  
javascript/dom. The local javascript application sends messages to the  
server and receives answers - for example "delete item FOO - OK" or  
"send me the current item list - Here is the list".
+
+In Kronolith and Hermes,
+Static snippets of HTML like dialogs (without the data) are called  
slices - they live in /template/ and have a .inc filename extension.
+
+A function go(fullloc, data) allows to change into different screens.



More information about the commits mailing list