The Alagad Technical Team Blog

Entries Tagged as 'Programming'

Three new Open Source Alagad Projects for IMAP, SNMP and QuickBooks

Published By: Doug Hughes on Feb 26, 2010 at 03:49 PM
Categories: Alagad , Programming , ColdSpring

I’m happy to announce that I have three new Alagad projects to announce. As with most other Alagad projects these are all free and open source. Please share and enjoy!

The first project is my favorite: ColdBooks.

http://www.alagad.com/projects.coldBooks

ColdBooks is a free and open source tool that allows ColdFusion developers to work with data stored in Intuit QuickBooks. ColdBooks attempts to simplify the process of communication with QuickBooks by integrating with the ColdFusion administrator and allowing users to create and use connections to QuickBooks in a manner similar to ColdFusion data sources.

Essentially, it’s a tool that you drop in under the ColdFusion CFIDE/administrator directory and can use to establish connections to QuickBooks via the Quickbooks web connector. You can then use services that this tool provides within your application to do pretty much anything that the QuickBooks API supports. This includes reading and writing employee, customer, vendor, invoice, check and many other types of data.

We’re still working on implementing this at Alagad, but we’ll soon be using this to connect our project management and time tracking tools directly to QuickBooks. (We actually already do this via a different unreleased too, but it’s very unreliable. So, I’m excited to get ColdBooks rolled out.)

The next project is an Imap Watcher Event Gateway

http://www.alagad.com/projects.imapGateway

How many times have you needed to interact with emailed data in your ColdFusion applications? Well, maybe not that often, but when you’ve had to it’s always been a pain in the rear. Traditionally, you’d have to create a scheduled process that would run every few minutes to check for new messages in your POP account. This is slow, unreliable and can be problematic. What if you needed (or wanted) a more efficient and nearly real-time system?

The Imap Watcher Event Gateway works like the Directory Watcher Event gateway in that it can watch a folder on your IMAP server and, as soon as a new message appears, it can announce an event to a configured CFC that can do whatever you want with it.

For my first test application I simply created a CFC to echo back the message that was sent:

<cfcomponent hint="I this is a sample CFC that handles generic Events">

<cffunction name="onEvent" access="public" hint="I handle incomming events from an event gateway." output="false" returntype="void">
<cfargument name="CFEvent" hint="I am the cfevent structure" required="true" type="struct" />
<cfset var Message = CFEvent.data.message />

<cftry>
<cfmail from="#Message.getTo()[1]#" to="#ListChangeDelims(Message.getFrom(), "[],", ",")#" subject="Re: #Message.getSubject()#"
port="465" useSSL="true" server="smtp.gmail.com" username="example@doughughes.net" password="something"
>Echo: #Message.getText()#</cfmail>
<cfcatch>
<cfdump var="#cfcatch#" output="console" />
</cfcatch>
</cftry>

</cffunction>

</cfcomponent>

So, that’s nifty and all. I can quickly reply back to emails. But what if I wanted to do something cooler? Well, just for fun, I setup a Google Voice account to send SMS messages to email to an email address that I watch with the IMAP Watcher Event Gateway. This means I now have a poor-man’s SMS short code (well, long code). This example only echos the SMS back to you, but now you may be able to see how it would be easy to make some cool applications with this.

The last project is an SNMP Event Gateway

http://www.alagad.com/projects.snmpGateway

The SNMP Event Gateway was originally created for Michigan State University a while back. They gave me permission to release it a long time ago, but I’m just now getting to it.

In all honestly, I’m not too familiar with SNMP so I can’t speak in detail to this gateway’s capabilities. However, I can say that it lets you listen for SNMP events as well as broadcast SNMP events. Behind the scenes it uses SNMP4J and, as far as I can tell, it pretty much just works.

So, there you go. Share and Enjoy!

View Full Entry | 5 Comments

 

Where Oh Where Did My Bottleneck Come From?

Published By: Jared Rypka-Hauer on Jun 22, 2009 at 10:43 AM
Categories: Alagad , ColdFusion , Programming , The Server Side

At one point in my career I thought I knew what performance tuning was... I would have described it as “writing tight code.” (Remember that phrase? “Tight code”?) And if I were to be tasked with fixing performance issues, I would have jumped on my computer, gotten a local copy of the app going, and started hitting pages to find the slow ones, then look at the code for ways to fix the issue. That, however, was before I knew what performance engineering really is.

View Full Entry | 15 Comments

 

No Object Oriented Cookbooks Here

Published By: Jeff Chastain on Jun 3, 2009 at 02:54 PM
Categories: ColdFusion , OO Development , Programming

With all of the recent talk regarding object oriented development in ColdFusion, a common theme appears with developers attempting to make the jump that I have seen many times in the past.  You see comments like "where are the OO tutorials" or "where can I find an OO book".  The problem that people don't seem to grasp here is that object oriented development is not something that you can just follow a check list for and be an expert at.  There is no step A, step B, now you have a world class object oriented application.

Imagine a carpenter who only has a hammer in his toolbox.  This carpenter can get quite a bit done with just that one tool, but to him, everything looks like a nail.  This is where procedural development is very useful and practical for getting things done.  For this carpenter, the hammer can take care of quite a few tasks - "hammering" them out quickly - just maybe not in the best way possible.

View Full Entry | 4 Comments

 

Getting Started With Enterprise Java is One Huge Pain

Published By: Doug Hughes on May 5, 2009 at 11:06 AM
Categories: Groovy , Ant , ColdFusion , OO Development , Programming

Over the last few months I've been reading several books about Groovy, Spring, Maven, Hibernate and more.  I've stated before on this blog that I'm moving towards implementing my application's model in Groovy and using ColdFusion for the presentation tier for HTML applications or Spring's BlazeDS integration for Flex applications.  And now, with those few months of experience under my belt I can authoritatively say that Enterprise Java is a royal pain.

You see, I actually understand Java just fine.  I can read the language and, to me, it's fairly clear.  But, as with my German, I'm much better at reading it than speaking it.  The reason isn't that I can't write the syntax, but that the supporting technologies are so amorphous and decentralized that they can simply be very difficult to learn.  Beyond that, they're often created with extreme flexibility in mind and that means more complexity.

View Full Entry | 13 Comments

 

Getting Started Configuring an Enterprise Development Environment For JBoss, Groovy, ColdFusion, Spring, Hibernate, Model-Glue and ColdSpring, among others.

Published By: Doug Hughes on Feb 16, 2009 at 08:00 AM
Categories: Groovy , Alagad , OO Development , Programming , ColdSpring

 

As I stated in a couple of blog entries the recently, Alagad is moving towards using Groovy to develop the object model for the systems we create. I outlined the logic behind this decision in this post. Joe Rinehart outlined some of the important basic concepts in this post.

Today I'm going to write about how Alagad is configuring its development environment. I'm hoping that this documentation will help others get a basic environment setup to start working with Groovy and ColdFusion. From this starting point I'm sure we'll all diverge into using our own preferred techniques.

When I'm done with this blog entry I'll have created a few publicly readable SVN repositories, including one called "Tools", that you can hopefully use to skip some of the tedium of getting this stuff setup.

View Full Entry | 40 Comments