Because, doing GUI code in Flash sux.  Dare you to use Flash for 6 years 
doing GUI development, and THEN ask the same questions.

You can do layout in Flash via dragging form elements, but:
1. you run into initialization challenges which complicate your coding & 
elongate debugging
2. layout changes break existing code
3. preventing #1, and allowing for more fluid positioning of components, you 
create things dynamically.  Suddenly you're doing layout with code...??? 
"Nope... needs to come over 4 pixels, let me recompile."  Huh?  Photoshop 
users would blow their brains out... I just use beer to compensate.  3 weeks 
out of a 2 month project is spent writing & tweaking draw and size 
functions...wtf?  And you still cannot justify Flex's cost to benefit ratio?

I've heard the same analogy talking to a Java developer I used to work with, 
about how JSP tags weren't ever really used a lot, and people ended up just 
coding the things anyway.

However, Flex has something JSP does not: the capability to do a good GUI, 
one that is rich, interactive, stateful, integrates easily with the backend, 
and makes AJAX look like the hack it is.

I don't really share your concerns, though.  When I first started coding 
Flex, I thought the concept of using tags was disgusting.  I came from a 
Flash background, not an Enterprise, JSP one.  However, I've come to learn 
how powerful they are, mainly for laying out a GUI's that "seperation 
presentation from business logic."  It's so frikin' cheese but man it's 
true.

However, I've always loved and felt comfortable doing logic in code, just 
like in Flash.  However, MXML is only v1.  I'm sure as it matures, so too 
will my willingness to start doing some of the more data orienated aspects 
of it in tags vs. code, which helps signifinately if your GUI helps support 
those practices, some of which FlexBuilder does.



----- Original Message ----- 
From: "Dave Wolf" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, October 11, 2005 5:54 PM
Subject: [flexcoders] Re: WebServices via ActionScript


I may be out of the loop because I couldnt see which thread you broke
from but....

You can turn on the keep-generated to keep the generated AS from a
<mx:WebService> call to prove its possible as well.  Since at runtime
the J2EE Servlet Filter is generating AS from the <mx:*> tags pretty
much anything you can do in a tag you can do in AS right?

The real question is why?  You used to see this in JSP development a
lot (Since JSP is a nearly direct analog to Flex) in that JSP
developers would just make huge scriplet sections and do everything in
Java. Eventually it reached the point that why not just write a darn
servlet.  Since at runtime the JSP is just codegenerated to java and a
servlet runs.

Flex is the same right.  The MXML is code generated in AS.  I worry
about Flex ending up like JSPs with huge script sections and wondering
why you didnt just use Flash itself.



Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY x85


--- In [email protected], "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> Starting a new thread since we hijacked the other one.
>
> I tested this and it works in Flex 1.5 and Flash 8.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
>  initialize="getFunky()">
>  <mx:Script>
>  <![CDATA[
>
>  import mx.services.WebService;
>  import mx.services.PendingCall;
>
>  var myWebServiceObject:WebService;
>  var MyPendingCallObject:PendingCall;
>
>
>  public var debug_str:String = "";
>
>  function getFunky()
>  {
>   d("WebService: " + WebService);
>   var theURL = "http://radio.tapper.net/artist.cfc?wsdl";;
>   myWebServiceObject = new WebService(theURL);
>   MyPendingCallObject = myWebServiceObject.getCurrentSong();
>   d("Made call...");
>   MyPendingCallObject.onResult = function(result)
>   {
>    mx.core.Application.application.d("result: " + result);
>    for(var p in result)
>    {
>     mx.core.Application.application.d(p + ": " + result[p]);
>    }
>   }
>   MyPendingCallObject.onFault = function(fault)
>   {
>    mx.core.Application.application.d("fault: " + fault);
>    for(var p in fault)
>    {
>     mx.core.Application.application.d(p + ": " + fault[p]);
>    }
>   }
>  }
>
>  function d(o)
>  {
>   debug_str += o + "\n";
>  }
>
>
>  ]]>
>  </mx:Script>
>
>  <mx:TextArea text="{debug_str}" width="400" height="300" />
> </mx:Application>
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to