5 Replies Latest reply on Apr 4, 2008 7:49 PM by ProjectedSurplus

    Learning in a Hurricane

    ProjectedSurplus Level 1
      I'd like to say my problem is that I'm really stupid but insofar as I don't remember alcohol having had that much cumulative effect please excuse if I seem to be ranting while simultaneously seeking help. As background:

      I came up with a business idea and knew fireworks/photoshop.
      I "painted" mockups of the site front end.
      The Flash developers I then hired to "make it work" failed miserably to the tune of $250,000+ (hey, I never said I was a tee totaller).
      I learned SQL/SQLYog and designed the site database -- including as much business logic as possible in that tier.
      The Adobe Solutions Provider contracted to simply connect the "ends" also failed miserably to the tune of $150,000 I know, but it's not as though I still drink that much anymore).
      I set out to learn Flex and found MXML easy but ActionScript incomprehensible.
      Perhaps due to this efforts to connect to my MySql datasource have progressed slowly.

      Frankly though, the learning resources at each step along the way have been, well, lets call it "convoluted". Despite numerous book purchases/tutorial exercises and nearly infinite web research, the abundance of options, terminology, product upgrades etc. is more than half "the problem".

      Thus I proffer the following primarily for fellow noobs -- though also in the sincere hope of finding mentor(s) to speed my own on-going learning curve (corrections/comments/advice actively sought):

      Flex (which is really Flash which is really ActionScript) provides the best (or at least incontestably most mature) front-end (or "View" tier) available today.

      Databases are (until they become immensely large) interchangeable on the backend (or "Model" tier).

      Communicating between the two is the "Controller" tier and good software design practice suggests breaking application code into (self-contained) "modules" saved (roughly) in separate Model, View and Controller folders (with further subfolders from there etc -- please don't ask me what Cairngorm is).

      In Flex, the controller is essentially code which listens for events (such as a mouse click on the "Google Search" button) and then dispatches "results" (say "search terms" to the database, whereupon it listens for that response and sends it back to the display page).

      Straight forward enough so far right? OK, well a big hurdle is the database needs an interpreter, the main applicable being PHP or ColdFusion. Primarily because Adobe seems committed to integration, CFusion is what I've chosen (but be advised each is a new programming language/skillset to master in addition to IIS/Apache setup and IMHO is best learned distinct from Flex).

      Meanwhile back at the ranch, data can be received by or sent from Flex via <mx:HTTPService> OR <mx:WebService> OR <mx:RemoteObject>. The first two require conversion from/to XML and so are more generally available but also "heavier" (costing bandwidth and CPU). Thus I've chosen the latter, especially due to extra/better features between it and ColdFusion.

      Specifically CF 7.02 and 8 have "Remoting" built in. This allows Flex to "see" the dbase and is what the CF wizards in Flex make use of. Additionally there are CFusion "add-ons" (don't even ask Adobe evangelists the product names) which provide scalability and Server-push capability (say for building a Flex Instant Messaging App).

      Yet despite this CF-Flex interactivity, ActionScript best practices argue for Object Oriented Programming. I'm beyond my comfort level now but I think this breaks down to databases delivering information as a "set" (i.e. 50 of First, Middle, Last) whereas OOP ideally would have a PERSON "class" (all of which must have attributes of First, Middle, Last) which it then would make 50 "instances" of to display on the UI.

      These "classes" are defined or extended via ActionScript (note that MXML is really just preformed AS "classes" and a specific data-exchange benefit of AS3 is "strong typing") and specifically the "Controller" tier needs to be written in AScript (i. e. beyond the cfcs and AS classes the CF/Flex wizard creates for database interaction).

      As above, I hope this helps some of you out there, obviously I'm still struggling in some respects myself and welcome additional links and any other feedback -- especially all those who wouldn't mind my emailing them every now and then with a "stupid" question (possibly arising from my "University Days").
        • 1. Re: Learning in a Hurricane
          riesvantwisk Level 1
          I am not sure what your question is here,
          but I could suggest using a java backend using LCDS, Blaze-DS, WebORB or red5 to support amf3 using remote objects.

          As it sounds like that your DB is fairly complex, why not go for a better DB like PostgreSQL or something commercial, PostgreSQL can withstand higher loads while keeping it's performance (my experianc, not tryinto to flame here), see http://tweakers.net/reviews/657/6 (PG 8.3 performs much better even).

          Then try to write POJO's in structured classes, make modules in flex Actionscript is really not that bad, but you need to handle it as a scripting language so keep it small.

          Appart from that, which I had the drink with you :)


          • 2. Re: Learning in a Hurricane
            ProjectedSurplus Level 1
            I have little doubt you may be right -- for down the road. At the moment though I'm struggling with much more fundamental things -- like say where to save (and hence architect) my files. Essentially then what I'm asking is:

            A.) Have I made any major misconceptions in what I have written
            B.) Is there a resource I have not found yet that walks through the entire process (without say assuming that I know to designate the Flex build files into dir:/CFusion8/wwwroot/ProjectName like the CFWizard seems to)
            C.) Any and all other advice which more experienced coders may want to put forth.
            • 3. Re: Learning in a Hurricane
              riesvantwisk Level 1
              It's hard to judge this from my chair since it sounds like a fairly large project, it needs time and a lot of understanding from anybody to understand it (to beable to dream it).

              A) I cannot answer that.. without know much more of your project...
              B) this sounds an experieance issue, and you might not sure if the approach your are currently taken is the right on?
              C) This is hard to answer without a direct question.

              My current setup is using ant build files and using modules to work with larger projects, FB out of the box is not really well capable of doing this.

              I don't have any experiance with CF, but from what I read it's capable of running robust on a server so you should be fine there. But without knowing what sort of application you are making it's hard to give good advice.

              • 4. Re: Learning in a Hurricane
                ntsiii Level 3
                My 2 cents:
                A) No egregious errors or misconceptions in what you say
                B) No, for the very reason you note: "..the abundance of options...". You will need to focus on a platform architecture first, then dig down to find examples of that.
                C) Do this one step at a time: If you already have built the best part of the DB, then focus on the CF side of doing the DB integration. Then focus on getting data into flex, then build your UI.

                If this was easy, then anyone could do it. That is why they pay us the big bucks ;)

                • 5. Re: Learning in a Hurricane
                  ProjectedSurplus Level 1
                  thanks, my thoughts are to learn coldfusion now (actually to build out the site mockup in cf first) then to migrate that to flex -- i.e. right in line with your suggestions -- so even if there is no "best answer" it's at least good to know I am on the track of an answer ;)

                  BTW, yeah, I've paid out enough of the big bucks to know . . .