[flexcoders] Re: Module blues...am I going crazy??

2009-01-08 Thread Jim Boone
Perhaps. However, I am attempting to use PureMVC multi-core and the
constants I want to use simple define my notification names. Even
thought they are included only in the module code, for some reason the
names are "undefined" when PureMVC attempts to register my commands
when the module PureMVC initializes.  I have found a work around by
placing the notification constants in a common library. It isn't the
best work around, but I need to make some progress.

In the Java world, I am used to getting ClassNotFound exceptions when
messing with class loader and isolation issues (at least Java will
blow chunks if it can't find something verses failing silently). The
only equivalent I can find in AS3 is Application domain. It doesn't
seem to matter if I load the module in the current domain though
(Application.currentDomain). Oh well...any other thoughts? Is this
situation analogous to a Java classloader isolation problem?


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> If the app references a class in a module, it defeats the whole
purpose of modules.  That class will still be linked into the main app.
> 
> Also note that the order that classes get their static initialized
is "random" so be careful if static are anything other than simple values.
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Jim Boone
> Sent: Thursday, January 08, 2009 8:46 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Module blues...am I going crazy??
> 
> 
> Hi,
> 
> I am attempting to convert an app to use modules but I am seeing
> strange behavior. For example, say I have a constant that I refer to
> as (see Constants class below):
> 
> Constants.something
> 
> in my code. You would expect it to resolve to the string "someThing".
> Unfortunately, after being loaded as a module, Constants.something is
> undefined, not "someThing"!! Is there something magic about static
> constants when they are used in modules? Has anyone ever seen this
> issue?
> 
> Jim
> ---
> package blah{
> 
> public class Constants
> {
> public static const something:String = "someThing";
> 
> }
> 
> }
>




[flexcoders] Module blues...am I going crazy??

2009-01-08 Thread Jim Boone
Hi,

I am attempting to convert an app to use modules but I am seeing
strange behavior. For example, say I have a constant that I refer to
as (see Constants class below):

Constants.something

in my code. You would expect it to resolve to the string "someThing".
 Unfortunately, after being loaded as a module, Constants.something is
undefined, not "someThing"!! Is there something magic about static
constants when they are used in modules?  Has anyone ever seen this
issue?  

Jim
---
package blah{

  public class Constants
  {
public static const something:String = "someThing";

  }

}



[flexcoders] Sharing menu and status bar with modules

2008-12-19 Thread Jim Boone
Hi,

Our app has grown to the point that we would like to use modules to
streamline loading, development, etc.  I have created an application
shell that will load my modules as necessary.  The shell contains a
menu bar at the top and a status bar along the bottom.  What I would
like to do is allow each module to integrate with the menu and add
visual components to the status bar.  I envision defining an interface
that all my modules implement like the one below.  The shell would
call the interface methods and insert the components in the
appropriate place when the module is loaded.  From a big picture
perspective this seems reasonable but something tells me it won't work
or I am missing something obvious.  Has anyone done what I am trying
to do and made it work?  Is there a better solution?  This is my first
venture into modules so I know there is much to learn. Any thoughts
and ideas are welcome.


package com.
{
import flash.display.DisplayObject;

/**
 * 
 * @author Jim Boone
 * 
 */
public interface IModuleIntegration
{
function getButtonBarComponent():DisplayObject;

function getMenuItems():XML;

function getStatusBarComponent():DisplayObject;

}
}




[flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Jim Boone
Thank you both for your tips. I think I will just embed the SQL
statements into the application and not go through the hassles that
you both speak of.  I think this will be cleaner from a deployment
perspective.

Jim

--- In flexcoders@yahoogroups.com, "Jim Hayes"  wrote:
>
> If you're using flexbuilder to package, then probably the easiest way is
> to check "copy non embedded files to output folder" in project |
> properties | flex compiler,
> But I find this to be a bit messy at times.
> If not, then you can kind of cheat. When you publish your .air file, it
> will offer you the choice of files to include in the archive.
> If you click "back" at this point then you have the opportunity (outside
> of flexbuilder) to copy any files you need to the "bin-release" folder
> that gets temporarily created as part of the publishing operation. Back
> in flexbuilder, click "next" again and you'll be back in the stage where
> you can specify files to include, but now you'll have the opportunity to
> select the files you just copied to bin-release.
>  
> This, however, gets old pretty quickly! 
>  
> I now have an ant build script that packages everything up for me,
> without having to think / remember to copy certain files.
>  
> I'm not sure if my script is generic enough or even clear enough to be
> much help to anyone though, to be honest I found it quite hard work to
> get it all working from a nil level of ant knowledge/experience.
> If there's anything specific you need to ask on that, however, then I'll
> do my best (Though I'm sure many people on the list are better qualified
> than myself in that respect).
>  
> In regard of copying it over, you'll need to check if the file is there
> when the app starts, and copy it if not. There's not any scripting in
> the Air installer itself.
>  
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jim Boone
> Sent: 15 December 2008 13:36
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: How do I include a file in the AIR app-storage
> directory at install time?
>  
> I read what you say, but I don't know how to do that. How do I include
> it as part of the install? How do I copy it over? Does the AIR install
> include some sort of scripting?
> 
> Also, on doing more research, I have found that it is not wise to
> include files that I am talking about in app-storage and that perhaps
> the user directory is more appropriate.
> 
> http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html
> <http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html> 
> 




[flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Jim Boone
I read what you say, but I don't know how to do that. How do I include
it as part of the install? How do I copy it over? Does the AIR install
include some sort of scripting?

Also, on doing more research, I have found that it is not wise to
include files that I am talking about in app-storage and that perhaps
the user directory is more appropriate.

http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html


--- In flexcoders@yahoogroups.com, "Johannes Nel" 
wrote:
>
> include it in the application directory as part of the instal and
copy it
> over if it does not exist.
> 
> On Mon, Dec 15, 2008 at 5:22 AM, Jim Boone  wrote:
> 
> >   Hi,
> >
> > I am new to AIR and I am writing an application that needs access to a
> > new SQLite database when the user first launches the application. I
> > have considered two options. I could create an empty SQlite database
> > and include it in the app-storage directory when the application
> > installed or I could include an SQL schema file in app-storage and
> > create the database when the user launches the app. Either way, I want
> > to be able to include an file the the application directory at install
> > time. I have researched how to do this with no luck. Does anyone know
> > how I can accomplish this? Thanks!
> >
> > Jim
> >
> >  
> >
> 
> 
> 
> -- 
> j:pn
> \\no comment
>




[flexcoders] How do I include a file in the AIR app-storage directory at install time?

2008-12-14 Thread Jim Boone
Hi,

I am new to AIR and I am writing an application that needs access to a
new SQLite database when the user first launches the application.  I
have considered two options. I could create an empty SQlite database
and include it in the app-storage directory when the application
installed or I could include an SQL schema file in app-storage and
create the database when the user launches the app. Either way, I want
to be able to include an file the the application directory at install
time. I have researched how to do this with no luck. Does anyone know
how I can accomplish this?  Thanks!

Jim



[flexcoders] Re: Determining when a component is visible and not visible to a user

2008-08-26 Thread Jim Boone
Mike,

Good idea.  I am actually using an accordian but I can trigger part 
of my update based on the change event for the accordian. The concept 
is the same.  It will not work for all cases though such as when a 
user moves to another app on his desktop.  This might be when I use 
the deactivate event.  I will continue to chew on it but this is a 
partial solution.  Thank you for you idea!

Jim

--- In flexcoders@yahoogroups.com, "Michael Schmalle" 
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> If you are using a ViewStack subclass, try the 'change' event.
> 
> Mike
> 
> On Tue, Aug 26, 2008 at 9:21 AM, Jim Boone <[EMAIL PROTECTED]> wrote:
> 
> >   I have a use case that sounds simple but I am not certain how 
to code
> > it. The client wants data on the page to refresh periodically and
> > automatically but only if a user is viewing the page that 
displays the
> > data. So if they click on a another tab, the expensive updates 
will
> > stop. If they click back on the tab updates will again initiate. 
The
> > client doesn't want to use messaging since they don't want 
updates to
> > occur unless the user is actually viewing the page.
> >
> > The problem I see is knowing when a component is being displayed 
and
> > when it is not. I have knowledge of the display list and how 
visual
> > components are created etc. but I am by no means a 
Flash/Actionscript
> > expert. I do not know if and what events might be fired to help 
out.
> > I have tried listening for ACTIVATE/DEACTIVATE, RENDER,
> > FOCUS_IN/FOCUS_OUT events but no luck. Is there any way to tell 
when
> > a component is visible/not-visible to a user? Any ideas? Thanks!
> >
> > Jim
> >
> >  
> >
> 
> 
> 
> -- 
> Teoti Graphix, LLC
> http://www.teotigraphix.com
> 
> Teoti Graphix Blog
> http://www.blog.teotigraphix.com
> 
> You can find more by solving the problem then by 'asking the 
question'.
>




[flexcoders] Determining when a component is visible and not visible to a user

2008-08-26 Thread Jim Boone
I have a use case that sounds simple but I am not certain how to code
it. The client wants data on the page to refresh periodically and
automatically but only if a user is viewing the page that displays the
data. So if they click on a another tab, the expensive updates will
stop.  If they click back on the tab updates will again initiate.  The
client doesn't want to use messaging since they don't want updates to
occur unless the user is actually viewing the page.

The problem I see is knowing when a component is being displayed and
when it is not. I have knowledge of the display list and how visual
components are created etc. but I am by no means a Flash/Actionscript
expert.  I do not know if and what events might be fired to help out.
 I have tried listening for ACTIVATE/DEACTIVATE, RENDER,
FOCUS_IN/FOCUS_OUT events but no luck.  Is there any way to tell when
a component is visible/not-visible to a user?  Any ideas? Thanks!

Jim

 



[flexcoders] Re: As3Crypto - Can't read RSA Public Key

2008-07-10 Thread Jim Boone
Alright, I think the mystery is solved.  I did indeed download the 
latest source created a Flex project and imported the source 
directory of that project into the project where my test file was.  
Unfortunately, I forgot to REMOVE the downloaded swc file from the 
lib directory so FB picked up the old library and not the new code. 

So in summury, simply download the latest as3crypto source code and 
compile it with AS3, otherwise, you may have issues.

Jim

--- In flexcoders@yahoogroups.com, "Jim Boone" <[EMAIL PROTECTED]> wrote:
>
> Interesting enough, I was able to make it work as well on another
> machine.  I checked out the latest code from Subversion and copied 
the
> code into a Flex library project then referenced the new library 
swc.
> Everything worked as expected! I will try to use the library swc on
> my other machine to see if it continues to work there. 
> 
> For what it is worth, the checked-out code would not compile in 
AS3. 
> There are many places in the code with int.MAX_VALUE is used as a
> default parameter in a method call.  This must have been OK with 
AS2
> but AS3 chokes.  You will need to replace these variables with the
> actual numbers.
> 
> e.g.
> 
> public function
> bmpString(size:int=int.MAX_VALUE,size2:int=0):BMPStringType {
>   return new BMPStringType(size, size2);
> }
> 
> Thanks for your help Nick.
> 
> Jim
> 
> --- In flexcoders@yahoogroups.com, "Uber_Nick"  
wrote:
> >
> > Hi Jim,
> > 
> > I copied your code into a project and pulled in the latest 
As3Crypto
> > source.  Your project compiled and worked as expected.  I was 
unable
> > to replicate the error, and would assume it's an environment 
issue.
> > 
> > -Nick Matelli
> > 
> > --- In flexcoders@yahoogroups.com, "Jim Boone"  wrote:
> > >
> > > Hi,
> > > 
> > > I posted this on the As3Crypto discussion list but there is 
very
> > > little activity there.  Maybe someone in this group has 
encrypted
> > > something using an RSA public key that they might share.
> > > 
> > > I am trying to read a RSA public key so I can encrypt data in 
my
> > > application. I assembled a test app just to learn how the 
library
> > > works. Unfortunately, I didn't get very far. I get the 
message "I DONT
> > > KNOW HOW TO HANDLE DER stuff of TYPE 1" when I try to run the
> > > following code. I have downloaded the latest source from trunk 
but I
> > > still get the error. I generated the private and public keys 
using
> > > openssl as shown below:
> > > 
> > > openssl genrsa -out private.pem 1024
> > > openssl rsa -in private.pem -pubout -out public.pem
> > > 
> > > Any clue what is happening here?
> > > 
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute" creationComplete="init()">
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ~~~ Error ~~
> > > 
> > > I DONT KNOW HOW TO HANDLE DER stuff of TYPE 1
> > > Error: Error #2030: End of file was encountered.
> > > at flash.utils::ByteArray/readBytes()
> > > at
> > > com.hurlant.util.der::DER$/parse()[C:\flex\crypto_1.3
\com\hurlant
> > > \util\der\DER.as:134]
> > > at com.hurlant.util.der::PEM$/readRSAPublicKey()
[C:\flex
> > > \crypto_1.3\com\hurlant\util\der\PEM.as:84]
> > > at
> > > Test/init()
[C:\flex\workspaces\smtoolsPrototype\Test\src\Test.mxml:
> > > 28]
> > > 
> > > ~Jim
> > >
> >
>




[flexcoders] Re: As3Crypto - Can't read RSA Public Key

2008-07-09 Thread Jim Boone
Interesting enough, I was able to make it work as well on another
machine.  I checked out the latest code from Subversion and copied the
code into a Flex library project then referenced the new library swc.
Everything worked as expected! I will try to use the library swc on
my other machine to see if it continues to work there. 

For what it is worth, the checked-out code would not compile in AS3. 
There are many places in the code with int.MAX_VALUE is used as a
default parameter in a method call.  This must have been OK with AS2
but AS3 chokes.  You will need to replace these variables with the
actual numbers.

e.g.

public function
bmpString(size:int=int.MAX_VALUE,size2:int=0):BMPStringType {
return new BMPStringType(size, size2);
}

Thanks for your help Nick.

Jim

--- In flexcoders@yahoogroups.com, "Uber_Nick" <[EMAIL PROTECTED]> wrote:
>
> Hi Jim,
> 
> I copied your code into a project and pulled in the latest As3Crypto
> source.  Your project compiled and worked as expected.  I was unable
> to replicate the error, and would assume it's an environment issue.
> 
> -Nick Matelli
> 
> --- In flexcoders@yahoogroups.com, "Jim Boone"  wrote:
> >
> > Hi,
> > 
> > I posted this on the As3Crypto discussion list but there is very
> > little activity there.  Maybe someone in this group has encrypted
> > something using an RSA public key that they might share.
> > 
> > I am trying to read a RSA public key so I can encrypt data in my
> > application. I assembled a test app just to learn how the library
> > works. Unfortunately, I didn't get very far. I get the message "I DONT
> > KNOW HOW TO HANDLE DER stuff of TYPE 1" when I try to run the
> > following code. I have downloaded the latest source from trunk but I
> > still get the error. I generated the private and public keys using
> > openssl as shown below:
> > 
> > openssl genrsa -out private.pem 1024
> > openssl rsa -in private.pem -pubout -out public.pem
> > 
> > Any clue what is happening here?
> > 
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute" creationComplete="init()">
> > 
> > 
> > 
> > 
> > 
> > 
> > ~~~ Error ~~
> > 
> > I DONT KNOW HOW TO HANDLE DER stuff of TYPE 1
> > Error: Error #2030: End of file was encountered.
> > at flash.utils::ByteArray/readBytes()
> > at
> > com.hurlant.util.der::DER$/parse()[C:\flex\crypto_1.3\com\hurlant
> > \util\der\DER.as:134]
> > at com.hurlant.util.der::PEM$/readRSAPublicKey()[C:\flex
> > \crypto_1.3\com\hurlant\util\der\PEM.as:84]
> > at
> > Test/init()[C:\flex\workspaces\smtoolsPrototype\Test\src\Test.mxml:
> > 28]
> > 
> > ~Jim
> >
>




[flexcoders] As3Crypto - Can't read RSA Public Key

2008-07-08 Thread Jim Boone
Hi,

I posted this on the As3Crypto discussion list but there is very
little activity there.  Maybe someone in this group has encrypted
something using an RSA public key that they might share.

I am trying to read a RSA public key so I can encrypt data in my
application. I assembled a test app just to learn how the library
works. Unfortunately, I didn't get very far. I get the message "I DONT
KNOW HOW TO HANDLE DER stuff of TYPE 1" when I try to run the
following code. I have downloaded the latest source from trunk but I
still get the error. I generated the private and public keys using
openssl as shown below:

openssl genrsa -out private.pem 1024
openssl rsa -in private.pem -pubout -out public.pem

Any clue what is happening here?


http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="init()">






~~~ Error ~~

I DONT KNOW HOW TO HANDLE DER stuff of TYPE 1
Error: Error #2030: End of file was encountered.
at flash.utils::ByteArray/readBytes()
at
com.hurlant.util.der::DER$/parse()[C:\flex\crypto_1.3\com\hurlant
\util\der\DER.as:134]
at com.hurlant.util.der::PEM$/readRSAPublicKey()[C:\flex
\crypto_1.3\com\hurlant\util\der\PEM.as:84]
at
Test/init()[C:\flex\workspaces\smtoolsPrototype\Test\src\Test.mxml:
28]

~Jim 



[flexcoders] Re: BlazeDS Security Confusion

2008-05-01 Thread Jim Boone
Robert,

Well that certain made it spring to life! Thank you. It now throws an
exception back to the front end with a Client.Authentication faultCode
and faultString = "Login required before authorization can proceed".
The developers doc imply that the browser should pop a login dialog
box, but that isn't happening. I ultimately want to capture the
exception and login in my Flex app anyway. 

server="JBoss" must have worked at one point because I have seen
several references on the web that use it...

--- In flexcoders@yahoogroups.com, "Robert Cadena" <[EMAIL PROTECTED]>
wrote:
>
> try setting "server" to "Tomcat" instead of "JBoss" in your
> services-config.xml > security > login command node?
> 
> /r
> 
> On Thu, May 1, 2008 at 12:50 PM, Jim Boone <[EMAIL PROTECTED]> wrote:
> 
> > Mete,
> >
> > Thank you for the response. Unfortunately, I am still having troubles.
> >
> > I have:
> > * confirmed that the Tomcat Valve is being loaded correctly.
> > * defined the TomcatLoginCommand in services-config.xml (see below).
> > * secured the destination (see remoting-config.xml below).
> > * configured JBoss to use a UsersRolesLoginModule and added the user
> >  and basic_access role (same concept as adding Tomcat users and
> >  roles).
> > * not set any credentials in the Actionscript code.
> > * DID NOT secure the endpoint in the web.xml since your guidance
> >  didn't included it and therefore implies you don't need to.
> >
> > The results?  I was not prompted with the web browser Basic login
> > prompt and the destination was not secured. I could contact the
> > destination even though I was not authenticated. It didn't work!
> > A. Any other thoughts?
> >
> > Jim
> >
> > === services-config.xml ===
> > 
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
> >
> >
> > Basic
> > 
> >basic_access
> >
> >
> >
> >
> > === remoting-config.xml ===
> > 
> >  >class="flex.messaging.services.RemotingService">
> >
> >
> > >
> >  class="flex.messaging.services.remoting.adapters.JavaAdapter"
> >default="true" />
> >
> >
> >
> >
> >
> >
> >
> >
> >ejb
> >dashboard/DataGeneratorBean
> >
> >
> >
> >
> >
> >
> > 
> >
> > --- In flexcoders@yahoogroups.com, "meteatamel"  wrote:
> > >
> > > Hi Jim,
> > >
> > > The short answer is that TomcatLoginCommand uses Tomcat valve to do
> > > its authentication/authorization but here's a writeup I have on
> > > BlazeDS security that should clarify things.
> > >
> > > -Mete
> >
> >
> > 
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > Links
> >
> >
> >
> >
>




[flexcoders] Re: BlazeDS Security Confusion

2008-05-01 Thread Jim Boone
Mete,

Thank you for the response. Unfortunately, I am still having troubles.

I have:
* confirmed that the Tomcat Valve is being loaded correctly. 
* defined the TomcatLoginCommand in services-config.xml (see below).  
* secured the destination (see remoting-config.xml below). 
* configured JBoss to use a UsersRolesLoginModule and added the user
  and basic_access role (same concept as adding Tomcat users and 
  roles).
* not set any credentials in the Actionscript code. 
* DID NOT secure the endpoint in the web.xml since your guidance 
  didn't included it and therefore implies you don't need to. 

The results?  I was not prompted with the web browser Basic login
prompt and the destination was not secured. I could contact the
destination even though I was not authenticated. It didn't work!
A. Any other thoughts?

Jim

=== services-config.xml ===
















Basic

basic_access




=== remoting-config.xml ===













ejb
dashboard/DataGeneratorBean








--- In flexcoders@yahoogroups.com, "meteatamel" <[EMAIL PROTECTED]> wrote:
>
> Hi Jim,
> 
> The short answer is that TomcatLoginCommand uses Tomcat valve to do
> its authentication/authorization but here's a writeup I have on
> BlazeDS security that should clarify things.
> 
> -Mete



[flexcoders] BlazeDS Security Confusion

2008-04-30 Thread Jim Boone
Hi,

I am trying to wrap my brain around the BlazeDS destination security
model. I have read the "Securing destinations" section in the BlazeDS
Developer's Guide about 20 times and I have spent the better part of a
day trying to determine the best way to secure destinations.  I'm sure
it is simple once you know how it all works. Maybe someone can provide
a simple explanation before I bang my head on the wall!  My biggest
question is:

What is the relationship between BlazeDS channel security and J2EE
container managed security? Are they independent, complimentary, or
redundant? 

I am using JBoss and wish to tap into the JBoss security model. The
BlazeDS source code download tells you how to do this in a readme.txt
file. What I am not clear about is what does the Tomcat Valve do? How
is this related to the TomcatLoginCommand that is configured in the
services-config.xml file?  Any insights would be appreciated.  Thanks!

Jim



[flexcoders] Re: Any ideas for a Flex strip chart emulator?

2008-03-27 Thread Jim Boone
Josh,

I was able to make the chart work nicely using a stock LineChart
component and using the cursor from the ICollectionView interface
implementation. I also profiled the code and didn't see any memory
issues (other than what is associated with the ARLabelData class which
is discussed elsewhere). The following are snippets of code that I
used. I hope it helps someone.

// In class definition 
[Bindable]
private var metrics:ArrayCollection;
private var cursor:IViewCursor;
...

// In init function 

// Populate the array with place holder objects
var i:int;
var myArray:Array = new Array(ARRAY_SIZE);
for (i = 0; i < ARRAY_SIZE; i++){
  myArray[i] = new MetricsVO();
}

metrics = new ArrayCollection(myArray);

// Store cursor as an instance variable to minimize memory consumption
cursor = metrics.createCursor();

...

// In callback handler
var msg:AsyncMessage = message.message as AsyncMessage;
var data:MetricsVO = msg.body as MetricsVO; 

// Update chart data provider, remove the oldest and add
// the newest data point
cursor.seek(CursorBookmark.FIRST);
cursor.remove();
cursor.seek(CursorBookmark.LAST,1);
cursor.insert(data);

--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> Just implement IList or ICollectionView or whichever interface is
needed,
> and keep a pointer to the actual data and "start" and "length"
variables,
> and all refresh() when any of those things is updated?
> 
> I assume this would work, but somebody a little more familiar with the
> internals of the iterable interfaces and/or charts might be able to
clarify
> :)
> 
> -J
> 
> On Thu, Mar 27, 2008 at 11:10 AM, Jim Boone <[EMAIL PROTECTED]> wrote:
> 
> >   Josh,
> >
> > Yes I actually have. I haven't tried it yet, but I believe if I
> > initialize the list with a fixed number of entries the X axis delta
> > will remain constant which is required by my application. The only
> > thing that I have not figured out is how to efficiently shift the
> > elements of the array without triggering lots of garbage collections.
> > In the Java world I would use a linked list implementation of a
> > collection. I just need to figure out what that same implementation
> > looks like in ActionScript. Thanks for your your response.
> >
> > Jim
> >
> >
> > --- In flexcoders@yahoogroups.com ,
"Josh
> > McDonald"  wrote:
> > >
> > > Have you considered using some sort of proxy IList that hooks
into your
> > > datastream but only shows the last n rows? That would allow you to
> > use the
> > > various existing chart components.
> > >
> > > -J
> > >
> > > On Fri, Mar 21, 2008 at 10:30 AM, Jim Boone  wrote:
> > >
> > > > I am attempting to write a dashboard application that shows
> > real-time
> > > > dynamic metrics of one of our production applications. I would
like
> > > > to plot parameters on graphs similar to what you see in the
Windows
> > > > task manager under the performance tab (basically an emulation
of a
> > > > moving strip chart). I have considered using the line chart
component
> > > > but it doesn't seem well-suited for showing historical trends.
Does
> > > > anyone have any ideas on how I should tackle this problem?
Thanks in
> > > > advance for your help.
> > > >
> > > > Jim
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > "Therefore, send not to know For whom the bell tolls, It tolls for
> > thee."
> > >
> > > :: Josh 'G-Funk' McDonald
> > > :: 0437 221 380 :: josh@
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls, It tolls for
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>




[flexcoders] Re: Any ideas for a Flex strip chart emulator?

2008-03-26 Thread Jim Boone
Josh,

Yes I actually have.  I haven't tried it yet, but I believe if I
initialize the list with a fixed number of entries the X axis delta
will remain constant which is required by my application. The only
thing that I have not figured out is how to efficiently shift the
elements of the array without triggering lots of garbage collections.
 In the Java world I would use a linked list implementation of a
collection. I just need to figure out what that same implementation
looks like in ActionScript.  Thanks for your your response.

Jim


--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> Have you considered using some sort of proxy IList that hooks into your
> datastream but only shows the last n rows? That would allow you to
use the
> various existing chart components.
> 
> -J
> 
> On Fri, Mar 21, 2008 at 10:30 AM, Jim Boone <[EMAIL PROTECTED]> wrote:
> 
> >   I am attempting to write a dashboard application that shows
real-time
> > dynamic metrics of one of our production applications. I would like
> > to plot parameters on graphs similar to what you see in the Windows
> > task manager under the performance tab (basically an emulation of a
> > moving strip chart). I have considered using the line chart component
> > but it doesn't seem well-suited for showing historical trends. Does
> > anyone have any ideas on how I should tackle this problem? Thanks in
> > advance for your help.
> >
> > Jim
> >
> >  
> >
> 
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls, It tolls for
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>




[flexcoders] Re: sot: java noob, need advice on blazeds app development

2008-03-26 Thread Jim Boone
Derrick,

There is a lot to be said for simplicity in your backend and POJOs are
about as simple as it gets.  However, if your backend code is not
trivial I really recommend using the Spring framework because you gain
so much power with a small investment of book/reading time.  For
example, it is a snap to set up database pools in Spring.  It is also
very simple to integrate Spring with BlazeDS (you can read my blog
post if you wish
(http://jim-boone.com/2008/03/07/converting-from-graniteds-to-blazeds-remoting/).
Spring also plays very nicely with Tomcat so you don't need a Java
application server like Jboss (all the Jboss embeds tomcat as the Web
server).

Spring implements the concept of dependency injection (DI) which to my
knowledge has not caught on in the Flex world yet but I am sure will
very soon. DI allows you to write very clean decoupled code that's
wired together using XML configuration files. There are also
enterprise services you get right out of the box like transactions and
security. Spring is way cool.  Check it out.

Jim

--- In flexcoders@yahoogroups.com, "Derrick Anderson"
<[EMAIL PROTECTED]> wrote:
>
> hi jim, thanks for your response-
> 
> for the first question, i want to save variables on the server
because in my
> application, the database used for all queries is determined at login
> (different clients go to different databases) but it's all the same
client
> code.  when the backend was coldfusion I would just save that datasource
> name in a session variable and use it for my queries.  if i cannot
save to
> the server, i have to pass that variable to all remoteObject
requests so it
> knows what DB to interact with.  that page you sent me looks most
helpful
> for this
> 
> for the framework i was more asking on the java development side of
things.
> i hear people talk about Spring and others, just wondering if I
should be
> using something like that or just writing pojo's.  (i know nothing about
> java frameworks)
> 
> thanks again,
> d.
> 
> 
> 
> 
> 
> On Fri, Mar 21, 2008 at 12:59 PM, Jim Boone <[EMAIL PROTECTED]> wrote:
> 
> >   Derrick,
> >
> > Your correct, this isn't a simple questions.
> >
> > 1) Why do you want to save variables in session on the server when you
> > can save state in your client? If you really have a business need to
> > save session variables, then look in the section titled "Working with
> > session data" in the BlazeDS Developer Guide.
> > (http://livedocs.adobe.com/blazeds/1/blazeds_devguide/) There is a
> > great example of how to write a remote Java object that will give you
> > access to anything in the request/response streams.
> >
> > 2) Working with query result sets? Simple, just create some type of
> > collection with the result set objects. Define an equivalent object on
> > the AS3 side (make sure you include the RemoteObject meta tag on
the AS3
> > object), and let BlazeDS convert the dataobjects to and from AS3
to Java
> >
> > 3) Frameworks are a function of how big the project is and how many
> > folks might be working on it. If it is simple, you don't need a
> > framework. More complex projects can but don't need to. You can use
> > Cairngorm or PureMVC. I have used both and prefer PureMVC for the
> > reasons that the author states on his web site.
> >
> > I know this is only a start but your Qs cover a bunch of ground.
> > Remoting between Flex and Java is almost brain-dead simple primarily
> > because BlazeDS is written in Java and Adobe has abstracted away
all the
> > complexity. Good luck!
> >
> > Jim
> >
> > --- In flexcoders@yahoogroups.com ,
"Derrick
> > Anderson"
> >
> >  wrote:
> > >
> > > hey everyone, i'm switching my server side app from coldfusion to
> > java- i'm
> > > still new to java so i'm looking for some docs or any tips that
cover
> > the
> > > basics:
> > >
> > > 1) sessions/persisting variables between requests to the app server,
> > how do
> > > you handle it? i'm assuming that I might need an application server
> > to
> > > handle that right? My current plan was to just export my java
project
> > to a
> > > JAR- what options do I have for persistence?
> > > 2) working with query resultsets
> > > 3) any particular framework that you develop in that works well with
> > blazeds
> > > (or does it matter)?
> > >
> > >
> > > sorry, i know it's really a java question, but I figure a lot of you
> > have a
> > > java background and might be able to give me some tips on ramping up
> > with
> > > java+flex (i have seen the blazeds turnkey sample apps, so i've seen
> > 1
> > > example of using List to handle query resultsets)
> > >
> > > thanks
> > > d.
> > >
> >
> >  
> >
>




