Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-11-08 19:50:51

Kelon
Member
Registered: 2009-10-18
Posts: 16

Out of interest: what's your local to remote development workflow?

Hi
I’m interested in how people have their sites set up for ongoing local development?

Updating content (writing new articles.. adding new static pages, images) is cool done direct on the remote site…

However… developing a site’s presentation, structure and functionality, is best done locally first, then published. I’m interested in how people have this set up….

At the moment I’ve duplicated the lot so I’ve ended up with two html directories stored locally and one copy of the database remote plus one database copy stored locally. It’ll mean I’ll have to copy the presentation tab contents from the local database to the remote one… instead of ftp anything (other than the external style sheet).

How do you sensible people do it?

Cheers

Last edited by Kelon (2009-11-08 19:54:05)

Offline

#2 2009-11-08 23:00:49

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Out of interest: what's your local to remote development workflow?

Kelon wrote:

It’ll mean I’ll have to copy the presentation tab contents from the local database to the remote one… instead of ftp anything (other than the external style sheet).

That shouldn’t be necessary. The db contains everything and could also include the css, if you wanted. The only items that need to be ftped are images and files in the respective directories.

Usually you then just export the db locally as a text file and import that into the remote db via phpMyAdmin. Depending on how your local site was stored, you might need to adjust path names in references namely the site URL in Txp’s preferences tab.

Offline

#3 2009-11-09 10:25:03

Kelon
Member
Registered: 2009-10-18
Posts: 16

Re: Out of interest: what's your local to remote development workflow?

Hi Martin.. thank you for your viewpoint, very interesting. There’s two things I’m concerned about with regards to exporting the local database each time… one is that as you say some settings need to be adjusted (site url and paths to directories) for the local copy… I can see I’ll annoy myself with that.. and the second is that importing databases can be a little fraught with odd messages about duplicate keys and such….

At the moment I’ve found editing page structure through the Textpattern interface a bind so I hanker after more things being external … I’ve not quite tuned into ‘pages’ = ‘templates’, ‘forms’ = ‘editable regions’ just yet (yes, I’m a Dreamweaver body)… I’m aware there are discussions here about editing html with something that provides code colouring… I’ll get there, just a case of persistence. :-)

Last edited by Kelon (2009-11-09 10:26:07)

Offline

#4 2009-11-09 11:32:40

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

Re: Out of interest: what's your local to remote development workflow?

It’s not ideal I agree. Couple of things to look at: advice for team development has a few approaches that might help in your situation. There are other such topics dotted around the forum. Secondly, if you want more stuff outside the database, look at rvm_css which keeps a copy of the user-viewable stylesheets in the filesystem (while allowing you to manage them from within TXP’s admin interface if you wish) and also consider cnk_versioning which stores copies of your pages/forms/styles in files, and keeps them in sync with the DB.

Last edited by Bloke (2009-11-09 11:33:05)


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 2009-11-09 11:36:59

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Out of interest: what's your local to remote development workflow?

Kelon wrote:

There’s two things I’m concerned about with regards to exporting the local database each time… one is that as you say some settings need to be adjusted (site url and paths to directories) for the local copy… I can see I’ll annoy myself with that.. and the second is that importing databases can be a little fraught with odd messages about duplicate keys and such….

Not necessarily.
I’ve done it a few times in either direction without problems. Path issues can be avoided by consistent use of the <txp:site_url /> tag. It picks up the site’s base URL as defined in the prefs.

Use it to prefix any hard coded references (root-relative references), such as links to js, css and navigation links, e.g.

<ul class="navigation">
<li><a title="Return to homepage" href="<txp:site_url />" class="home">Home</a></li>
<li><a title="Who we are" href="<txp:site_url />about/" class="about">About</a></li>
…
</ul>

I haven’t experienced any glitches importing the db either. It’s vastly preferable than bringing in anything by copy&paste.

The fact that a Textpattern installation is almost entirely contained in the db, is actually a great advantage regarding its portability. All you need in addition is setting up your ftp client to mirror the contents of the files and images directory to the remote server.

Offline

#6 2009-11-09 11:48:20

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Out of interest: what's your local to remote development workflow?

Kelon wrote:

At the moment I’ve found editing page structure through the Textpattern interface a bind so I hanker after more things being external … I’ve not quite tuned into ‘pages’ = ‘templates’, ‘forms’ = ‘editable regions’ just yet

I only edit templates or forms directly in the Textpattern interface when the changes are minor. Otherwise I prefer to view them in an external editor with code-colouring and -completion. There’s a clever FF extension It’s all text, which allows you to open the contents of any text area in an editor of your choice with one click, make your changes and copy&paste back into Textpattern.

As a DW user you might find Jan’s Textpattern tag library for DW interesting.

Offline

#7 2009-11-10 20:02:41

Kelon
Member
Registered: 2009-10-18
Posts: 16

Re: Out of interest: what's your local to remote development workflow?

Hi.. thank you for responding.

Stef Thanks for the thread, interesting though of course I’m the sole developer of the site so my challenges are not so great as yours. I’ve downloaded the plug-in cnk_versioning.. to have a go with, sounds just the jobbie, thank you. (Great smd_gallery plug-in by the way).

Martin Thank you, I hear what you’re saying. I do like Dreamweaver’s template, site management and ftp features among other’s I can’t think of right now, so I am keen to see if I can develop a sensible way of working with Dreamweaver in the loop. I’ve already found and downloaded the tag library, but not implemented it yet. Thank you for pointing it out to me.

General: I understand the benefits of all eggs in one (database) basket… but I personally don’t have a problem with using a database strictly only for content while keeping all structural files external, quite like the logic – though I don’t know if there’s more efficiency in http/database traffic/processing.

Offline

Board footer

Powered by FluxBB