August 21st, 2012, 06:12 PM
"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
... 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.
August 21st, 2012, 07:15 PM
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.
August 21st, 2012, 07:53 PM
I was hoping that wouldn't get brought up. I've tried GIT previously and it made things even worse. I quickly uninstalled it.
August 21st, 2012, 07:57 PM
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 08:00 PM.
October 4th, 2012, 07:04 AM
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.