Archive for category Web Development

A compelling argument for why we should play more games!

What do you think?????

type="application/x-shockwave-flash"
allowscriptaccess="always"
allowfullscreen="true"
width="640"
height="385">

No Comments

Free Developer Tools!

Any developer or artist will tell you – you are only as good as the tools you use.

As an artist when I am considering starting a new piece my first consideration is the materials I am going to use and the tools I have at my disposal to create.
The better the tools, the nicer the finished piece is going to be, and the higher the quality of the materials the longer it is going to last.

Database query – Oracle SQL Developer:
http://www.oracle.com/technology/products/database/sql_developer/index.html

Coding – Eclipse:
http://www.eclipse.org/pdt/
I can’t wait for the official release of the Eclipse based ColdFusion builder but until they finish putting it together I’ll continue using Dreamweaver and Eclipse.
I primarily use Dreamweaver but I like both. I’ve just been using Dreamweaver for so long I haven’t been compelled to switch over to Eclipse full time.

SEO – Website Auditor:
http://www.link-assistant.com/website-auditor

Analytics – Google Analytics:
http://www.google.com/analytics/

You could build your own analytics maps using a network ip location database system. There are lots of them available online but why reinvent something that google does so well!

No Comments

Getting calendar datefield to work within a cfgrid

After searching for several days and trying different things I finally came across this blog for developers in ColdFusion and got this function working in my application.

http://cfsilence.com/blog/client/index.cfm/2008/4/7/CFGrid-Date-Picker-Editor

Next I’ll need to create a window pop-out when selecting a button within a row in a cfgrid.
Once I get that working I’ll put my code up here…

Happy coding!

No Comments

Apache2, PHP, ColdFusion9, MSSQL, Subversion on OSX Snow Leopard!

I searched and searched and searched for weeks trying to find something that documented all the necessary packages, where to find them, and how to get them all installed and working in the Snow Leopard system and I wanted to document the process so others can find my final solutions and possibly save yourself a lot of headaches along the way.

I only had to follow the following advice once so I was lucky I had it setup and working but before you start this process: INSTALL AND CONFIGURE TIME MACHINE!!!!!!! And make sure it’s all working flawlessly by doing some test deletes and restore those files the following day or even a few days later. If you are like me once you start doing something like this you just attack it head on like you’re driving a brand new Mustang Convertible on the open freeway, never slowing down to consider the risks.

Ok so backups are working and you want to get a truly impressive developer system with all the bells and whistles!

On Snow Leopard and probably all future versions of OS X the first thing you’ll need is Mac Ports. These people are far better programers and developers than I ever will be so take their advice and use the tools they’ve put in place. They’ve already broken everything that could be broken and are working HARD to make sure we developers have clean tools to work with. You can download and install MacPorts here: http://www.macports.org/

Following all of their advice you open up a terminal and type:
# port selfupdate [enter]

Next you have to figure out all the packages you’ll need for your environment.
In my case I need Apache2, PHP, Subversion, MySQL, FreeTDS (odbc for MSSQL), and any dependency packages.
Here are all of the packages I ended up installing in my environment, you can find out all the packages on your system by just typing:
# port installed [enter]
The following ports are currently installed:
apache2 @2.2.14_1+darwin+preforkmpm (active)
apr @1.3.9_1
apr @1.3.9_2 (active)
apr-util @1.3.9_1
apr-util @1.3.9_2 (active)
autoconf @2.65_1 (active)
autoconf213 @2.13_1 (active)
automake @1.11.1_0 (active)
bzip2 @1.0.5_3+darwin (active)
db46 @4.6.21_6 (active)
expat @2.0.1_0 (active)
freetds @0.82_0 (active)
gawk @3.1.7_0 (active)
gettext @0.17_4 (active)
gperf @3.0.4_0 (active)
gsed @4.2.1_0 (active)
help2man @1.37.1_1 (active)
libiconv @1.13.1_0 (active)
libtool @2.2.6b_0 (active)
libxml2 @2.7.6_0 (active)
m4 @1.4.13_0 (active)
mhash @0.9.9.9_0 (active)
ncurses @5.7_0+darwin_10 (active)
ncursesw @5.7_0+darwin_10 (active)
openssl @0.9.8l_0+darwin (active)
p5-locale-gettext @1.05_2 (active)
pcre @7.9_0 (active)
perl5 @5.8.9_0 (active)
perl5.8 @5.8.9_3 (active)
php5 @5.3.1_1+apache2+darwin_10+macosx (active)
php5-mssql @5.3.1_2 (active)
pkgconfig @0.23_1 (active)
readline @6.1.000_1+darwin (active)
sqlite3 @3.6.22_0 (active)
zlib @1.2.3_4 (active)

