> <p>hello <? getDb "name") ?> how are you
Putting code fragments into HTML is not a good style for
developing (larger) web applications.
This has to do with the typical team structure / division
of labour for web teams:
- the web developers do the pure php/perl/.. script code
- the screen designers rule the template files
- the backend folks deliver methods to feed/query the
For php we use the smarty template engine.
A template is instantiated and fed with variable data by
the web application.
has just extra support for conditional code activiation,
data access (just to the provided variable data) and
simple repetition control, all in a HTML like syntax.
A web developer delivers just a plain template file as
result of his work, a template file that just renders the
web page in minimal stylish fashion, with all access to
the internal vars provided.
This is then fed to the screen designers who use their
> 2) Is there an easy way to get line numbers right in transformed code?
> I thought there was an annotation you could add to the source.
> Like this:
> -file("foo.ehe", 23)
> foo(A) ->
> To tell the compiler that foo(A) came from foo.ehe line 23.
> This seems to be broken (there *is* code in epp.erl to do this and
> I *can* change the file name but *not* the line number). Is this
> a bug or a feature or have I misunderstood something?
The -file attribute has so far been used for implementing -include and
The changes necessary to make it work on "user level" have been made
in R11B to be. They are neither simple nor beautiful.
One of the first users of this new feature will be yecc.