Flex Builder 3 and Flash Builder compatibility - apache-flex

Hi
I use Flex Builder 3 for all my coding. Recently, at the office where I work we are upgrading to Flash Builder.
I would still like to work on the same projects at home using Flex Builder.
Can anyone tell me what compatibility issues I will run into?
Is it impossible to share the same project between Flash Builder and Flex Builder?

I have a similar setup. I haven't really encountered any problems. Just make sure you're using the same SDK. I typically work with Actionscript projects as opposed to Flex projects, so I'm not sure if there would be any issues there. I have had issues with going from Flex 3 to FDT, but that was mainly due to the project files and compiling method. As a solution, I usually place my source, library and bin files in source control (svn or git) and ignore the project files. Then, set up separate projects in each environment.

Related

Does Adobe Flex have the ability to compile into HTML/JavaScript?

I'm fairly sure I know what the answer will be here, but since I recently stumbled across Apache FlexJS: https://blogs.apache.org/flex/entry/apache_flexjs_0_6_0 I thought I would double-check.
Is there a way to compile Adobe Flex applications into HTML/JavaScript, using the Adobe Flex SDK? I have done some digging and this new development on the Apache Flex project seems to be the only path forward in that respect.
In theory yes, as described on the schema of https://cwiki.apache.org/confluence/display/FLEX/FlexJS : you get the same source code and can compile it into HTML/JS or SWC.
However, in practice you will get issues because the component library is currently very limited in HTML/JS.

AS3 only app breaks when I compile w/ adobe sdk, works when I compile w/ apache sdk (same adobe sdk)

something strange happens when I switch between the adobe sdk (3.90.1210), and the apache sdk (which includes the same adobe sdk (3.90.1210)
one would think that there should be no differences when I make this switch, as my app is AS3 only, no flex references, and the underlying sdks are the same
the app builds and runs under both sdks, but about half of my images just dont show up when I run under the adobe sdk
so I dig down and I can see that the bitmap data objects that dont show up all have their HxW set to zero, the others have it set to proper HxW
the thing is, this has worked fine for a long time under the various adobe sdks, and something in the apache sdk fixes the problem, would like to understand it
meanwhile the wierdness in the images has something to do with having been flattened or not during production... images are all pngs, imported into flash and compiled to a swc, then merged into code
not a graphics guy, was hoping I wouldnt have to become one... have poked around and cant figure that side of it out...
suggestions?
one thought is to go back thru our hundreds of images and flatten (unflatten? whatever) them all with some photoshop batch process... this would not be fun
or I could stick w/ the apache sdk... which makes me a little nervous in that I have no idea what magic it's bringing
thoughts? anyone else seeing this?
thanks
To avoid stretching out the comments on the main question further, I'll throw this into an answer.
There are three official SDKs for Flash development. There are several others (like Starling) which have no affiliation with Adobe, so we won't count those.
Flash SDK - This is the basis for all things Flash and is developed solely by Adobe. Your core classes (DisplayObject, Object, Number, System, etc) are all found within this SDK. No matter what you are building for, every Flash application must include this SDK.
Flex SDK - Flex is a GUI framework originally developed by Adobe. After v4.6, roughly two years ago, Adobe donated the framework to Apache. Since that time, Apache has been developing the framework with fairly consistent development. We are currently at 4.11 with 4.12 due out in the coming months. This framework is also open-source, so it is partially community developed, partially Apache developed. There are two main different GUI frameworks in Flex: MX and Spark. MX is no longer in development, while Spark is. You should not mix components from the two.
AIR SDK - This is the Adobe Integrated Runtime. AIR allows you to run Flash apps as native apps on various platforms. The AIR SDK is the bridge between Flash and the native platform and nothing more. It is developed solely by Adobe and is closed-source. Apache has no part in this project, other than Adobe's promise to keep supporting Flex and MXML for the foreseeable future.
So with those things in mind, let's look at how they interact. As I said, the Flash SDK is included in all Flash apps. The AIR and Flex SDKs are built in ActionScript 3 (Flex is NOT built in MXML) using the classes found within the Flash SDK. The AIR SDK is used to build a native application, and that is the only time it should be used. The Flex SDK is a set of GUI components that make building interfaces easy and can be used in both web and AIR applications.
The Flex SDK can exist without the AIR SDK and the AIR SDK can exist without the Flex SDK. There is absolutely no reliance between the two. For the sake of unity, the Flex and AIR SDKs are generally combined into a single folder. This does not mean they are the same SDK or related in any way, just that this is how the SDKs are loaded. This was an ease-of-use decision by Adobe years ago when they still developed Flex.
So if your AS3 project is using the same AIR SDK version are your Flex app and you are getting compiler errors when you compile AS3, there must be something Flex in your project. Maybe a Formatter or the RPC classes used to make SOAP calls). You need to find that and get rid of that or import the correct SWC file from the Flex SDK, assuming it isn't a GUI component.

