What I've got set up at home is a separate box running Ubuntu Server with Apache, MySQL, and PHP on my local area network behind my firewall. Technically, yes, it's connected to the internet, but it doesn't go there. I develop on my Windows machine and "upload" the files to my local Ubuntu server across the local area network. That's where I develop and test everything. You'll want to download Putty in order to control the server from your development machine (unless you've got a spare monitor and keyboard lying around, but even then it's easier with Putty), and look into setting up virtual hosts in Ubuntu, which is actually quite simple even if you're like me and know next to nothing about Linux. I mean, I don't hyperventilate when I see a command line interface, but I'd rather avoid one when possible.

So, for me when I start a new project, I'll Putty in to the Ubuntu server from my Windows box, create a new virtual host called something along the lines of 'projectname.com', use phpMyAdmin or MySQL Workbench to create the database, code on the Windows box and upload to the local Ubuntu server. Because it's a virtual server, it's almost exactly like dealing with a live hosting environment except that the customer can't access the local server - that's where you bring in a staging server, something along the lines of 'dev.yoursitename.com' where the customer can actually see the work when it's ready for milestone presentations. This also gives you a chance to troubleshoot and server-specific issues you may run across before the site goes live.

As a bonus to working this way, you get to learn a little Linux while you're at it.

    maxxd;11054717 wrote:

    What I've got set up at home is a separate box running Ubuntu Server with Apache, MySQL, and PHP on my local area network behind my firewall. Technically, yes, it's connected to the internet, but it doesn't go there. I develop on my Windows machine and "upload" the files to my local Ubuntu server across the local area network. That's where I develop and test everything. You'll want to download Putty in order to control the server from your development machine (unless you've got a spare monitor and keyboard lying around, but even then it's easier with Putty), and look into setting up virtual hosts in Ubuntu, which is actually quite simple even if you're like me and know next to nothing about Linux. I mean, I don't hyperventilate when I see a command line interface, but I'd rather avoid one when possible.

    So, for me when I start a new project, I'll Putty in to the Ubuntu server from my Windows box, create a new virtual host called something along the lines of 'projectname.com', use phpMyAdmin or MySQL Workbench to create the database, code on the Windows box and upload to the local Ubuntu server. Because it's a virtual server, it's almost exactly like dealing with a live hosting environment except that the customer can't access the local server - that's where you bring in a staging server, something along the lines of 'dev.yoursitename.com' where the customer can actually see the work when it's ready for milestone presentations. This also gives you a chance to troubleshoot and server-specific issues you may run across before the site goes live.

    As a bonus to working this way, you get to learn a little Linux while you're at it.

    This sounds a lot like what I do, except I work on the Ubuntu machine itself! This eliminates the need to upload any files from some workstation to the server. My workstation is the server. You can't run Microsoft Office or Adobe programs on an Ubuntu machine AFAIK, but there are a lot of good open source programs that do the job just fine.

    Whether you use your workstation as a server or whether it's a separate machine, it will still behave pretty much exactly like any linux server you'd have for a real server. It does require you to learn some linux, but I've found that this really pays off for your development skills.

      Hi all,

      Thanks again for your input.

      I would like to do something similar to #11, develop on my Windows PC and send data across to the Linux server. Lastly I would like to test the website from the internet side, as I want to interact with the website.

      I this still possible?

      Many Thanks,

      Rocketman46

        Rocketman46;11054755 wrote:

        Hi all,

        Thanks again for your input.

        I would like to do something similar to #11, develop on my Windows PC and send data across to the Linux server. Lastly I would like to test the website from the internet side, as I want to interact with the website.

        I this still possible?

        Many Thanks,

        Rocketman46

        Absolutely it's possible - just set up as described. I think I spent about $200 on an eMachine from WalMart, wiped the Windows installation, installed an Ubuntu LAMP stack, and hooked the machine up to my home network. It takes some tweaking with Samba to get Windows and Ubuntu to talk to each other, but once you do you're set. You can develop on your Windows box using whatever software you want, then drag and drop to the local server. Of course, if you're setting up virtual hosts for the sites you're developing you'll have to edit your Windows machine's .hosts file, but then you can just point your browser to the virtual host and it's pretty much exactly how your live host works. Once you get the project to a presentation milestone, create a subdomain on your current website and upload everything there for the client to review.

          I'm pretty much 50/50 between bare hardware and virtualization. I really like virtualization for development (Virtualbox is free and I find it very stable on Windows, with FreeBSD or Linux guests), but I like bare hardware 'cause I'm geeky that way and still occasionally like to get my hands cut on cheap sheet metal 😃 ...

          That said, if you've got a powerhouse workstation already and download Virtualbox, there's no need to have $200 for the eMachine --- you can spend it on fast cars, cigars, dates with supermodels, groceries, diapers, pain medication, divorce court, etc. 🙂 :p

            As a practical matter, I always found it onerous to have to copy my files to the server before seeing how they worked. This extra step of dragging/dropping files or using FTP or whatever actually contributed a substantial amount of effort to my development tasks.

            It was quite a leap for me to get away from using Windows software -- Dreamweaver was really hot at the time -- but once I jumped to Ubuntu, my productivity really jumped. I have maybe a dozen projects, each in their own subdirectory:

            /var/www/project1
            /var/www/project2
            /var/www/project3
            etc.
            

            And each website has its own apache configuration file that sets up a <virtualhost> mapping of some domain onto each of those project directories, and then I make an entry for each domain in my hosts file. The domain names on my workstation don't usually match the live domain (because I still want to be able to go out and check that live site) but it's close. For example, if I'm working on MyProject.com, I'll set up a local domain on my worksation, mproj.com.

            Things can get a little complex if I want to access more than one site via HTTPS but I usually disable one project's apache conf and enable the other. It just takes a couple of commands via CLI.

            And Dalecosp does point out that you get a little $$savings for not having another machine. You also save electricity cost, space cost, etc. You could use the extra money to buy another 22" monitor and further enhance your productivity.

            I'm not especially familiar with running linux virtual machines on windows, but I've heard of many folks doing this. It's a pretty awesome skill because you can check your code with a bunch of different versions of PHP or Apache or whatever if that's something you need to do.

              sneakyimp;11054767 wrote:

              As a practical matter, I always found it onerous to have to copy my files to the server before seeing how they worked.

              Hmm; in my IDE CTL+S does the FTP work for me; also Notepad++?

              sneakyimp;11054767 wrote:

              I'm not especially familiar with running linux virtual machines on windows, but I've heard of many folks doing this. It's a pretty awesome skill because you can check your code with a bunch of different versions of PHP or Apache or whatever if that's something you need to do.

              Since you don't use Windows any longer, I guess that's to be expected. I was offered Windows or a Mac when I got this job, and because IE on Mac was stuck Way Back and IE on Windows was still a bit of an issue back in 2010, I opted for Windows.

              I've found Virtualbox to be extremely useful, easy to administer and set up, and though it used to seem as if it leaked RAM like a rubber canoe in the North Atlantic, it's been VERY well-behaved on my workstation for over a year now (not sure when it got better, around v4.3.16 maybe? I'm now on 5.0.14). I used to run it on my FreeBSD workstation when I had my own shop and it was useful in THAT context for having Windows VM guests, amongst other things.

                sneakyimp;11054767 wrote:

                As a practical matter, I always found it onerous to have to copy my files to the server before seeing how they worked. This extra step of dragging/dropping files or using FTP or whatever actually contributed a substantial amount of effort to my development tasks.

                It was quite a leap for me to get away from using Windows software -- Dreamweaver was really hot at the time -- but once I jumped to Ubuntu, my productivity really jumped.

                Don't laugh, but I still use Dreamweaver code view. Many, many years ago I got used to the keyboard shortcut for upload, so now I save, upload, then Windows key + Tab to my browser in about three key strokes. That and DW is part of Creative Cloud which I need anyway, so it's kinda free... :rolleyes:

                I've worked in situations where the development machine was the server but honestly didn't like Vim, and it didn't boost productivity all that much for me, but it boils down to personal preference in the end.

                Never thought about virtual machines for different versions of PHP - that's kind of an awesome idea that I may explore soon...

                  maxxd;11054771 wrote:

                  Don't laugh...




                  Heheh ... but seriously, I think we've fought enough editor wars here to realize that a] it's a personal preference thing, and b] you can type bad code, or good code, into pretty much any piece of software there is, and PHP will still run it as bad, or good, code 😉 🙂

                    maxxd;11054771 wrote:

                    Don't laugh, but I still use Dreamweaver code view. Many, many years ago I got used to the keyboard shortcut for upload, so now I save, upload, then Windows key + Tab to my browser in about three key strokes. That and DW is part of Creative Cloud which I need anyway, so it's kinda free... :rolleyes:

                    I'm so not laughing. Dreamweaver was a great leap forward for me from Notepad and an FTP client (seriously!). It is nice that it can render the HTML for you. And your save-upload technique sounds exactly like what I was doing. I bet DW has improved since I was using it, but I remember having issues with the files getting uploaded.

                    So one day I installed Ubuntu on my windows machine as an alternate boot option. Ubuntu is a mature, user-friendly OS now and is very similar to windows in many ways -- except you have linux underneath. I cast around a bit for a editor and eventually settled on Eclipse because it's code-aware. I can click on a function or class or variable, hit the F3 key, and it takes me to the code that defines that function/class/var. It also has autocomplete functionality -- if you start to type a function name, it prompts you with matching options as you type. Then when you select the function you want, it prompts you for the parameters and even shows documentation to explain in most cases explaining what the params do. This code awareness has been a huge boost -- even more than avoiding the save-then-upload keystrokes. You can also step through your code if you set up Eclipse properly, but I've always found this to be a nightmare and my setup frequently got broken when software was updated.

                    I hear PHPStorm is even better.

                    maxxd;11054771 wrote:

                    I've worked in situations where the development machine was the server but honestly didn't like Vim, and it didn't boost productivity all that much for me, but it boils down to personal preference in the end.

                    I never got into Vim either and never ever use it. If I must edit from the command line (which is sometimes convenient, e.g., when editing the hosts file) then I'll use nano.

                    sudo nano /etc/hosts

                    As I mentioned above, Ubuntu is an OS with all kinds of (free) user-friendly software. Don't think you'll be stuck using the command line.

                    maxxd;11054771 wrote:

                    Never thought about virtual machines for different versions of PHP - that's kind of an awesome idea that I may explore soon...

                    I've been meaning to explore it "soon" as well but have yet to get around to it. I got a lot of helpful advice in this post some time back.

                      dalecosp;11054773 wrote:

                      Heheh ... but seriously, I think we've fought enough editor wars here to realize that a] it's a personal preference thing, and b] you can type bad code, or good code, into pretty much any piece of software there is, and PHP will still run it as bad, or good, code 😉 🙂

                      Yeah the editor wars are never ending
                      https://twitter.com/progpaintings/status/720700429210939392

                        sneakyimp;11054779 wrote:

                        Yeah the editor wars are never ending
                        https://twitter.com/progpaintings/status/720700429210939392

                        "Operations and Developers agreeing on Git workflow" - HA!!!

                        In my defense, I've always only used the code view and one of the things that got me into PHP was the fact that - even back when dinosaurs still roamed the earth and I knew nothing of PHP or JavaScript - I realized that the pre-built DW code was crap.

                          5 days later
                          maxxd;11054793 wrote:

                          In my defense, I've always only used the code view and one of the things that got me into PHP was the fact that - even back when dinosaurs still roamed the earth and I knew nothing of PHP or JavaScript - I realized that the pre-built DW code was crap.

                          So if you only ever use code view and you don't need the pre-built code snippets from DW, all that really remains I think is the integrated FTP client and probably some crude code formatting capabilities.

                          If you run apache on your workstation, you don't need to FTP anything. You just save the code to the hard drive, switch to your browser, and refresh. Using Eclipse, I do this with some shortcuts on ubuntu using eclipse
                          ctrl-s saves the document
                          alt-tab to switch from Eclipse to my browser
                          F5 to refresh the page

                          I'll reiterate that the code-awareness you get from Eclipse (or PHPStorm) is waaaaaaay better than what I remember from DW. The code hinting, autocompletion, and F3 button to locate a variable/class/function definition is a tremendous advancement, productivity-wise.

                            Write a Reply...