<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Mike Nimer&apos;s Blog</title>
			<link>http://blogs.digitalprimates.net/mikenimer/index.cfm</link>
			<description>Random posting about ColdFusion, Travel, Java, and some other stuff. As well as links to resources I&apos;d like to share.</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 16:19:35 -0400</pubDate>
			<lastBuildDate>Sat, 08 Nov 2008 17:36:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>mikenimer@yahoo.com</managingEditor>
			<webMaster>mikenimer@yahoo.com</webMaster>
			
			<item>
				<title>Intellij 8 - alternative to FlexBuilder</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/11/8/Intellij-8--alternative-to-FlexBuilder</link>
				<description>
				
				If you&apos;ve ever used IntelliJ for java development, are frustrated with eclipse, or you wish Flex Builder could do more (and you never use design view). This might interest you. 

JetBrains has added Flex development support to IntelliJ 8. Which was just release (nov 6th). Note, they have only added code support with no plans for a UI designer. 

&lt;a href=http://www.jetbrains.com/idea/&gt;http://www.jetbrains.com/idea/&lt;/a&gt;


Some of my favorite features

1. CODE FORMATTING!!&lt;br/&gt; 
cntrl-shit-L and boom the as/mxml file is formatted to my liking. 

2. Flaging common errors without running the compiler.&lt;br/&gt;

3. Navigating between classes and around a class. &lt;br/&gt;
you can jump from an interface to the as classes that implemented a given menu. 

4. CNTRL-Q help&lt;br/&gt;
Put your cursor on a method or class and hit cntrl-q, intelliJ will dynamically pull the comments out of the code for that class/method  and show it to you as help

5. Code generation&lt;br/&gt;
It&apos;s easy to auto generate get/set method for properties, constructors, implemented methods, override methods

6. Find Usages&lt;br/&gt;
A quick search of all the code that uses a given variable to method. 
				</description>
				
				<category>Flex</category>				
				
				<pubDate>Sat, 08 Nov 2008 17:36:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/11/8/Intellij-8--alternative-to-FlexBuilder</guid>
				
			</item>
			
			<item>
				<title>Congratulations ColdFusion (for topping the User Choice list.)</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/10/22/Congratulations-ColdFusion-for-topping-the-User-Choice-list</link>
				<description>
				
				ColdFusion is among the top Applications servers in a &quot;users choice&quot; report created by Evans Data. 
&lt;a href=&quot;http://www.evansdata.com/reports/viewRelease_download.php?reportID=20&quot;&gt;http://www.evansdata.com/reports/viewRelease_download.php?reportID=20&lt;/a&gt;

&lt;a href=&quot;http://www.cio.com/article/print/455845&quot;&gt;http://www.cio.com/article/print/455845&lt;/a&gt;

Evans Data interviewed more than 700 developers asking them questions about the servers they have used. And ColdFusion is among the top! 

But this is my favorite quote of the survey: &quot;this survey felt that performance was one of the server&apos;s strongest points, along with scalability, security, and support&quot;

So to the ColdFusion Team, keep up the good work! 
				</description>
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 22 Oct 2008 12:14:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/10/22/Congratulations-ColdFusion-for-topping-the-User-Choice-list</guid>
				
			</item>
			
			<item>
				<title>RIA Debugging and ColdFusion (brainstorming)</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-brainstorming</link>
				<description>
				
				I just posted about a post written about RIA Debugging by Simeon Simeonov, in this post:
&lt;a href=&quot;http://blog.mikenimer.com/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-forgotten-feature&quot;&gt;http://blog.mikenimer.com/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-forgotten-feature&lt;/a&gt;

In Sim&apos;s post he talks about the need for a common place to see all of the debug data from the server and the client. 

So my question to everyone. What would this look like?

Let&apos;s imagine that there was a way to send all of the client (flex, ajax, silverlight, etc.) logging data and all of the server logging data(ColdFusion debug data, etc..) to a common UI.. 

