View Full Version : Learning Flex...
americanloti
12-22-2006, 04:10 PM
Hello there,
I'm an intermediate Flash user who wants to get started with Flex ,and more in general with RIA development. I was wondering if you guys know some good tutorials (other than the ones at adobe.com) and/or books about Flex/AS 3.0. Also, I'm curious to hear how you approached the migration from Flash to Flex. I feel like knowing flash doesn't really help when working in Flex. How was you experience?
madgett
12-22-2006, 04:46 PM
The largest thing to remember with Flex is that all it really is, in terms of Flash Development, is an extension to the framework which includes MXML.
If you know AS3 you can program all your Flex applications in classes. I particularly do not like programming in MXML, which is the "Flex" xml style based programming, similar to that of ColdFusion.
So what I usually start out doing for my Flex App is by creating a very simple MXML file that points to an AS3 class that defines the entry point.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:app="app.*">
<app:Test />
</mx:Application>
Test.as will be in a package called "app":
package app
{
public class Test
{
public function Test():void
{
}
}
}
Basically, if you are already proficient with AS2, you already have most of the AS3 syntax down because it is very similar to AS2. Most of your problems will not necessarily be with catching up to speed on AS3, but rather it will be programming in the Flex Framework because it is very different than the Flash 7/8 AS2 framework.
For example, to add a button to the Flex Framework you will use "addChild(btn)" rather than createClassObject on some movieclip.
The documentation really is the best place to start in my opinion. I have not purchased any Flex books, but maybe some others have and can add input on them.
dr_zeus
12-22-2006, 05:50 PM
madgett, I'm not sure the ColdFusion connection is quite right. Instead, MXML is more like HTML where Actionscript adds additional functionality like Javascript.
americanloti
12-23-2006, 01:27 AM
Hey thanks for the replies. I like the comparison with HTML/Javascript dr_zeus. I've never dealt with Javascript and probably that's the reason why I found a bit confusing the MXML AS integration. From what I could see (I just downloaded the beta a couple of days ago) with MXML is really easy to layout the interface. I like a lot the states management and the components seems much better that the ones in Flash, but when it comes to add functionality I find a bit hard to understand where to place the AS Code and how reference properly the compnents created in MXML. I'm also new to the OOP aspect on AS and that's also what "scares" me most about AS3.
I was reading this (http://www.onflex.org/ted/2006/11/flex-stole-my-mojo.php) article I found on another post. The author saying how hard is to master the flash authoring because of the concepts of timeline, and movieclips etc, things that are unique to flash, while flex is easier for VB .NET and Java user because it supports paradigms that are already part of those aother languages. Well, I find myself in the opposite situation. I know well the flash authoring enviroments and its paradigms because at the end it's the only technology I've ever used. I'm not sure if would be better to try "translating" the approach I was using with Flash when building dynamic apps or just start fresh and keep my AS skills as assets for Flex development. I know it might sound a silly question, but I've never had a formal programming education and I'm not a developer, I'd say that programming is more of an hobby for me. Thanks again
diciccod
12-28-2006, 05:30 AM
Yes, i feel that MXML more closely resembles CFML because there is more interactivity and complexity that is involed(i.e. web services) than HTML offers. And actionscript can be compared to that of Coldfusion scripting(<script>) which is very similar to javascript. I think you are misplacing MXML by labeling it as more similar to HTML than CFML. Just my opinion though.
dr_zeus
12-28-2006, 05:39 PM
Certainly, MXML goes beyond HTML in that it is extendable. In fact, ActionScript components can become MXML tags. I suppose you may be as close with ColdFusion as I am with HTML. I think one of my issues with the comparison is that a lot of people are only vaguely familiar with how CF works.
CDHBookingEdge
12-28-2006, 08:44 PM
Just a thought..aren't all of them (MXML, CFML, HTML, XAML, XUL) an attempt to put the declarative in the declarative space and leave the procedural to focus on the procedural? I know that sounds vague and maybe it is purposefully so. But there is a need for them all, or most of them at least, in different circumstances.
Oh and Josh, I'll gladly put myself in that camp (the ones that only vaguely grasp ColdFusion) so feel free to "wax programmatically" on it.
If I don't "see" you guys before New Years, have a happy and safe one,
Christopher
Just to have my 2 cents (where's ted :)), i would advise to use MXML when you feel its right. It really speeds up development. Don't fight against what Flex is provideding.
Happy NY to all too!
CDHBookingEdge
12-28-2006, 08:58 PM
having had to do UI and such things back in the days of DOS I can say as far as speeding up the design ...oh hell yeah LOL. And even just a few years ago as far the other possibilities. C# for example still annoys me that the design is "harbored" in code.
dr_zeus
12-28-2006, 09:32 PM
use MXML when you feel its right
Unless I'm making a super-basic component, I generally use the code-behind method where everything is laid out in an MXML class which extends an ActionScript class that I make I take care of all the business logic. On the other hand, if it's a super-complex component where it could contain a variable number of children (like a List, Tree or my open source TreeMap component), I generally go all ActionScript.
CDHBookingEdge
01-05-2007, 07:35 PM
I know I may be opening up a can of worms here, but based on the fact that ColdFusion is a major way that data is passed from server to client, I'd love to hear some of Josh's reflections on ColdFusion. It might also show some info on Remoteobjects and such in general.
Christopher
dr_zeus
01-05-2007, 08:46 PM
I'd love to hear some of Josh's reflections on ColdFusion.
I'd love to share some insights, but remember when I said this...
a lot of people are only vaguely familiar with how CF works
That includes me, I guess. I've never actually touched CF. I'm more of a front-end guy. I know a bit of PHP and some RoR. Enough to do some damage. ;)
It might also show some info on Remoteobjects and such in general.
I need to find some time to play with AMF and RemoteObjects. I've only done a few tests to see if I could get AMFPHP to work. It seems pretty simple, and once I find myself working on a project that would benefit from it, I'll be able to get my hands dirty.
CDHBookingEdge
01-05-2007, 09:30 PM
Ok :-) Not a problem.
Daedalus
01-16-2007, 02:50 PM
madgett, what does app refer too?
<?xml version="1.0" encoding="utf-8"?>
//get this error> Could not resolve <mx:Application> to a component implementation.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:app="app.*">
<app:Test />
</mx:Application>
Does it refer to a folder in your project or something. I dont have any special package thing in my project everything just starts with "package" and I have all my classes in the project root directory of my project. How would I either use the code above without a custom package thing?
(or how would I create a package for my existing project to allow the code above to work for my project?)
I tried creating a folder in my project called app then putting all my classes in that and then calling my test class but It did't work. Arent packages just infered through the directory structure of the folders like AS2?
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.