Quick Coldfusion AJAX

Jan
8th
2010
A graphical despiction of a very simple html d...
Image via Wikipedia

External Library?

With Coldfusion 8 and 9, there are a full host of tools that you can use to enahnce user interactions and interfaces in your web apps.  One of those is the built in AJAX features.  While you can program your own, or even use an external javascript libarary, Coldfusion has it’s own, and it is very simple to use, cross-browser friendly and can be implemented in short order.

While you follow the rest of the post, do keep in mind that using the Coldfusion solution present, it does load files from your Coldfusion installation libraries.  These javascript files are sent to the browser just as any other javascript file.  Also remember that this is just one tag in the Coldfusion AJAX library – there are many others that support asynchronous form postings and much more.

Using CFDIV

The first thing you will want to do is import the necessary tag to use the cfdiv layout control.  You can do this by including Quick Code

<cfajaximport tags="cfdiv">

The second thing is to ensure you have a .cfm file with the content you are loading into the cfdiv.  Say for this example we will call it content.cfm.

In your page, you simple call the cfdiv like you would a normal div layout container, with one exception – the bind parameter which tells it which .cfm page to load. Keep in mind, if you need to pass in url parameters, that is fully supported, making it that much more dynamic.

Quick Code

<cfdiv id="myDiv" name="myDiv" bind="url:content.cfm">
</cfdiv>

Putting it together

To really make it work well, let’s show a sample page, complete with a simple javascript function that calls another Coldfusion ajax control, Coldfusion.navigate.  The Coldfusion.navigate function let’s us dynamically load the content into the cfdiv – so we could build a navigation menu and use that to dynamically load the content into our div.

Quick Code


<html>
<head>
<title>Test Coldfusion Divs</title>
<script>
function loadContent()
{
Coldfusion.navigate("content.cfm", "myDiv");
}
</script>
</head>
<body>
<ul><li><a href="javascript: loadContent();">Change Content</a></li></ul>
<cfdiv id="myDiv" name="myDiv" bind="url:somestartercontent.cfm">
</cfdiv>
</body>
</html>

Now, we have a basic page that will load somestartercontent.cfm when the page loads, and when the visitor clicks on the change content link, it will run the javascript function that calls the Coldfusion.navigate function.  This will load the content.cfm page into the myDiv div.  Note the Coldfusion.navigate function takes two parameters in this scenario – the page to load and the div to load it in.

Reblog this post [with Zemanta]

Overly Complicated?

Jan
6th
2010
It's Complicated
Image by Or Hiltch via Flickr

Is it really as complicated as you think?

Sometimes we see things from the wrong perspective.  We think they are complex, complicated and wicked to learn, use to do.  We see them as something unattainable, something that will always be either just out of reach, or a million miles away.  Sometimes we stop and think to ourselves, “That will never happen…”, or “I could never do that…”  Is it really that complex, that complicated or that wicked?  Many times they are not, and we all need to learn that about ourselves, the things we do, the thing we would like to accomplish, use or do.

I think we all sometimes just need to step back and re-evaluate how we are peering into our path.  How we perceive the obstacles on that path, and where we ultimately want that path to take us (whether it involves a turn, a new path or more).  Sometimes, we have to brave where the is no visible path – and with the right support behind us – our group of people, whether online or offline, that are our backing, the pushers pushing us to excel – we can build a path.  Our own path.

Does it need to be complicated?

Sometimes, and being a web programmer by trade I see this alot (and have even been guilty of it myself), we over complicate things.  We make them harder than it should be.  It’s nothing with our perspective or outlook, but in our natural habits.  We add steps, layers and side trails – not out of the fear of failure or other things pertaining to our paths and such, but out of a necessity to be thorough to the point of complications.

Why?  We all have off moments, and sometimes that is all it is.  A moment of clouded clarity, or no clarity at all.  Other times it’s the best we know at the time, and we just haven’t honed out skills to work, create and be lean, mean machines at what we are doing.  Finally, sometimes we just do it to see if we can – which can work against us, or for us, depending on what the outcome should be and what the outcome ends up being.

How about we make things uncomplicated?

Let’s face our fears, let’s build that new path, let’s learn about who we are, what we can do, should do and want to do.  Then, let’s get out there and do it.  No more complications from us not pushing forward, okay.  How about we try to maintain clarity – yes sometimes we just need to slow down or stop to gain that clarity – and that’s okay.  Your competitors (if your applying to a business mentality) aren’t going to get that far ahead of you if you stop or slow down to renew the clarity.  Think about it, they won’t get any farther ahead than you staying in a cloudy state for a longer period of time, now will they.  And that clarity may give your business just the edge it needs.

In our personal lives – let’s slow down and find that clarity – to interact well, live well and take more moments to cherish those around us.  Those who are helping us on our paths deserve nothing but our best in return for what they do for us.  Let’s give them that, shall we?

Why not.

Reblog this post [with Zemanta]

First Post of New Year (2010)

Jan
5th
2010
Sydney New Years Eve Fireworks 2007
Image by Christopher Chan via Flickr

It’s 2010?  Already? 4 days ago?

Yeah, Yeah I know, it’s already January 4th and I am just now posting my first post.  Get over, I have – :-)

I was extremely ill last week with a stomach bug, and was in bed most of the day January 1, worked everyday since and as I write this at 11:20pm I have just finished working for the day.

Pertaining to Work

Speaking of work, we recently debuted the updated Live Event Center at the Professional Bull Riders – much smoother user interface, much better updates and runs much faster than before.  It will be bringing live updates this weekend as the PBR invades New York City!

In additional working news, I am working with the fine photographers from Bull Stock Media, the official photographers to the PBR.  I am helping them update and maintain their web site, which is going to be pretty fun considering what great guys Andy and Matt are.

Nikon D5000 Digital SLR with AF-S DX VR Zoom-N...
Image via Wikipedia

Did someone say photography?

My awesome wife, knowing how hard it is to decide on items for me for Christmas, went out on a limb this year and simply gave me a Visa Gift Card.  How cool is that?  So cool that I am in the process of listing a bunch of items on eBay that I have had laying around for far too many years so that others can enjoy watching them collect dust as I have these years.  Why?  My next goal is to get me a beginner to intermediate Digital SLR camera and begin taking more and better photos.  I have always wanted one, and it appears I may be able to see that dream happen – so yeah, my wife ROCKS!  I am leaning towards a Nikon – either a used D40 or a new D5000 – yes big price difference, but we will have to see how fast and how much I can earn on eBay, which if you click the eBay link you can see what I am trying to sell ;0)

Speaking of photography I think I will be starting a photoblog to go along with the camera once it has arrived.  Yes I know I hardly update this one (or any of the other 4-5 blogs I write on), but hey, lofty ideas sometimes come to fruition, right?  Right.

If you didn’t know….

In case you didn’t know, I launched a new blog some time ago.  Yes it only has one post, but I believe it will become part of the photoblog and will become a more personal blog – for posts much as these.  You can find it at: billynab.com – pretty easy to remember since it’s my name.  It launched November 27, 2009 and has one post, another one going up tonight and maybe more soon.  Or….maybe in a month….my blogging schedule is low priority right now.

If that wasn’t good enough to know that you can still find my occasional tweets on Twitter – @southplatte – where I send a few tweets here and there.  I used to tweet much more, of course that was before I got extremely busy making the Interwebz work.

Speaking of making the Interwebz work

One of my goals for 2010 is to get some “industry” certifications. You know the piece of paper I can use to claim I know what I am doing on making the web work.  Actually I nearly have my B.S. degree finished so I may finish that as well.  However, in the mean time (simply because time permits quick study and quick tests) I will be trying to obtain my ColdFusion certification, PHP certification and possibly my Java certification this year.  I could be real lofty and try for my C# as well, but we’ll wait and see how many of the three I get done first, okay.

For many of you that might read this, you may not remember the prank I pulled on April Fool’s day last year.  It was one of the biggest traffic days I had all year – so be on the look out in a few months for something else fun, mimicking, or full of gimmickry.  Why?  Because we all need a laugh, and we all need some fun in life.

