The following diagram shows how the various inputs are transformed into a web page that is delivered to the browser. It's very simplistic, and it doesn't show many of the behind-the-scenes parts of the architecture.
Pages are a generated from components. A component is a piece of PHP code that generates further PHP code to form a specific task. Once a component has been written, it can be re-used. A large set of components is supplied with Arcos. You can also write your own components. Typical uses of components are:
See Reference, Components for a full list of components.
Templates are a way of separating the roles of the graphic designer and the programmer.
A template is HTML code that Arcos uses as the basis of the layout of a generated web page.
Arcos can create a template that is based on the forms, buttons, recordsets and so on that will appear on a web page.
Templates use a special class of tags in HTML, known as KTAGs. A KTAG indicates to Arcos how to manipulate data.
In general, Arcos automatically generates a template when necessary (the diagram shows an arrow from the web page assembler to the template files), provided that you specify that it should do so (by using particular tags in the XML configuration). Without the appropriate tag, a template is not created. In this case, you will need to create your own template (indicated by the arrow from the template files to the web page assembler). You will create a simple template when you test the installation.
Layouts are similar to templates, in that they govern the appearance of the generated web page.
A layout has these advantages over a template:
You will create XML files that define the web site. These XML files contain definitions for the database, the recordsets, and the individual web pages themselves. You create these definitions using various built-in tags.
See Reference, Built-in tags for a full list of these.
Each recordset and each web page is defined as to how it should work using components from the component library.
Assuming that a web site does not require any new components to be developed, the entire web site can be generated from this XML file without the need to write any PHP code (without some additional design work, it will look plain).
There is always at least one configuration file called configuration.1.xml
. Rather than using one large configuration file, it's best to use included files. For example, one for the database definitions, one for the web pages and so on. The tutorial shows you how to do this.
As its name suggests, this assembles all the various code pieces. It is controlled by the configuration files. It is not discussed further, since it is not used by you or the end user.
The generated page store (also called the cache) contains pieces of PHP code. Arcos uses this to generate a web page whenever a page is requested. There is no physical existence of the page until Arcos generates it.
Since the PHP code is stored, Arcos only needs to generate new PHP code if the XML definition has changed.