SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Development from two Computers

    I would like to have a desktop PC and a laptop available for development. I am using XAMPP on the desktop which I use as my main workstation, however I'd like to just change location and be able to continue working on the laptop. It seems that it is possible to move the /htdocs folder to Dropbox so the XAMPP instances on both devices would use the same shared folder. That would be a part-solution, what about the question of databases, how would I go about that? I'm sure there are others who work in a similar fashion, so I'd like some pointers on how to set this up properly. Thanks

  2. #2
    SitePoint Wizard webcosmo's Avatar
    Join Date
    Oct 2007
    Location
    Boston, MA
    Posts
    1,480
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Why not use one of them as a server computer, and then create a network to allow remote access from other computers. This way you can have everything on one place still access from others.

  3. #3
    SitePoint Guru Jason__C's Avatar
    Join Date
    Oct 2009
    Location
    Racoon City
    Posts
    660
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Are we talking Linux or Windows? I also agree with webcosmo, setting up a server-client relationship would be the best solution for multi-computer setup. The biggest problem you would run into, excluding client-server solution, would be database integrity between 2 computers. Plus, it is very easy to set up a client-server relationship with two personal computers.
    Chuck Norris is so tough,
    mosquitos ask for permission before they bite him

  4. #4
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,998
    Mentioned
    100 Post(s)
    Tagged
    0 Thread(s)
    Something like http://www.usbwebserver.net/en/ is probably what your looking for. I've never used it myself. I guess it would be a case of saving any work, shutting the server down and then moving the USB stick to the other computer to switch over
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  5. #5
    SitePoint Member
    Join Date
    May 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The beauty of XAMPP is that it is configured to be used as a full web server. I agree with webcosmo, simply identify one of your machines as the server, and do all af your dev from there. You can further configure access to your files via ftp or a direct share, which you will be able to access from both machines.

  6. #6
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would be ideal if my main desktop is always switched on and I am working from home, but I'd like both computers to be independent of each other, and be able to work from any location with internet access. That's why Dropbox would be very nice. Another alternative I thought about is to use Bitbucket to host files there and then use Git to pull files to each computer. Not sure that would sort the database issue though anyway.

  7. #7
    SitePoint Member
    Join Date
    May 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have used a Dropbox solution similar to the one you mention, and simply drop my dev files into the right location on each machine. This worked great most of the time, but a couple of times there was a connectivity or other issue, and the files didn't get updated on machine #2. As you can imagine, when I started editing on #2 the changes were propagated to #1, overwriting my original updates. Uggh.

    Anyway, I finally shelled out the $50 annual fee for a hosting plan on 1and1 (or was it godaddy, or somewhere similar?), which solved most of the problems I was running into. Btw, these plans typically provide git support as well.

  8. #8
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,397
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    For me, I try to develop using the same machine if possible. If I need to work from diff computer then I remote access. Of course, I use SCM but I run all the resources like db's/servers/etc... locally. Many times, I tweak those settings. For these tweaks, it's hard (more of remembering issue) to synchronize these between multiple computers. Anyways, your dropbox sounds like a solution but you won't be able to synchronize completely.. the last thing you want to ask is "It runs on A computer but not on B computer". Another option is to remotely wake the computer. I've never done this but here's a resource link.

    http://www.raymond.cc/blog/how-to-re...m-lan-and-wan/

  9. #9
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,397
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    Something like http://www.usbwebserver.net/en/ is probably what your looking for. I've never used it myself. I guess it would be a case of saving any work, shutting the server down and then moving the USB stick to the other computer to switch over
    I like this solution! Keep everything in USB.

  10. #10
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    I think copying files across would probably work for you as a first step, for the db you'll just want do something like http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

    However, it's really easier to be working with with source control & db migrations rather than doing these manual steps if you're moving between machines a lot.
    For example, here's all I would need to do to update the code and migrate the database using a framework like Rails.

    git pull
    rake db:migrate

  11. #11
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    This is a solved problem. What you want to do is use source control, such as subversion, git or mercurial. Work on files on any PC, commit changes, pull updates from the other PC. Also get great features like change tracking, the ability to roll back versions or even the ability to maintain multiple divergent versions in a sane and rational manner.

  12. #12
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the files yes, but for the database? Would you do an export and import each time?

    Quote Originally Posted by wwb_99 View Post
    This is a solved problem. What you want to do is use source control, such as subversion, git or mercurial. Work on files on any PC, commit changes, pull updates from the other PC. Also get great features like change tracking, the ability to roll back versions or even the ability to maintain multiple divergent versions in a sane and rational manner.

  13. #13
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    We usually keep a reference backup that travels with the code so we've got something to stand up and test against. When doing most dev work the rows in the database tend not to matter.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •