#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Location
    Holloman AFB, NM
    Posts
    21
    Rep Power
    0

    Red face "Easy" web development?


    I hope this is the right forum for this type of question, as I couldn't find one that seemed "right."

    I'm still relatively new to web development and I'm having issues keeping commonality between my dev pc (at home, Win 7) and my VPS (Server 2008).

    I've found I can do things to help, such as:
    - map folders to drives (U:, P:, etc.) so that scripts can ignore absolute file locations
    - use the exact same version of WAMP and FileZilla

    If I make a large number of changes I may have to:
    - Upload all php code / files
    - Dump, upload, and then re-import database
    - Change FTP username/passwords
    - Change apache config
    - etc.
    ... this can quickly become a very tedious process just to match what I have on the dev side.

    I'm using WAMP, so I figure that maybe I can stop services and just upload the entire root directory of WAMP (which contains all apps & code, such as MySQL and my php files) to overwrite data / users / etc. By only uploading modified files this would be rather quick, I'd think. Additionally, my VPS is not web-accessible as-of-yet so I'm not too worried about momentary outages.

    I feel like the development is probably less complicated than I'm making it. All I'm trying to do is deploy a "snapshot" of all my website-related code / configuration / data to the VPS. I'm thinking there's a way to do this efficiently that I'm simply not grasping.

    Really, I'm just trying to make development "easy"-ish. I make changes, I run something (maybe a bat/php script?) and the VPS is updated to my DEV state.

    I hope this rambling even makes sense! Any help is greatly appreciated.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    It's sounds like you're not using version control software, which is probably the number one thing you can do to make it easier.

    If your software is written well, the absolute file locations shouldn't matter at all. The server version shouldn't matter much either as it's pretty rare for PHP or MySQL to introduce backwards incompatible changes.

    Handling the database is the trickiest part. Most projects that I've seen start with a common base schema and then apply patches to it. The patches are SQL statements that are committed into version control and then run against the database when you update a working copy. Often a list of already-executed patches is stored in the database and a script is used to apply new ones.

    You shouldn't be sharing FTP usernames and passwords between environments.

    Your Apache config shouldn't change frequently either.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Location
    Holloman AFB, NM
    Posts
    21
    Rep Power
    0
    I was hoping that wouldn't get brought up. I've tried GIT previously and it made things even worse. I quickly uninstalled it.
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    If it made things worse then you were using it wrong, but GIT is not an easy version control system to use so I'm not too surprised. You might have better luck with Subversion and TortoiseSVN if it's your first time working with version control systems, they are a lot friendlier.

    Basically you have a checkout of the repository on your development machine and a checkout on your production machine. In the simplest use-case, you commit changes from your development copy to the repository, then when you're ready to deploy you update your production copy from the repository.
    Last edited by E-Oreo; August 21st, 2012 at 07:00 PM.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    8
    Rep Power
    0
    Web development is a broad term for the work involved in developing a web site for the Internet or an intranet . This can include web design, web development content, and client communication, programming client-side/server-side, web server and network security configuration, and e-commerce development. However, among the professionals on the Internet, "web development" usually refers to the non-core aspects of building design Web sites: writing descriptions and coding. Web development can range from developing the simplest static single page of plain text to the most complex Internet applications on the Internet, and e-business, or social network services.

IMN logo majestic logo threadwatch logo seochat tools logo