To install any package all you have to do once you’ve installed MacPorts is type:
# port install [name of the package]

So if I needed to install apache2 I would just type:
# port install apache2

I am documenting all of this for both Mac OS X Snow Leopard as well as VMWare installation of Ubuntu(Linux) the process is very similar on both systems. Ubuntu uses a similar package manager called apt-get.

apache2 config is found at /opt/local/apache2/conf/httpd.conf

In order for PHP files to load properly these have to be configured properly in Apache conf httpd.conf:
This loads the php module for the web server:
LoadModule php5_module modules/libphp5.so
This tells apache that when found the files index.php should be loaded when a directory is called.


DirectoryIndex index.php index.cfm index2.php index.html

This allows the directories for php applications to load without needing to run a redirector in html files.
You can add anything you want here like home.php home.php5 or whatever you want – as long as the server recognizes the format of the file being opened then it can be the main load page when a directory is called. I have an application that loads home_frameset.cfm when a directory is called that opens the primary frameset from a ColdFusion application. So this is included in this directory tag. That way when the main page loads for http://mydomain.com/ the server knows that this file should be loaded by default.

The next configuration file to check is the PHP config found at /opt/local/etc/php5/php.ini
again if you pico /opt/local/etc/php5/php.ini
The following features are of special note:
register_globals = On
This option should be turned off in most configurations but if you like me are updating an older application then you’ll need to turn it on until you fix your code. I had to fix about 20,000 different code references that required the register_globals references.
If you are running this as a development platform set your error reporting to:
error_reporting = E_ALL
If you don’t want all your errors reported in a live install
error_reporting = Off

The last step in getting PHP to talk to your database took me several days to find any information about.
You have to explicitly define your database connections to your servers in the freeTDS configuration files.
The file is found at: /opt/local/etc/freetds/freetds.conf OSX mac-ports
In Ubuntu its found at: /etc/freetds/freetds.conf
The config should read:
[global]
tds version = 8.0

[myserver]
host = sql.mydomain.com
port = 1433

[myserver2]
host = unixbox.mydomain.com
port = 4000
tds version = 5.0

[myserver3]
host = instancebox.mydomain.com
instance = foo
tds version = 8.0

Once freetds knows your database location it can now talk to mssql servers and your database calls will work.

Now that all of the php,apache2,freetds configs are setup restart your apache server by opening terminal and typing:
sudo apachectl restart

I normally just authenticate my terminal as root by typing su root and then enter the root password for my server that way any commands I type in the terminal don’t need the sudo command before I tell the terminal to do anything.

Verify that everything is running correctly in the browser for PHP applications and then we can move on to the ColdFusion install.

In my environment I download the ColdFusion 8 or 9 and install the development server.
Once ColdFusion is installed you just have to tell apache what modules to load and where the JRun is located.
I normally skip the automatic apache config options in the installer and add these to apache myself.
On OSX using ColdFusion 9
If you install a live version and use the multiserver options and the J2EE server then you’ll need to change the location of the module to /Applications/JRun4

# JRun Settings
LoadModule jrun_module /Applications/ColdFusion9/runtime/lib/wsconfig/1/mod_jrun22.so

JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /Applications/ColdFusion9/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51800
#JRunConfig Errorurl url
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf

That’s it now restart apache again and you’ll be able to run PHP and ColdFusion documents from the same server!

No Comments

Updating PHP code using regular expressions

I have been reconstructing a php based application that has grown into a full blown interface system over the last ten years by a developer that has now gone into business for himself building php sites. I am not incredibly fond of writing php code on a daily basis and have been working on getting the system migrated to an up to date implementation of php 5.3.1 and I’ve run across some issues in the migration that I thought warranted documenting.

