Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-12 13:09:45

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

allow extensive versioning

as i’ve already said to peter here (at the very bottom): the one thing that bothers me the most about textpattern is that it stores everything (page templates, forms, etc) in the databse. this is great sometimes as it allows you to access everything with a browser — but let’s face it when developing and coding exhaustive page templates you need a solid editor and even more important versioning! i’m aware of the multiple workarouds, that allow you to load content from the forms into your editor of choice and then update it (it’s all text for firefox or textmate itself provide good alternatives). however, if we were able to work directly on a filesystem we could use our preferred editors and do proper versioning. how do you guys develop medium to large scale websites without being able to roll back to older revisions at any given time? i think that this is a real problem, there’s usually a lot of copy and pasteing involved in the development process and when you’re working with multiple peoples on a project it gets even worse. </txp:rant>

has anyone thought about providing a solution to this? would it even be possible to allow for either (a) versioning in the database (i.e. as it is described here) or (b) providing the possibility to work directly on files, while still maintaining the current “everything in the db”-mantra? i’d love to hear your thoughts on this.

Last edited by sthmtc (2008-06-12 13:10:08)

Offline

#2 2008-06-12 18:03:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: allow extensive versioning

At least one versioning plugin already exists.
I think storing versioning stuff as plain files instead of in a table is not a good idea.

Offline

#3 2008-06-12 19:06:06

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: allow extensive versioning

I’d pass on versioning with TXP. If you have template files (as .txp or whatever), you can just use Subversion, Mercurial, Git, etc. to version your files. Version control software handles merges, conflicts, and revisions much better than TXP or a plugin ever could.

Offline

#4 2008-06-12 19:47:11

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: allow extensive versioning

jm wrote:

I’d pass on versioning with TXP. If you have template files (as .txp or whatever), you can just use Subversion, Mercurial, Git, etc. to version your files. Version control software handles merges, conflicts, and revisions much better than TXP or a plugin ever could.

sorry for not being clear. that’s exactly what i want to do! i’d like to be able to have my pages, forms, etc in a filesystem so that i’m able to use svn, etc.

Offline

#5 2008-06-12 20:17:39

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: allow extensive versioning

I still think movable type had the best system for this.

Everything started in the DB but you could associate (I think that was the term) things to a file so that changes made in the file were reflected in the db and vice versa. I kept the ease of just backing up the DB for backups and allowed all the functionality of the file system for version control etc.

Last edited by hakjoon (2008-06-12 20:18:01)


Shoving is the answer – pusher robot

Offline

#6 2008-06-12 21:10:05

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: allow extensive versioning

hakjoon, that sounds great. do you think something like this would be possible with txp?

Last edited by sthmtc (2008-06-12 22:03:52)

Offline

#7 2008-06-12 22:34:55

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: allow extensive versioning

Sounds a lot like drupals versioning. Noiwse!

Offline

#8 2008-06-13 07:04:10

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: allow extensive versioning

I personally like very much the fact that everything is stored in the db: it allows me to work from any computer, remotely, online, so I’d rather not change this.

But I agree that some form of versioning is a major lack, both for articles/images/files/link (content, in a word), and pages and form, that is, templates.

I also remember of MT way of doing it with external files, while also being able to work online with db’ed content. I think this approach makes the two way of operating compatible, at least for templates: only those who want to modify them via browser can do it, those who want to use external versioning software could also do it. Maybe that could be pluggable, or with just minor change to code base? I imagine a check on a given folder, on the date of files, on their name and on a preference setting?…

PS: That would not solve versioning in contents, but that’s another point.

Z-

Offline

#9 2008-06-13 20:27:34

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: allow extensive versioning

MT also had the advantage that it only had compare the DB and files on rebuild. Doing the compare for every form and page fetch (which si really what you would have to do) could get heavy.

Maybe this could be based on the production level? If that is set to debugging TXP assumes you are building the site and does the comparison. If set to live it assumes the database.


Shoving is the answer – pusher robot

Offline

#10 2008-06-13 21:17:07

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: allow extensive versioning

i’m really happy that you guys are posting your thoughts on this here… keep it coming :)

tying it together with the production level sounds like an awesome idea! i have no idea how complicated something like this would be. do you think it would be achievable by a plugin? or is that something that needs more significant changes to txp’s inner workings?

Offline

#11 2008-06-14 20:05:39

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: allow extensive versioning

Fetching the page could be done as a plugin on the Textpattern callback but you would have to duplicate all of the functionality of textpattern() to achieve it I think since there is not really a way to intercept the sql call that fetches the page. There is no way to do it for forms via a plugin that I can think of.


Shoving is the answer – pusher robot

Offline

#12 2008-06-14 21:12:02

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: allow extensive versioning

I think the easiest way would be to use the pre-textpattern callback, but instead of replacing the sql as you mentioned, hakjoon, I would simply load all altered files to the database. Dependend on the number and size of files to upload, this might take some time on the first call, but the second call will run almost as quick as a normal txp page view.

If you all are fine with it, I’d like to make this idea into a plugin.

Offline

Board footer

Powered by FluxBB