[flexcoders] Re: sot: java noob, need advice on blazeds app development

2008-03-21 Thread Jim Boone
Derrick,

Your correct, this isn't a simple questions.

1) Why do you want to save variables in session on the server when you
can save state in your client?  If you really have a business need to
save session variables, then look in the section titled "Working with
session data" in the BlazeDS Developer Guide. 
(http://livedocs.adobe.com/blazeds/1/blazeds_devguide/)  There is a
great example of how to write a remote Java object that will give you
access to anything in the request/response streams.

2) Working with query result sets? Simple, just create some type of
collection with the result set objects. Define an equivalent object on
the AS3 side (make sure you include the RemoteObject meta tag on the AS3
object), and let BlazeDS convert the dataobjects to and from AS3 to Java

3) Frameworks are a function of how big the project is and how many
folks might be working on it. If it is simple, you don't need a
framework. More complex projects can but don't need to. You can use
Cairngorm or PureMVC.  I have used both and prefer PureMVC for the
reasons that the author states on his web site.

I know this is only a start but your Qs cover a bunch of ground.
Remoting between Flex and Java is almost brain-dead simple primarily
because BlazeDS is written in Java and Adobe has abstracted away all the
complexity.  Good luck!

Jim

--- In flexcoders@yahoogroups.com, "Derrick Anderson"
<[EMAIL PROTECTED]> wrote:
>
> hey everyone,  i'm switching my server side app from coldfusion to
java- i'm
> still new to java so i'm looking for some docs or any tips that cover
the
> basics:
>
> 1) sessions/persisting variables between requests to the app server,
how do
> you handle it?  i'm assuming that I might need an application server
to
> handle that right?  My current plan was to just export my java project
to a
> JAR- what options do I have for persistence?
> 2) working with query resultsets
> 3) any particular framework that you develop in that works well with
blazeds
> (or does it matter)?
>
>
> sorry, i know it's really a java question, but I figure a lot of you
have a
> java background and might be able to give me some tips on ramping up
with
> java+flex  (i have seen the blazeds turnkey sample apps, so i've seen
1
> example of using List to handle query resultsets)
>
> thanks
> d.
>




