Work-flow advice
Posted: Sat Feb 19, 2011 7:29 am
Hello,
I am a novice PHP coder working on a website using PHP/MySQL. I would like some advice on the best work-flow and tools to use. My background is in UNIX/C/embedded systems and real-time systems programming in C/assembler.
My work-flow is like this - all editing done in Emacs on a Mac:
1. write HTML for page (nxml-mode) with reset.css style-sheet only;
2. write a style-sheet to get appearance right;
3. check style using Firebug and/or Safari web inspector; iterate through 1, 2 and 3 many times...
4. write PHP code (C-mode)
5. check errors in the Apache log (tail -f) or in the browser (var_dump)
Iterate through 4 and 5 repeatedly, and sometimes back to 1...
- pages are under ~/Sites and the local Apache server is setup like my target server
- HTML is in a .html file
- each HTML file has a related .php file
This clearly works, but I wonder if it is optimal. The MySQL is generally no problem but the PHP and CSS certainly are. I looked at a few dev tools such as CSSEdit, Taco, TextMate, StyleMaster, but was unconvinced that they make life much easier. And where they give a 'preview' they don't run the PHP, which semed useless. Zend Studio might help (would it?) if I had the patience to figure out how to use it. I can't single-step the PHP. I am developing some forms that require $_SESSION, $_POST etc so I don't think I can run the PHP separately.
Are there better ways of going about this? Partly it is unfamiliarity with web development, but it takes me ages to get anything done...
Regards
--
William
I am a novice PHP coder working on a website using PHP/MySQL. I would like some advice on the best work-flow and tools to use. My background is in UNIX/C/embedded systems and real-time systems programming in C/assembler.
My work-flow is like this - all editing done in Emacs on a Mac:
1. write HTML for page (nxml-mode) with reset.css style-sheet only;
2. write a style-sheet to get appearance right;
3. check style using Firebug and/or Safari web inspector; iterate through 1, 2 and 3 many times...
4. write PHP code (C-mode)
5. check errors in the Apache log (tail -f) or in the browser (var_dump)
Iterate through 4 and 5 repeatedly, and sometimes back to 1...
- pages are under ~/Sites and the local Apache server is setup like my target server
- HTML is in a .html file
- each HTML file has a related .php file
This clearly works, but I wonder if it is optimal. The MySQL is generally no problem but the PHP and CSS certainly are. I looked at a few dev tools such as CSSEdit, Taco, TextMate, StyleMaster, but was unconvinced that they make life much easier. And where they give a 'preview' they don't run the PHP, which semed useless. Zend Studio might help (would it?) if I had the patience to figure out how to use it. I can't single-step the PHP. I am developing some forms that require $_SESSION, $_POST etc so I don't think I can run the PHP separately.
Are there better ways of going about this? Partly it is unfamiliarity with web development, but it takes me ages to get anything done...
Regards
--
William