Great Free HTML Editor for the Mac

Although I have searched several times with no luck for a good HTML editor for the Mac, today I decided I was done using TextEdit.

Here is my criteria for a "good" HTML editor.

1) The editor must provide some semblance of context highlighting. Just displaying the text is not good enough.

2) The editor gets extra points for some of the features I have come to expect from using the Microsoft toolset--automatic completion of closing tags when I type the opening tag, outlining and the ability to collapse sections, and syntactical popups of available tags. Auto-identing would also get high marks.

3) Support for CSS.

4) Also, a huge bonus if there is some easy way to preview the output.

5) The tool MUST be free.

This all seems like a tall order, doesn't it? Especially when you add in #5.

Well, friends, there is a tool that provides all the above and then some. Navigate your browser over to Aptana and download Studio. You can either download the standalone tool (around 85M) or the Eclipse plug-in if you have already downloaded Eclipse to build apps for the Android phone.

Don't wait! Download it now. This is an unbelievable tool. And did I mention it's free?

Using DateTime.ParseExact to load a DB2 timestamp to .NET

It would be nice if the only database you ever needed to access from .NET was SQL Server, or something similar to it, that .NET understood and worked with easily. One of my clients makes extensive use of DB2, though, and not a recent version--a version old enough that there is no LINQ provider. So, part of my job is working around some of the oddities of pulling out of DB2 and sometimes writing the result into .NET.

Recently I had to pull a DB2 timestamp and save out something like a timestamp in SQL Server. As you probably know, the SQL Server timestamp is not a timestamp as all, at least not like DB2's. So when I needed to pull the timestamp from DB2 and get some semblance of a timestamp in SQL Server, I needed to convert to a DateTime in .NET.

Luckily, DateTime.ParseExact was there to save the day. DateTime.ParseExact provides methods to allow you to describe in detail the format of the value you will be passing in, and have the resulting DateTime parse out the string exactly as you describe it.

The solution is pretty simple (assuming dateField is the input string with the DB2 timestamp):

Dim cultureInfo As New CultureInfo("en-US")
Dim dateTime As DateTime = DateTime.ParseExact(dateField, "", cultureInfo)

Note the ".ffffff" at the end of the format string. This allows you to specify fractions of a second, which will be coming in on the input string. Unfortunately, this information will be stripped off, and you will lose the fraction part. But at least you now have a DateTime you can save successfully into SQL Server!

Good luck out there!

Zero to e-commerce in 2 days with CRE Loaded

If you have done any amount of freelance web development, you have probably been asked at some point to put together an e-commerce store front for someone. Most likely, the request also contained some caveats--like, the customer was just getting started, and wanted a store front for cheap, and they wanted it to be up pretty quickly (i.e. no long development cycle, with a minimum to the requirements gathering process), and they wanted some kind of admin tools so they did not have to contact you any time they wanted something simple like a price change.

As a custom build, this would be nothing short of impossible. Hopefully your next thought is to use an existing framework and customize it, to accomplish the goals and get something up quickly and cheaply. Next, you are also thinking about hosting, which can be expensive too, depending the requirements of the tool you buy.

I was presented with a similar request lately, so I started looking at some existing frameworks. My research took to through such disparate tools as DotNetNuke (of course the Microsoft guy would look at DNN) and MamboCharge, but I landed on CRE Loaded. CRE Loaded is a PHP script that has been developed on the popular OSCommerce framework. And the results are amazing.

Some of the best parts of CRE Loaded are the multitude of plug-ins available (including secure credit card processing), the availability of resources (both people and web content that can assist), and the easy and speed of getting a store up and running. CRE Loaded brags about how quickly you can get a Payment Card Industry (PCI) compliant store up and running, which promises secure processing in an industry standard framework. And it is every bit as easy as they say.

I recently got a store up in just a few days. I spent additional time tweaking the product, and learned a lot of the ins and outs. Let me tell you that if you plan to do any serious customization, or even maintain an inventory of even 100 items, you owe it to yourself to learn how to make changes in the SQL tables directly. I am sure CRE Loaded would rather you would either use their front end, or their custom load process--but if you know what you are doing, you can turn a difficult update across your entire inventory into a few minutes work.

Case in point, I was setting up shipping for the store, and discovered that shipping requires product weights. The inventory list that I had gotten from the customer's POS system was missing a lot of things, not the least of which was shipping weights. So I had 3 options--go through the admin screens and add a weight to every item (probably close to an hour's work); extract the database to a spreadsheet, update the spreadsheet, and then reload the spreadsheet, praying that the only thing that would be changed would be the product weight (probably 15 minutes work, plus an undetermined amount of time to fix anything that might have been broken due to a typo, etc); or, write a SQL query to set every product weight to 1 pound (1 minute's work).

If you are PHP person, you can also dig into the entire source, and tweak the application. This is not for those lacking caution, though, because it is a somewhat complex script, so I would not advise hacking into to it to make changes--spend some time first and figure out what it is doing. Another example, I had to make some changes to the shipping module to allow various flat rate shipping types, selectable by the customer. Currently, CRE Loaded expects that you will either use one flat rate, or chose from a number of different available shipping options. The moral of the story, though, is that will a little analysis, even this was a fairly easy change, and I could customize the app to meet the business' requirements.

CRE Loaded offers a free version that is a bit limited, but the pro version does a lot and only costs the equivalent of a few hours' work. In am impressed with the speed, ease, and flexibility. If you need to get a storefront up, make sure you include it in the list of products you research. It is worth every penny!