How big should a Flex SWF be?

I've a fairly small Flex4 project targeting Flash 10, developed in FlashDevelop. I know Flex SWFs carry extra overheads to a plain AS3 project, but 240Kb for release build seems still a lot - is it? Or is this a realistic minimum?
In case it's relevant, FlashDevelop builds my project with the following (anonymized):
mxmlc -load-config+=obj\********.xml -incremental=true -benchmark=false -optimize=true -static-link-runtime-shared-libraries=true -o obj\*****************
Doesn't Flash player include Flex runtimes or something sensible like that?
The player does not include the Flex framework. It shouldn't. The Flex framework is independent of the player and if it was included the player would have to include every version of the framework to use the one each swf was built against. To solve this the framework is different (as is the Flash framework).
The resolution to large swfs is to use Framework Runtime Shared Libraries. This way the player will load a shared library swf once for the specific framework version you used and this shared library will be used across all swfs that were compiled against the same framework version.
You can find more information here:
http://livedocs.adobe.com/flex/3/html/help.html?content=rsl_09.html
In practice, it's somewhat like having the framework in the player, but it's just not pre-loaded. The frameworks get loaded as needed.
240KB is not a lot. Yet.
However, in my opinion, Flex does make files quite large when you start developing bigger applications, which is the reason I do plain ActionScript projects.
Flash Player does not come with preloaded framework data in. Therefore, 1) do what sam said with Runtime libraries. 2) load almost all files after the main flash has loaded, thus giving the user meaningful info, while the rest loads (you could load homepage, display it, and only then start loading the other sections). You could use something nice called BulkLoader.
hth

Can i use flex without Flex builder?

i am starting to study FLEX. i have only flex sdk. So can i start study only using that. If so please suggest me the link to go through..
But still, Using an editor will minimize our work and will create the code by its own. So as a new learner it would be tedious to understand and also hard to learn new things...
Yes.
Just a bit of background: Flex Builder (a.k.a Flash Builder), the mxmlc compiler (free) and Flash CSx all compile Actionscript code into SWF files and/or AIR files. Flash CSx is a design-centric tool with a ultra-simplistic coding editor built in (not much more useful than Notepad); Flex Builder/Flash Builder is a full-blown programmer's IDE (based on Eclipse); the mxmlc compiler is a free command-line tool that compiles Actionscript files into SWF and AIR files. (You have to use your own editor to write the source files.)
MXML is an xml language that acts as a shortcut for Actionscript. You can code in mxml instead of Actionscript and the compiler will convert your mxml into Actionscript before compiling. You can't use mxml as a shorthand for all AS coding. Mostly you can use it as a substitute for UI coding and as a way of binding data to UI elements. The compiler converts the mxml into Actionscript classes and then compiles the Actionscript classes (the ones created as mxml and the ones coded natively in Actionscript) into bytecode. The Flash virtual machine (e.g. the browser plugin) runs the bytecode.
Currently, you can code both Actionscript and mxml -- and then compile using Flex Builder/Flash Builder or the mxmlc compiler (which is free). Flash CSx can does not understand mxml, so you it can only compile straight-forward Actionscript.
Note: there are third-party tools, such as FDT that can also be used to write and compile Actionscript and mxml.
The language Actionscript has been revised several times. After a brief phase when it was a proprietary language, it morphed into something much like Javascript. Then, with AS 2.0, it became much more like Java -- and it continues in this direction with AS 3.0. (its syntax is very similar to Java and, like Java, it is class-based).
There are a core set of Actionscript classes that are available to you in Flash CSx, Flex Builder/Flash Builder and the free sdk. There are additional classes, known as the Flex Framework, which are available to you in Flex Builder/Flash Builder and in the sdk -- but not in Flash CSx. These extra classes add new visual components, such as a datagrid, an advanced UI-layout engine, and a framework for data-binding.
You can use the Flex Framework without the Flex Builder IDE (which is going to renamed, in the next version to Flash Builder).
Compiling without Flex Builder
You can also use Flex Builder/Flash Builder without using the Flex Framework -- meaning you can program in the IDE and use only Actionscript classes that aren't part of the framework (the classes you'd use if you programmed in Flash and not Flex Builder).
You can choose to use or not use mxml.
You can even use mxml to auto-generate Actionscript that's not part of the Flex Framework (e.g. your own custom classes).
Using mxml for your own classes
Good luck!
my Actionscript blog
If you are a student, you can get Flex Builder for free.
Free for students
I like FlashDevelop # http://www.flashdevelop.org/
Open source editor for Adobe Flash/Flex for Windows (may work under Wine?).
You can certainly build application with solely the open source Flex SDK. I have posted some instructions for using only the Flex SDK on Linux. If you are on a different platform the instructions can be slightly adjusted.
Yes, you can use any text editor to write MXML and ActionScript code, and then use the command line to compile the code into a SWF (Flash Movie). The SDK does not include Charts, however.
http://opensource.adobe.com/wiki/display/flexsdk/Downloads
If you're on Windows, see if you can run mxmlc.exe (the compiler) from a command prompt. Create a simple Example.mxml file to test it out.
mxmlc.exe Example.mxml
Here's a simple Hello World mxml source code.
Easy steps are well documented on Adobe's site and in chapter 2 of "Flex 3 in Action"
Flex Builder (now Flash Builder) is based on the Eclipse IDE - it's actually a plugin to Eclipse. So with Eclipse being open source and free, you can use that as your editor.
You won't get the integrated debugger, and visual design view... but using some free plugins you can still be productive.
1) You'll need the Flex SDK: www.adobe.com/products/flex/flexdownloads/
2) Get Eclipse: eclipse.org/
3) Two notable Eclipse plugins:
- www.eclipse.org/webtools/
- www.aptana.com/studio
Alternatively, if you have MSFT's Visual Studio, there's a Flex plugin for that too:
- www.sapphiresteel.com/Adobe-Flex-Development-in-Visual
To compile your code you'll use the Flex compiler, information on how to use it can be found here:
www.adobe.com/livedocs/flex/3/html/compilers_13.html#150640
Chapter 2 of Flex 3 In Action also has a section on how to develop Flex applications without Flex Builder:
http://www.amazon.com/dp/1933988746/?tag=insidemark-20
Note that Flex Builder is free for academic faculty, students, and out of work coders. So that's another option.
Cheers.
Flex Builder will be the very best way to learn as its got a debugger and thus lets you step thru code see how it works. FlashDevelop is free tho it lacks a debugger - still very useful
Intellij actually has pretty good support. AS3 support is wonderful, but there is no WYSIWYG tool.
Still, it is not a problem for many programmers, as MXML is easy to read and edit without WYSIWYG.

What are the Pros/Cons of Flash Builder vs. FlashDevelop?

