I get more and more trouble from running WAMP on my XP computer to solve my local development needs. It feels like as more and more things just go wrong or could not be installed at all to a Windows version of PHP.
I have been looking for an alternative and found AndLinux plus this link.
开发者_C百科Would it be a good idea to get an Ubuntu box running virtually on my XP computer to simulate the production web server?
Yes, in case you don't want to use Linux as desktop OS running it virtually in a VM is quite practical. by using the VM's "shared folder" support you can use the same directory for local development using your Windows IDE and serving requests from the Web Server inside the VM.
In the past - ~5 ears ago or so - I used coLinux and wasn't too happy. On modern systems a small Linux VM just works well.
Regarding virtual machines:
Advantages
- Isolation: Everything in the VM is completely separate from the host; no cross contamination.
- Easy Testing: Most VM software have snapshot and rollback capabilities.
- Mobility: If you wanted to, you could easily move the self-contained VM over to another machine.
Disadvantages
- Inconvenient: File transfer between the host and guest. Using "shared folders" alleviates this somewhat.
- Virtual Hardware: Not good for graphics-intensive programs or other software that relies on certain hardware features (which shouldn't be a problem in this case).
Generally speaking, the closer you can get to the production environment the better. Developing on Windows isn't wrong, per se, but you need to be able to test in an environment which matches production.
If you have the resources on your PC to do it in a VM, that will work just fine. If you don't, running it natively or using a remote server somewhere would also work.
Hope that helps!
Thanks, Joe
精彩评论