What features does that common UI need to have?
What would it look like?
What are some of the must do features? 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Mon, 13 Oct 2008 12:09:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-brainstorming</guid>
				
			</item>
			
			<item>
				<title>RIA Debugging and ColdFusion (forgotten feature)</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-forgotten-feature</link>
				<description>
				
				Some of you might remember Simeon Simeonov from the early days of ColdFusion. He was one of the original engineers and the architect of ColdFusion at Allaire. Needless to say, he is responsible for many of your favorite features in ColdFusion.

Sim, has recently posted a great blog post about the problems debugging RIA applications. And a possible solution. Definitely worth a read.

&lt;a href=&quot;http://simeons.wordpress.com/2008/09/16/debugging-ria-ajax-flex-services/&quot;&gt;http://simeons.wordpress.com/2008/09/16/debugging-ria-ajax-flex-services/&lt;/a&gt;


However, there is one more way to do debugging missing from his post (unless it&apos;s been updated). One of the last things I added to ColdFusion 7.0.2 before I left Adobe was to make sure all of the ColdFusion debug data is sent with every Flash Remoting request. 

This is one of the more common forgotten features in ColdFusion. If you are using ColdFusion with Flex, you can still get all of the information you are used to seeing at the bottom of a regualar .cfm. To turn this on, just turn on debugging in the cfadmin. And then in your result event, you can look at the result event header to see all of this information; sql, execution times, variables, etc.. 

Way back when, on mikenimer.com I posted a flex dump component that does know how to format this debug data. However, to be honest. I haven&apos;t opened the component in the latest versions of flex so the component might need to be tweak to work in flex 3. 

But that&apos;s no excuse not to monitor this data. With RIA apps it&apos;s more important than ever to monitor your requests. It&apos;s too easy to write a bad query and not know it, since you can&apos;t easily see this debug data. But it&apos;s worth a little extra work. 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Mon, 13 Oct 2008 11:48:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-forgotten-feature</guid>
				
			</item>
			
			<item>
				<title>dpHibernate - Hibernate lazy loading with Adobe BlazeDS</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/5/21/dpHibernate--Hibernate-lazy-loading-with-Adobe-BlazeDS</link>
				<description>
				
				One of the biggest problems with working with data in a RIA/Flex application is that it&apos;s all or nothing. You either need to get all of the data or write a lot of code to return the data in multiple requests. The problem is that good design means that we want to design our data object to match the data, not the UI.  For instance a User might have an array of Orders which each have an array of Items. Seems simple enough, right. The problem is that this is a large complex objects which could require a query that joins multiple tables when returning data to your application.  No big deal if you want to display all of the data. But if you are just trying to output the users name and email in a search result screen then this is a huge performance hit. 

Luckily there is a solution, It is called lazy loading. JSP developers, which use the java hibernate framework, have been able to use lazy loading for years. But until now this did not work with remote client applications like Flex.  For those of you who have tried, I&apos;m sure your familiar with the dreaded LazyLoadingException.  Frustrating huh.  Lazy loading let&apos;s your define a complete object model, such as a User with an array of Orders. But only return the data you are actually using in your presentation layer (Flex). Avoiding that all or nothing data problem that is so common.

I&apos;m happy to announce a new Digital Primates open source project. dpHibernate, add support to BlazeDS for Hibernate lazy loading.  You can find both the java and the ActionScript parts of the project here:
&lt;a href=&quot;http://code.google.com/p/dphibernate&quot;&gt;http://code.google.com/p/dphibernate&lt;/a&gt;

If you&apos;re not familiar with hibernate, check out http://www.hibernate.org. At a real high level, Hibernate is a java ORM tool, which lets you map java beans to a relation database. Hibernate does all of the sql work for you. 

So how do &lt;a href=&quot;http://code.google.com/p/dphibernate&quot;&gt;dpHibernate&lt;/a&gt; work? dpHibernate is actually a combination of two code bases. First, there is a custom java adapter for the BlazeDS server. This HibernateAdapter understands the hibernate proxy objects and knows how to convert them into a special &lt;a href=&quot;http://code.google.com/p/dphibernate&quot;&gt;dpHibernate&lt;/a&gt; proxy which the AMF serializer will ignore and not try to initialize. This is how the proxy objects are able to go back to the client without getting the LazyLoadingException. 

The second part of &lt;a href=&quot;http://code.google.com/p/dphibernate&quot;&gt;dpHibernate&lt;/a&gt; is an ActionScript library which gives your application the code it needs to understand these dpHibernate proxy objects. This AS library has the code to manage your ActionScript beans and knows how to call back to the server to load a proxy once that object has been touched, usually with a binding expression. 

In case your wondering, how does &lt;a href=&quot;http://code.google.com/p/dphibernate&quot;&gt;dpHibernate&lt;/a&gt; differ from the hibernate support in LiveCycle Data Services ES?  For one dpHibernate doesn&apos;t require LCDS it works with the open source BlazeDS server. The other big difference is that hibernate support in LCDS requires you to duplicate the lazy associations in the services-config.xml and you need to use an Assembler class to get the hibernate objects. dpHibernate let&apos;s you call any java method and return any hibernate object. 

So check it out, if you can use it I&apos;d love to hear about it. If it doesn&apos;t work for you I want to know about that too. And as with all open source projects this one can use as many eyes as possible on it too. If you find any hibernate configurations that don&apos;t work let me know. Or better yet, send me a test case with the right hibernate mapping files to recreate the issue.

Thanks,
---mike nimer
mikenimer at yahoo.com 
				</description>
				
				<category>Flex</category>				
				
				<category>dpHibernate</category>				
				
				<category>hibernate</category>				
				
				<pubDate>Wed, 21 May 2008 15:44:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/5/21/dpHibernate--Hibernate-lazy-loading-with-Adobe-BlazeDS</guid>
				
			</item>
			
			<item>
				<title>Making air do crazy things</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/1/30/Making-air-do-crazy-things</link>
				<description>
				
				So technically Adobe Air doesn&apos;t have direct OS level integration, we can only hope the next version does. But that doesn&apos;t mean it&apos;s not possible. Louie Penaflor (a member of the Digital Primates team) has still been able to make AIR bend to his will, with some help from the Artemis project. He has written an application that let&apos;s AIR control his scanner. So from inside his application he can scan his travel receipts. 

Read all about it here: &lt;a href=&quot;http://www.restlessthinker.com/blog/?p=69&quot;&gt;http://www.restlessthinker.com/blog/?p=69&lt;/a&gt; 
				</description>
				
				<category>Flex</category>				
				
				<pubDate>Wed, 30 Jan 2008 14:16:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/1/30/Making-air-do-crazy-things</guid>
				
			</item>
			
			<item>
				<title>FlexCamp Chicago presentation and examples</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/1/30/FlexCamp-Chicago-presentation-and-examples</link>
				<description>
				
				First I just want to thank everyone who attended the FlexCamp in Chicago. As promised here is the presentation I did and the two examples I walked through. 

&lt;a href=&quot;http://www.mikenimer.com/downloads/presentations/flexcampchicago2008/FlexCampChicago2008_CFandFlex101.pdf&quot;&gt;Presentation&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://www.mikenimer.com/downloads/presentations/flexcampchicago2008/flexcamp_chicago_examples.zip&quot;&gt;Examples&lt;/a&gt;&lt;br/&gt;
(these use the sample database that ship with ColdFusion) 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Wed, 30 Jan 2008 14:11:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/1/30/FlexCamp-Chicago-presentation-and-examples</guid>
				
			</item>
			
			<item>
				<title>Flex Camp Chicago! - limited space available, sign up now while you still can</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/1/9/Flex-Camp-Chicago--limited-space-available-sign-up-now-while-you-still-can</link>
				<description>
				
				Are you a flex developer? Are you still learning new things about flex? Are you planning on learning flex? Do you want to meet other flex developers in the area? Do you live near Chicago, IL? 

