Re: [flexcoders] Actionscript on JSR223

2009-07-09 Thread Sam Lai
A hack would be to use the GWT code and Flash's ExternalInterface to
validate via the Javascript produced by GWT and loaded in the browser.

I don't know how much you have to commit to GWT before you can use it
though; haven't used it before.

2009/7/10 Sam Lai :
> Doesn't GWT do something similar, converting the necessary Java code
> to Javascript? Maybe that part can be reused as AS code. Granted, you
> will lose the typing in the validation code, but I would presume that
> GWT would've thought about that and mitigated the security issues
> there?
>
> P.S. Silverlight can do this, for obvious reasons.
>
> 2009/7/9 Tom Chiverton :
>>
>>
>> On Wednesday 08 Jul 2009, Tim Rowe wrote:
>>> Does anyone happen to know of any JSR223 (Java platform scripting)
>>> implementation(s) of ActionScript for dynamic use? I'm currently looking
>>> through a lot of our business data validation logic which is implemented
>>> in
>>> two places arguably unnecessarily - both on the front-end in AS and then
>>> again on the back-end in Java.
>>
>> Isn't that a good idea ? In theory anyone could write a replacement
>> front-end
>> and call your services, so you should validate the business rules there. At
>> the same time, you don't want to round-trip to provide feedback to the user,
>> so the rules have to be in the front end too.
>> I would argue the front end rules would be more relaxed, and probably not
>> aware of the full security context, however.
>>
>> --
>> Helping to assertively cultivate high-end wireless intuitive models as part
>> of
>> the IT team of the year, '09 and '08
>>
>> 
>>
>> This email is sent for and on behalf of Halliwells LLP.
>>
>> Halliwells LLP is a limited liability partnership registered in England and
>> Wales under registered number OC307980 whose registered office address is at
>> Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list
>> of members is available for inspection at the registered office together
>> with a list of those non members who are referred to as partners. We use the
>> word ?partner? to refer to a member of the LLP, or an employee or consultant
>> with equivalent standing and qualifications. Regulated by the Solicitors
>> Regulation Authority.
>>
>> CONFIDENTIALITY
>>
>> This email is intended only for the use of the addressee named above and may
>> be confidential or legally privileged. If you are not the addressee you must
>> not read it and must not use any information contained in nor copy it nor
>> inform any person other than Halliwells LLP or the addressee of its
>> existence or contents. If you have received this email in error please
>> delete it and notify Halliwells LLP IT Department on 0870 365 2500.
>>
>> For more information about Halliwells LLP visit www.Halliwells.com.
>>
>> 
>


Re: [flexcoders] Actionscript on JSR223

2009-07-09 Thread Sam Lai
Doesn't GWT do something similar, converting the necessary Java code
to Javascript? Maybe that part can be reused as AS code. Granted, you
will lose the typing in the validation code, but I would presume that
GWT would've thought about that and mitigated the security issues
there?

P.S. Silverlight can do this, for obvious reasons.

2009/7/9 Tom Chiverton :
>
>
> On Wednesday 08 Jul 2009, Tim Rowe wrote:
>> Does anyone happen to know of any JSR223 (Java platform scripting)
>> implementation(s) of ActionScript for dynamic use? I'm currently looking
>> through a lot of our business data validation logic which is implemented
>> in
>> two places arguably unnecessarily - both on the front-end in AS and then
>> again on the back-end in Java.
>
> Isn't that a good idea ? In theory anyone could write a replacement
> front-end
> and call your services, so you should validate the business rules there. At
> the same time, you don't want to round-trip to provide feedback to the user,
> so the rules have to be in the front end too.
> I would argue the front end rules would be more relaxed, and probably not
> aware of the full security context, however.
>
> --
> Helping to assertively cultivate high-end wireless intuitive models as part
> of
> the IT team of the year, '09 and '08
>
> 
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England and
> Wales under registered number OC307980 whose registered office address is at
> Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list
> of members is available for inspection at the registered office together
> with a list of those non members who are referred to as partners. We use the
> word ?partner? to refer to a member of the LLP, or an employee or consultant
> with equivalent standing and qualifications. Regulated by the Solicitors
> Regulation Authority.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and may
> be confidential or legally privileged. If you are not the addressee you must
> not read it and must not use any information contained in nor copy it nor
> inform any person other than Halliwells LLP or the addressee of its
> existence or contents. If you have received this email in error please
> delete it and notify Halliwells LLP IT Department on 0870 365 2500.
>
> For more information about Halliwells LLP visit www.Halliwells.com.
>
> 


Re: [flexcoders] Actionscript on JSR223

2009-07-09 Thread Tom Chiverton
On Wednesday 08 Jul 2009, Tim Rowe wrote:
> Does anyone happen to know of any JSR223 (Java platform scripting)
> implementation(s) of ActionScript for dynamic use?  I'm currently looking
> through a lot of our business data validation logic which is implemented in
> two places arguably unnecessarily - both on the front-end in AS and then
> again on the back-end in Java. 

Isn't that a good idea ? In theory anyone could write a replacement front-end 
and call your services, so you should validate the business rules there. At 
the same time, you don't want to round-trip to provide feedback to the user, 
so the rules have to be in the front end too.
I would argue the front end rules would be more relaxed, and probably not 
aware of the full security context, however.

-- 
Helping to assertively cultivate high-end wireless intuitive models as part of 
the IT team of the year, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

[flexcoders] Actionscript on JSR223

2009-07-07 Thread Tim Rowe
Does anyone happen to know of any JSR223 (Java platform scripting) 
implementation(s) of ActionScript for dynamic use?  I'm currently looking 
through a lot of our business data validation logic which is implemented in two 
places arguably unnecessarily - both on the front-end in AS and then again on 
the back-end in Java.  The scripting.dev.java.net project page still seems to 
be absent of any AS interpreters.

It would seem far more logical to be able to just implement this once in a 
single language.  Two options I can see are using a Java->AS convertor, or to 
write this all in AS and validate the data again on the back-end against the 
same code.  The latter would be preferable, mostly due to the stigma around 
here about generated code.
Though much of this code might work as javascript if we dropped the typing on 
data, that's far from an ideal solution.

Any project suggestions here would be appreciated.

Thanks,

Tim Rowe
Software Engineer
carsales.com Ltd

Level 1, 109 Burwood Road
Locked Bag 
Hawthorn VIC 3211

t: 03 9093 8600 (Reception)
t: 03 9093 8757 (Direct)
f: 03 9093 8697