Laughter? How about the final laugh?

One of the goals I have for 2010 is to laugh more.  I feel it is a gatekeeper of all that is good, and can mend many things that drag us down in our daily life.  Often I am so serious, so intense on what I am working on my sense of humor is fading and failing.  No more of that.  My sense of humor is actually rather dry – so I try not to joke to much because so many people think I am serious – but oh well, if they truly know me, then they know me.  So lets laugh this year, share a joke or two.  Let’s take some photographs, work on some web sites that kick ass and get together on social networking, shall we?

Why not.

Reblog this post [with Zemanta]

Connected, Synced, Mobile – Keeping it Together; Part 1

Dec
1st
2009

This is the first post in a series discussing how to create a mobile command center for your life, your business or both.  This guide is centered around using an iPhone (in this case jailbroken and unlocked), Google Apps Standard, Outlook 2003 along with some pretty great free apps from the iTunes App Store.

I have long been needing to sync my life together – ok, not in that way – however, trying to accomplish this has presented some difficulties.  In part I found some of the difficulties in my particular setup of certain items discussed through out this series, as well as just not experimenting enough with the technology I have available.  In talking with others, it seems this can be a common issue, as well it seems with the amount of paid apps, services and entities that offer solutions to tie one’s life together it appears to be potentially widespread.

The Setup That Didn’t Work

For years, I have used various different mobile phones, from the old Motorola Star Tac to a small flip-phone all without any data availability at all, to Windows Mobile, BlackBerry and the iPhone.  It has been an even longer time that I have been using email to communicate online, say 1993 or 1994 when I got my first email address – when email was still text based the majority of the time, just as were the majority of web sites at the time.  Somewhere in that mix creating task lists, calendaring appointments, scheduling my work and personal lives and meshing it all together in a logical way was added to the mix.  In the early years, I could simply task list on the computer in notepad and keep things straight.  2 children, 3 step-children,  college and a real career later notepad has been out the window for many years now.

It started becoming clearer in 2006 that I needed a solution that could tie all of this together, and while I have not spent much time searching for a solution, I have finally found one that I am going to share with you in hopes it might spark your imagination to creating your own solution using the things of tech and non-tech that you have available.  While this series focuses on the iPhone, I will be sharing a series with a very similar solution with using a BlackBerry and if I see a need, will end with a series using a Windows Mobile solution.  While my true mobile platform of choice is the iPhone (for various reasons that could be discussed in a completely separate post), I like the email better on a BlackBerry and certainly had good results setting this solution up with that platform.

There are several hang ups I experienced that the majority of users will not – I do not use email services such as Gmail or Hotmail as my primary email service.  No, in fact, since 2003 I have operated my own email server for various domains and as such have also operated my own DNS servers, web servers and other servers that generally are used to power the web, email and things such as calendaring, task scheduling sharing and so forth.  Why does that present a problem?  Since I don’t use Exchange for my email and simply use Linux based simple solutions, some of the collaboration, sharing and built-in support on mobile devices has been limited to simple POP3 mailbox access and no sharing of calendars, tasks and the like.

Sharing Explained

What?  Share a calendar, task list and more?  Who am I sharing it with?  Let me explain – while I work full time web development for the Professional Bull Riders, I do occasionally do freelance work with the right clients.  In addition, having 2 children, 3 step-children, being active in church and other activities I find the necessity to schedule more than my work day.  Sometimes that work day overflows into the personal day and knowing when there is something important coming up that evening or weekend it good to know to adjust priorities to get things at work done on time (preferably ahead of schedule), or to reschedule the personal items to fit.  No big deal right?  We all deal with that.  Well, when you are looking at operating a freelance project, keeping up with kids, making praise team practice at church (which I just started back to after a 6-month hiatus), along with everything else that goes on in our personal lives I found the need to be connected more personally.  So my work phone, a BlackBerry, is just that – a work phone.  My personal phone, then, needs to become a central station for anything non-work related.  No big deal right?  Wrong.

At work, if I put something on my Outlook calendar, thanks to Exchange and BlackBerry Enterprise Server (BES), it is pushed to my phone in a flash.  So I have all my stuff on my desktop and on my mobile.  Of course, as I pointed out prior, I don’t have the resources to run Exchange and BES to accomplish this type of connectivity.  I checked for a few solutions and found mostly paid apps or other costly services that would accomplish this for me.  Too bad I am a cheapskate (ok not really, but family size does dictate budgets for personal tech many times).  So I developed a solution using some free tools, free services and have found a solution that, for the past week, has had me very pleased with the outcome.

The end result?  I now have complete synchronization of my email, contacts and calendar between my desktop (using Outlook 2003), on the web and on an iPhone.  If I add to one, it will sync to all – so if I add an appointment on my iPhone, I get it on my Outlook and web based calendars and so on and so forth between the three items and applications.  This post series will discuss the exact setup that I have making this possible.

Coming in Part 2: Connected.  Coming in Part 3: Synced; Coming in Part 4: Mobile.

Reblog this post [with Zemanta]

Entitlement Reaction

Nov
4th
2009
Social Media Landscape
Image by fredcavazza via Flickr

Jason Tryfon, a swell guy and app developer, writes on his blog about Entitlement and questions whether or not Social Media is furthering this mentality.  You can read his full post here:  The Culture of Entitlement, Is It Forming Thanks to Social Media Sites?

The sense of entitlement isn’t just confined to the Internet and Social Media.  More over, especially American society, has gained a perspective of it is for me, my benefit and you need to make sure you do what ever it takes to make sure I stay happy.  To the point that legal action gets taken, smearing across several avenues takes place, and generally ill will and the perception that it is okay to do whatever it takes to cause any type of harm because something did not work out as planned.

Far too often I think people feel that they have ownership in these services, products, companies, and even other people.  That somehow by providing content, value, or time they have a vested “ownership” that is merited a return on investment.  As the original article points out, most of the sites and services that are being questioned in creating a Culture of Entitlement are free and/or “freemium” services.  In other words there generally is no cost, save with some advertising being shown.

That brings me to another point that was discussed in the comments over on Jason’s site.  Fullbirdmusic states if people spend all this time creating content on these sites, putting time and sweat equity, there should be some form of return.  Randy stats that members on these are not just membership numbers in a database, but are partners in these networks or apps.  Which stands to reason – put something, get something out.  Is that true of life in general?

If we voluntarily use a service, without paying for it save viewing some advertisements and the time we “opt” to put into it, should we have any expectations of return on it?  When we go to work for the day, we expect that we will give an honest days work for an honest days pay.  When we volunteer in our community, we expect that we will see betterment of that community.  When we create content on a service or site of someone else, is it reasonable that we “expect” a return from that, even when they are providing us, the user, with the tools for free or next to free? Are we entitled to expect anything from a free tool when there are plenty of alternatives in any variety of locations, contexts to which we could still publish and push our content?

I used to always take advantage of the $4.95/month hosting specials.  Hey, you got a free domain name, they setup all the DNS, MX mail records and everything.  They even gave you a control panel so you could control any aspect of your account, your site, your email your everything online.  Yet, frequently in the early years of doing web development I constantly found myself persuing open source scripts to speed up development time and to learn from and unfortunately many times this allowed me to find limitations on the hosting provider.  Maybe I needed shell access, or root access.  Maybe I needed a special Apache configuration.  On these shared hosts, it just was not feasible.  My solution?  Instead of expecting them to fix my problem to better my return, I created my own solution and since 2004 have owned and operated my own web, email, dns and database servers.  Sure I could have purchased a dedicated server from the same hosting company – well leased it – but now I own the hardware and pay for a certain amount of bandwidth and IP address, to which monetary value is exchanged for a certain guarantee of service.

So if you are not getting the expected return from what ever tool you are using, maybe it’s time to find a new tool, make your own tool or change what you are doing.  Quite simply, you are getting a return – you are getting a free tool to use, free search traffic, free analytics, advertisement supported applications, services and more.  If there are issues with any of these services, to which you are not paying for a dedicated service level, use a different one, make your own or stop all together.

Reblog this post [with Zemanta]