开发者

Building a CMS in PHP: Development tools

开发者 https://www.devze.com 2022-12-24 14:15 出处:网络
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 questi

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'r开发者_如何学运维e 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号