7 users online. Create an account or sign in to join them.Users
Newbie quesions
This is an open discussion with 10 replies, filed under General.
Search
Yes technically you would overwrite each other; however there are extensions such as Entry Versions (if not mistaken) which keeps the previous versions in DB; so if that happens you can fall-back and check changes.
There is database not just simple XML for a very simple reason. Database allows you to run plenty of queries and retrieve the data in plenty of different ways. If you had to chuck it all into a static XML file - it would lead to very in-efficient systems. (unless you are designing a very simple page/website)
Usually Symphony Load time is under 2s (depending on the site) if this had to be inefficient with excessive XML and stuff I assure you you can go over 15s :)
In some rare instances I do output straight XML data - by editing the datasource and putting the XML string in the grabXML function. This is when the data will never/rarely change - such as a list of countries for example.
Thank you, gunglien. Are there any tried and true techniques to have multiple (dev and production) environments on the same server? As I understand all data from dev and production will go to the same "symphony" DB. Are there ways to separate dev from production records?
What I usually do is run a switch in the Symphony Config. Where if it is my testing environment I use a different DB connection string.
However when creating new sections and stuff - I still have to manually replicate all the steps. I sometimes also have to modify events/datasources manually. For example when a section is created and not used; and a new section created afterwards is pushed to live. The IDs won't match so I would have to do some customization to work on both dev/production.
As I understand all data from dev and production will go to the same "symphony" DB. Are there ways to separate dev from production records?
You should set up two separate databases, one for dev and one for prod, and change the config file of both Symphony builds to connect to their respective databases.
clearing up a bit. As nick says a different config for each; however usually I use the same by doing the following
if ($_SERVER['SERVER_NAME'] == 'www.mysite.dev'){
//dev config
} else {
//live config
}
I thought that if you keep dev and prod in two separate folders then you only synchronize the workspace. Based on what you guys say, does it mean that you keep two separate folders for dev and prod but to synchronize you copy the whole folders including manifest folder with config.php?
I don't copy anything usually, I manage code through source control (SVN or git). You'll find it more reliable than copying manually.
Sorry, probably my question wasn't clear. When we copy data (via direct copy or SVN) from dev to prod, do we usually copy the whole folder (with manifest and symphony) or just workspace?
Just the workspace.
Just workspace; most of the time the individual files that are modified. Usually we work on multiple aspects at the same time.
I use the above code not for config purposes in the manifest (well that too for backup in-case we have a server crash I can just push everything up again and get working). Most of the time I use it when we are working on multiple projects on the same website. If you do not create the sections/fields in db not in the exact same order you are prone to having ID mismatches. So to keep datasources etc that work on both (until dbs are synchronized) I usually make use of switches so the same file would work in both environments. Hope its not too complicated. If you create everything in the exact same order or sync dbs you will never need to do that.
Create an account or sign in to comment.
Just started to explore Symphony. Really enjoyed it. Especially the fact that it's XSLT based. What I don't really understand is why MySQL? Especially given that some information (like pages, events etc) is kept under the workspace and some other (like entries) are in the DB. As I understand it the DB is used to make sure many authors can enter data at the same time. What about editing xsl pages? If I open a page and start to edit and someone else edits it and saves before me we'll end up with only my changes overwriting the previous author? The reason I am asking is that I am trying to figure out how I can keep my dev and production environments co-exist on the same server. I can easily copy files from dev to production folders but what about keeping the db in synch? Also, just wondering if the whole CMS could be based on pure XML data in the workspace folder? Wouldn't it simplify things? I am very new to the whole CMS business so I beg your pardon for my naive questions.
Thank you, Andrei