Welcome!

ColdFusion Authors: Yakov Fain, Maureen O'Gara, Nancy Y. Nee, Tad Anderson, Daniel Kaar

Related Topics: ColdFusion

ColdFusion: Article

No Experience Required

Don't be afraid to build your own Web-based data management tools

This is not a piece full of technical anything. It's a story about a boy and his dog...ok, not that. It is a story about how a Web-dabbling engineer created some highly useful apps for his co-workers and himself.

We work in a metallurgical lab, which means, among other things, we study metals by looking at finely polished samples (let's call them "mounts," as they are often mounted/embedded in plastic) under microscopes. We like to number and keep track of these samples and their descriptions for reference, and to comply with the record retention requirements of our customers. However, a few years ago we became acutely aware of the limitations of our hard copy log (the mount book) for these samples. Even at only about 1,000 samples per year, the volume of data was too much to search through by turning pages. In other words, "It would be nice to have an application that we could all access to store data, assign new numbers, and do other neat things automatically." Web- (intranet) based seemed the obvious choice, as there were enough computers and an already established intranet presence. Other solutions were available of course, such as a Lab Information Management System (LIMS), but we weren't likely to get approval for a large software purchase. Our IT department had adopted a trouble ticket system, which was fairly simple, but very expensive - more than $20,000. We knew that wasn't going to happen for us; this data was important, but making it convenient and more useful wasn't mission critical.

We had MS Access so we started there. It worked, though it was only really meant for a single user. Knowing that much (or that little) about Access told me that this was not the solution we were looking for. The company has production databases it uses to track the manufacturing of everything we make, and for many other functions besides. Using this system was an option, but it would mean turning over development and any changes to someone else, and, consequently, someone else's timeframe. Our hard copy logs weren't rotting away, so the priority of this work probably wouldn't be very high for them, though it would be for us. That wouldn't work, as we're a rather impatient group when it comes to having the right tools-especially when the right tools seem to be within our reach. Second, changes were typically slow, given the workload of that coding group, so we'd have to live with limitations for longer than we cared to. Third, we weren't talking about one application; we were talking one application to start with, and several others to follow in quick succession. Fourth, if we needed another reason, the work and the output data aren't just text. Images are integral. Though we could probably adapt the production system to deal with images (storing the paths to image files), it seemed more natural to pick some kind of Web-based solution. Finally, the choice between using Access and other established company resources was the choice between doing it ourselves or giving control over to someone else. I knew we could do this, so we decided to keep control. Thus, we tried Access-generated Web pages. Retaining control was the right choice. Using Access Web pages was just a step, however.

At first, the data entry Web pages worked, but they were limited. I thought that maybe I just didn't understand all of the features, but after asking our internal guru it was clear that Access Web pages would not do what we wanted. In essence, we needed something that supported at least a handful of simultaneous users and maintained data integrity without anyone overwriting other data. Access' pages had already proven unfaithful with these modest requirements, much to my dismay. Consequently, some data had to be re-entered from memory. In this case it was caused by simultaneous users. One record was started and before it was finished another person started a record, but it was the same record, so the race was on. One set of data was written and the next overwrote the first. Data erasure is unforgivable by our customers and we don't enjoy it so much either. So - once bitten, twice shy - I went back to talk to someone in IT. Due to the requirements of traceability and data integrity in so much of what we do, the solution had to at least perform these functions well. Flexibility would hopefully be part of the solution.

Our IT department had recently started using ColdFusion on a limited basis and recommended it to me. They were running a server so it was just a matter of learning this new software (Studio 4.5). Looking back, it appears that in it's simplest form CF is just another set of HTML tags allowing the server to build pages from data in databases. At the time, it seemed a little more daunting. I didn't know SQL either. I found enough resources on the Internet to get started. Between several now-forgotten tutorials and some resources at Webmonkey, I started coding. Not having to run the server took much of the steepness out of the learning curve. After a few days of learning some of the ropes and testing code, I started building the interface to enter data for our samples. SQL syntax gave me more fits than CF. If I'd read a little bit more, it may have helped, but it wasn't too bad and there were people to talk to here if I got stuck.

It wasn't long before I had the beginnings of a usable Web interface for our mount book. It's come a long way since those first days. Figure 1 is a screen shot of the latest version of the entry page.

Walking through the major steps of the code, a security template is applied, the last mount number is queried, and a new mount number is generated. The new number, along with the user's ID, is inserted into the mount book so that it is reserved for as long as it takes to fill out the form. The number itself took a little bit of coding effort as it's alphanumeric: a letter and three digits. For each letter, mounts 0-999 are used, then the next letter comes up. That was our original numbering scheme. I think I'd do it differently if I had to do it over. The two little forms at the top are aids, one if users accidentally hit a link to start a mount and the other for inserting mount data from another existing record to save keystrokes for similar samples. Next comes the main body of the form.

Submitting the form gets the data inserted properly and displayed (from a query) for users to check. This application has a query associated with it, of course. The form page is plain. Figure 2 shows a sample of a mount book query result.

The part link, 2177-204, is a link to display an engineering drawing of that part. The update button allows a user to go back in and edit the record data. If that user is not the one who entered the mount, he/she can only add text to the notes field and his/her comments are labeled in the field with his/her ID. Another notable feature is the Add image link. Clicking this link takes users to yet another form where any image can be uploaded. Figure 3 shows this image upload form.

Users browse for an image and, when selected, the page displays the image with a nifty little JavaScript. The JavaScript displays the browsed image shown in Figure 3. Thanks to the HouseOfFusion lists. (Credit to Jon Hall for this script.)


<script type="text/javascript">
function showImage(img) {
        var imgObj = document.images['header'];
        imgObj.src = 'file:///' + img;
}
</script>

<input type="File" name="header_image" id="header_image" size="45" onchange="showImage(this.value)">
<img src="bg_head.gif" name="header" id="header">

For a certain description of mount, a copy of the image is copied to another network location for processing. An image analysis application is run using a macro to control annotation and measurements and saving of those results. Later in the day, a scheduled task takes the processed image and copies it back to the images tied to that mount, inserting an appropriate record. For any mount with images associated with it, the mount number m328 (as shown in Figure 2), becomes a link to display all images for this mount number. Figure 4 shows the display of all images for this mount page. The data from the mount book is shown, the image is displayed, and all entered image information is shown to the right of the image, including the option to inactivate the image.

I coded apps to eliminate all of our logbooks and I was asked to code a few utilities for other departments as well. One of those departments takes input from a barcode reader and calculates parameters needed to hard-anodize aluminum. I've used Verity in simple ways, such as to give us full text search options over thousands of new and legacy documents. Scheduled tasks monitors some data, reminds us of work that's due, reminds us of equipment maintenance, and supports some QA functions.

The most attractive thing about this setup is its customization and adaptability. Every one of our modest whims was satisfied and we began to have some not-so-modest whims. Some applications have undergone dozens of minor revisions and are now customized to the nth degree by end users. Adaptations emerged from suggestions like uploading images of the metal samples and tying the file to the sample record. That led to another application for uploading and indexing documents for a different department. At the end of the day, we get what we want and need and it becomes not just usable, but also useful. Our customers have access to much of our live data. Presenting analyses to remote locations on our intranet is simplified by adding a few links to an e-mail.

It didn't take long for these applications to become critical to our daily jobs. Now we rely on them, not just for the ability to query our growing body of data, but to satisfy audit requirements and customer requirements as well.

I did have the benefit of not having responsibility for the care and feeding of a Web server. This eased any learning curve that was present and allowed me to take hours rather than days to code something useful. That and the fact that that many CF tags are very straightforward made the self-teaching route practical for a part-time coder. A Ben Forta book and a copy of Studio was enough.

Looking back, I know this was a good path to follow. I knew some HTML and had built a few sets of static pages prior to learning CF; I didn't realize until I started learning ColdFusion tags that the step from static to dynamic was not large. Granted, many of my applications might be considered bicycles compared to others' SUVs. My page designs may not be pretty, but developing for yourself gets you exactly what you want. It's been great for us!

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Darrell Morris 01/20/05 11:46:54 AM EST

Excellent article. Well written and informative. Thanks Joe.

@ThingsExpo Stories
The Internet of Things (IoT) is going to require a new way of thinking and of developing software for speed, security and innovation. This requires IT leaders to balance business as usual while anticipating for the next market and technology trends. Cloud provides the right IT asset portfolio to help today’s IT leaders manage the old and prepare for the new. Today the cloud conversation is evolving from private and public to hybrid. This session will provide use cases and insights to reinforce the value of the network in helping organizations to maximize their company’s cloud experience.
Disruptive macro trends in technology are impacting and dramatically changing the "art of the possible" relative to supply chain management practices through the innovative use of IoT, cloud, machine learning and Big Data to enable connected ecosystems of engagement. Enterprise informatics can now move beyond point solutions that merely monitor the past and implement integrated enterprise fabrics that enable end-to-end supply chain visibility to improve customer service delivery and optimize supplier management. Learn about enterprise architecture strategies for designing connected systems tha...
Cultural, regulatory, environmental, political and economic (CREPE) conditions over the past decade are creating cross-industry solution spaces that require processes and technologies from both the Internet of Things (IoT), and Data Management and Analytics (DMA). These solution spaces are evolving into Sensor Analytics Ecosystems (SAE) that represent significant new opportunities for organizations of all types. Public Utilities throughout the world, providing electricity, natural gas and water, are pursuing SmartGrid initiatives that represent one of the more mature examples of SAE. We have s...
IoT is still a vague buzzword for many people. In his session at Internet of @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, will discuss the business value of IoT that goes far beyond the general public's perception that IoT is all about wearables and home consumer services. The presentation will also discuss how IoT is perceived by investors and how venture capitalist access this space. Other topics to discuss are barriers to success, what is new, what is old, and what the future may hold.
Whether you're a startup or a 100 year old enterprise, the Internet of Things offers a variety of new capabilities for your business. IoT style solutions can help you get closer your customers, launch new product lines and take over an industry. Some companies are dipping their toes in, but many have already taken the plunge, all while dramatic new capabilities continue to emerge. In his session at Internet of @ThingsExpo, Reid Carlberg, Senior Director, Developer Evangelism at salesforce.com, to discuss real-world use cases, patterns and opportunities you can harness today.
All major researchers estimate there will be tens of billions devices – computers, smartphones, tablets, and sensors – connected to the Internet by 2020. This number will continue to grow at a rapid pace for the next several decades. With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo in Silicon Valley. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be!
Noted IoT expert and researcher Joseph di Paolantonio (pictured below) has joined the @ThingsExpo faculty. Joseph, who describes himself as an “Independent Thinker” from DataArchon, will speak on the topic of “Smart Grids & Managing Big Utilities.” Over his career, Joseph di Paolantonio has worked in the energy, renewables, aerospace, telecommunications, and information technology industries. His expertise is in data analysis, system engineering, Bayesian statistics, data warehouses, business intelligence, data mining, predictive methods, and very large databases (VLDB). Prior to DataArcho...
Software AG helps organizations transform into Digital Enterprises, so they can differentiate from competitors and better engage customers, partners and employees. Using the Software AG Suite, companies can close the gap between business and IT to create digital systems of differentiation that drive front-line agility. We offer four on-ramps to the Digital Enterprise: alignment through collaborative process analysis; transformation through portfolio management; agility through process automation and integration; and visibility through intelligent business operations and big data.
There will be 50 billion Internet connected devices by 2020. Today, every manufacturer has a propriety protocol and an app. How do we securely integrate these "things" into our lives and businesses in a way that we can easily control and manage? Even better, how do we integrate these "things" so that they control and manage each other so our lives become more convenient or our businesses become more profitable and/or safe? We have heard that the best interface is no interface. In his session at Internet of @ThingsExpo, Chris Matthieu, Co-Founder & CTO at Octoblu, Inc., will discuss how thes...
Last week, while in San Francisco, I used the Uber app and service four times. All four experiences were great, although one of the drivers stopped for 30 seconds and then left as I was walking up to the car. He must have realized I was a blogger. None the less, the next car was just a minute away and I suffered no pain. In this article, my colleague, Ved Sen, Global Head, Advisory Services Social, Mobile and Sensors at Cognizant shares his experiences and insights.
We are reaching the end of the beginning with WebRTC and real systems using this technology have begun to appear. One challenge that faces every WebRTC deployment (in some form or another) is identity management. For example, if you have an existing service – possibly built on a variety of different PaaS/SaaS offerings – and you want to add real-time communications you are faced with a challenge relating to user management, authentication, authorization, and validation. Service providers will want to use their existing identities, but these will have credentials already that are (hopefully) ir...
Can call centers hang up the phones for good? Intuitive Solutions did. WebRTC enabled this contact center provider to eliminate antiquated telephony and desktop phone infrastructure with a pure web-based solution, allowing them to expand beyond brick-and-mortar confines to a home-based agent model. It also ensured scalability and better service for customers, including MUY! Companies, one of the country's largest franchise restaurant companies with 232 Pizza Hut locations. This is one example of WebRTC adoption today, but the potential is limitless when powered by IoT. Attendees will learn rea...
From telemedicine to smart cars, digital homes and industrial monitoring, the explosive growth of IoT has created exciting new business opportunities for real time calls and messaging. In his session at Internet of @ThingsExpo, Ivelin Ivanov, CEO and Co-Founder of Telestax, will share some of the new revenue sources that IoT created for Restcomm – the open source telephony platform from Telestax. Ivelin Ivanov is a technology entrepreneur who founded Mobicents, an Open Source VoIP Platform, to help create, deploy, and manage applications integrating voice, video and data. He is the co-founder ...
The Internet of Things (IoT) promises to create new business models as significant as those that were inspired by the Internet and the smartphone 20 and 10 years ago. What business, social and practical implications will this phenomenon bring? That's the subject of "Monetizing the Internet of Things: Perspectives from the Front Lines," an e-book released today and available free of charge from Aria Systems, the leading innovator in recurring revenue management.
The Internet of Things will put IT to its ultimate test by creating infinite new opportunities to digitize products and services, generate and analyze new data to improve customer satisfaction, and discover new ways to gain a competitive advantage across nearly every industry. In order to help corporate business units to capitalize on the rapidly evolving IoT opportunities, IT must stand up to a new set of challenges.
There’s Big Data, then there’s really Big Data from the Internet of Things. IoT is evolving to include many data possibilities like new types of event, log and network data. The volumes are enormous, generating tens of billions of logs per day, which raise data challenges. Early IoT deployments are relying heavily on both the cloud and managed service providers to navigate these challenges. In her session at 6th Big Data Expo®, Hannah Smalltree, Director at Treasure Data, to discuss how IoT, Big Data and deployments are processing massive data volumes from wearables, utilities and other mach...
P2P RTC will impact the landscape of communications, shifting from traditional telephony style communications models to OTT (Over-The-Top) cloud assisted & PaaS (Platform as a Service) communication services. The P2P shift will impact many areas of our lives, from mobile communication, human interactive web services, RTC and telephony infrastructure, user federation, security and privacy implications, business costs, and scalability. In his session at Internet of @ThingsExpo, Erik Lagerway, Co-founder of Hookflash, will walk through the shifting landscape of traditional telephone and voice s...
While great strides have been made relative to the video aspects of remote collaboration, audio technology has basically stagnated. Typically all audio is mixed to a single monaural stream and emanates from a single point, such as a speakerphone or a speaker associated with a video monitor. This leads to confusion and lack of understanding among participants especially regarding who is actually speaking. Spatial teleconferencing introduces the concept of acoustic spatial separation between conference participants in three dimensional space. This has been shown to significantly improve comprehe...
The Internet of Things is tied together with a thin strand that is known as time. Coincidentally, at the core of nearly all data analytics is a timestamp. When working with time series data there are a few core principles that everyone should consider, especially across datasets where time is the common boundary. In his session at Internet of @ThingsExpo, Jim Scott, Director of Enterprise Strategy & Architecture at MapR Technologies, will discuss single-value, geo-spatial, and log time series data. By focusing on enterprise applications and the data center, he will use OpenTSDB as an example...
SYS-CON Events announced today that Gridstore™, the leader in software-defined storage (SDS) purpose-built for Windows Servers and Hyper-V, will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Gridstore™ is the leader in software-defined storage purpose built for virtualization that is designed to accelerate applications in virtualized environments. Using its patented Server-Side Virtual Controller™ Technology (SVCT) to eliminate the I/O blender effect and accelerate applications Gridsto...