State Management
IntraWeb is very unique in how it handles its state management. In traditional web development to handle state there are two things that must be performed:
-
Tracking of the user between pages.
-
Persistence of user specific data (state)
User Tracking
User tracking can be accomplished by fat URLs, cookies, hidden fields, or authentication. Each however has tangible deficiencies and shortcomings. Because of this a typical web application must often employ a combination of these methods to accurately track the user.
Some web development tools assist in user tracking.
Persistence of State
Persistence of state is the storing of user data between page generations. Because HTTP is stateless, user data cannot be easily stored. There are two common approaches to persistence of state:
-
Embedding - Embedding consists of storing all the data in the page itself, the URL, or in cookies. The advantage is that the data never expires and is always available when needed. However the disadvantages are that it increases the network traffic as it must travel to the browser and back each time, and it is not secure because it is traveling along the connection and being stored in the user's browser. Because of this, only very small amounts of data are useful for embedding. This technique can be effective for simple applications, but is not suited to complex ones.
-
Streaming - Streaming consists of assigning the user a unique identifier and using this identifier to identify data stored on the server. The data is streamed to a file, or more commonly a database and reread when needed. The amount of data that can be stored has virtually no limits. Because of the high overhead of I/O, this increases the load on the server. In addition, because all data must be streamable, large sets of data, or data beyond simple types such as strings and numbers cannot be stored.
Traditional web development tools may assist the developer in these tasks, even calling such features "automatic". The fact remains however that a large portion of the responsibility and work remains with the developer and must be accounted for and managed in each application.
Transparent State Management
IntraWeb completely manages the state and user tracking in an integrated way that is completely transparent to the developer. The method is efficient, robust, scalable and secure. It also permits for storage of any type of data, streamable or not.
IntraWeb uses inherent state management to achieve transparency. What the heck is that you say? Some new buzzword? No. Ask yourself this, How do you manage state in a normal application? What? You do not have to? Exactly! That is how you manage state in IntraWeb.
If you need a variable, simply declare it in the user object (similar to declaring a global variable in a normal application), a datamodule, a form, or a class. The variable can be of a simple type, or a complex type holding references to other classes. IntraWeb will take care of the rest.
An example of IntraWeb's state management can be seen in its comparison to ASP.net.
|