Open GoogleCodeExporter opened 9 years ago
First, embedded code blocks generally lead to sloppy programming practices,
such as interrupting conditions and similar.
Second, have you ever looked at the "template" module, shipped with v8cgi? I
strongly believe that it contains much of the functionality you request.
Third, it might be best to wait what CommonJS says about this feature, as I
need v8cgi to stay fully commonjs-compliant.
Original comment by ondrej.zara
on 21 Jul 2010 at 4:51
Hi,
First point: I'm not quite sure I understand about interrupting conditions
(using break is bad?).
Second: Thanks, I didn't look earlier because I didn't think it was relevant
(sorry). Compared to the embedded code blocks, it seems like a very clean
process, but perhaps a bit much with the need for template files? Can it also
be done completely inside the running script?
Third: I fully agree there. Thanks for your work!
Thank you,
pikpik
Original comment by pikpik.1...@gmail.com
on 21 Jul 2010 at 5:49
First point - I was talking about:
<?php if ($something) { ?>
...
<?php } else { ?>
...
<?php } ?>
this leads to completely unmaintainable code, as soon as you start using these
paradigms for a project larger than tiny :)
Second point - no, you must use templates. One the other hand, ask any skilled
PHP coder and he will surely acknowledge that using templates (in PHP, as well
as in any other language) is generally a very good idea.
Original comment by ondrej.zara
on 21 Jul 2010 at 5:55
[deleted comment]
Hi,
First point: That makes sense.
Second point: That generally sounds reasonable. I suppose if file system
latency or speed are issues, the developer will output content in a more manual
way?
Thank you,
pikpik
Original comment by pikpik.1...@gmail.com
on 21 Jul 2010 at 6:21
From the performance point of view, there are numerous options. One can use
memcached to fast access; people also often cache templates filled with data.
Templates can be also preprocessed and cached in a form of a machine code; you
might be interested in how Dokuwiki performs its caching.
Original comment by ondrej.zara
on 21 Jul 2010 at 7:34
Hi,
That sounds good! It's great to see well-reasoned opinions.
Thanks for the discussion!
pikpik
Original comment by pikpik.1...@gmail.com
on 21 Jul 2010 at 7:42
Original issue reported on code.google.com by
pikpik.1...@gmail.com
on 21 Jul 2010 at 3:58