SUI Cob Layer
From ESEwiki
The web implements two special technologies.
Contents |
Multi-user
Principle
The web layer allows many users to access the same forms.
In fact the program is multiplexed in as many processes as there are connected users. Unlike other languages, there is no notion of "session", or rather, the session is reified by the process.
This allows for very simple programming, because the programmer codes for a single user and the system takes in charge the multiplexing.
Design
The web server creates and manages a process per user session. The server and the process share a protocol that let them talk together:
Server Process
| data:<body length>:<uri> |
|------------------------------------->|
| |
| ok |
|<-------------------------------------|
| |
| <body> |
|=====================================>|
| |
| count:<answer length> |
|<-------------------------------------|
| |
| code:<http code> |
|<-------------------------------------|
| |
| <answer> |
|<=====================================|
| |
Legend
-----> control data ("out-of-band")
=====> data flow
ok verbatim data
<length> data depending on context (self-evident)
Business/design separation
Unlike many web solutions, the web pages to be rendered may not use special tags. Instead, SUI lets the designers write their html code with their favorite tool. The only link between the HTML code and the business logic is the sui:id attribute, which lets the business layer (i.e. the code written by programmers) take control.
Caveat: SUI/web currently allows only pure XHTML code. Legacy HTML is not supported. Also note that because of current bugs in the SmartEiffel XML parser, the XTML DOCTYPE is not correctly parsed. Use the namespace instead, but note that the XML document will not be validated.

