<?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>Sean Moore - Software Developer, Digital Musician, Arduino Hacker &#187; Spring</title>
	<atom:link href="http://seantheflexguy.com/blog/category/spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://seantheflexguy.com/blog</link>
	<description>Sean Moore - Software Developer, Digital Musician, Arduino Hacker</description>
	<lastBuildDate>Mon, 27 Feb 2012 16:17:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Simple Spring Example Project</title>
		<link>http://seantheflexguy.com/blog/2009/02/25/simple-spring-example-project/</link>
		<comments>http://seantheflexguy.com/blog/2009/02/25/simple-spring-example-project/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 17:54:29 +0000</pubDate>
		<dc:creator>seantheflexguy</dc:creator>
				<category><![CDATA[Aspect Oriented Programming]]></category>
		<category><![CDATA[Inversion Of Control]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://seantheflexguy.com/blog/?p=289</guid>
		<description><![CDATA[The Spring framework is not new, it&#8217;s been around since mid 2003. In very simple terms Spring is a framework to help build Java (and .NET) applications. Spring helps organize and orchestrate the source code for Java applications. Spring can be used with any Java application including Java web applications. This is beneficial to Flex [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://www.seantheflexguy.com/images/blog/spring-logo.jpg" alt="" width="275" height="103" />The <a href="http://www.springsource.org/" target="_blank">Spring framework</a> is not new, it&#8217;s been around since mid 2003. In very simple terms Spring is a framework to help build Java (and .NET) applications. Spring helps organize and orchestrate the source code for Java applications. Spring can be used with any Java application including Java web applications.<br />
This is beneficial to Flex applications that communicate with server side Java web applications. In addition, Flex developers can now use the <a href="http://www.springsource.org/spring-flex" target="_blank">new Spring BlazeDS Integration </a>provided by Spring with BlazeDS projects. Check out the awesome <a href="http://coenraets.org/blog/2009/01/new-springblazeds-integration-test-drive/" target="_blank">blog post</a> and <a href="http://coenraets.org/blog/2009/02/spring-blazeds-integration-on-adobe-tv/" target="_blank">video</a> by <a href="http://coenraets.org/" target="_blank">Christophe Coenraets</a> for a walk through of the Spring BlazeDS Integration. His <a href="http://coenraets.org/downloads/spring-flex-testdrive.zip" target="_blank">example project</a> should get you up and running pretty quickly.</p>
<p>After reviewing the example that Chris provided I wanted to take things s step further and integrate Hibernate and MySQL into the project. I wrestled with the JAR&#8217;s, the classpath, the Spring and Hibernate XML markup, and the Hibernate Annotations for a while and then realized that I needed to get a firm understanding of some Spring fundamentals. <a href="http://www.manning.com/walls3/" target="_blank">Manning&#8217;s Spring in Action</a> was recommended by a colleague and so far has been really shedding some light.</p>
<p>I was able to create a simple Spring project (no Flex, no BlazeDS, no Hibernate&#8230; yet) to help me understand some of the core Spring concepts. The IoC Container and AOP are two very important pieces of the Spring framework. This very simple project only utilizes the <a href="http://www.devshed.com/c/a/Java/The-Spring-Framework-Understanding-IoC/" target="_blank">IoC Container</a>. <a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming" target="_blank">Aspect Oriented Programming</a> is very cool and I also recommend checking it out. AOP is not covered in this example. (Check out <a href="http://en.wikipedia.org/wiki/Cross-cutting_concern" target="_blank">cross cutting concerns</a>.)</p>
<p>There is a simple <a href="http://ant.apache.org/" target="_blank">Ant </a>task to compile, jar and run the application. You&#8217;ll also need the latest version of the JDK for this application.</p>
<p>You can download the project using a Subversion client using the following URL:</p>
<p>http://seantheflexguy.com/applicationcontextex/</p>
<p>You can also download a zipped version of the project here:<a href="http://seantheflexguy.com/java/ApplicationContextExample.zip"></p>
<p>http://seantheflexguy.com/java/ApplicationContextExample.zip</a></p>
<p>To run the project navigate to the directory where you downloaded the project, and extracted if you grabbed the zip. Then from the project root using a Terminal or Command Prompt issue the command: ant to compile and: ant run to run the application.</p>
<p>The first version of the application used a <a href="http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/beans/factory/BeanFactory.html" target="_blank">BeanFactory</a>. This second version uses the <a href="http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/context/ApplicationContext.html" target="_blank">ApplicationContext</a> class instead. BeanFactory is in Spring&#8217;s core module, it’s the main Spring container that provides DI. The ApplicationContext module builds on BeanFactory providing additional capabilities such as: internationalization and validation support and access to the application event lifecycle.</p>
<p>The Simple Spring Example Project should help you understand the most basic level Spring mechanics. The only JARs required by the project are spring.jar and the commons-logging-1.1.1.jar, both are included with the project. The Ant build file will set the CLASSPATH for these JARs, if you bypass Ant make sure to set these on the CLASSPATH prior to compiling the application.</p>
<p>So far Spring really looks like a powerful way to organize and manage Java application development. You should take a moment to check it out. Also be sure to check out the <a href="http://www.springsource.org/spring-flex" target="_blank">Spring BlazeDS Integration</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seantheflexguy.com/blog/2009/02/25/simple-spring-example-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Flex / Flash guy learning more about Java</title>
		<link>http://seantheflexguy.com/blog/2009/02/20/a-flex-flash-guy-learning-more-about-java/</link>
		<comments>http://seantheflexguy.com/blog/2009/02/20/a-flex-flash-guy-learning-more-about-java/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 01:01:49 +0000</pubDate>
		<dc:creator>seantheflexguy</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Development Notes]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Software development process]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://seantheflexguy.com/blog/?p=286</guid>
		<description><![CDATA[Understanding more about Java is great. A good amount of knowledge can be shared between Flex/ActionScript 3.0 and Java. I&#8217;ve worked with Java in the past, compiled some applications, read the tutorials and some books, helped build a Java based LMS and also worked with Adobe on writing a simple Java socket server, but I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://www.seantheflexguy.com/images/blog/java-duke.jpg" alt="" width="174" height="150" />Understanding more about Java is great. A good amount of knowledge can be shared between Flex/ActionScript 3.0 and Java. I&#8217;ve worked with Java in the past, compiled some applications, read the tutorials and some books, helped build a Java based LMS and also worked with Adobe on writing a simple Java socket server, but I wanted more of a thorough understanding of the language. The University of California at San Diego offers a great series of programming and software development courses. These classes are really affordable so I decided to take a Java II course. It&#8217;s been seven weeks and so far the experience has been awesome. The end goal is to become more familiar with the core Java language. My hope is that this will enable me to have greater confidence when working on Flex and <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/" target="_blank">BlazeDS</a> projects. (A really cool stack I&#8217;ve been playing with recently is Flex/Cairngorm, the new <a href="http://www.springsource.org/" target="_blank">Spring</a>/BlazeDS <a href="http://www.springsource.org/spring-flex" target="_blank">integration</a> and <a href="http://www.hibernate.org/" target="_blank">Hibernate</a>/MySQL. Eventually I want to get this running on <a href="https://glassfish.dev.java.net/" target="_blank">Glassfish</a>. Something else I&#8217;ve been looking into.)</p>
<p>Some items we&#8217;ve covered in the Java class so far are: <a href="http://java.sun.com/" target="_blank">SDK</a> installation and command line compilation, data types, control flow, variables/operators, numbers, arrays, objects and classes, static classes and methods, method overloading, object construction, constructor overloading, OOP basics, packages, commenting, generating JavaDoc, inheritance, abstract classes, polymorphism, sub/superclasses, reflection, inner classes, graphics programming, event handling, <a href="http://java.sun.com/docs/books/tutorial/uiswing/" target="_blank">Swing</a> and <a href="http://java.sun.com/docs/books/tutorial/collections/index.html" target="_blank">Collections</a> including Maps, Lists, Sets and the Comparator interface. We&#8217;re compiling all of our homework using the command line. It&#8217;s pretty cool. The class also demands a pretty rigorous reading schedule. The three-pronged-learning-approach is working well for me: lectures, reading, coding (homework and labs.) The ins and outs of the language are really sinking in.</p>
<p>A few immediate benefits to learning more about Java are: Flex and BlazeDS / LCDS integration, strengthen fundamental OOP understanding and comprehension and also gain knowledge of OOP concepts not available in Flex/AS3. Learning Java also provides the opportunity to get exposure to Swing (Flex&#8217;s distant relative). Also, since the Flex compiler and <a href="http://opensource.adobe.com/svn/opensource/flex/sdk/frameworks/projects/framework/src/mx" target="_blank">other</a> <a href="http://opensource.adobe.com/svn/opensource/flex/sdk/" target="_blank">aspects</a> of the Flex SDK are written in Java this opens up the door to greater understanding of the Flex SDK and <a href="https://bugs.adobe.com/jira/secure/IssueNavigator.jspa?header=FB" target="_blank">even bug contributions</a>. Java makes extensive use of design patterns and there is a plethora of existing Java code to look at, use and learn from. (Cairngorm was born from J2EE design patterns.)</p>
<p>There are several differences that I noticed in Java. Some items available in Java and not in AS3: static classes, abstract classes, private constructors, constructor overloading, method overloading and Collections. Working with Arrays is a LOT different, working with numbers is different, working with Strings is different and String comparison is different. There are no <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html" target="_blank">Hashmaps</a> and no hashcodes in ActionScript. No <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" target="_blank">equals() method</a>. Another difference is that you have to implement your own design patterns more often in Java. Not a bad thing, and good to know how to do, but Flex takes care of a lot of things behind the scenes: events, data binding etc. I noticed that when coding Java the developer is expected to implement interfaces more often than in Flex/AS3. This is pretty cool; it involves more work but provides more power.</p>
<p>It&#8217;s been a cool experience and I wanted to share some of these thoughts and observations. I think more developers come into the Flex world from Java vs. the other way around. For some reason Java sort of reminds me of AS2&#8230; I may try to post some Java source code soon if time permits&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://seantheflexguy.com/blog/2009/02/20/a-flex-flash-guy-learning-more-about-java/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

