NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
projects and collateral developing


Joined: 05 Feb 2011
Posts: 8
Reply with quote
hello to all.
firstly excuse me my bad english.

well, firstly I'll describe the situation. There is a project, several developers, each has own debug brunch (version) on server, from time to time versions are merged via SVN.
Other developers don't use project management, they navigate on server with WinSCP and directly edit each file, some programmers at all use other software than PhpEd. Anyway, simple editing of single file disables a lot of useful features of project (you know).
So I created the phped project that includes only my work(debug) version, and every time I save file it automatically is uploaded to server with WinSCP to see the changes. I think it's too inconveniently, but i can't every time manually upload every file after saving. Maybe i don't understand the essence of phped project, but as far as I understand it is the most useful only when i'm the only developer, all site is on my local machine and i only from time to time upload new version to the server. In this case it's just enough locally save the file and i immediately will see the changes on local web-server. Please correct me if I'm wrong.

Anyway, there is a big problem where any other programmer edit file in my version (here may be a lot of reasons, but the result is the same). As they everybody edit files directly (navigate on server using WinSCP and edit separately each file), between they there won't appear a problem. but if they edit my version and i won't update my local project, this changes will be missed.
The same situation if i don't update my local project after merging versions with SVN (just forget and locally save any file).

So. I think i do something wrong. It have to be easiest way to managing collateral work. I think the best solution will be new feature - automatic smart upload of each file when saving. Am I wrong?

thanks for help.

ps - it's too hard to express a thoughts on foreign language, so excuse me once more.
View user's profileFind all posts by senseysensorSend private message
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
I think many developers face what you are facing. I'm not sure how others have addressed this, but our team has decided to avoid exactly what you are doing and do the following instead:


  1. The project is controlled via source control (eg SVN, as you mentioned)
  2. Each developer runs his own copy of the project which is a checked out copy of the SVN project.
  3. Each developer uses PHPEd to edit his local copy only, and never uploads to any server for dev work. His system either runs a local webserver or he must be samba or NFS mounted by a common server.
  4. When developers make a change it only affects them until them commit.
  5. When developers commit, they must ask all other devs to update. We use an IRC channel dedicated to this, developers can only state what project to update in this channel, no general chit-chat to avoid people missing update requests.
  6. Deployment to a staging or live server is done via SVN checkout.


I believe having developers edit files on a server with WinSCP (which I also use for other reasons) is a Bad Idea. I believe the same is true of directly editing on ANY Live server. We used to have to upload developer work via WinSCP or use an editor that saves to remote files, for development testing, but doing the former causes productivity to drop like a stone, and doing either results in developers overwriting each others' changes.
View user's profileFind all posts by rudderSend private message


Joined: 05 Feb 2011
Posts: 8
Reply with quote
thanks a lot for the answer. I'll digest your reply for a while,
but right now I would notice that

1. despite editing files directly on server each has its own branch, and it comparatively rare happens that someone needs to edit branch of another dev. (but this is still staying the problem with merging branches via SVN).
2. i have too small experience of working (about 3 months) so some questions may be stupid.
3. when i set up the work for the first time, main developer said that making full local copy of project is too problematically because of big size of that. At that time i couldn't waste a lot of time for looking into setup so i did everything as other did. But! I don't need the whole copy of server version, do you? The only I need is my branch, images folder, some config files. rest content i would exclude from project..?
4. I think too that using local web-server as you say is much better than every time upload files (it's much faster). In addition sometimes server brakes so everybody are forced to stand idle.
5. in case of using local web-server what would be with database and othe? server options? some options in config file would have to be changed..?
View user's profileFind all posts by senseysensorSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
We handle it a bit differently. We have a dedicated development server and everyone has their own working folder on it. We use git as source versioning system.
The webserver has a different vhost for every developer, but all use the main database to display the site.

We work test-driven and for those (we do a lot more tests with phpunit on commandline than actually visiting the website) every developer has his own database.
Since we develop new features in the TDD-way testing occurs on the own DB and thus any changes required database wise can be done there without breaking the main db.

If a task is done and it was committed locally for the developer (after passing the entire test suite and various other checks) changes are then pushed to the main repository and made available for everyone and for the rest of our process to production (> testing-environment > staging-environment > production). I use cygwin-rsync to upload files after changes, but I've used Webdrive in the past as well (also works really well and you just save like on a local drive).

Tbh the day we threw out SVN was pretty much the happiest day of my development life (looking back on it that is, it took a while to get used to it). We merge a lot and often and never had a single issue anymore since we stepped over to git.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Hey Blizz, our structure is more similar to yours than I hinted above. I didn't want to complicate senseysensor's situation but this might help you too senseysensor:

Our current model is that a central dev server mounts each of our work drives as exported mounts (samba or NFS). Every save that we do is reflected instantly on the server, but we all share the same working database because it is large. Every dev has his own working copy.

Our work is not as TDD (we're working towards it) but our Test model is that the unit tests create a copy of all required tables exclusively for each dev running the test (avoids test result pollution when multiple devs are testing).

Unfortunately, this model only works if you are all in the same office. We're now slowly building so that the "dev" server is really just a VM image, the idea being that any developer could have a VM running on their system.

Anyway, we're stuck using CVS, nevermind SVN, and I'm pushing us towards Git as fast as I possibly could Very Happy.
View user's profileFind all posts by rudderSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
We are spread over more than one country and often work from home as well. Our dev server is an instance on amazon. The only extra step is getting your files there. But as I said, for windows you have webdrive. PhpED had it's smart upload (although that doesn't delete files that are removed on the server). For linux/mac you have sshfs and so on. I tried a lot of them and still like the rsync over cygwin most. As you confirmed, running on a central database for the normal work and a per-dev copy of the structure for the tests is what works best Smile And git yeah, what can I say. Unfortunately it requires quite a mind shift. Best is to try to convince the others to try it for 2 weeks. If used intensively you'll need the first week to get used to the shift Smile Ow and if you don't have any experience with git: do NOT use it like you use SVN, thats not how it is supposed to work Wink
View user's profileFind all posts by BlizzSend private messageVisit poster's website
projects and collateral developing
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic