Working with small group of developer on PHP projects - php

Want to work with 4-5 devs over internet on PHP projects.
Question: Is there any with/without central server version control system that will work with Netbeans IDE, Windows 7 and IIS?
Please: don't suggest any third-party servers like bitbucket or git-hub. I don't want to use any paid server or free ones with limited posibilities.
I want to set-up my own server. That's why asking to community
Thanks in advance.
System specs:
Currently My OS is: Windows 7 Ultimate X64 and IDE is Netbeans 7.1.

I personally prefer git. Since I work from a laptop, it allows me to have my own versions, while still reaping the benefits of a centralized repository.
The Windows part was answered in this question.
This should be the thing you're looking for, since git integrates in netbeans 7.1 REALLY well, and is easy to use and master.

cvs and svn are both easy to setup on a server and they have clients for all the platforms mentioned.

We are successfully using gitosis. gitolight might also be an option for small teams but I have not used it. An other option is to set up gitourious, but this might be overkill for you.
Said all that most of this systems are desigend to work on Linux. We are actually running gitosis on a Synology NAS, with 2 developers and about 30 projects.
This post might be interesting for you: Gitosis alternative?

You can use an ssh account and create a github repo that is shared among the members of the team. The limitations are negligible with this approach since you can setup a server yourself.
Take a look at http://www.mindfuzz.net/?p=250 for ideas.

Ok, I decided to make this an answer after all.
VisualSVN is an easy-to-use-and-setup SVN server. Simply download the free version from http://visualsvn.com/server/download and install. Then refer to http://www.visualsvn.com/server/getting-started/ for a few tips to get you started.
You need to make sure that NetBeans supports SVN. This link states it does.

If you want to run your own server, you have many options. I personally like git, and it is quite easy to set up your own server. Check out this chapter of Progit: http://progit.org/book/ch4-0.html
It talks about your options for setting up a git server and has step by step instructions.

Related

Git for Windows 7

My OS is: Windows 7 Ultimate and IDE is Netbeans. Want to work with 2-3 devs on PHP projects. After research I found that it's possible with GIT. Found this solution. But it's installing apache server. (I don't need any web server: I already have one - IIS7). Is there any free solution (I mean not only GIT, maybe something else) that will work with Netbeans and allows to work with group of developers?
Instead of running your own Git server, why not use bitbucket? It will give you a Git server that you can share with up to 5 people, working on an unlimited number of projects and it is free.
Installing and running a private Git server is not worth it.
For an internal hosting solution I find that Gitolite running on an Ubuntu Server VM with the max secure connection setting bumped up to 100 works really fast! Admin is a breeze as well.
Personally I use TortoiseGit and it's good enough for me. However, a better idea might be to buy a cheap VPS (git doesn't need high specs) and set up your git repo on that.

How to share a PHP project?

Me and two friends want to build something in common in PHP, probably all of us are going to use eclipse for that, but some use Ubuntu and some use Windows.
Is there any convince and good why to share the code and develop together freely? Thanks!
And we don't want our project to be open source in this case :(
You can probably use a Subversion (SVN) or Git repository. These are tools that enable several developers to work on the same project at the same time, managing conflicts and versions of the code.
For free solutions, please see:
https://stackoverflow.com/questions/59791/free-online-private-svn-repositories
https://stackoverflow.com/questions/2378120/is-there-a-free-private-git-repository
How to install Subversive, a free Subversion client for eclipse: http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php
Depending on your platform, i would recommend following:
SVN Provider:
SpringLoops (Ref. Link)
I've been with them for 2.5 years now, blazing fast support. It has some rock-solid features like auto remote deployment so if you commit it instantly deploys to the remote server so you have the actual version running on the FTP too.
As far as i can tell you, KEEP AWAY from BeanStalk as provider, they are copying SpringLoops and have roughly the same features but theirs work very very slow. There are waiting times for remote deploy of 120 seconds in average.
Mac OS X:
I've extensively used Versionsapp from Sofa but in the last 2 years it did not receive any (major) update at all so i purchased CornerStone and it's working very very good. You can keep track of anything that happens to the repository.
Windows:
If you are using windows, i would work with tortoisesvn which works with the windows Shell so you give the commands via the shell menu. It's easy to use and is developed since a very long time.
If you have any questions write a comment and I'll update my answer :)
I think bitbucket is a great solution for sharing a small project with your friends and make it privately for free.
https://bitbucket.org/

Building a CMS in PHP: Development tools

I'm planning to build a CMS in PHP and MySQL, mainly for my own amusement and education. (Though who knows, I may come up with something useful and cool. Anything's possible.) I'll be asking questions about code architecture etc. later. For now, I'm more interested in development tools.
So far, all my playing with code has been done on a web server, and I've edited over FTP. I was thinking it might be quicker to use a localhost. Also, that way, I could use version control (which I've never done before).
So,
A. How do I set up a localhost server with many subdomains on an Ubuntu 9.10 computer. Is XAMPP for Linux the way to go, or should I use a standard Apache distro? (Or another webserver altogether?) For that matter, is it possible to set up more than one webserver on the same computer, and to use them for different localhost subdomains?
B. How do I set up a version control thingy covering all the code (which will be on several subdomains of localhost, and in a few shared folders)? I've read Joel Spolsky's HgInt tutorial, and it makes Mercurial look good. And simple, especially if you're working on your own.
C. Should I continue to use gEdit to write HTML/CSS/JS/PHP, or is there a better free editor out there for these languages?
A. Why would you use XAMPP when installing a LAMP stack is as easy as sudo tasksel install lamp-server? You can add as many domains to the configuration as you want using VirtualHosts for example (well theoretically anyway, in practice the amount will be limited by the available resources), you don't need multiple servers for that.
B. sudo apt-get install mercurial maybe? Of course, how to create a repository and add your projects is up to you - you should read the documentation of Mercurial.
C. Use Eclipse or NetBeans if you're planning to do any serious development work.
I'd recommend against using XAMPP, particularly if you're inexperienced as this would bypass all the package management functionality integrated in Ubuntu (so you need to manually track and apply security changes, if you need extensions not in the XAMPP distro you'll need to compile from scratch, similar for most of the external admin tools which might interact with the Apache install).
Yes - you can have lots of virtual hosts on the same webserver (rcently worked somewhere with 1200 named virtual hosts on each Apache webserver - start up took about 2 seconds rather than 0.5 - but after that you'd never have known the config files were HUGE).
If you're working on your own, then this is about the only scenario where using a distributed version control system offers no benefits over concurrent version control system, and a concurrent version control system offers no benefit over a conventional version control system. But even though it offers no advantage in the technology, it may be of benefit to you to acquire specific product skills.
What editor you use is matter of personal choice. Though personally I would list gEdit in my recommendations (I'd suggest NetBeans or Zend Studio for people who like standalone IDEs, otherwise vim, Eclipse, emacs).
A php documentor is (IMHO) a must (I like phpxref) along with some sort of testing toolkit.
HTH
C.
A: I've used Xampp for Linux successfully on Ubuntu. It's not hard to setup a normal apache installation, but I like the advantage of having a "temporary" web server where the changes are easy to reverse without affecting my normal installation.
If you want subdomains, configure apache to use virtualhosts.
B: I suggest subversion, but VCS is something of a religious issue. It doesn't matter what you use particularly. Once you've made a choice, then research the usage of a VCS.
C: Netbeans is much better than gEdit. That or Eclipse would be my preference. I use Netbeans under Ubuntu myself. A full IDE though will make development much easier than a text editor. Mostly because of code completion/integrated debugger.
I think stackoverflow.com is for programming questions. You'd want to ask those server questions on serverfault.com. Then again, they'd probably ask you to google it. Give it a try.
The editor question is cool. I use Kate, just because it comes with KDE and has syntax coloring.

Does most professional PHP development take place on PCs or on Macs?

I'm trying to determine how likely it is that my next job will involve the use of a Mac/PC if I am hired as a PHP programmer. With Rails, most shops seem to develop on the Mac. I'm wondering whether the same is true of PHP.
Most PHP development houses will have you debug and run your code in a testing environment that mimics the production environment. This way you are able to use the OS/editor/IDE of your choice and it should all come out okay. One of the advantages of PHP over other web service languages (ASP.net, et al.) is that it is multi-platform at its heart. I would be more worried about things like what version control system are they using and what is their production environment like than what desktop OS you will have to use, as these are the variables that get locked in stone while your desktop machine isn't.
The simple answer would be more people use PC's so more developers develop PHP on a PC. I use Linux.
They all can do it very well, I would just make sure you are comfortable with all 3 operating systems. My office does almost ASP.net development exclusively, and the guy next to me develops on a Mac!
Basically, as a professional, you need to be able to hop on anything and be able to develop on it.
When I did PHP, I developed on XP, deployed on Linux, FWIW.
Irrelevant. I use Linux and Windows, but it doesn't really matter, because on both I use the same editors (ActiveState Komodo and Zend Studio), both of which are also available for Mac.
There is no limiting factor in regards to the language itself. We're a pure PHP development environment and all of our developers use Macs. But it wouldn't be a problem if any of them used Windows boxes or Linux boxes to develop on. The only problem would be if the company had development tools that had to be run on a specific platform. The short answer is: it depends on where you get a job.
I have seen a few companies say in their job advertisement that they use Macs to develop on. In reality though I think that was just put there for the "cool" factor.I am willing to bet that they would allow you to use whatever you wanted to develop PHP on as long as your PHP + Apahce/IIS/whatever configuration is not a million miles away from what is used on the production servers.
I don't think it should matter all that much when it comes to web script programming like PHP or JavaScript, unless you are partial to a specific IDE or something. I do all of my web programming code in a notepad editor, but it does not seem like it would be all that hard to code just as well on a Mac or a Linux box or even a Blackberry.
I do all my development at work on Windows XP.
For PHP development at work I use Nusphere PHP Ed on Windows. It has a lot of useful features like debugging and code intelligence, but I've found it to be a little unstable for software that costs money. Still, if you don't mind it freezing up every so often and want to pay for it, it's a great PHP IDE for Windows.
My personal favourite is Eclipse with the PHP IDE Project plug-in (there's a few options), if you use that it doesn't matter which OS you use (it works on PC, Mac and Linux).
I would say PHP is more on windows as it has been around much longer and likely spread to more development environments.
I do most of my heavy development on Linux. If you are running Linux servers, like we do, and your site uses specific services, it's best to keep your development platform as close to your target production server.
I use a Mac to do personal development, but I'm not as comfortable with that as I am on Linux.
I bet quite a few people use Windows for web development as most people use windows full stop, and I see no reason why not, if that's what they prefer. I don't.
At the moment i am doing all my PHP development on a macbook using a Centos Virtual box. Its great as you do not have to install anything on your actual mac apart from Virtual box as its Free. It takes around a 1 or 2 hours to set up the guest correctly and you can be on your way. From there i am using Eclipse PHP for the actual code development.
I like to work on Windows 7 and the IDE is Sublime Text which is also convenient for Mac users as well. OS is really doesn't matter for PHP development as its multi-OS dependent.
My PHP Environment Setup:
Windows 7
Sublime Text
Xampp Server
GIT

PHP website, should I develop into a Linux distribution instead of Windows?

In few months I start a project in PHP and I am hesitating to do like usual : develop on my Windows Vista 64bits machine. Since I know few things on Linux, I think it can be a good way to learn by working on a Linux distribution.
Do you think it's a good idea or not? I would run a VirtualBox with Ubuntu (on my Vista64bits). I was thinking to install XAMPP to be able to develop in PHP.
If you think it's a good idea, feel free to suggest me some tutorial about what I should know with Virtualizing an OS, or Linux/dev.
Update
I have build many website in PHP with Windows, the question is more about if it's a good way to start learning Linux by developing on it via a Virtual machine? I have 4 gigs rams, will it be smooth if I install Eclipse in the Virtual Machine? etc.
You should really develop on the same platform where you are going to deploy. I'm not saying it is bad to do differently, but it can save you some pain in the long run. OTOH, you might learn faster about platform differences that way. So, the main question is: do you want to have a production system running ASAP without much headache? Or, you want to spend some time and make some effort to learn how to develop cross-platform stuff?
And yes, there are differences. For example, case sensitive and case in-sensitive filenames. Then, some PHP functions use native C functions that have different implementation. For example, printf() does not produce the same amount of whitespace for some of the types. Resolution of time measurement (milliseconds vs microseconds) can be different, etc. Then, you have different ways filesystem permissions are handled. These are just some recent problems I've found that I can remember off the top of my head.
PHP should be the same on any platform - so where you develop shouldn't matter.
However, in my experience and observation,more sites running PHP are running on Linux than Windows.
Getting Apache and PHP setup on something like Ubuntu or Fedora is a cinch, and testing everything is pretty simple, too.
Also, when you go live with your site, what platform will it be running on? I prefer to do development on the platform it will be running on whenever possible.
Personally, I don't think that for local production you should be using a VM. Would you be running your IDE inside the VM too?
If you are aware enough of the pitfalls of moving between Windows and Linux environments (such as case sensitivity and permissions), you should have no problem developing on Windows and deploying on Linux.
Working on a Linux distribution is defnitely the easiest way to learn it. And setting up some servers and doing some dev work is an excellent start.
Virtualising Linux is also really easy. I've done it quite a few times and it's really obious. Also, going this way will ease you into using Linux, much better than just jumping in and finding out your wireless card is unsupported like I did :)
As for PHP development on Linux... I've done some PHP coding on Windows and on Linux and I can tell you there's very little difference between the two. I use Eclipse on both platforms and Apache &MySQL / XAMPP. The only major difference I've seen is that Linux is much more finicky about permissions and case.
PHP is not the same on all platforms, and until very recently the windows versions had problems which were not found in the Linux versions. Lots of useful features are *nix specific.
I would echo #Milan's sentiments about developing in the deployment environment. You learn a lot more about the deployment environment by doing so too.
On the VM issue, if you want all your Windows tools and your windows machine, setup a linux server in your VM (can have a GUI if you want, but you're going to mainly use it as a server). Set it up so that windows can view the apache install running in your VM and you use samba shares to access the vm's files like a drive in windows. That way, you develop in windows but are testing deploy / setup on a running linux server. While two devs at my shop run Ubuntu, a third needs to use Photoshop and various other bits of windows software all the time, so she uses this method of running a server in a VM but developing from windows.
Oh, and if you're running on Linux, don't use XAMPP! A few simple commands will have you up and running and you'll get a much better understanding of your deploy. XAMPP is fine, but it's for OS's that don't have Linux's package management.
while XAMPP works great, running Apache and PHP on Linux is a given; while on Windows it's something extra you have to do... and support. Also, most parts of the stack are far more optimised and mature for a POSIX environment. The database engine(s) performance is particularly sensitive to the available primitives.
Most OSS runs on windows, but it's a round peg whammed on a square hole.
On principle, I would advise against "learning by doing" in a real project - unless it it really small, or you have doen very similar projects before, so that the learning curve on project related issues would not be steep. In that case you may have ressources free for learning about the developing environment.
Generally I like the Linux environment better than Windows. Mainly because all the CLI tools you would need are provided and Bash beats cmd.ext any time. But with Cygwin I find even Windows a comfortable development environment.
Regarding PHP development I can't really see how it would be much different. Maybe there is some benefit in being forced to make the code more portable (things like line endings, forward slashes in filenames and such) if you use booth systems.
As a desktop or workstation there isn't much difference between the two. I find that the biggest differences lies in how you administer them, but hopefullt you have some other people doing that for you.
In my opinion you needn't to develop in a linux distribution.
Web Development can be done from any OS. I don't know, why you are programming for the web... as a professional? for your personal homepage?
I think, it's enough to get some free webspace running a PHP Server and to upload your files there... it doesn't take you much time and there are less things to manage.
a german student ;)
Use the OS your deployment server will be running, and it is highly probable to be linux. I have recently seen a deployment gone ultra bad cuz it was developed using wampserver and deployed on CentOS. With major differences in apache and PHP config. So know your deployment server and match it as closely as possible.
Try creating a development environment using VmWare Player. I have several Linux environments that I run on my Vista laptop. You could also just dual boot. I use Ubuntu, it is easy.
The side effect of developing inside a VM: more overhead and eventually the needs of additional tools to make the development more comfortable.
Often people need special tools for their development like Photoshop or some vector design tools not available on Linux. If the working copy of the project is inside the VM, it makes sense to have easy access to it. So you will setup SAMBA (which makes often problems with the login from XP) or setup SSL(SFTP)/FTP.
Also you must learn how to use networking with the VM (NAT, bridging, port forwarding).
On the other side, developing on another platform as the target can give some headache. I found myself often confused with .htaccess files for password protection, because oft the different path on Windows/Linux. If you forget to change this entries later on the production server, you have a problem...
A better solution: use the best of both worlds.
A VM eventually running later headless (no gui, more like a "remote server") with Ubuntu/Debian/FreeBSD) and only running the needed servers (Apache, MySQL, FTP, SSH...).
Eclipse or the other development tools on Windows/Mac.
5 years later: My opinion is to use the Linux solution. There are many advantages for using PHP in Linux. The primary reason is the level of help available from the community. PHP seems to be optimized for Linux environments as well.
There is also safety in numbers as an overwhelming number of sites are hosted and run with LAMP solutions. There are a wide range of frameworks and CMS' that run best on Linux with Apache2.
Make your life easier and start learning PHP straight away.

Categories