Skip to content


Welcome

Christopher Grant is a Technology Leader in Columbus OH with and MBA and over 12 years experience focusing in the Internet and Architecture fields. His work with businesses in a wide variety of industries and varying sizes demonstrates his adaptability and versatility. Christopher combines his business background, leadership qualities and comprehensive knowledge of technology to provide organizations with successful long-term strategies and exacting tactical execution.

This blog provides a venue for discussing various topics from business, technology, and whatever else may arise. Please feel free to contact with any questions or comments.

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Uncategorized.


Agile Code Reviews with Jupiter

imageCode reviews are a valuable part of any software development effort. Agile development processes provide the opportunity to integrate reviews closer to the actual development .

Jupiter

Jupiter is a plugin for the eclipse platform that enables developers to communicate over specific lines of code. The plugin comes with a suggested process for code reviews. The process suggests a three phase approach starting with inspecting the code and logging review items.  A quick demo of this process can be viewed here. When a section of code raises quality concerns, the reviewer notes the issue in Jupiter for later discussion. Once the initial review is completed, the process moves into the second phase which is to discuss the items that were identified. As each item is approved for rework it is updated and assigned to a developer. In the third phase, the developer works through the list of issues that were assigned to him. This process can be used in agile code reviews as well.

Agile

A quick review of the agile development cycle. Code is developed in time boxed chunks called sprints, or iterations. One or more iterations of code are sent to production at regular intervals. We’ll call this the release. For this discussion our release will contain two iterations. In each iteration a developer works multiple story cards to completion then hands it off for various sign-offs.

Agile Jupiter

To integrate code reviews into the process we need to add a step to the story card process. When a developer has completed work, he passes the code to a reviewer.

image Individual Review

This reviewer picks up the standard code review process, discussed earlier, starting with the identification of quality concerns. When this individual review is complete the results are passed back to the developer for discussion.

Team Review

In this second phase, the developer walks through the list with the reviewer to understand what the concerns. The two discuss and agree on which items need to be corrected before the story can be signed off.

Rework

Once the list has been discussed and review items have been approved for rework, the developer moves into phase three, to rework the issues found.

Code Review Cleanup

Each code review will generate a series of files that are used by the Jupiter system. A file is created for each developer in each review. Given that a single iteration will contain multiple stories, the result is a handful of files that would need to be managed.

In each review there may be review concerns which will be deferred to a later point. To manage these concerns it is suggested that those issues be moved to a master list or logged as stories for future work.

image It is suggested that these code review files be closed down and cleaned up before starting the next release. To close out the code reviews for a release, all outstanding review items should be moved to a consolidated location. What remains are Jupiter files with closed out review items. At this point all Jupiter files can be removed and the review process can be prepped for the next release.

This should be completed after cutting the release. This leaves all review files available to be included in version control system for use in future audits.

 

Adding a second set of eyes to a coding effort can not only improve code quality but also enhance knowledge transfer within a team. Integrating a code review process into your agile environment can enable those discussions and improve application quality.

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Uncategorized.

Tagged with , , , .


Updating server after DataGrid edits – Dealing with event handler priorities

In this example we’re looking at sending a server request to update data from a Flex DataGrid after a user has edited a field. What we want to do is automatically save the data to the backend when a user leaves an editable field.

The datagrid fires off an event when the user is done editing. Setting up a handler for  DataGridEvent.ITEM_EDIT_END can be done right on the MXML or in ActionScript. The MXML version is very straight forward.

<mx:DataGrid 
id=”dg”
dataProvider="{dgCollection}" 
itemEditEnd="endHandler(event)"
editable="true">

 

The problem here is that this fires before the datagrid updates the data provider with the edits. In this case the endHandler function only has access to the original values.

As Paul Robertson notes in his article on this the DataGrid registers its own handler for this event. When adding event handlers you can optionally add a priority, and in this case the DataGrid handler is –50 in priority and our endHandler is using the default 0. Which means our function fires before the datagrid’s function.

In order to gain access to the updated results on the dataprovider we need to register our handler AFTER the datagrid updates the provider. To do this we need to switch over and user the ActionScript moethod of handler registration instead of the MXML style.

We register our handler in ActionScript with a priority less than –50

dg.addEventListener(
    DataGridEvent.ITEM_EDIT_END, 
    endHandler,
    false,
    -100);

Now when endHandler fires it will be accessing the updated values

 

Here is the complete code

 

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768"
              creationComplete="creationCompleteHandler(event);">
    <fx:Declarations>
        <mx:RemoteObject id="ro" destination="DGSource" result="resultAllEvents" />
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.events.FlexEvent;
            import mx.rpc.events.ResultEvent;
            import mx.events.DataGridEvent;
            [Bindable]
            private var dgCollection:ArrayCollection;
           private function creationCompleteHandler(event:FlexEvent):void
            {
                dg.addEventListener(DataGridEvent.ITEM_EDIT_END, endHandler,false,-100);
            }
            private function resultAllEvents(evt:ResultEvent):void
            {
                var e:ArrayCollection = evt.result as ArrayCollection;
                dgCollection=e;
            }
            public function endHandler(event:DataGridEvent):void
            {
                ro.saveOrUpdateEvent(dg.selectedItem);
            }

        ]]>
    </fx:Script>
    <mx:Button x="168" y="10" label="Get Events" width="343" click="ro.getOperation(‘findAll’).send();" height="21"/>
    <mx:DataGrid
        dataProvider="{dgCollection}" 
       id="dg" editable="true"
        >
        <mx:columns>
            <mx:DataGridColumn headerText="Date" dataField="date"/>
            <mx:DataGridColumn headerText="Title" dataField="title"/>           
        </mx:columns>
    </mx:DataGrid>
</s:Application>

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Flex.

Tagged with , , , , , , .


What is source control and how to get started

In the big IT shops source control is rather common place. However in smaller shops or for individual developers a version control system may not be a top priority. A source control system may seem overly complicated and unnecessary. Fortunately they’re not as cumbersome as you might think and the benefits are well worth the small effort. 

So what exactly do we mean when we talk about source control, or version control systems? Basically a source control system provides a central place to store your code and a mechanism to track revisions of that code.

 

Source Control

One common reason people start using a source control system is when more than one developer needs to access the code. There used to be a time when our live production system served as the central repository for accessing code. Jim had a task to update a webpage so, he would connect directly to the server and make a change to the file in the live environment. Bob may have a change to make and then go do the same thing. What about quality, what if there was a mistake or a file was accidentally deleted. To avoid this Developers may keep code in another location other than the live site. For individual developers this is typically on their computer. For multiple developers, this central spot may be a shared network drive. With that risk averted what else could go wrong?

What if Jim had a lot of changes to implement. Some core functionality needed to be changed and it couldn’t be done at one time. Typically Jim would grab a copy and keep it locally until it was finished then post it. Here’s the rub, after Jim takes the copy but before he puts it back, Bob goes on the server and makes a change. Later Jim posts his changes and overwrites Bob’s code. Geez thanks Jim.

Here’s where we start to see features of a source control system come in. In this case if they were using source control, when Jim tries to put his changes in, the system would alert him that other changes had been made since he pulled his copy.

Source Versioning

So what about this versioning concept, why do I care? Have you ever used undo on your computer? You know you make a mistake, hit ctrl+z and revert back to what you had before? Here’s a question, how do you revert back to something you had yesterday or last week. If you had something versioning your files you could do just that.

Say you’re doing a website and are making some wording updates to a promotion. You post the changes and a few weeks later your client tells you there’s a law suit over that change. Apparently a customer claimed the original promotion said one thing but the company say it was something else. How do you go back and see what really was on the site? Version control.

