views:

358

answers:

2

Hello,

Here's my story, Sort of long - please bear with me :)

I am currently the only programmer here, no much designing to do - yet. When I started, we had no source control, - files where edited directly from a "development" server - which used rsync to sync to production servers.

I have not had much experience doing this kinds of thing - this is my first job (i'm 19) - but what I have setup sort of works, but I don't know if it will work easily when coolaborating with a designer and/or more programmers.

My IDE is Zend. Project is an SVN-checked out project.

When I need to make a change, I do so, save it and hit my local computer that has apache setup to read from those files in that project. Mostly they are Webservices or just 1 file - not whole projects.

I got started on another project that required me to use a full domain name (because it required parsing subdomains) so I setup my local apache to use that domain name, even though it wasn't pointed to me. Using foxyProxy and making http://*.domain.com and http://domain.com as one rule and pointing it to 127.0.0.1 - this allows me use the www.domain.com but hit the dev machine (which is mine).

I commit the changes, and run this sort of ghetto bash script that checks out the code off SVN and syncs to all the servers using RSYNC.

Well, soon we will get a designer to work with me. My code is split into a sort of View Controller system - But i don't use any php templating system

I've got a buddy that works at this other company. They way they do stuff different from how i do it. I think how he does it is perfect.

The code is in a Z:\ drive - which apparently is a network share (I'm not 100% sure) The project uses that code, and when he saves something, he opens firefox and turns foxyproxy on. It is configured using an HTTP Proxy server. I think the way it works, is that that HTTP server is configured to make any site that that company develops, go into b.b.b.b (development) ip instead of a.a.a.a (production) - I wish i knew what software it is or which proxy software can do this.

He uses JIRA and jira has a "commit" button - Not really familiar with it so I don't know how it works.

The confusing part is that, when he goes to the site, supposedly there is a development "dropdown" where he can choose from any developer's change and look at what they have worked on.

Basically, each person who can commit, has their own environment - not just one. ** How can something like this be implemented, any ideas? **

He doesn't know how it works because he's new to that company but I hope he learns quick!!

Some of my questions:

  • How is your development and staging environments setup?
  • Should a designer have full acess to php code even though all they need is the "views" ?
  • What is an easy way to implement a "multiple-user" environment ?
  • Should we use a template system or can basic <?=$name?> do the work for designer and their HTML code?
  • Any comments on what I am not doing right?

PS: My boss is/was technical (he used to be a programmer) but he never used any of the tools we use now -- I am the one in charge of all that - He didn't know what SVN was :)

+1  A: 

How is your development and staging environments setup?.

Every developer has a local XAMP installation. Default configs, default virtual hosts, databases schemas, etc. are in the SVN repo. Updates are made with rsync. But I don't think it's a very productive way of release management, even though it is very flexible. The DNS stuff handles our DNS server (what a surprise). The naming convention is:

  • development: example.local
  • production: example.org

Should a designer have full acess to php code even though all they need is the "views" ?

If all your view-scripts are under one path why not just let the designer check out this path only? Depending on how you're managing your repos you can set privileges very specific.

Should we use a template system or can basic do the work for designer and their HTML code?

IMHO PHP is a template engine and there is really no need to use another one. If a designer can write %VARIABLE%, he can write <?php echo $variable; ?> as well. And as soon as you have to implement control structures (for, if, etc.) in a template engine you have a level of complexity which does not differ from basic PHP's control structures. And if you can't trust your designer, you need a new one ... ;-)

Philippe Gerber
A: 

"But i don't use any php templating system"...

PHP is a template language. it's even correctly recognized by most HTML editors, so any non-braindead designer should be able to use it correctly, if you split most of the 'working' code out of the 'view' files. or at least, put all the code at the top of the PHP code, leaving only oneliners intermixed into the HTML.

personally, I only allow things like <?=$varname?>, simple loops like

<?php for $row in pickdata() { ?>
  <tr>
    <td><?=$row->field1?></td>
    <td><?=$row->field2?></td>
  </tr>
<?php } ?>

and a few <?php if (test()) {?>

Javier
That is how i do stuff. I tried smarty but i found it hard to get data from objects that returns other objects (like getResults()->getItem(0)->getInfo() or something like that)My boss said tried doing php on one earlier project once said it didn't work. That i needed to separate PHP and HTML by using something like Smarty. I don't like to fight him so i just agreed and used smarty. That was 1 year ago. Now i do whatever i want -- :D
angelito