Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-02-10 10:44:59

Mel
New Member
Registered: 2021-02-10
Posts: 6

Is it possible to develop a theme without Textpattern tags?

Hi,

We are looking for a new CMS to replace an old one, no more maintained by the author.

As the website speed is in the top of the list, we need to avoid anything that can add any delay.

So, we are wondering if it is possible to develop a theme without Textpattern tags?

Offline

#2 2021-02-10 10:50:09

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: Is it possible to develop a theme without Textpattern tags?

Hi Mel,

Yes you can but how will you get data from the DB without txp tags ?

Cheers.

Offline

#3 2021-02-10 10:55:50

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: Is it possible to develop a theme without Textpattern tags?

Mel wrote #328699:

As the website speed is in the top of the list, we need to avoid anything that can add any delay.

So, we are wondering if it is possible to develop a theme without Textpattern tags?

It is possible, yes. It will be no fun at all since you will need to reverse engineer the tags and translate them into database-speak, which will be an extremely time-intensive exercise.

There is no reason to use Textpattern if you don’t wish to use Textpattern tags. If you use Textpattern, you will need to use Textpattern tags. The content that Textpattern manages is accessed and displayed by tags. Textpattern tags are efficient, we invest time and work in ensuring our tags are performant.

You should investigate static site generators with caching and a content distribution network if you want the absolute fastest website speed. Or, look at Textpattern tags and use best practices to make them work to your liking. There’s a wealth of information here, and many helpful folks.

Offline

#4 2021-02-10 11:03:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: Is it possible to develop a theme without Textpattern tags?

Surely a theme without any dynamic data from a database is just an HTML page? In which case, hard-code your site.

If you’re worried about performance in Textpattern, then depending on application, sites routinely score well in excess of 90+ on pagespeed for mobile and desktop without cacheing or expensive hardware. As long as you set up your templates with reuse in mind (which we can help with if you post details here), your site will likely fly. There are also cacheing plugins like etc_cache to speed up parts that don’t need to change every time.

Edit: everyone else was faster :)

Last edited by Bloke (2021-02-10 12:59:33)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2021-02-10 11:06:10

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Is it possible to develop a theme without Textpattern tags?

I’ve seen that on one site where the agency that originally coded it obviously used their own templating system across many sites and perhaps also CMS systems. They created an entirely parallel set of scripts to set up the database connection and read data directly from the Textpattern database to output it with PHP. Basically, Textpattern is used for the admin side and the output is mostly independent of Textpattern. It’s very clever but …

… it creates problems further down the line: fast forward a few years and the site needed to be updated from an early PHP5 version and that entailed not only updating Textpattern but also trawling through the agency’s code to correct incompatible code (or to bring it in line with Textpattern changes). Other features, such as adding several image sizes for mobile to desktop use, can’t be achieved simply by installing a Textpattern plugin such as smd_thumbnail; instead the agency’s PHP templating code needs revising as well.

Long story short: Textpattern provides good and safe database retrieval functions as well as tags that allow you to control your HTML output in quite granular detail. In the long term, it may be worth considering refactoring your page templates to use Textpattern’s system of tags.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2021-02-10 11:28:00

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Is it possible to develop a theme without Textpattern tags?

Just to add to this. On a relatively good server I’m seeing a HTML render time of around 150ms by using Textpattern with a fair number of tags in situ on a homepage. Very fast for a database-driven CMS. Note that time is including DNS lookup/initial server response/TTFB.

Offline

#7 2021-02-10 11:50:06

etc
Developer
Registered: 2010-11-11
Posts: 5,188
Website GitHub

Re: Is it possible to develop a theme without Textpattern tags?

Offline

#8 2021-02-10 12:51:20

Mel
New Member
Registered: 2021-02-10
Posts: 6

Re: Is it possible to develop a theme without Textpattern tags?

Thank you everyone.

We were thinking to do something like Jakob wrote. Moreover, I was thinking that Textpattern tags were much more like Twig (template engine) tags and the like.

For information, with the current unmaintained CMS, which makes intensive use of DB,
- we retrieve VERY heavy pages under ~130ms, on a “pretty cheap” server,
- we get 100 at PageSpeed tests,
- and with “not so much caching” (no html pages, “only” images, css and js assets)…

As we are in very competitive markets, we cannot take the risk to get a slower website… We prefer to save few ten seconds with a better server if needed, and “not waste them”.

Offline

#9 2021-02-10 12:59:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: Is it possible to develop a theme without Textpattern tags?

I’d love to know what the CMS is then. If you’re getting those speeds on ridiculously heavy pages with tonnes of DB interaction, I for one could learn something about performance!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2021-02-10 14:16:26

etc
Developer
Registered: 2010-11-11
Posts: 5,188
Website GitHub

Re: Is it possible to develop a theme without Textpattern tags?

Targeted CMS can certainly be faster than generic ones, but 130-150ms is quite common with txp, especially if DB is optimized (indexes and so on). Loading core takes ~30ms, even on a laptop.

Offline

#11 2021-02-10 14:23:41

Mel
New Member
Registered: 2021-02-10
Posts: 6

Re: Is it possible to develop a theme without Textpattern tags?

It is WolfCMS, based on PHP 5.X but still runs under PHP 7.X.

When I write HEAVY, I mean around 6.8MB and the other more then 2,25MB of transferred size of all requests, so more than the average. I did not check for the third.

Yet, the websites are heavily customized, and also use several plugins…

— Edited as I did a mistake, it is not 3MB but 6.8MB…

Last edited by Mel (2021-02-10 14:33:56)

Offline

#12 2021-02-10 14:31:21

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: Is it possible to develop a theme without Textpattern tags?

Can you share the current URL? I have made a guess based on your provided email address but that doesn’t match the 100 score you listed.

Offline

Board footer

Powered by FluxBB