Problem 1) The application as it stands is currently on a Linux box running php 4.4.2 which allows you to use variables without pre-defining them. So if you want to write a conditional loop that takes a variable named $var and loop through a query adding things to the variable. You don’t need to pre-define the variable you just put in the loop $var .= “new conditions” and the variable get’s appended including the new string. The problem is security of course and the most recent implementations do not allow a variable to be appended unless it pre-exists. So I needed to devise a way to find every existence of the $var .= no matter what the variable was called and then append the code so that it now says ” if (!isset($variable)) { $variable=”";} $variable .= “.

Solution: Adobe Dreamweaver (or any other API that includes a find and replace utilizing regular expressions) I just like using Dreamweaver because I’ve been using it for so long. I am sure you can do the same thing in many other APIs like Eclipse of BBEdit or whatever your preferred editor. If you aren’t using something capable of doing site wide find and replace with regular expressions GET ONE! This method has saved me weeks of coding by allowing me to do global or site wide replacement of outdated code.

Here was my final solution:
In the FIND BOX: ([\\$]\w*\b) \.\=
In the REPLACE BOX: if (!isset($1)) { $1 = “”; } $1 .=

In my application instance there were a total of 10,876 instances of a variable followed by the .= operator. Imagine hand coding that many instances of variables that are now out of date!

Explanation:
What this regular expression is saying is this. Find anything that begins with $ followed by anything in the alphanumeric keybord 1 through 0 as well as a through z and A through Z. That’s denoted by the \$\w the [] signs surround the \\$ to denote that I am looking for the dollar sign and not wanting to use the dollar sign as a special character predefined by the regular expression syntax. The \w denotes a word or series of characters and the *\b denotes continue to the next end of line \b meaning a space or line return. The expression inside a set of parentheses means it’s going to capture the expression in the return statement as the first in a registry of expressions denoted in the replace statement as $1. So my replace statement includes whatever I want to replace the entire string with including $1 as the original expression. So the string $variable .= is replaced by if (!isset($variable)) { $variable=”"; } meaning if the variable is not defined first define it and then continue with the logic.

Problem 2) The other method in this application that is no longer supported in PHP 5.3.1: Using the if (!$variable) to determine if a variable exists which again exists in this application in 4,000+ instances! You now have to ask the code if (!isset($variable)) so my solution using the same method:

In the FIND BOX: if \(\!([\\$]\w*\b)
In the REPLACE BOX: if (!isset($1)

I just thought this regular expression syntax was amazing! So I though I would document it for the world to be able to find.
Hope it helps if you are a programmer!

No Comments

Free Advice

It always amazes me how many people exist in the world – and are actually making money giving people advice or “consulting” or “coaching” on things that are available for free. The question is: what do you have time for, or more importantly what has the most VALUE to you. For me it’s time. More than likely for you the answer will be the same. So if you can afford it then pay someone to manage all of this stuff for you, after all your time is better spent on more profitable things. Like sipping margaritas with your friends – of course only if that’s how you make MONEY and provide for yourself and your family if you have one.

Of course if you are not named Ashton Kutcher, or Madonna, or that guy that just has a symbol for his name – or does he call himself Prince now??? I don’t know, anyway… if you need to manage all of this stuff for yourself for now – until you get your first big break… read on.

You are a brand, whether you want to believe it or not in today’s world you are actually a brand.

Do a search in google for your name. When someone new meets you in a club, at church, at the local show you just attended, a friend of a friend and yes especially at work, or a potential new job. You are actually being looked at online. Do you know what the internet says about you? Do it yourself, what does google say about you?

A couple of months ago I did this for myself and realized there were quite a few people that shared my name:

There are probably more people but that is all I can find now in the first few pages of google search results. And I don’t mind being confused for a moment with a guy who is a Director for the Center for English Language.

I think the best advice I could offer anyone in the professional world today is to go through this practice yourself. If you can’t find yourself online – then you aren’t saying anything and you need to register on as many free web sites, portals and social media sites as you can; and start talking. You are probably a great person, a professional with valuable skills and a high level of integrity. Maybe you are thinking about breaking out of the corporate world to go into something you are more passionate about, perhaps you have lost your job and just need to get your name in front of as many people as possible so that your skills are out in the open and you can be found be prospective employers. Maybe you just like attention and you just want people to know who you are. Hey go for it! You don’t necessarily need to be selling something to have a presence online, and more than likely there is a presence online. If you don’t have one you are building yourself talking about your good and admirable skills and qualities, people will simply get directed to a site like intelius.com where for a small fee they can find out every location you have ever lived and much more embarrassing information like that time you spent in jail for driving on a suspended license when you were 19 years old. Or that drunk and disorderly from college. There are much worse examples but I’ll leave that up to the rest of you to imagine what embarrassing things there are as a matter of public record that people might find out about you.

On a much lighter note – for me: I just moved back to my home town of Tampa Florida from Chicago and started aggressively marketing myself as a consultant and designer/illustrator. So it was important to me that all the places online that might have my information or a profile about me have complete and up to date information. I found many sites referencing past places I had lived because I registered at one time or another and never used the site and never went in an updated my information. So I took some time and went out there and updated my information everywhere I could find a reference to the person who is supposed to be me.

Next thing: get yourself registered everywhere! Linked-In, Facebook, Twitter, Google
Most of the social media and profile sites are free.
Here is an interesting practice:
Check this page out! http://www.prelovac.com/vladimir/top-list-of-social-media-sites
That’s just the top 100 – there are thousands of sites out there the important thing is to be on all of the top ones, and make sure your info and the description of who you are and what you do is accurate. Especially for your industry!

Here’s a challenge – get your name registered – pay for a hosting package and just start a basic blogging site for your name, you can do this for under $50 per year! (That will be a different post) Then register in all 100 top sites and make sure your name, phone, email and about you description are all up to date and pointing to your blog. Then register for the free google analytics package (MORE FREE STUFF) and start tracking your results. You’ll be surprised how quickly people start finding you online!

If you want or need help with anything shoot me an email – I am always glad to offer help. I only charge for complicated things that you couldn’t do for free somewhere else!!!!! And in today’s internet society you would be surprised how much power you have in that little box on your desk with the keyboard attached to it.

, , , , , , , , ,

2 Comments

The Case for ColdFusion, Flex and AIR

A little over five years ago I began researching CRM applications for possible deployment into the company I worked for. As Chief Technology Officer it was my responsibility to evaluate current technologies and look for the best technological solution for managing and delivering the executive recruiting practice as well as the mergers and acquisitions advisory services offered by the company. We began first by looking at software packages that advertised solutions tailored to the recruiting process and identified the top five solutions that were highly discussed and deployed in the industries we worked in. The top five solutions we found and evaluated:

  • Cluen – Windows based application portal
  • Bullhorn – Web based CRM solution based on ColdFusion
  • Salesforce – Web based SAS solution based in .Net
  • Microsoft CRM – Windows based platform integrated in Windows Server Env
  • Dillistone – Filefinder – Web based CRM solution

All five products advertise the same basic criteria:

  • Easy to use
  • Quick deployment
  • Intuitive recruiting process driven
  • Expandable and customizable
  • Easily migrate your existing data

While looking at the features available of each product, they all exhibit the same basic functionality, thorough candidate and client information storage, ability to track and search for candidates and prospective clients, storage and parsing capabilities for documents inserted or submitted to the system. Each product offers a support and training program and the claim for customizable functionality tailored to meet the needs of most organizations.

While considering each platform we had to consider one major point that none of these platforms could deliver without an incredible amount of expense. Flexibility to meet the various business styles of a broad variety of executives and their teams while maintaining integrity and availability of data gathered executing search executive and mergers and acquisitions research and development. All while satisfying a marginal and profitable bottom line impact on the company.

Bottom Line: I want all the functionality available to me from the internet, social marketing, analytics and SQL (structured query language), I want it right now not two years from now, and I want it cheap and fast.

Solution: ColdFusion custom development.

  1. First the ColdFusion environment is extremely easy to learn and develop in – at least in my opinion.
  2. It’s flexible enough to be nimble and fast over the internet
  3. Yet it’s robust enough to provide things like:
  4. Integration with Microsoft Exchange
  5. Document Parsing and Indexing
  6. The platform was purchased and continues to be developed by Adobe a company known for the quality of their products and fully and completely dominating in the creative fields of visual design, one of the driving forces in online development, and a personal passion.
  7. ColdFusion development has expanded into Adobe Flex and Adobe AIR so the same server based functions and scripts can be extended easily to Flash as well as desktop applications that maintain the same functionality of the original code.
  8. And Finally developing the front facing interface for an application is independent of the backend database, so developing the web portal interface for the solution can be constructed while maintaining the system a company continues to use. Meaning the migration and training can be completed while long term users of another system can continue to perform their daily workflow, and there will be no down time in-between causing a loss of revenue during a long and drawn out training process.

My final solution was a combination of technologies based on the ColdFusion platform integrating the power of:

  • Apple Server Platform OS X 10.4
  • Apache Web Server
  • Subversion Source Control System
  • A mix of javascript and cfscript (Cold Fusion’s built in scripting a combination of javascript and action script)
  • Microsoft Exchange (using the ColdFusion 8 Enterprise cfexchange tags)
  • Microsoft Windows Server utilizing the Services for Unix and DFS

, , , , , , , , , , , , , , ,

No Comments

New url’s and sites

Ok so today I setup my new urls and started building out several new communications tools for PSM Design, Inc. I’ll keep everyone updated through this blog when I complete each piece of the buildout and let you know the technologies and tools I am utilizing for each piece as well as things like difficulty, costs, time spent to complete etc… That way if you want to do these things for yourself you can either follow my blog or send me an email for help.

As always – with everything I do – I want (WANT) constructive (Useful) criticism.

Bridging the gap between technology and design

Uniting two generally disconnected concepts
into a single unified application or brand
for clear and useful communication and function

No Comments