A more FLEXible COV - VMS

This is a discussion on A more FLEXible COV - VMS ; Hi, I've finally started playing with this Adobe Flex stuff and can't believe how easy it is! Now, you may recall, JFP promised his source code (when he gets around to it) and there is an absolute plethora of examples ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: A more FLEXible COV

  1. A more FLEXible COV

    Hi,

    I've finally started playing with this Adobe Flex stuff and can't believe
    how easy it is!

    Now, you may recall, JFP promised his source code (when he gets around to
    it) and there is an absolute plethora of examples and tutorials on Adobe's
    Flex SDK and FlexBuilder web pages, but I fear that most, if not all, of
    these examples with concentrate on http-based servers sending XML down the
    line to stand-alone AIR applications or browsers where the SWF owns the
    whole page. (Which is fine if you like that sort of thing :-)

    What I wish to accomplish here, with this post, is a whetting of your
    appetites for a slight variation on this theme; a pleasant and extremely
    flexible alternative, where your standard html mark-up and JavaScript
    continue to control the outer page while the SWF Flex Application is
    confined to as much or as little of the on-screen real-estate as you desire.
    Adobe's FABridge is employed so as to expose all of the mxml components and
    classes to your JavaScript, and alternatively your JavaScript to your
    ActionScript.

    Anyway, attached below is some code I've been playing around with. It's
    basically a cut-down version of the FABridge example (little steps :-) with
    a pie-graph from the Flex DashBoard example. (The declaring of arbitrary
    events and the handling of two-dimensional drill-down still being looked at
    :-)

    For a pretty good Flex charting example see: -
    http://www.adobe.com/devnet/flex/samples/dashboard/
    For information on the FABridge see: -
    http://labs.adobe.com/wiki/index.php...ework:FABridge

    So do yourself a favour. When you come out of church this Sunday and are
    thinking about checking out what beer gardens have opened, or on Monday when
    you look out the window and think of scooting off to Kaprun for a quick ski
    followed by a lazy afternoon around the lake at Zell am See, may I suggest
    that instead you download the Flex Builder & SDK and spend the day getting
    an application up and running. (Don't get me wrong, Perth's still a great
    outdoor place to raise a family and has the best climate in the world, but
    if it was any more boring I'd explode! :-)

    Download the 60 day Flex Builder trial version from
    http://www.adobe.com/products/flex/ then load up the 3 tiny source files
    below into a project and see how easy it is to get (an albeit very basic)
    example up and running. (I exported the Example.html and BridgeTest.swf
    files to /inetpub/wwwroot/ and place the required FABridge.js file below at
    BridgeExample/javascript/ )

    So what has any of this got to do with VMS? Well the only mental gymnastics
    I ask of you is the ability to look at the hard-coded population of the
    employeesFeed in the loadEmployees JS function and imagine instead that the
    employee data is coming down a Tier3 Socket from your VMS 3GL code. (Such as
    in the example demo_client_web.html at
    http://manson.vistech.net/t3$examples/ ) It's not really a hop skip and a
    jump is it? More later. . .

    Cheers Richard Maher

    PS. You'd like to see an employees salary_history by department via COBOL
    from an Rdb database in that pie-graph from the TestDrive cluster now
    wouldn't you?

    Example.html (The addInitialization callback is important)
    ==========

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



    Testing Flex-AJAX Bridge










      


    Trace Output:















    BridgeTest.mxml
    ============


    height="500" width="450" initialize="doInit();">


    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.charts.HitData;
    [Bindable]
    public var employeeFeed:ArrayCollection = new ArrayCollection();
    private function doInit():void
    {
    employeeFeed.addItem({Name:"Joe", Value:10});
    employeeFeed.addItem({Name:"Tom", Value:1});
    employeeFeed.addItem({Name:"Dick", Value:6});
    employeeFeed.addItem({Name:"Harry",Value:44});
    }
    public function flexAlert(msg:String = "defaultParam" ):void
    {
    Alert.show(msg);
    }
    private function amountFormat(item:Object, column:Object):String
    {
    return nf.format(item[column.dataField]);
    }
    private function getSliceLabel(item:Object, arg2:String, arg3:Number,
    arg4:Number):String
    {
    return item==null?"":item.Name;
    }
    private function formatDataTip(hitData:HitData):String
    {
    var name:String = hitData.item.Name;
    var value:Number = hitData.item.Value;
    return "Name: "+name+"
    Value: "+nf.format(value);
    }
    ]]>



    paddingTop="20" >


    Breakdown of employee salaries by department.


    showDataTips="true" dataTipFunction="formatDataTip">

    field="Value"
    labelPosition="callout" labelFunction="getSliceLabel"
    showDataEffect="{carousel}" />


    ataGrid
    dataProvider="{employeeFeed}"
    x="80" y="141" width="262" height="92" id="employeeList" editable="false"
    enabled="true">

    ataGridColumn headerText="Name" dataField="Name" />
    ataGridColumn headerText="Value" dataField="Value"
    labelFunction="amountFormat" />

    ataGrid>




    BridgeScript.as (Bare bones stuff)
    ===========

    // ActionScript to test out FABridge
    package {
    import flash.display.MovieClip;
    import bridge.FABridge;
    public class BridgeScript extends MovieClip {
    private var externalBridge:FABridge;
    public function BridgeScript() {
    super();
    externalBridge = new FABridge();
    externalBridge.rootObject = this;
    }
    }
    }




  2. RE: A more FLEXible COV


    > I've finally started playing with this Adobe Flex
    > stuff and can't believe how easy it is!


    Agreed, I started playing with it the other week and it was very easy to
    take the SHOW SYSTEM code out of the PHP_OPENVMS.PHP and display it in a
    DataGrid. Now I am playing with a program that dumps out the ACCOUNTNG.DAT
    and displaying a summary in a DataGrid and switching to a detailed page. The
    DataGrid is limited to 5000 rows though so that is a bit of a problem, but
    it is fun playing with it when I have a few minutes here and a few minutes
    there.

    Peter Weaver
    www.weaverconsulting.ca
    CHARON-VAX CHARON-AXP DataStream Reflection PreciseMail HP Commercial
    Hardware


  3. Re: A more FLEXible COV

    Hi Peter,

    > The
    > DataGrid is limited to 5000 rows though so that is a bit of a problem,


    Stuffed if I know why that is; any ideas? It's certainly ugly. (Although
    given the historically bollocks ACMS workspace-size restrictions, and my
    experiences with many DECforms applications, I don't think the VMS user-base
    will feel deprived :-)

    I assume it's a DataGrid-specific limit and not a DataProvider or
    ArrayCollection limit? A pie-chart can reference millions of rows, but a
    datagrid is stuck at 5K?

    With the FABridge you can always stick to JavaScript DOM where there is no
    such limit on list . (But
    > it's a real performance pain to tear-down a big array unless
    > you use node-cloning. See the Tier3 Queue Lookup example for
    more.)
    >
    > > but
    > > it is fun playing with it when I have a few minutes here and

    a few
    > > minutes

    >
    > Fun for playing, but you don't see it as a viable tool for
    > VMS GUI delivery because. . . Or you recommend product XYZ

    instead?

    "Playing" because my business is more System Management than
    programming. I occasionally help maintain code, but it has been a
    long time since I built anything from scratch. That is why I am
    looking at building something to look at the ACCOUNTNG.DAT
    records, if that works out I may do something to look at the
    Audit File. Also playing just because it is fun to show people
    that these things do work with VMS. When I first setup my website
    one of my customers who had been working with VMS for 23 years
    said "This can't be on VMS, it has pictures and colours." I still
    get people downloading my DCL/SVG Bar Graph and Pie Chart stuff
    that I posted here almost 2 years ago, I imagine people are
    downloading it just to show someone else that it is possible.

    Peter Weaver
    www.weaverconsulting.ca
    CHARON-VAX CHARON-AXP DataStream Reflection PreciseMail HP
    Commercial Hardware


+ Reply to Thread