How To Dynamic Web Rendering?

Alexander aldem+dmars at nk7.net
Sun May 15 09:02:11 PDT 2011


On 15.05.2011 17:04, Adam D. Ruppe wrote:

> In PHP, pages share data by having one include the other. Even
> Wordpress templates ultimately work that way - the main code
> includes the template's code after defining a bunch of functions
> and variables.

  This is not what I mean. What I mean is something like:

page-a.html:

<?d var = "value" ?>

page-b.html:

<?= var ?>

And this I expect to work. Just an example of what I mean, of course. I.e., *all* pages share the same namespace, and all values stored on one page are accessible on all other pages *and* persistent.

Sure, we can use database or shared memory to implement persistence - but this will be way too slower comparing to some in-memory state, not talking about complex objects which cannot be stored (easily) in the database.

To implement this, you would need a "bit" more than your dhp does (while PHP and ASP provide out of the box).

/Alexander


More information about the Digitalmars-d-learn mailing list