<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Josh Molina</title>
	<atom:link href="http://joshmolina.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshmolina.com</link>
	<description>Think. Discover. Design.</description>
	<lastBuildDate>Tue, 06 Sep 2011 10:30:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Software for the Financial Industry</title>
		<link>http://joshmolina.com/2011/09/software-for-the-financial-industry/</link>
		<comments>http://joshmolina.com/2011/09/software-for-the-financial-industry/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 09:46:23 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Financial RIAs]]></category>

		<guid isPermaLink="false">http://joshmolina.com/?p=373</guid>
		<description><![CDATA[The epitome of technological advancements could not be more evident that in the Financial industry.  Those of us who have spent time consulting and/or migrating/modernizing legacy systems have seen the good and the bad.  However, whether you&#8217;re writing software that moves Struts to Spring, Cairngorm to Parsley or even Oracle to Netezza and vice-versa one [...]]]></description>
			<content:encoded><![CDATA[<p>The epitome of technological advancements could not be more evident that in the Financial industry.  Those of us who have spent time consulting and/or migrating/modernizing legacy systems have seen the good and the bad.  However, whether you&#8217;re writing software that moves Struts to Spring, Cairngorm to Parsley or even Oracle to Netezza and vice-versa one thing is for sure; You need patience and the ability to dig into your bag of tricks to get the job done.</p>
<p>&nbsp;</p>
<h3>RIA (Rich Internet Applications)</h3>
<p>Let&#8217;s assume you&#8217;ve got all your services identified, configured, etc and your endpoints defined.  No? &#8211;Before we begin to start talking about our RIA layer, let&#8217;s discuss the approach in which you&#8217;ll expose your endpoints and services that Flex will call (via AMF).</p>
<p>&nbsp;</p>
<h4>Identify business logic and the &#8216;heart&#8217; of the application</h4>
<p>The goal here is to isolate the functionality that will be exposed to other consumers.  This is a very critical step since your application will become as valuable as those services you&#8217;re exposing and the data/functionality you&#8217;re providing to the clients.</p>
<p><strong>Refactoring your source code<br />
</strong></p>
<p>You may need to refactor your business objects.  If the implementation isn&#8217;t based on best-practices (ie, interfaces vs concrete implementation, inheritance vs object composition, encapsulation, etc) you&#8217;re in for a long day/night.</p>
<p>We will be exposing our services based on our interfaces, so this is a MUST.</p>
<p>One of the suggestions I give to all my clients is to not just look at the trees in the forest but step back and look at the tree.</p>
<p>If we&#8217;re going through the pain-staking process of code refactoring (and in some instances re-designing the application) assume we&#8217;re exposing our application as services and not just for consumption of Flex or any other RIA.</p>
<p>Take for example the following:</p>
<ul>
<li><strong>getPortfoliosInstrumentsForHedging() : List&lt;BusinessObject&gt;();</strong></li>
</ul>
<p>This method could potentially have the following responsibilities:</p>
<ul>
<li><strong>getAllInstrumentIdsBySegregation(ApplicationConstants.ELECTRICITY_EXPOSURE) : HashMap&lt;Integer, Instrument&gt;();</strong></li>
<li><strong>getPortfoliosByInstrumentId(Integer instrumentId) : List&lt;Portfolios&gt;();</strong></li>
<li><strong>isPortfolioCandidateForFurtherHedging(Portfolio portfolio) : Boolean;</strong></li>
</ul>
<p>and on and on and on&#8230;</p>
<p>All the functionality that is contained in this method getPortfoliosInstrumentsForHedging(..) is a sure candidate for segregation according to responsibilities.  Not only that, some of these method calls NEED TO BE delegated to an intermediary manager or another layer (to further decouple) the responsibilities.</p>
<p>What to do:</p>
<ol>
<li>Make sure you have or introduce a structure such as a services, manager, delegate, dao, etc, etc..</li>
<li>Keep your services layer thin and exposable (is that a word?)</li>
<li>Let the MANAGER handle the construction of objects and the delegation of responsibilities (such as calling other Managers, calling Formatters, DAO&#8217;s etc)</li>
<li>The DAO layer (of course only for data manipulation) &#8211;DO NOT MANAGE from here.</li>
<li>and ultimately, only pass objects upstream to the SERVICES layer fully populated, configured and ready to roll.</li>
</ol>
<p>So, going back to our example:</p>
<ol>
<li>Create a PortfolioHedge service with its corresponding interface and its implementation class in the /service folder</li>
<li>Create a PortfolioHedgeManager in the /manager folder</li>
<li>Create a PortfolioHedgeDAO in the /dao folder</li>
<li>Move all the Value Objects to the /vo folder</li>
<li>Break down the method getPortfolioInstrumentsForHedging into three different methods.</li>
<li>Create your tests, either by running Spring Mock Objects, running JUnit (only boolean results blah) or creating a simple void main method for them.</li>
</ol>
<p>Now we&#8217;ve got a service that has gone from monolithic to actually being a topic of discussion at a bar (to impress the ladies).</p>
<p>NEXT</p>
<ol>
<li>Configure Spring BLAZEDS with Spring</li>
<li>Discuss the application&#8217;s FLEX components that will display the objects and allow the user to act upon them</li>
<li>Asynchronous and/or AJAX functions for real-time processing</li>
<li>To paginate or not to paginate.</li>
<li>What should we consider for these applications?</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmolina.com/2011/09/software-for-the-financial-industry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction</title>
		<link>http://joshmolina.com/2010/06/introduction/</link>
		<comments>http://joshmolina.com/2010/06/introduction/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 23:17:50 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Web Security]]></category>

		<guid isPermaLink="false">http://joshmolina.com/?p=240</guid>
		<description><![CDATA[I don&#8217;t update this site to make it look pretty (although thanks to WP it looks decent) or to rank higher on Google. I update this website (whenever I can) to keep information I feel is valuable accessible to me and others. As an software Architect/Lead my job is to not only stay current with [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t update this site to make it look pretty (although thanks to WP it looks decent) or to rank higher on Google.  I update this website (whenever I can) to keep information I feel is valuable accessible to me and others.  As an software Architect/Lead my job is to not only stay current with technology, but understand its intricacies, pitfalls and ways in which it can be used to satisfy requirements.</p>
<h2>Never compromise integrity</h2>
<p>What we do and how we do it depends on what we know and who we are.  What this means is simple;  If you&#8217;re used to hacking and writing code &#8216;just&#8217; to get the job done, chances are your team dynamic lacks substance and you&#8217;re not cut out for the long haul.  However, if you&#8217;re someone who works with best practices and good discipline in mind, your work is your calling card, and your phone rings often.</p>
<p>No one knows it all.  Whoever says he/she does, is full of shit and someone you need to stay away from.  I&#8217;ve been privileged to work with some great technical people who are as humble as the day is long.  These folks love what they do and in turn their bosses, peers and clients love them back.</p>
<h2>How much Java/Flex/Oracle.. do you know?</h2>
<p>Anyone who asks this question doesn&#8217;t know what they&#8217;re asking&#8230; Do yourself a favor and move on.</p>
<p>-Josh</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmolina.com/2010/06/introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 3 Event Handling &#8230;</title>
		<link>http://joshmolina.com/2010/04/flex-3-event-handling/</link>
		<comments>http://joshmolina.com/2010/04/flex-3-event-handling/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 02:36:24 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bubbling]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[listeners]]></category>

		<guid isPermaLink="false">http://joshmolina.com/?p=107</guid>
		<description><![CDATA[This is a topic that EVERY software professional (developing Flex/Flash) should be familiar with. Not to say that you should know every little detail about it, but helps to know the when, how and what is triggering your events and what you can expect from them. If you want the gory details, here&#8217;s the link [...]]]></description>
			<content:encoded><![CDATA[<p>This is a topic that EVERY software professional (developing Flex/Flash) should be familiar with.  Not to say that you should know every little detail about it, but helps to know the when, how and what is triggering your events and what you can expect from them.</p>
<p>If you want the gory details, here&#8217;s the link to <a title="Adobe" href="http://livedocs.adobe.com/flex/3/html/help.html?content=16_Event_handling_1.html" target="_blank">Adobe</a>.  There!  Now, on with the code.</p>
<p>Let&#8217;s start out with something simple.  Very simple.</p>
<h3>What is an event? How do they happen?</h3>
<p>An event is purely and simple something that happens; A click of a button, the refreshing of a page, the focus on a text field, etc, etc.</p>
<p>First, by listening to what&#8217;s happening.  For every action there&#8217;s a reaction.  If you want to throw a ball, you want someone to catch it.  You (the event dispatcher), the catcher (the event listener).</p>
<p>We can get very detailed about the event flow and how it propagates itself on the DOM of Flash/Flex.  Suffice it to say that it all starts at the Parent Node (the Application/MXML) and travels all the way down to the object (broadcasting/sending) the event.</p>
<h3>Adding an Event</h3>
<p>An event can be triggered in 2 ways:</p>
<p><span class="golden">1. MXML</span></p>
<pre class="pre_withBasicCodeStyle">&lt;mx:button ... click="callFunctionOnClickEvent(event);"/&gt;
</pre>
<p>CLICK = Event Handler</p>
<p><span class="golden">2. ACTIONSCRIPT 3</span></p>
<pre class="pre_withBasicCodeStyle">myButton.addEventHandler(MouseEvent.CLICK, myFuctionToBeCalledOnClick);
</pre>
<p>This is pure code, so we&#8217;re responsible for creating a button, giving it its properties (look and feel) and ultimately telling it what to do in case someone presses on it.  As you can see, we attach the Event Listener to the button itself.</p>
<p><span style="size: 14px;"><span style="text-decoration: underline;">REMEMBER</span>: In real-life scenarios, applications with multiple layers will dispatch and listen for events at different levels.  It is very important to understand the &#8216;<a title="Event Bubbling" href="http://livedocs.adobe.com/flex/3/html/help.html?content=events_08.html" target="_blank">bubbling</a>&#8216; of said events.  We&#8217;ll get into that later&#8230;</span></p>
<p>Here&#8217;s what it looks like all put together:</p>
<p>Some source <a title="EventsDemoV1.0.zip" href="http://joshmolina.com/wp-content/sourcecode/EventsDemoV1.0.zip">code</a> for that azz!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmolina.com/2010/04/flex-3-event-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex, BlazeDS and Spring</title>
		<link>http://joshmolina.com/2010/04/flex-blazeds-and-spring/</link>
		<comments>http://joshmolina.com/2010/04/flex-blazeds-and-spring/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 02:34:15 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bubbling]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[listeners]]></category>

		<guid isPermaLink="false">http://joshmolina.com/?p=105</guid>
		<description><![CDATA[No frills, no thrills. I can give you the theory, but I won&#8217;t. I could give you some background on each and every one of these technologies, BUT I WON&#8217;T. I&#8217;ll tell you how to configure it, how to get it to work and how to test it. I&#8217;ll post some code and take some [...]]]></description>
			<content:encoded><![CDATA[<p>No frills, no thrills.  I can give you the theory, but I won&#8217;t.  I could give you some background on each and every one of these technologies, BUT I WON&#8217;T.  I&#8217;ll tell you how to configure it, how to get it to work and how to test it.  I&#8217;ll post some code and take some comments.  I&#8217;ll add some links here where you can read to your heart&#8217;s content.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshmolina.com/2010/04/flex-blazeds-and-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