Then you need to register and come to the next Flex Camp right here in Chicago, on Jan 18th, before it sells out. Plus you get a FREE COPY OF &quot;Adobe Flex 2: Training from the Source&quot; - thanks to PeachPit Press. 

Flex Camp is a one day, all day, conference about Flex with something for everyone - Flex Component development, Air development, CF Integration, and Java Integration. Plus I&apos;m a speaker! 

And it&apos;s easy to get to, Flex Camp will be located at the Illinois Technology Association, 200 S. Wacker Drive, 15th Floor. Which is right by Union Station in downtown Chicago. 

Click here to learn more and register:&lt;br/&gt;
&lt;a href=&quot;http://www.flexcampchicago.com/&quot;&gt;http://www.flexcampchicago.com/&lt;/a&gt; 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Wed, 09 Jan 2008 04:11:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2008/1/9/Flex-Camp-Chicago--limited-space-available-sign-up-now-while-you-still-can</guid>
				
			</item>
			
			<item>
				<title>Tapper, Nimer &amp; Assoc. + Digital Primates IT Consulting</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/12/5/Tapper-Nimer--Assoc--Digital-Primates-IT-Consulting--the-secret-is-out</link>
				<description>
				
				I&apos;m happy to finally be able to tell the world that Tapper, Nimer &amp; Associates and Digital Primates have decided to join forces. Now that the lawyers are done the merger is complete.

The new company will be keeping the name Digital Primates. If you&apos;d like to learn more about Digital Primates check out our web site at &lt;a href=&quot;http://www.digitalprimates.net&quot;&gt;http://www.digitalprimates.net&lt;/a&gt;

It&apos;s an exciting time in the RIA world and for us it just got a lot more exciting!

P.S. We are looking for a few great flex developers and flash video experts. If you&apos;re interested send me your resume. 
				</description>
				
				<category>Flex</category>				
				
				<category>ColdFusion</category>				
				
				<category>General</category>				
				
				<pubDate>Wed, 05 Dec 2007 03:47:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/12/5/Tapper-Nimer--Assoc--Digital-Primates-IT-Consulting--the-secret-is-out</guid>
				
			</item>
			
			<item>
				<title>dpUnit = new flex unit testing framework</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/12/3/dpUnit--new-flex-unit-testing-framework</link>
				<description>
				
				[Update] Correction: The name is dpUint, not dpUnit. I guess I&apos;m so used to all of XUnit frameworks I didn&apos;t even notice the spelling difference at first. 

