<?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>Xavi Colomer&#039;s Blog &#187; BlazeDS</title>
	<atom:link href="http://blog.ncatstudios.com/category/blazeds/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ncatstudios.com</link>
	<description>Web technologies and Interactivity ramblings</description>
	<lastBuildDate>Mon, 30 May 2011 14:01:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Creating your first BlazeDS project</title>
		<link>http://blog.ncatstudios.com/2009/01/07/creating-your-first-blazeds-project/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.ncatstudios.com/2009/01/07/creating-your-first-blazeds-project/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 22:52:45 +0000</pubDate>
		<dc:creator>Xavi Colomer</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.ncatstudios.com/?p=32&#038;language=en</guid>
		<description><![CDATA[
			
				
			
		
Now we&#8217;ve got Adobe Flex configured to work with BlazeDS let&#8217;s start with our first project.
We will do this:
We will create the front-end logic in Actionscript and MXML. 
We will create the back-end logic in JAVA 
We will create the needed config files to establish a bridge or a connection between the front-end and the [...]


Related posts:<ol><li><a href='http://blog.ncatstudios.com/2008/12/18/setting-up-your-blazeds-tomcat-server-on-eclipse-local/' rel='bookmark' title='Permanent Link: Setting up your BlazeDS (tomcat) server on Eclipse ( local )'>Setting up your BlazeDS (tomcat) server on Eclipse ( local )</a></li>
<li><a href='http://blog.ncatstudios.com/2009/04/04/flex-drupal-login-actionscript-remoteobjects/' rel='bookmark' title='Permanent Link: Flex &#038; Drupal login ( Actionscript remoteObjects )'>Flex &#038; Drupal login ( Actionscript remoteObjects )</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.ncatstudios.com%2F2009%2F01%2F07%2Fcreating-your-first-blazeds-project%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify; ">Now we&#8217;ve got Adobe Flex configured to work with BlazeDS let&#8217;s start with our first project.</p>
<p style="text-align: justify; "><strong>We will do this:</strong></p>
<p style="text-align: justify; "><em>We will create the front-end logic in Actionscript and MXML. </em></p>
<p style="text-align: justify; "><em>We will create the back-end logic in JAVA </em></p>
<p style="text-align: justify; "><em>We will create the needed config files to establish a bridge or a connection between the front-end and the back-end.</em></p>
<p style="text-align: justify; ">
<p style="text-align: justify; ">So let&#8217;s start creating a new project, this time we want to use a Server technology. Here we must select <strong>J2EE</strong> because tomcat / BlazeDS uses this language / technology and we won&#8217;t touch anything</p>
<p style="text-align: justify; ">you can see the results in the next image:</p>
<p style="text-align: justify; "><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_1creating.jpg" rel="lightbox[32]"><img class="aligncenter size-thumbnail wp-image-161" title="4_1creating" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_1creating-150x150.jpg" alt="4_1creating" width="150" height="150" /></a></p>
<p style="text-align: justify; "><a href="wp-blogfiles/images/4_1creating.jpg" rel="lightbox[32]"> </a></p>
<p style="text-align: justify; ">At the bottom of the image you&#8217;ll see a check box with this text: <strong>Create combined Java / Flex project using WTP.</strong> In the java source folder will be placed all the raw java files, the logic of the back-end, once you execute the project this logic will be compiled and placed to the server automatically, don&#8217;t worry about that.</p>
<p style="text-align: justify; "><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_2creating.jpg" rel="lightbox[32]"><img class="aligncenter size-thumbnail wp-image-162" title="4_2creating" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_2creating-150x150.jpg" alt="4_2creating" width="150" height="150" /></a></p>
<p style="text-align: justify; "><a href="wp-blogfiles/images/4_2creating.jpg" rel="lightbox[32]"> </a></p>
<p style="text-align: justify; ">Next we must configure the J2EE settings, the target runtime will be BlazeDS we created in the last post. I always put the same in the Context root and the Content folder, the project name, but in this example I will put context_root and content_folder to show you how the folders and files are created. The project is structured like this:</p>
<p style="text-align: justify; "><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_3result.jpg" rel="lightbox[32]"><img class="aligncenter size-thumbnail wp-image-163" title="4_3result" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_3result-150x150.jpg" alt="4_3result" width="150" height="150" /></a></p>
<p style="text-align: justify; "><a href="wp-blogfiles/images/4_3result.jpg" rel="lightbox[32]"> </a></p>
<p style="text-align: justify; ">Inside the content_folder to folders has been created: META-INF, and WEB-INF ( this is the important one now&#8230; )</p>
<p style="text-align: justify; ">inside WEB-INF we&#8217;ve got 4 folders:</p>
<p style="text-align: justify; "><strong>classes</strong>: <em>This is the back-end compiled logic created inside the src folder, every time you run the project the JAVA files will be recompiled ( if needed ) and updated inside this folder.</em></p>
<p style="text-align: justify; "><strong>flex</strong>: <em>Here is the messaging configuration you will see 4 files inside this folder but you only need services-config.xml the other files are automatically created for order purposes, if you delete them you will get some errors because you must edit services-config.xml. This file includes the other three, if you delete this inclusions, you can delete the files&#8230; ( of course this files are useful to mantain the messaging structure clean but this is a beginner tutorial!! )</em></p>
<p style="text-align: justify; "><strong>lib</strong>: <em>Some libraries, don&#8217;t need to look here&#8230;</em></p>
<p style="text-align: justify; "><strong>src</strong>: <em>Don&#8217;t need to look here either&#8230;</em></p>
<p style="text-align: justify; "><strong>web.xml</strong> <em>configuration file, we won&#8217;t edit this.</em></p>
<p style="text-align: justify; ">OK.</p>
<p style="text-align: justify; ">Now we&#8217;ve got our structure created the first thing we must do is add our project to our server, this will create a new folder inside the backend with the name of the project and this will contain a copy of our recently created content_folder.</p>
<p style="text-align: justify; "><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_4addServer.jpg" rel="lightbox[32]"><img class="aligncenter size-thumbnail wp-image-164" title="4_4addServer" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_4addServer-150x150.jpg" alt="4_4addServer" width="150" height="150" /></a></p>
<p style="text-align: justify; "><a href="wp-blogfiles/images/4_4addServer.jpg" rel="lightbox[32]"> </a></p>
<p style="text-align: justify; ">Now we will delete all the files inside content_folder -&gt; WEB-INF -&gt; flex except for services-config.xml, and we will edit the services node like this:</p>
<pre lang="xml"> 	            	com.ncatstudios.remoting.Test</pre>
<p style="text-align: justify; ">The important parts of this piece of XML are the destination and the source. The destination is like the address of the wharehouse where to fetch the data. We must call somewhere from flex to access the data, this name must be the same both sides. The source is the name of the JAVA class ( package doted format ) where we will call the methods.</p>
<p style="text-align: justify; ">Finally here is the code to run the application:</p>
<p style="text-align: justify; ">
<p style="text-align: justify; ">and the JAVA logic:</p>
<pre lang="JAVA">package com.ncatstudios.remoting;

public class Test {

	public String sayHelloTo(String who)
	{
		return "Hello " + who;
	}

}</pre>
<p style="text-align: justify; ">
<p style="text-align: justify; ">Now you can run the application to test it.</p>
<p style="text-align: justify; ">Possible error / bug: I found that sometimes my application doesn&#8217;t run as it should.</p>
<p style="text-align: justify; "><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_5error.jpg" rel="lightbox[32]"><img class="aligncenter size-thumbnail wp-image-165" title="4_5error" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/4_5error-150x150.jpg" alt="4_5error" width="150" height="150" /></a></p>
<p style="text-align: justify; "><a href="wp-blogfiles/images/4_5error.jpg" rel="lightbox[32]"> </a></p>
<p style="text-align: justify; ">If you open the project properties, inside the Flex Server section just delete the folder of the root URL, leave it to http://localhost:8080, you probably won&#8217;t need to edit this for rest of the life of this project.</p>
<p style="text-align: justify; ">
<p style="text-align: justify; ">
<div class="shr-publisher-32"></div>

<p>Related posts:<ol><li><a href='http://blog.ncatstudios.com/2008/12/18/setting-up-your-blazeds-tomcat-server-on-eclipse-local/' rel='bookmark' title='Permanent Link: Setting up your BlazeDS (tomcat) server on Eclipse ( local )'>Setting up your BlazeDS (tomcat) server on Eclipse ( local )</a></li>
<li><a href='http://blog.ncatstudios.com/2009/04/04/flex-drupal-login-actionscript-remoteobjects/' rel='bookmark' title='Permanent Link: Flex &#038; Drupal login ( Actionscript remoteObjects )'>Flex &#038; Drupal login ( Actionscript remoteObjects )</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ncatstudios.com/2009/01/07/creating-your-first-blazeds-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up your BlazeDS (tomcat) server on Eclipse ( local )</title>
		<link>http://blog.ncatstudios.com/2008/12/18/setting-up-your-blazeds-tomcat-server-on-eclipse-local/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.ncatstudios.com/2008/12/18/setting-up-your-blazeds-tomcat-server-on-eclipse-local/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 18:28:04 +0000</pubDate>
		<dc:creator>Xavi Colomer</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.ncatstudios.com/?p=10&#038;language=en</guid>
		<description><![CDATA[
			
				
			
		
BlazeDS is a &#8220;server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time&#8220;, in other words if you want to write chat applications, or maybe optimize the communications between front-end and back-end this is a great OPEN SOURCE option.
There&#8217;s the enterprise version called [...]


Related posts:<ol><li><a href='http://blog.ncatstudios.com/2009/01/07/creating-your-first-blazeds-project/' rel='bookmark' title='Permanent Link: Creating your first BlazeDS project'>Creating your first BlazeDS project</a></li>
<li><a href='http://blog.ncatstudios.com/2009/04/04/flex-drupal-login-actionscript-remoteobjects/' rel='bookmark' title='Permanent Link: Flex &#038; Drupal login ( Actionscript remoteObjects )'>Flex &#038; Drupal login ( Actionscript remoteObjects )</a></li>
<li><a href='http://blog.ncatstudios.com/2009/05/21/compile-css-to-swf-memory-bottleneck/' rel='bookmark' title='Permanent Link: Compile CSS to SWF memory bottleneck'>Compile CSS to SWF memory bottleneck</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.ncatstudios.com%2F2008%2F12%2F18%2Fsetting-up-your-blazeds-tomcat-server-on-eclipse-local%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify; "><strong><a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/">BlazeDS</a></strong> is a &#8220;<em>server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time</em>&#8220;, in other words if you want to write chat applications, or maybe optimize the communications between front-end and back-end this is a great OPEN SOURCE option.</p>
<p style="text-align: justify; ">There&#8217;s the enterprise version called LCDS (<em> Livecycle Data Services</em> ) which offers some more features like Data-Synchronization, Offline applications, RIA-PDF generation, etc&#8230;</p>
<p style="text-align: justify; ">You can find a comparison between the features of BlazeDS and LCDS here:</p>
<p style="text-align: center;"><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/blazeds.JPG" rel="lightbox[10]"><img class="size-thumbnail wp-image-167 aligncenter" title="blazeds" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/blazeds-150x150.jpg" alt="blazeds" width="150" height="150" /></a><strong> </strong></p>
<p style="text-align: left;"><strong>Requeriments:</strong></p>
<p>- You must download and install <a href="http://java.sun.com/javase/downloads/index.jsp">JDK</a> ( <em>Java Development Kit </em>)</p>
<p>- You must download and copy <a href="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds">BlazeDS</a> ( <em>Copy to the folder you wish, for example C:\Program files\BlazeDS, this is the folder I&#8217;ll be using all the tutorial</em> )</p>
<p>- Obviously you must have installed <a href="http://www.eclipse.org/downloads/">Eclipse</a> or <a href="http://www.adobe.com/products/flex/?promoid=BPDEQ">Flex Builder</a></p>
<p>- You must must/have install/ed the plugin for Java Development on Eclipse / Flex Builder ( <em>Help -&gt; Software Updates</em> )</p>
<p><strong>1. Create an environment variable called JAVA_HOME pointing to the JDK installation.</strong></p>
<p>To create this environment variable you can right-click on MyPC and follow this images ( <em>Remember to change the folder if necessary </em>):</p>
<p><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/myPC.jpg" rel="lightbox[10]"><img class="aligncenter size-thumbnail wp-image-172" title="myPC" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/myPC-150x150.jpg" alt="myPC" width="150" height="150" /></a></p>
<p>Now you must <strong>restart </strong>in order that changes take effect.</p>
<p><strong>1,5. Showing Servers tab</strong></p>
<p>You may want to view the servers tab in order to run it from any perspective.</p>
<p>In this case:</p>
<p>from Flex Builder go to Window -&gt; Other Views&#8230; -&gt; Server -&gt; Servers</p>
<p>from Eclipse go to Window -&gt; Show View -&gt; Other&#8230; -&gt; Server -&gt; Servers</p>
<p>You will see in your bottom view a new tab called Servers.</p>
<p><strong>2. Create a new server in Eclipse / Flex Builder.</strong></p>
<p>Right click in the Servers view and select New&#8230; or New -&gt; Other -&gt; Server -&gt; Server</p>
<p>This window will appear:</p>
<p><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/DefineServer.jpg" rel="lightbox[10]"><img class="aligncenter size-thumbnail wp-image-169" title="DefineServer" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/DefineServer-150x150.jpg" alt="DefineServer" width="150" height="150" /></a></p>
<p>We&#8217;ll let Server&#8217;s host name to <strong>localhost</strong> and will call this new Server <strong>BlazeDS.</strong></p>
<p>Click next.</p>
<p>Now we will point this new server to the tomcat&#8217;s folder in our BlazeDS installation. <em>Be aware to change the path if needed.</em></p>
<p><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/SetupTomcat.jpg" rel="lightbox[10]"><img class="aligncenter size-thumbnail wp-image-174" title="SetupTomcat" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/SetupTomcat-150x150.jpg" alt="SetupTomcat" width="150" height="150" /></a></p>
<p>Click Next.</p>
<p>We won&#8217;t add any project for the moment:</p>
<p><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/AddServer.jpg" rel="lightbox[10]"><img class="aligncenter size-thumbnail wp-image-166" title="AddServer" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/AddServer-150x150.jpg" alt="AddServer" width="150" height="150" /></a></p>
<p>OK. We&#8217;ve just created a new server.</p>
<p>You can run it to test it, but it won&#8217;t work until we configure it correctly, how? keep reading!!!! XD</p>
<p><strong>3. Configuring correctly the server.</strong></p>
<p>Right click on your brand new server in the Servers view and select Open&#8230;</p>
<p>This image should appear:</p>
<p><a href="http://blog.ncatstudios.com/wp-content/uploads/2009/09/Config.jpg" rel="lightbox[10]"><img class="aligncenter size-thumbnail wp-image-168" title="Config" src="http://blog.ncatstudios.com/wp-content/uploads/2009/09/Config-150x150.jpg" alt="Config" width="150" height="150" /></a></p>
<p>Here you must change two values under Server location:</p>
<p>1. On the first radiobuttons select the second one ( Use tomcat installation )</p>
<p>2. Chage Deploy path from wtpwebapps to webapps or your full path to webapps folder.</p>
<p>4. Test the server.</p>
<p>Now you can Restart the server and Test it going to this address in your internet browser http://localhost:8400</p>
<p>A welcome screen will appear with a short many of your options.</p>
<p><strong>Note: In order to get the examples working you must run the file </strong><em><strong>C:\Program Files\BlazeDS\sampledb\startdb.bat ( Change path if needed )</strong></em></p>
<p><strong>5. That&#8217;s all folks</strong></p>
<p>That&#8217;s all!!!  I&#8217;ll post how to connect your AIR / Flex project with this server very soon!!!!</p>
<p><strong>Happy Xmas</strong></p>
<div class="shr-publisher-10"></div>

<p>Related posts:<ol><li><a href='http://blog.ncatstudios.com/2009/01/07/creating-your-first-blazeds-project/' rel='bookmark' title='Permanent Link: Creating your first BlazeDS project'>Creating your first BlazeDS project</a></li>
<li><a href='http://blog.ncatstudios.com/2009/04/04/flex-drupal-login-actionscript-remoteobjects/' rel='bookmark' title='Permanent Link: Flex &#038; Drupal login ( Actionscript remoteObjects )'>Flex &#038; Drupal login ( Actionscript remoteObjects )</a></li>
<li><a href='http://blog.ncatstudios.com/2009/05/21/compile-css-to-swf-memory-bottleneck/' rel='bookmark' title='Permanent Link: Compile CSS to SWF memory bottleneck'>Compile CSS to SWF memory bottleneck</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ncatstudios.com/2008/12/18/setting-up-your-blazeds-tomcat-server-on-eclipse-local/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

