Shifting my focus a little...

Web Development No Comments »

(Google had this cached, so I am reposting since this got lost in the server crash)

For pretty much my entire career, I have always been more of a backend developer. I would rate myself as "good" to "very good" in that arena, especially in ColdFusion. I'm not the elite level that is always on the cutting edge, but I provide solutions that work with always a thought to performance.

But when it comes to design and front-end, I'm average at best. Creativity has always been a problem for me. I have passable graphics design skills, but mainly when given ideas first.

I also have been held back by my work environment. The last five years I have spent working as a contractor for the Federal Government. That means front-end design is done to the lowest common denomenator. For a long time, that meant things like tables instead of CSS, little or no JavaScript because everything had be coded to work with or without JavaScript, and often times projects couldn't afford the hours needed to code things twice. And most important, Section 508 accessibility standards and a mandate that sites must work in a lot of really old browsers (as far back as Netscape 4 and IE5) the same as they would in modern browsers.

Recently, the noose there has been loosened some. The oldest browser we have to accomodate now is IE6. Still means a lot of potential issues, but less than before. CSS-driven sites are now options. Solutions I have proposed that use jQuery and AJAX are gaining more traction, and in a few rare cases an assumption that JavaScript must be enabled in order for the site to work have been added to requirements documents. On the backend, until yesterday I was stuck using CFMX7. Now we have CF9 at our disposal!

So what does this all mean? A chance for me to start spreading my wings on the front end. I have had some chances to tinker on side work that I do from time to time, and while they like the solid backend processes that I can offer them (making sites not just a marketing brochure, but a tool for their business) they are seemingly most keen on a catchy design that is pleasing. To accomodate this, I find myself wanting to build more in my design arsenal. I look at a lot of sites I find aesthetically pleasing and I'll jump in with Firebug and figure out what they are doing.