In case you didn&apos;t see this earlier Mike Labriola from Digital Primates (&lt;a href=&quot;http://www.digitalprimates.net&quot; target=&quot;_blank&quot;&gt;http://www.digitalprimates.net&lt;/a&gt;) has released a new open source unit testing framework for flex this week ( &lt;a href=&quot;http://code.google.com/p/dpuint/&quot; target=&quot;_blank&quot;&gt;dpUnit&lt;/a&gt; )
&lt;br/&gt;&lt;br/&gt; 

Why is this cool?:
&lt;ul&gt;&lt;li&gt;1. Support full testing of Asynchronous actions (correctly).&lt;/li&gt;
&lt;li&gt;2. Trigger and listen for any event in your application and validate it in the unit test.(UI, Validation, or server).&lt;/li&gt;
&lt;li&gt;3. hain a series of actions into a sequence.
    &lt;dd&gt;This means you can define a series of application actions in your test case and they will be executed in sequence during the test. But even better - you can also add waits between these steps so the test case will not perform the next step until some event has been fired from the current step or timed-out and failed. For instance until a property has been set (VALUE_COMMIT event).&lt;/dd&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;4.You can write UI Component unit tests!!!!&lt;/b&gt;
&lt;dd&gt;This is unique to dpUnit - With dpUnit you can instantiate a new UI Component and trigger events and test that the UI Component actual does what it should. Instead of just testing individual functions or classes&lt;/dd&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;dd&gt;For instance if have a edit form component, you can create a new instance and set the values of the different form fields. Then you can trigger the validation and run asserts in your unit tests to check that the form validation happened correctly. &lt;/dd&gt;
&lt;/li&gt;
&lt;/ul&gt;


Let me say this again, &lt;b&gt;you can write UI Component Unit tests!&lt;/b&gt;. 

&lt;a href=&quot;http://code.google.com/p/dpuint/&quot; target=&quot;_blank&quot;&gt;Download it here&lt;/a&gt; 
				</description>
				
				<category>Flex</category>				
				
				<pubDate>Mon, 03 Dec 2007 00:24:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/12/3/dpUnit--new-flex-unit-testing-framework</guid>
				
			</item>
			
			<item>
				<title>Baby meet world - world meet baby nimer!</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/12/1/Baby-meet-world--world-meet-baby-nimer</link>
				<description>
				
				No one ever called me the quickest blogger, but I&apos;m excited to announce the newest nimer in the world.

&lt;img src=&quot;http://farm3.static.flickr.com/2124/1801491176_0b3613c4eb.jpg&quot;/&gt;
&lt;br/&gt;&lt;br/&gt;
Kayden Michael Nimer&lt;br/&gt;
Born: Oct 29th 2007&lt;br/&gt;
7lbs 10oz - 21&quot; long&lt;br/&gt;
&lt;br/&gt;&lt;br/&gt;
Kayden is a perfectly healthy baby boy and both mom and are baby are doing great. So being a new dad I can&apos;t stop thinking about the question where do I start with all of these cool toy options? :) 
				</description>
				
				<category>Personal</category>				
				
				<pubDate>Sat, 01 Dec 2007 23:45:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/12/1/Baby-meet-world--world-meet-baby-nimer</guid>
				
			</item>
			
			<item>
				<title>Flex Tip - Trigger validation when submitting form</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/10/11/Flex-Tip--Trigger-validation-when-submitting-form</link>
				<description>
				
				I just noticed a common pattern in the way I do validation, so I thought I would share. (in case you didn&apos;t know this already)

The validators are great at telling the user what is required or failing validation as the tab through the form. However they don&apos;t actually block the user from submitting the invalid form. But there is a simple way to do this with the validators.

1. Group all of the validators into an MX:ARRAY tag, and give it a unique id. - I usually use &quot;validators&quot;

&lt;code&gt;
	
&lt;mx:Array id=&quot;validators&quot;&gt;
	&lt;mx:StringValidator source=&quot;{abbreviations}&quot; property=&quot;text&quot; required=&quot;true&quot;/&gt;
	&lt;mx:StringValidator source=&quot;{subcode}&quot; property=&quot;text&quot; required=&quot;true&quot;/&gt;
	&lt;mx:StringValidator source=&quot;{name}&quot; property=&quot;text&quot; required=&quot;true&quot;/&gt;
	&lt;mx:StringValidator source=&quot;{letterType}&quot; property=&quot;text&quot; required=&quot;true&quot;/&gt;
	&lt;mx:StringValidator	source=&quot;{scheduleType}&quot; property=&quot;text&quot; required=&quot;true&quot;/&gt;
&lt;/mx:Array&gt;

&lt;/code&gt;


Since the validators are now all grouped in an Array, you can call the Validator.validateAll() function to check them all at once. 

2. Use this if statement in the click event of your form submit button to check the validators before submitting. You can also add this if check inside your doSave() method too. whichever you prefer.

&lt;code&gt;

if( Validator.validateAll(validators).length==0 ){ doSave() }