I want to play around a bit with FLASH for app development. I'm looking for a good IDE for that. Someone suggested Flash Develop.
Flash Builder
Pros
better debugging and profiling
visual designer for MXML
because of Eclipse: support for other languages (eg. with Aptana, PDT...) and usage of plug-ins for the Eclipse Platform with features not shipped with FlexBuilder (code snippets with CFEclipse "Dynamic Snippets", "auto-code" for getter/setters with Monkey scripts...)
support of virtual folders/files (links to external files/folders handled intern by Eclipse, so also working on Windows)
refactoring (renaming of classes, functions, properties with automatic changing of dependencies)
Cons
Commercial license
Big and because of Eclipse problematic with newer Eclipse versions for the FlexBuilder plug-in version (eg. not working with Eclipse Ganymede 3.4.1)
adding and configuring the missing features with Eclipse plug-ins needs time and searching in the Internet (which plug-in? settings etc.)
Code assist only average and sometimes buggy eg. if correct imports are missing ("java.lang.NullPointerException")
missing of a code formatter or automatic get/setters (but there are solutions with other Eclipse plugins like Monkey Scripts, CFeclipse, Flexformatter "FlexPrettyPrintCommand"...)
sometimes a bit sluggish if background tasks in Eclipse are working
no package explorer
AS2 and AS3 only - no Haxe
FlashDevelop
Pros
free and Open Source (developed with C#)
lightweight and snappy
best available Code Assist for ActionScript
supports all flash languages - AS2, AS3, haxe
"auto code" for automatic getter/setter, variables, code for event handlers
code snippets with integrated snippet editor
extendible with plug-ins
support for asdoc comments
package explorer (show classes, symbols from a SWC file)
basic refactoring
multiple source code folders per project
useful plugins : ANT integration, SWC creation, mini map, quick navigate
Cons
only for Windows
no visual designer for MXML
no support of virtual folders/files inside the project
weak refactoring
changing classpaths must be done manually
plug-ins often not working in newer versions and many plug-ins are only rarely updated
limited support for debugging Haxe applications
Common
Pros
projects for full range of flash apps : websites, AIR (desktop, mobile)
debugging of FP/AIR apps with breakpoints and stepping
debugging with watch windows and locals
support for ASDoc comments
automatic adding of imports and organizing of imports
class wizard
SVG/GIT integration
Cons
no editing of graphics or animation (use Flash IDE for that)
Summary
For debugging, visual design of MXML forms : Flash Builder
For coding AS2/AS3/Haxe projects under Windows : FlashDevelop
Major reason to use FlexBuilder: has a real debugger you can set breakpoints and single step and watch/edit variables.
Unless FlashDevelop has .. developed .. don't think it got any of that yet.
BTW - if you are a student/teacher FlexBuilder can be had for free
Flex builder has a design view for MXML so you can build more visually. Flashdevelop on the other hand is free!
I've been using Flash Developer. Trying now FlashDevelop. FlashDevelop is fast and light, and I'm trying to switch just because of that.
I'm using HG + TortoiseHG for source control. I have 2 screens, so having external source control is not a big problem. Also the IDE stays a little cleaner by not having all the little source control icons.
DesignView helps with not having integrated design.
Also, I can debug with FlashDevelop and see the variables. I'm using FD3.2.1.
Along with what was already mentioned, Flex Builder has some nice tools that helps a developer to learn how to create a data enabled Flex application in form of the Data Wizards and also a nice web services introspection tool that automatically creates an ActionScript 3 client for a web service.
I'm using the new Jetbrains IntelliJ 8, and it's great (especially if your used to java developement). Has a lot better XML/JavaScript editors that any other IDE.
The latest version of IntelliJ also has a good flex/javascript debugger.
Here are two objective contrasts between FlashDevelop (with the Flex 3 SDK) and FlexBuilder. First, only FlexBuilder includes AdvancedDataGrid. Second, FlashDevelop has no source control integration.
AdvancedDataGrid is not included in either the free or open source Flex 3 SDKs; if you want it, you have to buy FlexBuilder. (I assume it is probably possible to use it via another SDK if you possess FlexBuilder.)
FlashDevelop doesn't have any source control integration, FlexBuilder possesses the existing, stable source control options for Eclipse. This includes Subclipse for SVN, as well as a lot of other things. As a longtime Visual Studio and Emacs user, in FlashDevelop I'm beginning to feel unsatisfied with leaving the editor to check in.
Flash Builder, even in version 4.5, has primitive, useless syntax coloring and customization features. From a 700$ package I was expecting at least what I can do with my free text editor.
In the syntax coloring preferences, there is a total of 6 keywords, and you cannot add any custom one.
How am I expected to code having variable names, function calls, and classes look exactly the same?
I will stick to Flash Pro CS5.5 and SciTe.

Resources