I was reading through my blog roll this morning (and when I say this morning I really mean early afternoon because I am off) when I came across a very interesting post. We have all either used flex or at the very basics have seen some MXML code. Here is a quick hello world example that just puts a button on the screen.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:Button label="Hello World!"/>
    
</mx:Application>

Nothing special going on there right. Mrinal Wadhwa has a great article about writing flex applications without the mx prefix to each of the tags. All you have to do is simply change the application tag to match the one below. Then all of your tags can be written without using mx: prefix. I thought well this is great but I am still a newbie and really need the code insight that Flex Builder offers. To my amazement you still have your code insight. Mrinal offers up a couple of reasons on why this approach is better and in my opinion I could not agree more.

    1. I think this makes the code a lot cleaner
    2. There are many who do not use Flex Builder and for them this saves a lot of typing.

Here is the new code, go ahead and change your application tag to the following and have fun saving time. What a great tip Mrinal!

<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://www.adobe.com/2006/mxml">
    
    /* now you can use the tags without mx prefix and code hinting still works */
    <Button label="Hell World!"/>
    
    
</Application>