&lt;mx:Button 
	label=&quot;Save&quot;
	click=&quot;if( Validator.validateAll(validators).length==0 ){ doSave() }&quot;/&gt;

&lt;/code&gt; 
				</description>
				
				<category>Flex</category>				
				
				<pubDate>Thu, 11 Oct 2007 17:47:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/10/11/Flex-Tip--Trigger-validation-when-submitting-form</guid>
				
			</item>
			
			<item>
				<title>Suddenly I don&apos;t want anything to do with plastic products.</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/6/22/Suddenly-I-dont-want-anything-to-do-with-plastic-products</link>
				<description>
				
				&lt;a href=&quot;http://www.bestlifeonline.com/cms/publish/travel-leisure/Our_oceans_are_turning_into_plastic_are_we.shtml&quot;&gt;&quot;&lt;b&gt;A vast swath of the Pacific, twice the size of Texas&lt;/b&gt;, is full of a plastic stew that is entering the food chain. Scientists say these toxins are causing obesity, infertility...and worse&quot;&lt;/a&gt;

There is everything wrong with the fact that this pile of trash exists. And even worse, there is more than one in the world. 

I don&apos;t even know where to begin with a solution. But cutting back on the use of plastic seems like a good place to start. Everything doesn&apos;t need to be made out of plastic, I know I prefer the glass coke bottles to the plastic ones. Maybe some mandatory recycling programs are needed. I just hope something changes other wise the world 20 years from now could be a nasty place to live. 


&lt;a href=&quot;http://www.bestlifeonline.com/cms/publish/travel-leisure/Our_oceans_are_turning_into_plastic_are_we.shtml&quot;&gt;Read article&lt;/a&gt; 
				</description>
				
				<category>General</category>				
				
				<pubDate>Fri, 22 Jun 2007 21:02:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/6/22/Suddenly-I-dont-want-anything-to-do-with-plastic-products</guid>
				
			</item>
			
			<item>
				<title>I want to see this - looks like I need to go to Berlin</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/1/13/I-want-to-see-this--looks-like-I-need-to-go-to-Berlin</link>
				<description>
				
				&quot;Placed at the lobby of the Radisson SAS Hotel in Berlin, the 25 meters high AquaDom is the largest cylindrical aquarium ever built.&quot;
&lt;a href=&quot;http://fogonazos.blogspot.com/2007/01/aquadom-worlds-largest-cylindrical.html#&quot;&gt;http://fogonazos.blogspot.com/2007/01/aquadom-worlds-largest-cylindrical.html&lt;/a&gt; 
				</description>
				
				<category>Travel</category>				
				
				<pubDate>Sat, 13 Jan 2007 14:05:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/1/13/I-want-to-see-this--looks-like-I-need-to-go-to-Berlin</guid>
				
			</item>
			
			<item>
				<title>Bye bye -services!</title>
				<link>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/1/10/Bye-bye-services</link>
				<description>
				
				&lt;p&gt;
When you are building an application that uses the Flex FDS or ColdFusion servers as a back-end you need to define in your FlexBuilder project properties an additional compiler argument, -services. Why? FlexBuilder needs this argument/path to your services-config.xml file so it can pull just a few pieces of information out of the xml file. In turn, these pieces of information are what allows your flex client application to know what server to talk to and how. However, this has a few drawbacks.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to be able to access your services-config.xml file. Which can be difficult if you are developing against a remote Flex server.	Confusion with the launch url in FlexBuilder. &lt;/li&gt;
&lt;li&gt;By default endpoint urls in the services-config.xml use wildcards to define the host/port of the url &quot;{server.host} and {server.port}&quot;. However, the default for FlexBuilder is to launch flex applications with a file://c:\ absolute path, easily corrected but still the default. Now the problem is that if your movie is launched with a file:// path, Flex can&apos;t use the {server.host}/{server.port} wildcards (there is no http url to pull the host and port from)&lt;/li&gt;
&lt;li&gt;But, you can&apos;t hardcode the url in services-config.xml either. Otherwise your .swf will be compiled with a url that points back to your development server. And you don&apos;t want to recompile the .swf for production because then the .swf you tested is NOT the same .swf as the one you deploy. (you always want to deploy the same code you test). Context-root problems, if you develop with one context-root and deploy to production under a different context-root - Watch out!&lt;/li&gt;
&lt;li&gt;Because the context-root needs to be hard coded in the services-config.xml or defined as a compiler argument in FlexBuilder too, it is compiled into the swf as a hard coded value. Which means, you need a different .swf for each platform you run one (a testing nightmare).&lt;/li&gt;
&lt;/ul&gt; 

