Bookmarks for June 11th through August 20th

Recommended reading

All Flash, little bang

If you have ever visited You Tube you have seen a small example of Flash.  This Adobe creation is dandy for putting video on the web just about anywhere you’d want it.  In fact, there will eventually be some small flash vids on the sites I have here.  The video files are small compared to some of the other formats, and the “progressive download” nature of the beast means that videos can begin playing before they are completely downloaded (though having the video stop every few seconds while the file “buffers” is annoying on slower connections).

Within the last few years there has been a trend (still small, but growing) of creating entire websites in Flash.  This is done by creating the pages in an Action Script code, then compiling the code into a Flash SWF (a type of Flash file) that is then played through the Flash movie player (currently version 10.x). There are some interesting advantages to that, mostly for developers (primarily, that no one can see or steal your coding).

But, there are some dis-advantages, too.  One of my pet peeves is that the scroll-wheel on my mouse doesn’t work on the Flash player.  Not such a big deal when the player only takes up a part of the page, but really annoying when the entire page is a Flash player.  Another thing that doesn’t work is the “auto-fill” function of my browsers (IE8, FireFox, and Chrome).  I rely on that function to speed my logins for the sites I work on.  I’m sure these issues will be cured eventually, but even if they are no longer issues for new sites it’s likely that existing sites won’t get fixed any time soon: that will cost money!

I’m also not keen on the idea of having to have a proprietary player to see a web page.  Sure, it’s given away freely for the client (your browser).  But for how long?  And, not only are there occasional glitches with the latest version, there may be some security issues as well, issues that may not be readily visible.

Another issue is SEO, or Search Engine Optimization.  Because the Flash page code is closed to view, the search spiders don’t know when content is updated.  They are curious when new pages appear, but lose interest after a while because nothing seems to change.  I don’t think that’s too helpful.

Finally, to develop a Flash website requires either a working knowledge of Action Script (AS3 is the latest) and a development environment such as Eclipse or Flash Develop (both excellent open-source tools) or shelling out the cash for Adobe’s Flash Builder ($699.00!) and maybe a few more expensive applications if you want to go whole-hog (Photoshop, Illustrator, Lightroom, etc…, the CS5 packages start at $1899.00).

There are some options emerging, and I am playing with a couple: AuroraFlash and Silex.  Both are Flash Content Management Systems (CMSs) that by-pass the coding and just require installation to begin building your site.  Silex goes on your host, Aurora installs to your computer and creates the files and folders that you upload.  So far, I find that any changes you want to make in Aurora require uploading new files and Silex hasn’t got an intuitive method of adding or editing text content.

If you are interested in alternatives to Flash, feel free to ask: jeff@jeffdoesit.biz

Dot Net Nuke

I am playing a bit with Dot Net Nuke on my home IIS server.  If that makes any sense to you, then you are probably a little familiar with Asp.NET.  If not, let me preach on it.

IIS stands for Internet Information Services and is a web server that comes with certain editions of Windows, usually for free.  With it you could host your own website for all the world to see, as long as your internet service provider allows you to (most won’t without some type of “Business” account and higher fees).

Asp.NET is the Microsoft framework for Web applications and services.  That covers the gamut from simple web sites on the internet to corporate enterprise information systems on private networks.  It is intended to be a robust and secure framework that is also easy to work with.  I have worked with Asp.NET on a couple of websites and have had generally good luck with it.

Dot Net Nuke is a CMS created specifically for this Microsoft IIS/Asp.NET environment.  It is more complex than Joomla, but has more things that can be tweaked for look and feel.  It also has an active development community that produce business-ready modules (extensions, plug-ins, etc.) for shopping carts, catalogs, and the like.  So far, I like Dot Net Nuke.

If you don’t have a site yet, and have heard of Dot Net Nuke, here’s some things to think about before deciding that is the way to go.  The top three are Money, Money, Money.

Dot Net Nuke comes in two flavors: Community and Professional.  The first is free, the second costs.  You can get the particulars at http://www.dotnetnuke.com/.

IIS and Asp.NET hosting are another matter.  The reason that I don’t have an example site up for Dot Net Nuke is that I have not been able to find an adequate free or cheap Asp.NET host.  Because of the licensing fees to Microsoft for Server 2003-2008 and the necessary MSSQL Server (the database needed to handle content, user authorization, and so much more), free hosting with any kind of storage capacity or traffic bandwidth just doesn’t seem available.  And the cost for a Microsoft hosting solution is just plain prohibitive.  Don’t get me wrong, I’m not complaining (well, maybe a little).  Microsoft products have their use and fill a need for highly complex and secure sites.  It just depends on what you need.

To be perfectly honest, I am only mentioning Dot Net Nuke for comparison.  If your business website needs require a Microsoft platform, you are probably beyond the realm of my comfort zone and beyond the scope of my little enterprise.  However, if you are contemplating a website for your business and are looking at your options, I’d be more than happy to help you compare DNN to the other systems that are available so that you can make an informed choice.

Updating your dev environment after a Snow Leopard upgrade

I’ve avoided upgrading to Snow Leopard for ages for a number of reasons:

  • didn’t want to spend ages re-setting up all my ports, I’ve heard SL creates a havoc
  • wanted to maintain java apps that stop working in SL, like Zend 5.5 (it may be old but still has the best debugger around)
  • wasn’t crazy about tinkering with my Cocoa dev environment

Finally I was forced to upgrade, in a panic in fact, as it’s the only way to build iOS apps for iPhone and iPad for version 4 or later.  And since the iOS 4 update broke a lot of our 3.1.3 apps, I had to get fixes out asap.

So what’s involved?  Well on the database side, forget about downloading the dmg for MySQL, it’s poorly setup.  And forget about globally upgrading your ports, the various approaches suggested here and here simply don’t work.

Unfortunately you have to take the advice on the official Macports page and uninstall everything, then selectively re-install the ports you want.  The suggestion labelled “Automatically reinstall ports” refers to a script that collapses almost instantly when it fails to find Tcl libs which certainly don’t exist in my bog standard ports setup.

So one thing you need to keep in mind is to reinstall your ports with the +universal option which specifies 32 and 64 bit architectures will be accommodated.

For a basic PHP+Apache install this page has some good suggestions but is not up to date.  And you need to go here for advice on installing MySQL, which obviously needs to be done before you install PHP.  I’ve summarise the steps required here:

Apache 2

Install apache as follows:

sudo port install apache2 +universal

Then run the following, as advised, to get it to startup automatically after reboots:

sudo port load apache2

Just installing apache installed 16 ports including all the deps.  For tweaks the config the file is here:

/opt/local/apache2/conf/httpd.conf

MySQL 5.1

To get the ball rolling with MySQL, the following:

sudo port install mysql5 +universal

Then you need to issue you a

sudo port install mysql5-server +universal

which just takes a few secs and the server is setup.

To start the server on reboot do

sudo port load mysql5-server

and if you wanted to setup a new db from scratch you could issue

sudo -u _mysql mysql_install_db5

If you want to change any of the configuration the file is here:

/opt/local/etc/mysql5/my.cnf

PHP 5.3

Now that you have your Apache and MySQL installed, it’s time to install PHP and link to them:

sudo port install php5 +apache2 +universal

To enable PHP in Apache, run

cd /opt/local/apache2/modules
/opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so

then add the PHP modules you want after:

sudo port install php5-mysql

Then, to get MySQL working with PHP you need to edit /opt/local/etc/php5/php.ini and set

mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket to /tmp/mysqld.sock

And that should do the trick!

edit /opt/local/etc/php5/php.ini and set
mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket
to /opt/local/var/run/mysql5/mysqld.sock

Bookmarks for June 2nd through June 8th

Recommended reading