One design style I have become drawn to are sites built around large photographs as a background. I really think this is an easy way to spice up a site, and it's become so easy to optimize photos for the web that you can get great images at very little file size cost. I've taken to using "sprites" and CSS for not just navigation bars, but headers and other common elements to allow for a more graphically pleasing site with less of a file size hit only having to load one image for use in multiple places. And since everything I design is checked for 508 compliance, and tested with all styling turned off, I know that the important information will be found by everyone no natter what (and that spiders will read the site properly as well!

I am a huge fan of jQuery, and I know I have only scratched the surface in terms of its capabilities. If it is feasible, using AJAX and minimizing page reloads is a preference of mine, one I'd like to find more uses for.

In all of this though, I try and keep one overridding thought in my head: "Is there a need for this?" and "What makes sense here?". It's my logical brain getting in the way of my creative brain, I know, but I can see how easy it is to get carried away with bells and whistles. But in the end, the goal of the site is to impart information to the users, so it is most critical that the information be easily found.

In the end, I'll never probably be an elite level front-end or back-end developer. But if I can become "good" or "really good" on both sides of it, I think that can be quite a good calling card for the long run.

Comments are moderated solely for spam-prevention purposes.

What I Learned Today - Data loss sucks.

Viviotech , What I Learned Today No Comments »

Over the long weekend, Viviotech had a major outage due to a failed upgrade. I am one of the servers that had failures on the Viviotech backup process as well, which means my most recent server backup was mid-June. Not a very good weekend for me (but better than the one the Viviotech guys had to endure).

I do weekly backups every Monday of my databases, and all my web files are saved in a local CVS repository that I have backed up on my own. Unfortunately, the outage happened before I could do my latest rounds of backup, so my database backups are more than one week old. 

I've lost two blog posts that were done last week, and I know of at least two comments that got lost as well. My apologies to those people.

Comments are moderated for spam-prevention purposes.

What I Learned Today - MAMP Pro and SSL

What I Learned Today , SSL , Web Development No Comments »

A couple of projects I work in involve using SSL in some places. For the longest time I could never get SSL to work right with MAMP PRO (I have v1.84). Today I ran across a blog post that finally got it working for me.

http://www.rockettheme.com/blog/coding/310-getting-ssl-to-work-with-mamp-pro

CFSELECT validation bug still exists in CF9

ColdFusion No Comments »

A longstanding issue with CFSELECT still exists in CF9. For as long as CF has had CFFORM, there has been a bug in validating CFSELECT fields for required selections. It only looked to see if you had an option selected, but never checked to make sure that you had a value selected. So often we create a first option in a select box that has no value as a placeholder. According to CF, that's good enough to pass the required check if you just selected the placeholder. Adobe has been pinged on this issue by many developers over the years and still has failed to fix this for some reason.

There is a workaround for this though. When you use the required and validateat attributes of a CFINPUT, CFSELECT, or CFTEXTAREA, it pulls the front-end validation from CFIDE/scripts/cfform.js by default. Since this contains the incorrect method, you can do one of two things. You can edit the CFIDE/scripts/cfform.js file annd make the fix (it's extremely simple), or you can make a copy of that file, save it elsewhere, and access the file via the scriptsrc attribute of CFFORM.

The original fix for CF7 and CF8 can be found here: http://www.beetrootstreet.com/blog/index.cfm/2007/1/8/CFFORM-doesnt-catch-unselected-dropdown-lists-when-requiredtrue

The fix for CF9 is similar, you just need to make the following fix.

From:

if(_c=="SELECT"){
for(i=0;i<_b.length;i++){
if(_b.options[i].selected){
return true;
}

to:

if(_c=="SELECT"){
for(i=0;i<_b.length;i++){
if(_b.options[i].selected && _b.options[i].value !=''){
return true;
}
Comments are moderated solely for spam purposes.

What I Learned Today - Have your ColdFusion on OS X and your Verity too.

Verity , What I Learned Today , ColdFusion , OS X No Comments »

This is a followup to my previous post on this topic, and a solution found.

Thanks to comments here and from House of Fusion, I learned that Verity does not work on Macintosh OS X. An alternate solution must be found. Thanks in part to Dave Watts of Figleaf, I found it.

Setting Up Verity

From Dave's suggestion, I installed CF9 on an OS that has Verity - Windows in my case.I have an instance of WinXP SP3 running via VMware Fusion. I have the network adapter set up for NAT, so it gets it's own internal IP address.

I installed it as a standalone edition with the local web server on port 8500. After installation I ran the web-based config to get it all up and running. At that point, I disabled all the CF services except for the ColdFusion Search Services, which is set to Automatic. I went into Windows Firewall and opened up the three ports Verity uses.

I went back into my OS X CF admin, and changed the Verity K2 host to the IP address of my Windows instance. Tried to connect to the service and.... nothing. At this point it was 1700 on Friday so I shut down and took the weekend off from this.

I returned to this task this morning with a fresh head, and found some documentation on CF's instance of Verity. It only allows connections from one machine, and by default it is set up to be 127.0.0.1. A search found this address in two XML files in my C:\ColdFusion9\verity\Data\host directory, as well as the C:\ColdFusion9\verity\verity-install.cfg file. I went into all three files, and changed the IP address and mask from 127.0.0.1 and 255.255.255.255 to my OS X internal IP address and a mask of 255.255.255.0. I restarted the ColdFusion Search service on Windows. I cannot tell you for certain which change was the difference maker, but when I refreshed the ColdFusion Collections link on my OS X CF9 admin server, it was connected to the Windows verity!

Fun with soft links

The next task was to set up the collection that I was going to use. The function to do the indexing is set up to create the collection first if it does not exist.

As a reminder, my QA and production environment are Unix boxes, which does have Verity support from CF. On it, CF is set up in the /opt/coldfusion directory. Therefore the verity collections are in /opt/coldfusion/verity/collections/. I have been very strict in making sure that my local development environment on OS X mimics the directory structures used on QA and production, using soft links where needed. So on OS X, I created /opt, and inside /opt created a soft link for "coldfusion" to link to my /Applications/ColdFusion9/ directory.

The path to the verity folder is /opt/coldfusion/verity/collections/. My first instict was that CF would create the directories as needed. I ran my indexing template, and got back the following:

The collection was reindexed. 0 records have been inserted. 0 records have been updated.


Not what I was expecting. I looked in my /Applications/ColdFusion9 directory, and saw no new "verity" directory created. So where was it? I looked on my WinXP instance in C:\ColdFusion9\verity\collections, and saw no new collections created there. I was stumped until I looked at the C:\ drive, and found an "opt" directory there. Expanding it, I found C:\opt\coldfusion\verity\collections\ and my collection inside there!

Now knowing what had happened, I needed to link OS X to that verity folder. I shared the C:\opt\coldfusion\verity folder on Windows, and mounted it in OS X. I then went into /Applications/ColdFusion9, and made a soft link to the mount point for the verity shared folder at /Volumes/verity. So now /opt/coldfusion/verity links properly to the C:\opt\coldfusion\verity on Windows. I think I've got it all, so I run the index again.

The collection was reindexed. 0 records have been inserted. 0 records have been updated.


Huh?

The Final Hurdle - proper location of the documents

Looking in the CF9 admin, I read this:

Because you have a remote K2 server configured, you must ensure that the documents to be indexed are accessible from the ColdFusion server machine as well as the computer on which the K2 search services run.

And that's when I realized that the documents to be indexed couldn't be on OS X, they had to be on windows. I created an uploads directory on Windows, and shared it. I mounted the share on OS X. Then, again mimicing our QA and production structure, I soft linked the root uploads directory to the mount point (/Volumes/uploads).

A final running of the indexing returned this:

The collection was reindexed. 106 records have been inserted. 0 records have been updated.


Wahoo! And a test of the search returned results as expected!

Comments are moderated solely for spam-prevention purposes only.
Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds