<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>The Art of Software Development</title>
	<atom:link href="http://jim-boone.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jim-boone.com</link>
	<description>Jim Boone's thoughts on software development and other important matters</description>
	<pubDate>Tue, 02 Sep 2008 01:13:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Pilgrimage Experience</title>
		<link>http://jim-boone.com/2008/04/23/pilgrimage-experience/</link>
		<comments>http://jim-boone.com/2008/04/23/pilgrimage-experience/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 18:53:54 +0000</pubDate>
		<dc:creator>Jim Boone</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[presbyterian pilgrimage]]></category>

		<guid isPermaLink="false">http://jim-boone.com/?p=35</guid>
		<description><![CDATA[I wasn&#8217;t certain what to expect during my NC Presbyterian Pilgrimage #84 weekend on April 17-20, 2008, but I did know that it had a profound effect on all those that I had talked to who had attended.  I was first approached about the weekend several years ago but was a bit put off [...]]]></description>
			<content:encoded><![CDATA[<p>I wasn&#8217;t certain what to expect during my <a href="http://www.ncpp.net" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ncpp.net');">NC Presbyterian Pilgrimage</a> #84 weekend on April 17-20, 2008, but I did know that it had a profound effect on all those that I had talked to who had attended.  I was first approached about the weekend several years ago but was a bit put off by what appeared to be a <em>shroud of secrecy</em> surrounding the activities of the weekend.  I now know the reason for the secrecy was to protect the many surprises that the pilgrim will experience.  I intend to protect the surprises as well but if you really want to know I will tell you (but you would just ruin things for yourself).</p>
<p><span id="more-35"></span></p>
<h3>A Glimpse of Heaven</h3>
<p>Kathy attended a weekend several years ago and when she returned I asked her what it was like.  She summarized it by saying it must have been how the early church was as described in Acts.  After experiencing it I now understand what she meant. If you ask me to summarize pilgrimage I would say that it is a glimpse of heaven, a preview of eternity that you will experience here on earth (it least I did).</p>
<p>I just finished reading the book 90 Minutes in Heaven.  In that book the author describes his experience where he died and was in heaven for 90 minutes following an automobile accident.  He described a feeling of overwhelming love and peace, a complete immersion in love.  That is how I felt during the weekend.  I have never felt so much love in my life.  It is almost addicting!   That is why so many people return to work the pilgrimage because it is a powerful experience that you have to live through to truly understand.  I have already signed up to work the fall pilgrimage so you can tell that I&#8217;m hooked.</p>
<h3>Touched by the Spirit</h3>
<p>Words cannot accurately describe my experience but I will try to share the highlights. During the weekend you have the opportunity to listen to talks on various subjects.  After the talks you discuss them amongst your table group.  I had a very sweet lady named Doris at my table who had lost her husband to cancer four years ago.  During one of the discussions Doris began to break down and sob.  As I listened to Doris described her husband and how much his loss had impacted her, <em>I began to feel her pain</em>.  I felt so much pain for this lady who I had just met.  As I look back on this event I am convinced that it was a spirit moment.  The Holy Spirit allowed my heart to be touched and to absorb some of the pain that Doris had inside of her.  In response, I simply stood up and went over and hugged her for a long time.  I had a sense that Doris was there on that weekend to work through the healing process of her loss and that I was there in a small way to help her work through that pain.  I also believe the experience was intended for me.  It was intended to begin the softening process of my heart.</p>
<p>Every person at the pilgrimage had issues that they were struggling with or issues that were unresolved in their life.  Let&#8217;s face it, if you are honest, we all have issues in our lives that we need to deal with.  I almost sensed that for each of us to reach the next level spiritually we had to learn to effectively deal with our issues and quit ignoring them.  That was one of our purposes for being there as pilgrims, to break down the barriers keeping us stuck where we were. I am convinced that if and when you go it will be because God wants you to go, not because someone else wants you to go, to help you deal with YOUR issues.</p>
<h3>We are All Unworthy</h3>
<p>During the weekend you have a heightened awareness of how much Christ sacrificed for us all.  You begin to understand the meaning of grace and mercy.</p>
<p>I suppose one of the more significant enlightenment&#8217;s for me was an understanding of the power of prayer.  After I learned how much other people had been praying for me and all the other pilgrims I was immediately overwhelmed by the feeling that I was so unworthy of what these people were doing for me.  This unworthy feeling was so humbling.  It made me realize how much we did not deserve what Christ did for us through his sacrifice on the cross but what he willingly did anyway.  That is the true meaning of grace, to give unconditionally something that we do not deserve.  And on the flip side, mercy, not giving us what we do deserve.</p>
<h3>Love</h3>
<p>You cannot help but feel the love in Christian community that surrounds you the entire time you are at the mountain retreat.  But God used one event in particular to help me really understand what love is.  I don&#8217;t want to give away surprises so I can&#8217;t tell you exactly what happened.  But let&#8217;s just say that during a period of song as I looked upon several people whom I love dearly, I had an over powering feeling of love for those people.  It was so overpowering that I could barely handle it.  My response was the same as it was for Doris.  I felt compelled to jump up and hug them tightly.  At that same time a thought, or voice in my head, or whatever you call it said to me <em>I love you even more than what you are feeling now</em>.  I couldn&#8217;t imagine how that could be possible because the love within me was already off scale high.</p>
<p>During that same time we sung a song about the power of God and immediately thunder rocked the whole dining hall as there was an intense storm with lightning and thunder engulfing the camp.  As I looked around I could sense the energy and the emotion in the room and it was unlike anything I have ever experienced in my life.  For some reason it made me understand my full sense of humanity.  It was as if the voice was saying <em>this is what it&#8217;s like to be fully human</em>.  I still don&#8217;t quite understand what that really means but it is what I heard or sensed.  Meanwhile, lightning struck all around, the thunder cracked and the lights flickered several times.  It was an unforgettable moment.</p>
<p>After that experience was over my body was physically drained of energy and I was so tired I simply wanted to go to bed.  For years I have heard Christians pray, “Holy Spirit fill this room.”  Now I can honestly say that I have felt the Holy Spirit fill a room and it is one of the most intense awesome and powerful experiences any human could ever have.  Our God is an awesome and powerful God.  He made that perfectly clear to me that night and I will never forget it.  The team kept saying that it only gets better but it was hard to fathom how that could possibly be true.  But I was wrong.</p>
<h3>Chapel</h3>
<p>The Ruth and Billy Graham Chapel at Camp Harrison is located on a peninsula with a lake surrounding it on three sides.  It is an open-air chapel beautifully adorned with stone pillars and a somewhat rustic mountain look.  It was a beautiful peaceful place.  Every morning we began the day with a service and communion in the chapel.  Every evening we finished the day with a service in the chapel.  The first thing you do in the morning before breakfast is worship God.  The last thing you do before you go to bed as worship God.  It was a great way to begin and end your days.</p>
<p>The chapel is truly a holy place&#8230;holy ground.  During the many services we had at the chapel God made his presence known through the changing weather and the beauty that surrounded us.  For example, during a healing service, we were treated to rainbows after confessing to prayer partners the issues that were troubling us.  There were also low-lying clouds and fog on the lake at that time.  I asked Kathy to join me as we looked out on the scene and it was one of the most beautiful snapshots I had ever seen in my life.  I commented to Kathy that it looked like a postcard.  The dogwoods were in bloom on the mountain ridges, wisps of fog were coming off the lake, and the low clouds all around gave me the appearance of a cold winter scene but here it is April!  The timing and presentation could not have been any better.</p>
<p>On Sunday morning when we arrived at the chapel the whole camp was in shrouded in fog.  This was the resurrection day.  This was the day he did Jesus ascended from the depths of hell.  And indeed that is exactly what appeared to play out in the chapel.  As the service went on the fog began to lift and the more the pastor spoke of hope in life the more that blue sky and beams of sunlight broke through.  The timing was impeccable.  Nobody could have orchestrated the changing scene around us except for God himself.</p>
<p>And finally there was the closing service.  We had all become friends but now it was time to depart. As the pilgrims began to describe their experience, a light rain began to fall&#8230;tears of sadness.  The rain was a perfect expression of how many of us felt since we knew we were about to leave this place and our new friends.  But true to form, the rain stopped and the sun came out again before we all departed (I didn&#8217;t see them, I am told that two more rainbows emerged before it was all over).  After all, this wasn&#8217;t the end it was just the beginning.</p>
<p>God smiled on us every time we were in that chapel and he became part of our services as he changed the scenes around us to match the mood of the service.  There were no coincidences here.  It was obvious to me who is in charge.</p>
<h3>Conclusion</h3>
<p>I had to get away for a while and think before I could close this posting.  What can I say that I haven&#8217;t already said?  It was a powerful,  emotional and sometimes overwhelming weekend.  I would highly recommend it to any Christian who is secure in their faith and who are seeking to take their faith to a new level.  I think it would scare the living tar out of a new believer!</p>
<p>After several hours of deep thought I have developed a theory regarding the impact of the weekend on different personalities.  My extensive study (five or so people :-)) leads me to conclude that if you are not a very emotional person when you first attend the weekend, then it will most likely have a greater impact on you than the person who is already in touch with their emotional side.  I do not imply that emotional people will not experience an awesome time at the weekend, but I think they can process their emotions better and understand them more fully than us emotionally challenged people. In fact, empathetic people like my wife probably already feel other people&#8217;s pain like Doris&#8217;s so that&#8217;s no big deal to them.  But if you are like me, it got neurons firing that are not used to firing.</p>
<p>The impact on my friend and brother Hal Hester was very similar to mine.  During the weekend Hal quoted a passage from Ezekiel that he said spoke to him.  It also speaks to me.</p>
<blockquote><p>Ezekiel 36:26 (New International Version)<br />
26 I will give you a new heart and put a new spirit in you; I will remove from you your heart of stone and give you a heart of flesh.</p></blockquote>
<p>I have come to realize that when it comes to  my Christian faith, I am very book wise but I am not heart wise. Now that my heart has been softened it is clear where I need to focus my developmental energy. I need to ensure that my heart continues to soften and does not become hard again.</p>
<p>My second observation is that I feel it might be impossible to survive for a prolonged length of time in such a loving environment. I don&#8217;t know about others but I became somewhat depressed the days immediately following the pilgrimage.  I wanted to feel the same way at home as I did at Camp Harrison.  But I suspect my feelings were similar to that of a crack addict. The euphoria is so intense that the addict seeks more and more of the drug until they self-destruct.  Likewise, if we remained in that environment we would lose focus on our real mission here on earth.    On the bright side, if you going to become addicted to something, I can&#8217;t think of anything better than God&#8217;s love.</p>
<p>Finally, what we experienced was the formation of a community whose likeness will never be duplicated again.  The group may evolve over time as old team members return, but the character will never be exactly the same. We also know that on all subsequent pilgrimage weekends new communities will be formed for that brief moment of time. The common element between all groups is that they will all share the same grace and the same love. That same love that we all will experience when we meet our maker.  The weekend was truly a glimpse of heaven.</p>
<p>My friends, God loves you, and so I.</p>
]]></content:encoded>
			<wfw:commentRss>http://jim-boone.com/2008/04/23/pilgrimage-experience/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Foray into Agile Development</title>
		<link>http://jim-boone.com/2008/04/16/foray-into-agile-development/</link>
		<comments>http://jim-boone.com/2008/04/16/foray-into-agile-development/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 02:59:14 +0000</pubDate>
		<dc:creator>Jim Boone</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[agile development]]></category>

		<guid isPermaLink="false">http://jim-boone.com/?p=34</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of thinking lately and have come to the conclusion that technical blogging is difficult.  If you want to provide useful information for people, you need to do a lot of leg work, a lot of testing, and then take the results of your work and distill it into something [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of thinking lately and have come to the conclusion that technical blogging is difficult.  If you want to provide useful information for people, you need to do a lot of leg work, a lot of testing, and then take the results of your work and distill it into something that you think might be interesting for folks.  Then package it so that people can download it and use it on their own. In contrast, a posting that consists mainly of opinions and thoughts is easy (like this one).  My mind is full of thoughts every waking hour of every day.  The problem is, or least how I see it, is who really cares what I think about?</p>
<p>I could blog about the three days it took me to replace my hot water heater and everything I learned about sweating copper joints together, but does anyone really care?  I could talk about my challenges in managing a family with college-bound teenagers but does than anyone really care about that either?  The reality is I choose not to work my whole life away.  I think life is more than work.  I believe it is everyone&#8217;s duty to find their purpose in life and pursue it.  Through years of trial and error, I now know that I was meant to be a creator and developer of software.  The primary reason I know is I am passionate about it. I love it! So let me tell you about what&#8217;s going on in this area of life.</p>
<p>I&#8217;ve started a new project at work were I in the technical lead.  I really enjoy this role because I love to solve problems and I enjoy applying the latest technology to those solutions.  Since I am in charge of this project, and since my employer is allowing me to pursue an agile development methodology, I have delved into the world of agile development headfirst!  What I have discovered is there is a lot to unlearn.</p>
<p>When I studied computer science in graduate school the waterfall method was the only way to go.  Fifteen years later it is quite obvious to me that that is not the best way to go.  I really like the concept of agile development.  I especially like the concept of minimal documentation.  What surprised me though is that I didn&#8217;t know how to act without a requirements document or use cases.  How can you design a system without these?  How can you architect a solution if you don&#8217;t have a vision of the final deliverable?  Where did the documentation crutches go?</p>
<p>I like to think that I&#8217;m adaptable.  What I found is the beauty of agile is you can redefine your process to fit your circumstances.  You don&#8217;t have to abandon every technique or tool you know.  In my small team of four developers and the manager I can basically run the show the way I see fit (even though I&#8217;m not the official manager).  Therein lies the beauty of agile.  I know my team, I know the problem domain, I know our skill sets, I know the environment we all work in, and I know the toolset so I get to use my brain and create a unique approach at developing this application.  I am having a good time!  I like showing up at work lately and I&#8217;m not even coding.  Of course I will be coding since there are only four of us but there is more to life.  Trust me on this one.  Long live agile techniques will and long live human creativity! They are a perfect match.</p>
]]></content:encoded>
			<wfw:commentRss>http://jim-boone.com/2008/04/16/foray-into-agile-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RIA Prototype Client Using BlazeDS Messaging and JMS - J2EE Server</title>
		<link>http://jim-boone.com/2008/04/10/ria-prototype-client-using-blazeds-messaging-and-jms-j2ee-server/</link>
		<comments>http://jim-boone.com/2008/04/10/ria-prototype-client-using-blazeds-messaging-and-jms-j2ee-server/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 14:30:33 +0000</pubDate>
		<dc:creator>Jim Boone</dc:creator>
		
		<category><![CDATA[BlazeDS]]></category>

		<category><![CDATA[Dashboard Prototype]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[J2EE]]></category>

		<category><![CDATA[JMS]]></category>

		<category><![CDATA[messaging]]></category>

		<category><![CDATA[Remoting]]></category>

		<guid isPermaLink="false">http://jim-boone.com/?p=33</guid>
		<description><![CDATA[In a previous posting I gave an overview of the dashboard prototype that I created to investigate BlazeDS messaging with Flex clients. This posting focuses specifically on the J2EE application server component. I encourage you to read the prototype overview section of my initial post if you have not done so already to glean an [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous posting I gave an <a href="http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/" title="Overview" target="_self">overview of the dashboard prototype</a> that I created to investigate BlazeDS messaging with Flex clients. This posting focuses specifically on the J2EE application server component. I encourage you to read the <em>prototype overview</em> section of my initial post if you have not done so already to glean an understanding of what this server component does in the prototype.</p>
<h3><strong>Server Architecture</strong></h3>
<p>The EJB3 server architecture is quite basic and consists of one interface, one enterprise Java Bean (EJB), and one plain old Java object (POJO) value object.  <code>ITimer </code>is a local interface that is implemented by the stateless <code>DataGeneratorBean </code> EJB.  The <code>DataGeneratorBean</code> takes advantage of EJB timer service in order to generate events at the frequency specified by the client.  You can start and stop message generation by calling the startTimer() or stopTimer() methods of the <code>DataGeneratorBean</code> EJB (these are the methods called by the client to start and stop message generation).  It should be noted that by default EJB timers are persistent.  That is if the timer is running when you shut the application server down it will start up automatically when you start the application server and again.</p>
<p>The <code>MetricsVO </code>value object is used to encapsulate the metrics data.  A corresponding <code>MetricsVO </code>object is defined within the Flex client and the <code>[RemoteClass(alias='info.jimboone.MetricsVO')]</code> meta tag is added to the Flex definition object to assist BlazeDS in translating the Java object to/from the ActionScript object . You can <a href="http://jim-boone.com/src/dashboard/server/" target="_blank">view all of the Java EJB source files here</a>.</p>
<h3><strong>BlazeDS  Configuration</strong></h3>
<p>Integration of the J2EE server with BlazeDS occurs in the web.xml file.   All that is required here is the definition of the <code>MessageBrokerServlet </code>servlet and a listener that keeps track of the HTTP Flex sessions (<code>HttpFlexSession</code>).  This is fairly straightforward and very well documented within the BlazeDS Developers Guide (you can also view the web.xml files in the turnkey applications examples).  The complete web.xml file is shown below:</p>
<p><span id="more-33"></span></p>

<div class="wp_syntax"><div class="code"><pre class="xml">&nbsp;
	DashboardServer
	BlazeDS
	BlazeDS Application
&nbsp;
flex.messaging.HttpFlexSession
&nbsp;
&nbsp;
		MessageBrokerServlet
&nbsp;
			flex.messaging.MessageBrokerServlet
&nbsp;
&nbsp;
services.configuration.file
/WEB-INF/flex/services-config.xml
&nbsp;
		1
&nbsp;
&nbsp;
		MessageBrokerServlet
		/messagebroker/*
&nbsp;
&nbsp;
		index.html
		index.htm
		index.jsp</pre></div></div>

<p>The BlazeDS <code>MessageBrokerServlet </code>is configured by reading the services-config.xml file. This file includes two additional files describing both remoting and messaging destinations.  As I have mentioned previously, the remoting channel uses an EJB3 factory to lookup the stateless session bean that will service the remoting request.  The following remoting config file shows how easy it is to specify the JNDI name for the session bean that will service all remoting method calls.</p>

<div class="wp_syntax"><div class="code"><pre class="xml">&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
          	ejb
            dashboard/DataGeneratorBean</pre></div></div>

<p>The BlazeDS messaging destinations are configured in the messaging-config.xml file.  There are a plethora of settings that one can specify in this file for the <code>JMSAdapter </code>component.  These options are documented clearly in the BlazeDS Developers Guide.  The following snippet shows the more interesting configuration details from this file.</p>

<div class="wp_syntax"><div class="code"><pre class="xml">&nbsp;
&nbsp;
&nbsp;
				5
&nbsp;
&nbsp;
&nbsp;
&nbsp;
				1000
				0
				false
&nbsp;
&nbsp;
				Topic
				javax.jms.ObjectMessage
				java:/ConnectionFactory
				topic/testTopic
				NON_PERSISTENT
				DEFAULT_PRIORITY
true
				AUTO_ACKNOWLEDGE
				1</pre></div></div>

<p><strong>Prerequisites for Running the Prototype</strong></p>
<p>You are more than welcome to download the prototype and experiment with it to yourself.  Perhaps the easiest thing to do is to download the ear file and copy it into the JBoss server/default/deploy directory.  The ear includes the client swf file so you should be able to open a browser and hit the following URL to access the client: <em>http://localhost:8080/DashboardServer/CustomDashboardMain.html</em></p>
<p>Obviously, before you do this you need to ensure that the following prerequisites are available:</p>
<ul type="disc">
<li>Java5      JDK or higher installed</li>
<li><a href="http://www.jboss.org/jbossas/downloads/" title="Download JBoss" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jboss.org');">JBoss      4.2.1 or 4.2.2</a> (I have not tested with a JBoss 5.X)</li>
<li><a href="http://jim-boone.com/content/dashboard/DashboardServer.ear" title="EAR File" target="_blank">Prototype      EAR file</a></li>
</ul>
<p>Please note that I have been using the &#8220;default&#8221; server image that is included in the standard JBoss distribution.  This image includes a topic with the JNDI name <em>topic/testTopic</em>.  The prototype code base assumes that this topic will be present.  If it is not defined in the application server, then you will have to create the topic before the prototype will work.</p>
<h3>Experimenting with the Client Code</h3>
<p>After you drop the ear file and deploy directory and play around with the client for awhile, things can get pretty boring.  You might also want to modify the client code somehow to suit your needs.  I have included the Flex Builder 3 project <a href="http://jim-boone.com/content/dashboard/dashboard-web.zipfile" title="Flex Project export" target="_blank">here for download</a>.  You can import it into Flex Builder and run the client directly from Flex Builder.  That is the beauty configuring your destinations directly in ActionScript.  You have effectively decoupled the deployment of client code from the server code. Enjoy!!</p>
]]></content:encoded>
			<wfw:commentRss>http://jim-boone.com/2008/04/10/ria-prototype-client-using-blazeds-messaging-and-jms-j2ee-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RIA Prototype Client Using BlazeDS Messaging and JMS - Flex Client</title>
		<link>http://jim-boone.com/2008/04/05/ria-prototype-client-using-blazeds-messaging-and-jms-flex-client/</link>
		<comments>http://jim-boone.com/2008/04/05/ria-prototype-client-using-blazeds-messaging-and-jms-flex-client/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 19:26:08 +0000</pubDate>
		<dc:creator>Jim Boone</dc:creator>
		
		<category><![CDATA[BlazeDS]]></category>

		<category><![CDATA[Dashboard Prototype]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[channel configuration]]></category>

		<category><![CDATA[LineChart]]></category>

		<guid isPermaLink="false">http://jim-boone.com/?p=28</guid>
		<description><![CDATA[In a previous posting I gave an overview of the dashboard client that I created to investigate BlazeDS messaging with Flex clients.  This posting focuses specifically on the Flex client.
One of the purposes of an application dashboard is to provide the user a means of rapidly discerning the state of an application using data [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous posting I gave an overview of the dashboard client that I created to investigate BlazeDS messaging with Flex clients.  This posting focuses specifically on the Flex client.</p>
<p>One of the purposes of an application dashboard is to provide the user a means of rapidly discerning the state of an application using data visualization.  I couldn&#8217;t think of a better use of Flex and than visualizing data!  I am partial to real-time strip chart plots since you can monitor the history of operational parameters over a period of time.  I am also partial to bar type meter that show the current value of a parameter and maybe even a high water mark.  I envisioned a final dashboard application with many such strip charts and bar meters.  The first objective of the prototype was to scope out an efficient way of displaying data for one set of metrics.</p>
<h3>Charting Components</h3>
<p>I wanted to try out some of the stock Flex charting components since I had never had the opportunity to work with them before.  The <code>LineChart</code> component looked like a perfect component to use to draw my data in real time.  Unfortunately, the <code>LineChart</code> does not allow you to present data in the same way that say the Windows performance monitor does as shown below.</p>
<p><a href="http://jim-boone.com/wp-content/uploads/2008/04/windowsstripchart.gif" title="Windows Performance Strip Chart"><img src="http://jim-boone.com/wp-content/uploads/2008/04/windowsstripchart.gif" alt="Windows Performance Strip Chart" width="500" height="107" /></a></p>
<p>You basically have the choice of moving the whole chart as the performance monitor does or moving the data plot as you can with the bar chart component.  Once I got over my preconceived notions of how a strip chart should work I found the <code>LineChart</code> to be perfectly adequate. The following show the <code>LineChart</code> component in the dashboard demo.</p>
<p><a href="http://jim-boone.com/wp-content/uploads/2008/04/dashboardstripchart.gif" title="Dashboard Strip Chart"><img src="http://jim-boone.com/wp-content/uploads/2008/04/dashboardstripchart.gif" alt="Dashboard Strip Chart" /></a></p>
<p>Although the stock <code>LineChart</code> component appears adequate for my purposes, I&#8217;m still a bit tempted to try to construct a strip chart component.  After checking out the <a href="http://www.degrafa.com/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.degrafa.com');">Degrafa web site</a>, it looks like degrafa may be a good tool set to use in constructing a moving strip chart.  I suppose I can also make my <code>LineChart</code> appear a bit more polished through CSS.  Unfortunately, making UIs look pretty has not been in my job description up until this point so I have a bit to learn.<br />
<span id="more-28"></span></p>
<h3>Efficiency memory management</h3>
<p>One concern that I had with the <code>LineChart</code> was how can you effectively change the underlying data structure without causing the invalidation of a large number of objects each time a new data point is received (and hence sloppy memory management).  After pondering this issue, and after a post or two on the flexcoders newsgroup, I discovered the virtues of the <code>IViewCursor</code> interface which is implemented by the <code>ArrayCollection</code> class.  This interface provides methods similar to the file pointer used in random access file I/O APIs.  You can seek anywhere within your data structure and then perform operations like insert or remove.  This was exactly the behavior I was looking for: a way of deleting the oldest data point on one end of the data structure and adding the latest data point to at the other end of the data structure.  The following code snippet shows how this operation was implemented in code.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript"><span style="color: #808080; font-style: italic;">// Update chart data provider, remove the oldest and add</span>
<span style="color: #808080; font-style: italic;">// the newest datapoint if we are at the max array size. Otherwise,</span>
<span style="color: #808080; font-style: italic;">// add to the collection</span>
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>metrics.<span style="color: #006600;">source</span>.<span style="color: #0066CC;">length</span> &amp;gt; ARRAY_SIZE <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
cursor.<span style="color: #0066CC;">seek</span><span style="color: #66cc66;">&#40;</span>CursorBookmark.<span style="color: #006600;">LAST</span><span style="color: #66cc66;">&#41;</span>;
cursor.<span style="color: #006600;">remove</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
cursor.<span style="color: #0066CC;">seek</span><span style="color: #66cc66;">&#40;</span>CursorBookmark.<span style="color: #006600;">FIRST</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
cursor.<span style="color: #0066CC;">insert</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
metrics.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>I used the Flex Builder profiler to monitor object creation during a long run of the client application and saw a very minimal effect in the Flash player memory footprint due to this technique.  I hereby declare victory and move on!</p>
<h3><strong>Value Object</strong></h3>
<p>The next thing to consider is how to move data from the back-end to the front-end.  The classic design pattern here is to use a value object to encapsulate your data.  I use value objects so much that they are like breathing to me.  The following listing shows the simple value object that contains three dummy metric values and the associated timestamp.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript">package info.<span style="color: #006600;">jimboone</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span>
<span style="color: #66cc66;">&#91;</span>RemoteClass<span style="color: #66cc66;">&#40;</span>alias=<span style="color: #ff0000;">'info.jimboone.MetricsVO'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #808080; font-style: italic;">/**
* Simple object to encapsulate metric values
*
* @author Jim Boone
*
*/</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MetricsVO
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> timestamp:<span style="color: #0066CC;">Date</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Date</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> instantValue:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> metric1:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> metric2:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> metric3:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #b1b100;">return</span> timestamp + <span style="color: #ff0000;">&quot; Metric1: &quot;</span> + metric1
+ <span style="color: #ff0000;">&quot; metric2: &quot;</span> + metric2 + <span style="color: #ff0000;">&quot; metric3: &quot;</span> + metric3;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3><strong>Channel Configuration </strong></h3>
<p>I must admit that I am not completely happy with the way that endpoint configurations are handled between the Flex client and the server, especially with a J2EE application server but I will save this as the topic for another posting.</p>
<p>For simplicity, I effectively hard-coded the destination endpoints to localhost since this is where my server running.  The following code snippet shows how the endpoints and channels were configured all within ActionScript on the client. Of course this configuration needs to line up with entries on the server side configuration in server-config.xml in order for the front-end to talk to the back-end.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> pollingChannel:AMFChannel;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> longPollingChannel:AMFChannel;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const BASE_URL:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;http://localhost:8080/DashboardServer/messagebroker&quot;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const AMF_ENDPOINT:<span style="color: #0066CC;">String</span> = BASE_URL + <span style="color: #ff0000;">&quot;/amf&quot;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const POLLING_ENDPOINT:<span style="color: #0066CC;">String</span> = BASE_URL + <span style="color: #ff0000;">&quot;/amfpolling&quot;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const LONG_POLLING_ENDPOINT:<span style="color: #0066CC;">String</span> = BASE_URL + <span style="color: #ff0000;">&quot;/amflongpolling&quot;</span>;;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> initChannels<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">pollingChannel</span> = <span style="color: #000000; font-weight: bold;">new</span> AMFChannel<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;polling-channel&quot;</span>, POLLING_ENDPOINT<span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">longPollingChannel</span> = <span style="color: #000000; font-weight: bold;">new</span> AMFChannel<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;long-polling-channel&quot;</span>,LONG_POLLING_ENDPOINT<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> pollingFreq:<span style="color: #0066CC;">Number</span> = pollingFreqCbo.<span style="color: #0066CC;">text</span> as <span style="color: #0066CC;">Number</span>;
pollingChannel.<span style="color: #006600;">pollingEnabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;
pollingChannel.<span style="color: #006600;">pollingInterval</span> = pollingFreq;
&nbsp;
longPollingChannel.<span style="color: #006600;">pollingEnabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;
longPollingChannel.<span style="color: #006600;">pollingInterval</span> = pollingFreq;
&nbsp;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">pollingChannelSet</span> = <span style="color: #000000; font-weight: bold;">new</span> ChannelSet<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">longPollingChannelSet</span> = <span style="color: #000000; font-weight: bold;">new</span> ChannelSet<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">pollingChannelSet</span>.<span style="color: #006600;">addChannel</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">pollingChannel</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">longPollingChannelSet</span>.<span style="color: #006600;">addChannel</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">longPollingChannel</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
remotingService = <span style="color: #000000; font-weight: bold;">new</span> RemoteObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
remotingService.<span style="color: #006600;">destination</span>=<span style="color: #ff0000;">&quot;DataGenerator&quot;</span>;
remotingService.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MessageAckEvent.<span style="color: #006600;">ACKNOWLEDGE</span>, onMessageAcknowledge<span style="color: #66cc66;">&#41;</span>;
remotingService.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FaultEvent.<span style="color: #006600;">FAULT</span>, onRemotingFaultHandler<span style="color: #66cc66;">&#41;</span>;
remotingService.<span style="color: #006600;">channelSet</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">pollingChannelSet</span>;
msgConsumer = <span style="color: #000000; font-weight: bold;">new</span> Consumer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
msgConsumer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MessageEvent.<span style="color: #0066CC;">MESSAGE</span>, onMessageHandler<span style="color: #66cc66;">&#41;</span>;
msgConsumer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MessageAckEvent.<span style="color: #006600;">ACKNOWLEDGE</span>,onMessageAcknowledge<span style="color: #66cc66;">&#41;</span>;
msgConsumer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MessageFaultEvent.<span style="color: #006600;">FAULT</span>, onMessageFaultHandler<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3><strong>Dashboard Flex Client Source Code</strong></h3>
<p>There really isn&#8217;t anything earth shattering or terribly unique in a Flex dashboard client.  The more interesting observations will occur when I start putting the dashboard through its paces to investigate how BlazeDS performs. The complete source code for the Flex client can be <a href="http://jim-boone.com/content/dashboard/flex/srcview/">viewed and downloaded here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jim-boone.com/2008/04/05/ria-prototype-client-using-blazeds-messaging-and-jms-flex-client/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RIA Prototype client using BlazeDS messaging and JMS - Overview</title>
		<link>http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/</link>
		<comments>http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 15:05:11 +0000</pubDate>
		<dc:creator>Jim Boone</dc:creator>
		
		<category><![CDATA[BlazeDS]]></category>

		<category><![CDATA[Dashboard Prototype]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[JMS]]></category>

		<category><![CDATA[messaging]]></category>

		<category><![CDATA[Remoting]]></category>

		<guid isPermaLink="false">http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/</guid>
		<description><![CDATA[Objectives
In this multi-part post, I will present a prototype that I developed that examines the integration of BlazeDS with a Java 2 Enterprise Edition (J2EE) messaging back-end.  I have split the posting into three sections the first being an overview, the second presenting the Flex client and the third dealing with J2EE integration using [...]]]></description>
			<content:encoded><![CDATA[<h3>Objectives</h3>
<p>In this multi-part post, I will present a prototype that I developed that examines the integration of BlazeDS with a Java 2 Enterprise Edition (J2EE) messaging back-end.  I have split the posting into three sections the first being an overview, the second presenting the Flex client and the third dealing with J2EE integration using EJB3.  I recognize that many of you use other back-end server technologies such as Cold Fusion, PHP, or Ruby so you can ignore the third posting if you want to although the server Flex configuration files may be the same.</p>
<p>My objectives for writing the prototype were the following:</p>
<ul>
<li>Configure BlazeDS messaging between a J2EE JMS topic and Flex clients</li>
<li> Examine the difference between BlazeDS polling and long-polling messaging</li>
<li> Tweak the various BlazeDS configuration parameters and observe the effects on the J2EE application server</li>
<li> Demonstrate Flex remoting with EJB3</li>
<li> Gain experience working with the Flex charting components for real-time charting application</li>
<li> Ensure that the client components utilize memory efficiently</li>
</ul>
<h3>Prototype Overview</h3>
<p>I chose to develop a dashboard application that basically plots the value of three performance parameters in real time.  This prototype mimics the functionality of an AIR application that I will be writing to monitor a production J2EE web application. The prototype application consists of a line chart that plots the performance parameters in real time and a bar chart that shows the instantaneous value for each parameter.  The parameter values are generated randomly by the backend server code which places a value object containing these values into a JMS topic that the BlazeDS message broker is listening to.  These messages will be forwarded to the Flex client when it is connected to the topic. The following diagram illustrates the basic configuration of the prototype.</p>
<p><a href="http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/prototype-overview/" rel="attachment wp-att-24" title="Prototype Overview"><img src="http://jim-boone.com/wp-content/uploads/2008/04/prototypeoverview.gif" alt="Prototype Overview" /></a></p>
<p>The Flex client is used to start and/or stop a standard EJB timer session bean which creates a metrics data value object and sends it to a JMS topic (with topics messages are delivered to all subscribers) every time the timer fires.  The user can set the frequency that the timer fires from the client.  The EJB timer is controlled from the client via remote method calls.  An EJB3 adaptor written by Ryan Norris was used to interface the Flex message broker with the J2EE application server. This link will take you to Ryan&#8217;s <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;loc=en_us&amp;extid=1089970" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.adobe.com');">EJB and Flex Integration component</a>.</p>
<p>The JMSAdapter class that is shipped BlazeDS is used to connect the message broker to the JMS topic and forwards messages to all Flex client subscribers.  This adapter is feature rich and allows you to set about any configuration setting that a JMS client would need to. I even successfully tested connecting to a secured topic with no problems!</p>
<p>The following is a screenshot of the Flex client.  It is not pretty, but it is an effective tool for exploring Flex and BlazeDS messaging. <a href="http://jim-boone.com/wp-content/uploads/2008/04/dashboardfull.gif" title="Dashboard Prototype Client" target="_blank">Click here for a full size image</a>.</p>
<p><a href="http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/dashboard-thumbnail/" rel="attachment wp-att-26" title="Dashboard Thumbnail"></a></p>
<p style="text-align: center"><a href="http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/dashboard-thumbnail/" rel="attachment wp-att-26" title="Dashboard Thumbnail"><img src="http://jim-boone.com/wp-content/uploads/2008/04/dashboardthumb.gif" alt="Dashboard Thumbnail" /></a></p>
<h3>References</h3>
<p>I would also like share many of the excellent references that I have found while developing this prototype. Of course the <a href="http://livedocs.adobe.com/blazeds/1/blazeds_devguide/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/livedocs.adobe.com');">BlazeDS Developers Guide</a> is a must read but it can be a bit overwhelming if you just want to get a sense of the big picture. I found the article entitled <a href="http://www.adobe.com/devnet/flex/articles/intro_fms.html" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.adobe.com');">Introduction to the Flex Message Service</a> to be an excellent introduction into Flex messaging. It is perhaps my personal favorite.  You might also want to check it out an article titled <a href="http://www.adobe.com/devnet/livecycle/articles/blazeds_gettingstarted.html" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.adobe.com');">Getting started with BlazeDS</a> which provides a gentle introduction into BlazeDS messaging.    Finally, there is an article on the Flex Developers Journal website titled <a href="http://www.webddj.com/read/505476.htm" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.webddj.com');">How to Create a Multi User Flex Application Using JMS.</a>  Be warned that your browser will be spammed with all sorts of advertisements, a pet peeve of mine, but I suppose the Flex Developers Journal needs to pay the bills somehow. Stay tuned for some code!</p>
]]></content:encoded>
			<wfw:commentRss>http://jim-boone.com/2008/04/02/ria-prototype-client-using-blazeds-messaging-and-jms-overview/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