[flexcoders] Re: Howto build Blazeds sample for websphere

2008-03-12 Thread Jim Boone
If I can paraphrase, I think you are trying to get the sample code to
work with Websphere. I agree that the current distribution of BlazeDS
could use improvement, but it isn't that difficult. I am familiar with
 JBoss, but Websphere is conceptually the same. With JBoss, you could
dump the sample WARs into the deploy directory and you are done
(Tomcat is embedded in JBoss). Point your browser to the web site and
the examples should work. 

Anyway, I am successfully using BlazeDS in a J2EE project.  The
following blog entry provides an overview of how I converted from
GraniteDS to BlazeDS.  It might be useful to you...good luck

http://jim-boone.com/2008/03/07/converting-from-graniteds-to-blazeds-remoting/

Jim


--- In flexcoders@yahoogroups.com, "Joe Gamache" <[EMAIL PROTECTED]> wrote:
>
> Hi - I wish I could post the answer to the subject.  However, I can not.
> The sample is kind of wierd to me.  I would like it to have two
"halves": a
> server half and a client half.   In order to be prudent, expeditious,
> whatever, they seem to have combined everything.   So has anyone
ported this
> to websphere and if so could they take the time to post the
necessary steps
> to do so (successfully).   I have tried and thus far, have not yet
met with
> the results I seek [so ok, I can't say I failed, so what?]
> 
> thanks for any help/insight/suggestions/or best step-by-step directions!
> 
> jpg
>