Quote from: sara at Dec 20, 2006, 05:00 PM
Are there any rules of thumb? Or is it just on my own preference? Could someone provide us with some rough guidelines about how to manage workflow while developing with MODx?
Maybe you, Mr. Delicious?
Honestly, it is whatever you are comfortable with. There seems to be (with me anyway) a never ending learning cycle with MODx. Each time I think I have mastered it, I find something in it that will save me like ten steps. I have completely destroyed and redone my personal site more than a dozen times just because I found a more efficient way of doing things, and every time I learn a new way, that is a new technique for me to add to future projects.
My advice... Play with it. You have already learned that template variables can be an incredibly powerful time saving device. I have a localhost server set up called "beta" where I not only try to debug the latest MODx SVN (read that as "I try to break MODx"), but I try doing things in different ways and finding out which is fastest to roll out, easiest for a "non-me" to update, and executes with reliable output.
I guess making sure you know what you are going to do or at least what you want to achieve before you start is always a good plan. Then you can scour the forums to see if a solution already exists. I usually mock up a template in photoshop next, then work it out into actual XHTML (I use TextMate for creating templates and CSS). Next I get that template installed on a fresh local installation of the latest SVN (if you are doing this for a customer, you may want to choose the latest stable release). After that I work out the technical/functional parts of the website and web apps. This is where my previous "playing with MODx" comes in super handy. After I have it running smooth locally, I export the database, and upload to the server.
That is just one way to do it. It works for me. There are, I’m sure, as many production preferences here as there are forum members, so develop however you feel comfortable developing.
For developing snippets and modules, I want to pass along a tip that was passed to me long ago, and is still quoted frequently in these forums:
If you are developing a snippet called "snippet1", make a folder in assets/snippets/ called "snippet1" put the php file that you are working on in that folder. In the MODx manager, you can create a new snippet, call it "snippet1", and for the snippet code, write:
include($modx->config['base_path'].'assets/snippets/snippet1/myfile.php';
Now every time you make changes to that file, you only need to refresh the page on the front end that is calling that snippet and your changes will be reflected. After you are finished, you can copy the contents of that file into the snippet code textarea.
Hope this gets you started
-sD-
Dr. Scotty Delicious, Scientist.