Monday, June 29, 2009

Frameworks - onTap, and my decision

So, a few months ago, I started to look at frameworks that would help me out with a big site I have. now it is not like a ridiculously huge site, but for me it is big. I looked around and read up on some of the frameworks that there are. I think that I did a pretty decent job of searching through them all, and in the end I decided to use the onTap framework. there were these considerations that lead me to this decision:
  1. It supported internationalization, which is a huge plus for this site
  2. I could move my relatively large website over in a piecemeal fashion as it supports the fact that not all the pages need to be in the framework
  3. It has its own ORM with datafaucet
  4. It supports a plugin architecture so there are things I didn't have to develop
  5. It is dead simple to configure.... no xml
  6. All of your CFM files are compartmentalized in folders and you can seperate different page operations by the file structure.
  7. It uses/supports Lazy-Loading
  8. It was developed and is supported by Ike Dealey, who is a pretty damn smart guy... and I will do a follow up on my good friend Ike and his latest project...
All in all, the transition was pretty smooth, I am sure that I am not using the framework to its fullest potential, but some contractual problems with the client didn't give me enough time to move it over properly before rollout...

Live and learn I guess.

If you have any questions about onTap please let me know and I will share my experiences further.

Wednesday, June 24, 2009

FlexCF and Tutorial 19

Well, my Advanced Data Grid - Select All code is now available to view on the FlexCF website. It is there as tutorial #19. A big thanks to Paul Kukiel for putting it up there.

And I am happy to say that it is the first Flex 4 based tutorial on the website, so if you haven't had a chance to look at Flex 4 yet, here you are. It was build using the DCD functionality of Flex 4, which will Autogen the CFC for you. Now the autogen CFC is kinda verbose, and contains a few functions that you may or may not need, but the Flex4 Team gives you enough options for a Full CRUD with a few clicks of the mouse, and a little un-commenting!

Enjoy the tutorial, and of course View Source is enabled.

Any questions, you can find me...

Tuesday, June 23, 2009

SOnCFUG Meeting and CF9

Well tonight is the night. Yours truly will be presenting to the Southern Ontario ColdFusion User Group about CF9, Flex4, Flash Catalyst.

Check out our User Group page on Adobe Groups. To find out more, and RSVP! Start time is 6pm!

Monday, June 15, 2009

Selecting All Rows in an Advanced Data Grid

Well, I just spent waaay to long writing a little bit of AS to select/deselect all the cells in a datagrid/AdvancedDataGrid. Maybe I'm slow, and try stuff without really doing enough research, but either way, I had this super simple idea.

Why use an itemRenderer to get a check box in an AdvancedDataGrid, when it has a selectMode of 'multipleRows'? So, I wanted to select and Deselect all of the rows in a single click. I know, kinda crazy right?

Anyways, I did some Googling, and looked at FlexCF.com and found nothing that really helped with what I wanted. There was a tute on the Flex3 LiveDocs that related to getting the data from selected Cells, but not really what I wanted. Anyways, this is what I came up with:

The AdvancedDataGrid(ADG from now on) uses an array to store the data, and as a reference to what rows/cells are selected. So to get it to select them all? Well just create the correct array of course!

Code:

public function selecterOfAll():void
{
var selectedRows:Array = new Array(); //Define the array that will hold the values for selection
if (selectAllOutput.label == "Select All") //Test what the button says - default 'Select all'
{
for( var rows:int = 0; rows <>
{
//Loop over the rows that are in the Datagrid. the variable holds the ArrayCollection for the datagrid. should also be able to do ADG.rowCount
selectedRows[rows]=rows
//Make the selectedRows Array look like what the ADG expects
}
//Make the assignment happen - the 'magic' really
this.masterList.selectedIndices = selectedRows;
//Change the label to clear the selection
selectAllOutput.label = "Deselect All";
}
else //the label must say 'Deselect all'
{
//Update the label so that it will enter the loop above again
this.selectAllOutput.label="Select All";
//This is the best way I could find to clear the array
selectedRows = new Array();
//Update the ADG to have nothing selected
this.masterList.selectedIndices = selectedRows;
}
}

So, that is all well and good, but what if someone wanted to clear something that they had already selected? Well I need another button for that to call a similar bit of code. And of course, some people may want to go back to what they had already selected. Anyways, I am going to be working with the folks at FlexCF to get this up as a demo on their site, with perhaps some more of these goodies in there. Hope that this helps anyone, and of course I welcome feedback on my blogging style/content, I am still just getting the hang of this :).