Another scenario, you have a functional application that your client is using in production. Now you have another customer who wants to use it too. You decide to update the application to accommodate more than one client. After a few weeks of tinkering you still can’t get things the way you want. It’s functional and in your central repository but not quite right. Your client comes back and wants a change to the app in production tomorrow. Your repository copy has the new changes in it, if you make the change now it will have your unfinished changes in it. With a version control system you can pull a snapshot of the code from before you started your changes and update it without affecting your in progress changes.

 

Getting started using a source version control system

There are a variety of free and fee based solutions. Some of the big names like ClearCase and Preforce sometimes show up in the big companies but the free solutions like CVS and SVN are more popular. CVS has been around for ages and had a huge following. SVN, also known as Subversion, started as an effort to fix some of the challenges that were in CVS. These days SVN is very widely used and is pretty much the standard.

Lets take a look at SVN. Most systems have a server component and a client component. The server piece is where your code is stored and the client is an interface for you to access that code. SVN is no different. You can go out and grab the server components then go get a client too. You don’t need to do this at this point though. For this example and for simple setups, the Subversion client TortoiseSVN has everything you need. So go ahead, down load and install it.

Once installed create a directory to act as your central repository. In this case I’ll create one at c:\repo. Navigate into that directory and right click. In the context menu choose TortoiseSVN -> Create repository here. Just like that you have a functional source control system.

Lets start using our new system. Before we do I need to clarify one thing. We just created a setup that mimics a server configuration. While this example is setup locally, it could ba on a server somewhere. The next step explains how you access that content and keep a useable copy locally.

image We’re ready now to use our SVN instance. Find a place on your computer where you’ll be doing your work, maybe c:\workspace. Navigate into that directory and right click. In the context menu choose SVN Chekout. This will pop up a window asking you where your repository is and how you want to get the contents. 

For the URL type in file:/// followed by the path to where you create the SVN repository earlier. This is not the working directory, rather the location of the repository. Since we installed this locally it will be something like file:///C:/repo but if this were on a server it could be http://someserver.com/repo

In this scenario we’re starting with the repository and pull the contents into our workspace. If you already had files in a workspace you could start there and push them into the repository with the import option on the context menu.

Using Your New Source Control System

Now that we have things setup lets try it out. Create a text file in your workspace called MyFile.txt. Add some content in it. Save and close. imageDepending on your version and setup the icon may differ but you’ll see a marker on your file like a question mark. This is telling you that this file is not in the repository or under source control. Since it is a new file we need to get it in there. Right click on a white space and choose

svn commit. The following popup will show you all files   that have been updated locally and are not in sync with the repository. you should notice that our file is listed, but is not checked.image Since this is a new file we need to select it and have the SVN client add it to our repository. Make sure our file is checked and hit ok.  The confirmation screen will show that everything has been added and updated.

imageNow go back and make a change to that file again, Save it and take a look at the new icon. 

image

This exclamation point tells us that this file, which is under version control, is out of sync with the repository. Again right click and commit changes.

image Now all is good and we get a Green checkmark.

So there you have it. The barebones basics of getting going with a source control system.

 

 

In future posts we’ll be using source control systems in our examples which will give you more context how this fits into a development process. Even with this basic setup you’ll be able to point your IDE to this local repository and follow along. Don’t just use it for our examples though, you can keep versions of any file this way. Version your wedding list, or Photoshop files. Whatever it is, revision control systems provide a lot of value.

For now happy versioning. 

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Development, Flex, Java, Technology.

Tagged with , , , , .


Flex development on the cheap (free)

imageWhen introducing Flex in my organization there was a bit of pushback on the Flex Builder licenses. Being the Java shop the we are, free is just the way it works. We’re so used to using free tools like Eclipse that we question paying for anything. This reminded me of when I was trying to learn ActionScript way back and had to have a copy of Flash to work through things.

 

So here you are, don’t want to buy Flex Builder but you do want to learn flex. Sure there is a 30day trial but what will you do after that?

There are a few tools available that allow you to code in ActionScript / Flex for free. One of the popular ones is FlashDevelop is imagea free IDE for developing apps for the Flash Platform. FlashDevelop is a basic IDE that provides code insight, project management, and integrated compilation. There are a few steps to install,such as pointing to the Flex3 SDK and the location of your Flash Player, but that’s it.

Create a new project, write some code and you’re good to go. Flex development with no strings attached.

Check out FlashDevelop, it’s a great tool for Flex development.

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Development, Flex, Technology.

Tagged with , , , .


How to fix problems with combined Flex / J2EE projects and BlazeDS

image Flex Builder and Flash Builder both have the ability to setup a few aspects of your BlazeDS project for you. In a previous posting I explained how to set up a BlazeDS project in Flash Builder. When you select “Use remote object access service” you’re telling the IDE to set up a few things for you. Selecting this keeps you from having to import the BlazeDS libraries, add configuration files and set a compiler option that points to the config files.

It sounds nice, but it may not be the best solution. Flash Builder seems to be a bit buggy when you choose this option. As of this posting it seems to incorrectly set the web context for the destination call when making the actual AMF call. More specifically it seems to use the “WebContent” value instead of “WebContext”. The result is that the calls are made to http://localhost:8080/WebContent/messagebroker/amf instead of http://localhost:8080/MyProject/messagebroker/amf. While this may be a bug in the beta version of Flash Builder there are other reasons not to trust this to your IDE.

When you set this up automatically, the config files are put into your WEB-INF/flex directory for you. When you edit these files, Flash Builder prompts you asking you if you really want to do this since they are generated files. Typically you would just hit yes and update the files. Here’s the rub. If you go under the project properties and change the server configuration the IDE may delete those files from the directory. In FlashBuilder if you remove the BlazeDS support after a project has been set up it removes the config files. Why would you do this if you were writing a BlazeDS app? Well maybe someone (me) was trying to fix the destination issue I previously mentioned by changing the WebContext setting. This setting happens to be locked down in an automated setup.

Finally when your application gets all growed up and wants to move out, you’ll probably want to move the build process to a command line utility. At this point you’ll have to know about the libraries, config files and compiler options anyway. So why wait, just set it up on your own to begin with.   FlashBuilder isn’t really doing that much anyway.

 

Set it up yourself

So where to begin. Lets talk briefly about the three main styles of setup that you’ll come across online. First is what we already mentioned, having Flash Builder setup things for you in a combined Flex J2EE project. The second way many sites discuss is creating a project for flex and pointing it to an existing server that’s running BlazeDS.  This is a more prevalent option and highlights the separation of concerns that actually exists in any final solution. The third method is to manually create a combined Flex J2EE project. This third option is more ideal for smaller projects.

 

image Lets look at setting up Flash Builder with BlazeDS manually. Go ahead and create a new flash project. Select J2EE for server technology, but DON’T select use remote object access. I have WTP installed so I have Flash Builder create my web app for me by selecting Create combined J2EE/Flex project using WTP.

Finish the set up as usual. Now you’ll need that BlazeDS war everyone talks about. If you don’t have it yet go get it from the Adobe Release Builds page. You can just grab the Binary Distribution. The Turnkey version just includes a lot of stuff we don’t need right now.

Once you get the War we’ll need to import it into imageour project. Go to File –> Import then select Archive file under General. Locate the directory where you put the blazeds.war and switch the file type to *.* then select the war.

 

Now we don’t need everything in this war, sure you can import it all but lets keep things clean.

imageDeselect the META-INF, classes and src directories. Also you’ll need to change the import into folder field from <project> to <project>/WebContent.

Hit Finish and say yes to overwriting web.xml. See that wasn’t so bad and you just did most of what FlashBuilder did, simply by importing that war yourself.

 

There is one other thing we need to do before we’re done. The web.xml tells Java where to find the configuration files but we need to let flex know also. It’s pretty easy, just follow my lead.

imageOpen up the project properties and head to flex compiler. See that field additional compiler arguments?  We’re going to update it.

We want to add a compiler option pointing to the configuration files. You can use either a path that’s in the classpath  or a physical location on your drive. We’ll use the latter. Update the Additional compiler arguments to include the following –services “C:\dev\MyProject\WebContent\WEB-INF\flex\services-config.xml” where dev is your workspace directory and MyProject is your project name. 

image

Hit OK  and you’re done.

 

 

Setting this up manually is a good practice and will make things easier later when we migrate to Maven and Ant. Stay Tuned!!!!

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Flex, Java, Technology.

Tagged with , , , , .


Connecting Flex to Java with BlazeDS

BlazeDS offers a great mechanism to attach your flex application to backend services. In this brief overview we’ll configure flex to call a Java Class and return results. This overview assumes you’ve already setup your IDE with a basic Flex / BlazeDS project.

Main points we’ll cover

  • Build the Java Class
  • Expose the Class with Blaze on the server
  • Configure Flex to find the Blaze service
  • Build the Flex components to make the call

Continued…

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Development, Flex, Java, Technology.

Tagged with , , , , , , , .


Setting up Flex BlazeDS in FlashBuilder

One of the most compelling aspects of Flex is its ability to integrate with a wide variety of data sources. Many of the introductory tutorials online teach how to connect to http services to pull data. The result is typically an XML response. Flex makes it easy to manage XML but there are better ways. using XML requires an object on the server to be serialized to a text format which adds processing time. The response is also larger due to the variety of XML tags that need to be added in order to properly represent the object’s structure. Yes I hear you in the back telling me that JSON is a lighter weight response that doesn’t require all the tags. Regardless the response still needs to be parse out in the client. Finally the contract between client and server is not well defined with straight XML or JSON. Web services do provide a strict contract for the interface that the client can rely on but  the objects are still serialized with extraneous tags used to define the structure.

BlazeDS utilizes AMF to provide direct links between client and server objects. AMF provides access to objects through a binary protocol and eliminates the need to add additional tags that identify the object structure. It also reduces the work in flex to get the data back into a usable flex object.

Lets start working through an example by getting our workspace setup. Continued…

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Development, Flex, Java, Technology.

Tagged with , , , , , , .


Velocity: Tracking productivity instead of time

One of the most interesting parts of Agile project management is watching the velocity of a team increase over time. As a team works together their productivity tends to increase. Agile represents the amount of work a team produces in a metric called velocity. imageFrequently teams new to agile will size the work in a time based unit such as hours or days. This is a common carry over from traditional project management. While Agile does manage time and resources, the time is fixed not variable. In Agile an iteration or sprint is a fixed length of time typically between two or four weeks. Continued…

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Agile, Business, Development.

Tagged with , , , , , , , .


Working with Offshore Teams: Tips from the Trenches

image I’ve had the opportunity to work with a variety of offshore teams on various projects. While very challenging these relationships can indeed be valuable. So how do you make the most of these partnerships? Here are a few observations. Continued…

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Uncategorized.

Tagged with , , , , , , , , , .


Consumers are Spoiled Rotten

image What I want, When I want it, How I want it

That’s how to grow your business these days. Give people what they want when they want it and how they want it. This really isn’t a new thing in business, after all isn’t that the basis of fast food? The difference is this trend is moving to almost every element of life. The culture in business is changing from a world where we all attend meeting at the same place and time to one where decisions are made with people in different locations and contributions coming at different times of the day. Phone calls have been replaced by emails and text messages. This is all old news.

Business need to continue adapting to these changes. The success of iTunes music store is a prime example. Rather than purchasing an album full of music I don’t want just to get a single song I do, I can buy just the one song. Newspapers are feeling the strain as well. The challenge newspapers face is Continued…

Share and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • TwitThis
  • StumbleUpon

Posted in Uncategorized.

Tagged with , , , .