&lt;p&gt;
Alas, there is a solution! (You knew I was going there didn&apos;t you).  All of this can be defined at runtime without the -services argument and the services-config.xml. Defining this at runtime also has a few advantages.
&lt;/p&gt;
 	
&lt;ul&gt;
&lt;li&gt;Your context-root can be defined at runtime as a FlashVar  and your .cfm or .jsp can easily set that with a simple variable. &lt;/li&gt;
&lt;li&gt;You can switch URL&apos;s as needed, for instance if the movie is loaded under an http:// url, use the wildcards. If it&apos;s loaded under a file:// or c:\.. path use a hard coded development url.&lt;/li&gt;
&lt;li&gt;Different developer enviroments and configurations don&apos;t matter, everyone should be able to drop the code, sorry sync from source control, on their machine and run the application.&lt;/li&gt;
&lt;/ul&gt;	

&lt;p&gt;
There are different ways to do this but how I do it is with 2 files; a ConfigModel class and a standard ServiceLocator class.  
&lt;/p&gt;


&lt;strong&gt;ConfigModel.as&lt;/strong&gt;
&lt;code&gt;

package model
{
	import mx.core.Application;
	import mx.controls.Alert;
	import mx.utils.ObjectUtil;
	
	/**
	 * Used to store Application config settings, and the 
	 * FlashRemoting channel and endpoint url settings, with this you
	 * won&apos;t need define a -services compiler argument for the project.
	 * 
	 * @author: Mike Nimer
	 **/
	[Bindable(event=&quot;configChange&quot;)]
	public class ConfigModel
	{
		public static var TIMEZONEOFFSET:Number; //est=4 or 5, depending on DST
		
		// debug setting to switch between live and stub data
		public static const USE_STUB_DATA:Boolean = false;

		// Flash remoting config issues
		public static const CHANNELID:String = &quot;orca-amf&quot;;		
		private static const default_context_root:String = &quot;/&quot;; // adjust as needed for your default server.


		/**
		 * pull the context-root out of the flash var, if it&apos;s defined in your &lt;object/&gt; or &lt;embed/&gt; tags.
		 * ex: contextRoot=/flex
		 **/		
		private static function get CONTEXT_ROOT():String
		{
			var app:Application = Application.application as Application;
			if( app.parameters.contextRoot != null )
			{
				//Alert.show( ObjectUtil.toString(app.parameters) );
				return 	app.parameters.contextRoot;
			}
			return ConfigModel.default_context_root;
		}
		
		
		// return the correct endpoint, if this is server from an HTTP request
		// return the default localhost:8500 for development, if FlexBuilder launches 
		// the application locally with an absolute path (file://c:\...)
		public static function get AMFENDPOINT():String
		{
			var app:Application = Application.application as Application;
			if( app.url != null &amp;&amp; app.url.indexOf(&quot;http:&quot;) != -1 )
			{
				return &quot;http://{server.name}:{server.port}&quot; + ConfigModel.CONTEXT_ROOT +&quot;/messagebroker/amf&quot;;
				// for ColdFusion users
				// return &quot;http://{server.name}:{server.port}&quot; + ConfigModel.CONTEXT_ROOT +&quot;/flex2gateway&quot;;
			}
			else
			{
				return &quot;http://localhost:8500&quot; + ConfigModel.CONTEXT_ROOT + &quot;/messagebroker/amf&quot;;
				// for ColdFusion Users
				// return &quot;http://localhost:8500&quot; + ConfigModel.CONTEXT_ROOT + &quot;/flex2gateway&quot;;
			}
		}

	}
}


