Archive

Posts Tagged ‘firebug’

Hardy Heron is Here

November 27th, 2008

heron

Finally, a default Ubuntu desktop background that doesn’t suck.
ubuntu The new Ubuntu desktop/development server just arrived (a week early I might add). I’ll be running Ubuntu 8.04 LTS (Hardy Heron) with a whole bunch of packages installed for local Web development. It’s about time I had a decent server.

LAMP

debian After the prerequisite setting of the root password, creating a group and login for myself, and installing a few dot files to get comfortable, it’s time to install the ubiquitous stack—with a number of goodies thrown in:

$ sudo apt-get install\
  apache2\
  apache2-dev\
  php5\
  php5-dev\
  mysql-server\
  mysql-client\   # for C/Perl client interfaces
  php5-mysql\
  php5-xdebug\
  php5-apc\
  php5-gd\
  php5-imagick

At this point, you might want to get yourself a coffee or something—that’s a lot of software to download, build and install. When complete, you will most likely need to make some changes to your config files: apache.conf, php.ini, my.cnf, etc.

package If any of these packages complain about missing dependencies, try:

$ sudo apt-get build-dep [package]
$ sudo apt-get install [package]

You should probably consider changing the Apache/MySQL user/group daemons, and set the MySQL root password. Once you’re good to go, start the server:

$ sudo /usr/local/apache2/bin/apachectl start

And visit http://localhost/

If everything went well, you’ll get a welcome screen. I usually drop a little PHP script into docroot (normally /var/www/) to review settings and such:

<?php phpinfo(); ?>

xdebug If you’re planning on using the Xdebug profiler, you might want to check into Cachegrind and the various alternatives for viewing the output.

MySQL Toolkit

maatkit Speaking of goodies, Maatkit (formally MySQL Toolkit) includes:

And a whole lot more.

$ sudo apt-get install maatkit

Editors

vim You can’t write code without an editor. My personal favorite:

$ sudo apt-get install vim-gnome

Tweak it any way you like. Some good places for tips:

zend If you prefer an IDE over the command-line, then I recommend Eclipse. NetBeans is another choice, however Eclipse shines with PDT installed. Eclipse requires a JRE, as does OpenOffice (OOo) for some features. If you are having problems with the one already on the box, try installing the Sun JRE:

$ sudo apt-get install sun-java6-bin

image

QGit screenshot, how sweet is that?

Version Control

git Only fools still write software without maintaining their code in version control repositories.

$ sudo apt-get install subversion libapache2-svn
$ sudo apt-get install git-core git-svn

Git fans should be interested in QGit.

Other Development Tools

bugzilla Depending on the complexity of your project(s), whether this server is being built for a single developer working on a brand new application, or perhaps it will be used for multiple projects, some already off the ground, with multiple developers, and so on, there are some other tools that are worth considering. Trac combines issue/bug tracking, a wiki, and an interface to Subversion. Bugzilla is another very popular alternative, and there are other choices.

mediawiki If you decide a bug tracker isn’t required at this juncture, don’t overlook the importance of documenting your work. There are all sorts of methods for doing this, but I’ve found that wikis are great tools, no matter what the size of the team.

python Like Perl, Python is another great tool that excels at all sorts of things besides Web development, and many of the other tools listed here rely on it. Hardy Heron comes preloaded with Python 2.5. If you want to upgrade to 2.6, it’s a little tricky since, as of this writing, no Debian package exists for it. Why, I’m not sure. But you can build it from source. This article will help.

Productivity Applications

  • OpenOffice — word processing, spreadsheets, presentations, draw…
  • Gimp — who needs Photoshop? Or the price tag.
  • Inscape — who needs Illustrator? Ditto.
  • Pidgin (formerly Gaim) or Empathy — IM/chat clients.
  • Thunderbird — email client.

firebug There should be no need to mention Firefox. Or the wealth of addons that make Web development so much more rewarding than in years past.

The Price is Right

The price of hardware has steadily fallen over the past few decades, while throughput and the quality of software have been inversely meteoric.

Server Hardware

  • Pentium dual-core processor E2200 (1MB L2, 2.2GHz, 800FSB).
  • 2GB dual channel DDR2 SDRAM at 800MHz.
  • Intel Graphics Media Accelerator 3100 (this isn’t for gaming).
  • 250GB Serial ATA hard drive (7200RPM) with DataBurst cache.
  • 16x DVD/RW drive.
  • 10/100 Ethernet.
  • 7.1 Channel audio.
  • USB Keyboard/Optical mouse.

Price: $250. You heard me, but that’s without a monitor. I have a 22” FS that will do just nicely, thank you.

Software

A downright embarrassment of riches. Which also contributes to the low cost of the hardware itself, since you aren’t paying all those commercial vendor licensing fees. I won’t name names. No I didn’t build the server myself—my hardware days are over.

Price: $free.

A special thanks and kudos goes out to the thousands of open-source developers, maintainers and supporters who work countless hours to bring us all this fantastic software. The Web, and our lives, wouldn’t be the same without them.

Life is good.

See Also

More of the above, as they roll in.

Apache, Linux, MySQL, PHP , , , , , , , ,

GearsMonkey

November 24th, 2008

gearsmonkey Have you ever wished you could access Wikipedia from your laptop while on that 4-hour flight? Oops! No internet connection, you’re out of luck. Until recently.

gears If you have Google Gears installed and are running Firefox with the Greasemonkey extension you can tackle this challenge, and once you know the technique you can access almost any Web site offline. For Web applications that are designed to take advantage of this technology, you can even save data seamlessly to your local disk, and as soon as you’re back online it will sync with the remote server. This blog, built from WordPress, is already Google Gears enabled.

greasemonkey There are several steps involved in getting this to work. First, install Greasemonkey if you haven’t already. Next, install and enable Gears. Then install the Gearsmonkey script. It will utilize all three components of Gears:

  • LocalServer — capture URLs.
  • Database — store URLs and other data locally.
  • WorkerPool — run computationally heavy threads in the background.

wikipedia Visit Wikipedia. The Gearsmonkey script will check to see if Gears is enabled and trigger the allow dialog if it hasn’t. It then inserts an iFrame and initialized Gears on it. The iFrame will contain a Cache Page link, once selected it captures the HTML and CSS of the Main Page and stores all URLs and static media content (images and so on) to the local Gears database. With FireBug installed, you can watch all this taking place in the console log.

Once you understand the technique, and study the code in the user-script, you can adapt it to capture any site on the Web for access while offline.

Links

Extensions, Firefox, JavaScript , , , , ,

The Brave New World of Web Development

November 21st, 2008

image

Firebug running while I work on aligning floating right images.
firebug You gotta love Firebug!

Extensions, Firefox