In FlexBuilder, the default project output folder is “bin”. And, so it follows that often the default deployment folder is called “bin”. And there’s this little checkbox in FlexBuilder which says “Copy all non-embedded items to bin folder” or something like that. Which means, copy the folders, the graphics, anything within arms reach which was not included in the build. And so it follows that the default deployment contains a lot of unnecessary stuff, and it all goes into the bin folder.
I suppose I don’t have to say how this irritates me. But I will say it. This irritates me. Why? Because default behavior is often what gets deployed. How many pale blue halo themed Flex apps do you have to see to know that? Do you remember VisualBasic, and the default Form layout? Many other examples come to mind, as I try fervently to shut them out of that very same mind. Default behavior can be aesthetically displeasing visually. But that’s preferable to having a maintenance disaster in the making.
No need to wait for that, though. Trouble can sometimes arrive on the express train. ASP dot Net (Microsoft) also has designs for the “bin” folder. On IIS, the bin folder is hidden by default, if ASP.Net (version?) is installed. And it is hidden in an atypical way, so get ready for hours of fun trying to figure out what went wrong if deploying bin on this kind of infrastructure. The die hard bit twitcher will find:
And announce that the problem has been “fixed”. Well, that’s just great. Hurry up and have the congratulations party quickly, because there isn’t much time before the next problem hits.
Why did Microsoft hide that folder, anyway? Because of a security issue. ASP dot Net uses the “bin” folder for compiled executables and other DLL’s.
The simplest solution is to not use the default behavior for Flex builder. The resulting swf’s should go in some other deployment folder, which may even be served up programmatically, and not be in the web document structure.