&lt;/code&gt;


&lt;strong&gt;ServiceLocator.as&lt;/strong&gt;
&lt;code&gt;

package services
{
	import model.ConfigModel;
	import mx.messaging.Channel;
	import mx.messaging.ChannelSet;
	import mx.rpc.remoting.mxml.RemoteObject;
	import mx.rpc.events.ResultEvent;
	import mx.messaging.channels.AMFChannel;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.AbstractService;
	import mx.messaging.config.ServerConfig;
	
	/**
	 * Create the RemoteObject tags used by the application service delegates
	 * @author: Mike Nimer
	 **/
	public class ServiceLocator
	{
		public var service:AbstractService;
		public var amfChannelSet:ChannelSet;
		public static var serviceLocator:ServiceLocator;
		
		public function ServiceLocator()
		{
			var amfChannel:Channel = new AMFChannel(ConfigModel.CHANNELID, ConfigModel.AMFENDPOINT);
			amfChannelSet = new ChannelSet();
			amfChannelSet.addChannel(amfChannel);
		}		
		
		public static function getInstance():ServiceLocator
		{
			if( ServiceLocator.serviceLocator == null )
			{
				ServiceLocator.serviceLocator = new ServiceLocator();
			}
			return ServiceLocator.serviceLocator;
		}
		
		
		/**
		 * Individual Services used by the Application.
		 **/				
		public function getSomeService():AbstractService
		{
			if( service != null )
			{
				return service;
			}			
			service = new RemoteObject(&apos;someDestination&apos;);
			service.channelSet = this.amfChannelSet;
			(service as RemoteObject).showBusyCursor = true;
			
			// service.source = &quot;dot.path.to.cfc&quot; // If you are using ColdFusion			
			//service.setCredentials(username, password); // if you need it
	return service;
		}
		
	}
}

&lt;/code&gt;


&lt;strong&gt;Set Context-root FlashVar (ColdFusion)&lt;/strong&gt;
&lt;code&gt;
// You&apos;ll find this in the default html flex generates, just make the html page a cfm and add this FlashVar.
// note: Use contextRoot=&lt;%=request.getContextPath()%&gt; for JSP pages.

	AC_FL_RunContent(
			&quot;src&quot;, &quot;Orca&quot;,
			&quot;width&quot;, &quot;100%&quot;,
			&quot;height&quot;, &quot;100%&quot;,
			&quot;align&quot;, &quot;middle&quot;,
			&quot;id&quot;, &quot;Orca&quot;,
			&quot;quality&quot;, &quot;high&quot;,
			&quot;bgcolor&quot;, &quot;#869ca7&quot;,
			&quot;name&quot;, &quot;Orca&quot;,
			&quot;flashvars&quot;,&apos;contextRoot=#getContextRoot()#&amp;historyUrl=history.htm%3F&amp;lconid=&apos; + lc_id + &apos;&apos;,
			&quot;allowScriptAccess&quot;,&quot;sameDomain&quot;,
			&quot;type&quot;, &quot;application/x-shockwave-flash&quot;,
			&quot;pluginspage&quot;, &quot;http://www.adobe.com/go/getflashplayer&quot;
	);
&lt;/code&gt; 
				</description>
				
				<category>Flex Builder and ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Wed, 10 Jan 2007 10:15:00 -0400</pubDate>
				<guid>http://blogs.digitalprimates.net/mikenimer/index.cfm/2007/1/10/Bye-bye-services</guid>
				
			</item>
			</channel></rss>