Thursday, June 26, 2008

Web Programming Toolkit

I am not a "web guru" but I can generally get things done. But I am always on the lookout for tools that will make things easier. Here are some of the tools that I've been using lately in both my primary job and side projects that I work on.



Content Creation - Text Editing

In this area I am 'old school', I'm a text editor kinda guy. Right now my text editor of choice is notepad++. This is a great notepad replacement with line numbering and syntax highlighting and lots of other goodies for a programming editor.

Content Creation - Graphics

As I have mentioned in other posts, I am a big fan of Blender 3d for graphics creation both 3d and 2d. Also Inkscape for vector graphics is another great tool. Paint.Net is also good for getting those 2d images ready for the web.

Database

It is no small suprise that my database of choice would be MySQL. Here is a web standard if I ever saw one. Easy to set up and use and has always been very PHP friendly. I am also doing some looking at SQLite to see if it may hold some possibilities for use in the future for me. Actually I mention this because I've tinkered a little lately with Google Gears which is a component from Google that allows you to create a local site specific database on a client machine (with their permission of course) to let you store relational database information OFFLINE so that they can cache your web based application on their computer and use it while they are disconnected. This is actually how Google Docs and Reader are doing their offline modes. It uses a SQLite engine to accomplish this.

Code

PHP & PEAR

Most of the files you will see coming from my editor are coded in PHP. PHP has become one of the foremost used scripting languages used online these days. It is versatile for mixing dynamic content with static, making it easy to design websites that reuse a lot of code rather than duplicating it page after page. PHP also allows for easy integration with databases. This point brings me to PEAR. PEAR is the PHP Extension and Application Repository. This is a readily available library of tools written to extend the capabilities of PHP. One example is the MDB2 library which allows you to write database applications that don't really care what kind of database is backing it up (as long as the database tables are there) so your application can be just as happy talking to a mysql database as to an mssql or SQLite database. It also allows for "lazy" database connections. You can set up your database connection in a header file then when you code you always have a $db object ready to talk to the database for you. It also makes it easy to get the data back from queries really simple to do in various formats. I'll probably do a example in my next blog post.


JavaScript

I've been using a Javascript Framework called Prototype lately that is really helpful. I've mentioned it before. If all you are looking for is an easy way to get into AJAX, check it out. Also an extention to Prototype called Script.aculo.us makes doing user interfaces easy with JavaScript and AJAX. From animated effects to Edit-In-Place fields to Drag and Drop support it is a great library to get to know.

A recent javascript library that I found for making HTML tables sortable is called Standardista Table Sorting it is very simple to implement in your code and is very fast. I'll have to show you how I added it to a function to take a MDB2 result set and turn it into a sortable database table (based on an idea implemented by a co-worker) in a later post.

So, in short, yes I am firmly planted in the LAMP (Linux Apache Mysql PHP) camp. But I am certainly open to other tools and technologies. Really whatever makes my job easier.

What are your favorite tools, languages, database engines and libraries? Leave a post and let me know!

Thursday, June 19, 2008

Free / Open Source DVD Creation Workflow

Occasionally I will have the need to create a DVD. I'll do slide shows for weddings or special events, videos for family or church. My DVD drive came with it's own burning software but I've been looking for a more portable solution, since I use other computers with DVD burners in them, but no pre-installed burning software. Here is a rundown of how I might put together a slide show DVD with no commercial software.

First I'll need to scan in my images, for this you can use Paint.NET. If you haven't seen Paint.Net yet, it is a great light Photoshop replacement. If all you are doing is scanning, rotating and cropping images and doing minor work on them, it is super. Others would say to use Gimp here, but it has always felt clunky to me. Paint.NET is Windows only, so Mac and Linux users will need to look elsewhere for this part of the chain.

Once you have you images ready, you may need some extra slides as intro or ending slides. For this I go to my old stand by, Blender. Here for instance is a pair of wedding bands that I made for a wedding slide show. I added the text after the fact. You could also use Blender to create menu graphics for your DVD. It has a built in non-linear video editor if you wanted to do any motion video or animation as well. Blender is cross-platform: Windows, Mac and Linux can all use it.

So at this point, I have a folder full of images that I have named numerically in the order I want them (this speeds up the process later) ready to be made into a slide show. Now in the past I have used Windows Movie Maker, but I wanted to get away from that because it really has it's limitations. So in doing a little searching I found SSMM which is a really handy slide show tool. It has a pretty wide selection of transition effects and a pretty simple layout. You can also sync up audio as well (as long as it is in WAV format, see the section on FFMPEG later for help) Once you have all your settings done, it will render an AVI file of your slide show. SSMM is Windows only, so Mac and Linux users will need to look elsewhere. It may run under Wine for you Linux folk, but I don't know.

Now I needed to get this AVI onto a DVD. I found DVDStyler, a Windows/Linux DVD authoring package (Mac users could of course use iDVD). It lets you build your menus and insert movies into your DVD project and burn the DVD as well. There is only one problem with DVDStyler, for videos, it only accepts mpeg and SSMM only outputs AVI. But have no fear, there is always a solution.

If you do any work with video files, FFMPEG can be your best friend. One of the tools in the ffmpeg package is a command line converter. It can convert a TON of formats, including wmv and quicktime. It also does audio formats, so if you have an MP3 file that you want to convert to a WAV so you can use it in SSMM, it'll do that too! So with this simple command I can convert my AVI from SSMM to an mpeg usable by DVDStyler.

ffmpeg -i inputmovie.avi -b 1600kb outputmovie.mpg

Now that it is converted, DVDStyler can add it, I can finish the menus and burn my DVD.

So there you have it it may not be the quickest solution, but if you have a scanner and a DVD burner already, you are good to go. Do you have any suggestions for this production chain? Any tools in your toolbox that you would like to share?

Wednesday, June 04, 2008

Settling In

Well, I'm into my 3rd week at Greenville College. Week one was spent getting re-acclimated to how the IT department was set up, getting my accounts set up as well as my computer and learning that I may well get pegged in the head at any time with a nerf rocket. My second week at the college was not spent there, but in Nashville, TN at the JAM 2008 convention. This is the annual conference for a company called Jenzabar who makes software for higher education. I went with Dan Coulter and Kris Truitt. We went to a lot of sessions about the core software we use at the college, but also spent a bunch of time hanging out. We watched a bunch of RiffTrax and ate ate this a hole in the wall BBQ place called Hog Heaven. So really a great time!
So now the hard work begins, but I'm looking foward to it.