3 ms·
Presumably because of how many webhosts have it available automatically. I'd pondered a flat file based php 'blog' engine once - with all the benefits of markd
by deckiedan 13y ago
Presumably because of how many webhosts have it available automatically.
I'd pondered a flat file based php 'blog' engine once - with all the benefits of markdown or whatever - no database complexity, easily rsyncable for deployment, git can keep revisions, etc...
- hayksaakian 13y agoSure makes sense. I asked because I always see post about Jekyll and octopress, and such. That are basically server-less.
- deckiedan 13y agoYep - and there's also some benefits performance and security wise to not having any serverside code at all (other than nginx, or whatever). The problems you have with jekyll, pelican, et al is that you lose site-side search, 'related posts' (without some reasonably complex compile-side clobber), etc. etc. Using extremely minimal PHP lets you deploy just as easily, you don't get too much of a performance hit (a hell of a lot better than wordpress, etc), you can still do search, related posts, forms, embedding, and all that. PHP as a server-side 'clever templating' language really isn't that bad. It's only awful when used to build anything massivly complex (such as joomla! or drupal...), and that it encourages messy project design.
- vesinisa 13y ago> It's only awful when used to build anything massivly complex (such as joomla! or drupal...) Or a Bitcoin exchange
- meritt 13y agoIf only Mark Karpeles had simply written mtgox in another language, there's no way he would have lost 750,000 bitcoins.
- mercurial 13y ago> PHP as a server-side 'clever templating' language really isn't that bad. I only touch PHP as little as possible, and work with a legacy PHP codebase, but AFAIK, it hasn't evolved a tag to automatically HTML-escape/JSON-escape content. So, it's as good a templating language as it is a programming language: pretty terrible. I'll trade PHP for something as barebones as Python with WSGI + Jinja2 any day.
- pestaa 13y agoIt's not fair to compare to compare pure PHP and Jinja2. Twig is the PHP-equivalent of Jinja2, and it is an extremely well designed templating engine.
- mercurial 13y agoWhat's not fair about it when talking about PHP as a templating language? My point is that while PHP is often lambasted as a terrible programming language, people forget that its HTML templating part is even more abysmal. If you need to have a templating system in your "advanced templating language", this really tells you everything you need to know about its capabilities.
- pestaa 13y agoIt's not fair because PHP came way earlier than Jinja2. Both Twig and Jinja2 could learn from its predecessors.
- mercurial 13y agoYour rebuttal would only be correct if the two following propositions were both true: - software cannot evolve - the notion of sanitizing input/output has magically appeared out of thin air in the last 15 years (I'm pretty sure that Perl Mason could do that when it first came out, around the same time PHP did) Since clearly neither is, attributing the current state of affairs to bad technical decisions early on followed by inertia is the most logical explanation. It's like comparing Java and C#: C# has managed to regularly introduce interesting features, while Java has stagnated for a long time. Of course it's easier when you start from scratch, but especially for simple features like escaping, which I highly doubt would require major changes in architecture, there is simply no excuse.
- uniclaude 13y agoTo be honest, not implying you're wrong, but you could have "related posts" with pre-computation, and "site-side search" with a mix of pre-computed data structures and front-end Javascript (which could be quite efficient, provided the blog is not too large).
- danpros 13y agoHTMLy has a built-in search feature and related posts. I use file-naming convention than the speed always fast even though let say the blog has about 3k of posts with hundreds of tags, why? HTMLy don't read the content first but filter it first. I already test it with mini VPS (RAM 128 MB) and no speed penalty.