Friday, June 12, 2009

How Easy is AIR?

Alright, so in the process of doing dev with Flex, there will most likely come an urge to write an AIR App, I mean it is easy enough to change the setting in Flex Builder, (when starting a project) or the simple switch to , and of course the fact that you can use HTML/JS to write an AIR app.

So, I gave into the temptation on the weekend. A client of mine was talking about doing some data comparison, and even emailed to ask if I had a good website for images of gauges... fine, a quick Google and I was done. Now, if you are a Flex Dev or are considering it, I recommend checking out Tour De Flex it is totally worth it. The AIR App has tons of sample apps, and demo code to get you started. I of course remembered that there were a few sample apps with gauges. :)

So, I decided that instead of just having static gauge images, I would write an AIR app that displayed the comparison in the guage form. I worked on it for about an hour, changing the gauge display, and hooking in multiple instances, not just a single Gauge, hooked in some static data, changed the chrome, and I think I had a pretty nice app, in an hour. It was just so cool.

I of course sent a screen shot along to the client with a 'What do you think of this?' kinda question, and they were floored. Now obviously for it to work the way it needs to work, I have to get a better understanding of the SQLite database that I can place behind this, but it can't be that much different, right?

Anyways, if you develop Flex, and you have never tried making an AIR App, just do it! It is easy and fun, and your mind will blossom with possibilities... mine has.

Wednesday, June 10, 2009

It's About Time

So, I have been around the block for a while now. People have been asking me if I have a blog for about a year. I guess it is time. I hemmed and hawed about doing this for a number of reasons (time, resources, interesting content..) and finally went the free route. I was going to do the whole domain thing, but not right now. Lets see how committed I am first.

So, who the heck am I?

I am a GIS Specialist who develops Web Apps for Agriculture in Ontario. I use ColdFusion and Flex, and just recently started down the AIR path (which is pretty damn sweet, if you need something like that... anyways, that is my first real blog post). I have been a CFer for about 9 years now I guess. I know no one has ever heard of me ;0)... I work at the largest privately owned Agricultural Testing laboratory in Ontario, we do a LOT of testing of anything to do with Agriculture, and it is interesting. In my role as GIS Specialist, I look after all of the mapping that needs to be done for our customers... the guys that use precision Ag technologies that is. I will go into what I actually do if people are really interested, but suffice it to say, that I make maps. I also do all the web development and IT work as well. We have a website that serves all of our analytical results and runs calculations on those results... All ColdFusion.

I am also partner in service firm that provides GIS softare and precision Ag hardware to growers. We also do web development for companies. Currently I am working an a traceability program for the largest vegetable processor in Ontario. Growers go on-line and enter data about their crops, and well.... lots of other stuff too. Interesting stuff, if you think it is :) (another blog post if folks are interested :p)

I am in the middle of redoing a legacy system written in Visual C++ 6 and converting it to a Flex CF app. It has been interesting so far, and Flex is providing most of what I need without have to override too many classes. That might change as I get more comfortable. I just wrote an AIR App over the weekend, it is of no use to the general public, but will serve its' purpose. Especially when I figure out how to print a report out of AIR.

So, what else? I have been married for almost 7 years to my lovely wife (Jill) and we have a recently turned 5 year old daughter (Brenna). We have two English Springer Spaniels (Maddison, 8, female, and Wesson, 2, male) and we live in a lovely little community in Southern Ontario. I have been at my current job for just over 6 years, and things just keep on changing.

I am the manager of the Southern Ontario ColdFusion User Group (SOnCFUG).

You can follow me on twitter @rob_parkhill and on google talk @ robert dot parkhill at gmail dot com.

I think that that is all for now. I hope to occansionally post something that you will find interesting.