Best way to make Flash communicate with MySQL ?

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Best way to make Flash communicate with MySQL ?

Kévin STRUILLOU
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
If you want to access a database directly from Flash, check out
www.apstrata.com

Lee




Kévin STRUILLOU wrote:
> Hi,
>
> I'm looking for a better solution than posting a request with a
> flash.net.URLLoader to a neko page and waiting for the results
> Any idea ?
>
> How about a flash.db package ? :D
>
> Kévin


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Best way to make Flash communicate with MySQL ?

Blue Sans douze
In reply to this post by Kévin STRUILLOU
Hi.

Maybe using socket would be faster, but it needs you to have a socket server.

Calling directly a mysql database with flash would be unsafe, because your password would be optainable for anyone who uses your flash application.

--Blue112

2009/6/9 Kévin STRUILLOU <[hidden email]>
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Tony Polinelli-2
Have you looked into haxe remoting- it is much better than a URLRequest call (and sending back xml or the like)

http://haxe.org/doc/remoting



On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze <[hidden email]> wrote:
Hi.

Maybe using socket would be faster, but it needs you to have a socket server.

Calling directly a mysql database with flash would be unsafe, because your password would be optainable for anyone who uses your flash application.

--Blue112

2009/6/9 Kévin STRUILLOU <[hidden email]>
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--

haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Kévin STRUILLOU
Maybe http://haxe.org/doc/remoting/flash_amf will be a good start.
Thank you all, I'll take a look at this.

Kévin


On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli <[hidden email]> wrote:
Have you looked into haxe remoting- it is much better than a URLRequest call (and sending back xml or the like)

http://haxe.org/doc/remoting




On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze <[hidden email]> wrote:
Hi.

Maybe using socket would be faster, but it needs you to have a socket server.

Calling directly a mysql database with flash would be unsafe, because your password would be optainable for anyone who uses your flash application.

--Blue112

2009/6/9 Kévin STRUILLOU <[hidden email]>
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--

haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Kévin STRUILLOU
Ok, it seems http://haxe.org/doc/remoting/client_server will be my starting point.

I want to reuse my neko SPOD objects in Flash.
Is there a way to do this ?
Maybe with some kind of conditional compiling ?
Can the data returned to Flash be casted into some "SPOD like" class ?

Thanks again,

Kévin


On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU <[hidden email]> wrote:
Maybe http://haxe.org/doc/remoting/flash_amf will be a good start.
Thank you all, I'll take a look at this.

Kévin


On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli <[hidden email]> wrote:
Have you looked into haxe remoting- it is much better than a URLRequest call (and sending back xml or the like)

http://haxe.org/doc/remoting




On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze <[hidden email]> wrote:
Hi.

Maybe using socket would be faster, but it needs you to have a socket server.

Calling directly a mysql database with flash would be unsafe, because your password would be optainable for anyone who uses your flash application.

--Blue112

2009/6/9 Kévin STRUILLOU <[hidden email]>
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--

haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

laurence taylor

class SpecificObject #if neko extends neko.db.Object #end

would that work?

On Wed, Jun 10, 2009 at 10:18 AM, Kévin STRUILLOU <[hidden email]> wrote:
Ok, it seems http://haxe.org/doc/remoting/client_server will be my starting point.

I want to reuse my neko SPOD objects in Flash.
Is there a way to do this ?
Maybe with some kind of conditional compiling ?
Can the data returned to Flash be casted into some "SPOD like" class ?

Thanks again,

Kévin


On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU <[hidden email]> wrote:
Maybe http://haxe.org/doc/remoting/flash_amf will be a good start.
Thank you all, I'll take a look at this.

Kévin


On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli <[hidden email]> wrote:
Have you looked into haxe remoting- it is much better than a URLRequest call (and sending back xml or the like)

http://haxe.org/doc/remoting




On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze <[hidden email]> wrote:
Hi.

Maybe using socket would be faster, but it needs you to have a socket server.

Calling directly a mysql database with flash would be unsafe, because your password would be optainable for anyone who uses your flash application.

--Blue112

2009/6/9 Kévin STRUILLOU <[hidden email]>
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--

haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
In reply to this post by Kévin STRUILLOU
Hey Kevin,

I'm currently working on a layer for Flash for SPOD integration.
Essentially, the SPOD objects will be usable in both Flash and PHP /
Neko and you'd use the SPOD objects in Flash as you would on the server.
However, when accessed in Flash, the Flash/SPOD layer will use remoting
to call down to the server to make the actual updates.

It's a long way from completion, but that's my goal.

Lee



Kévin STRUILLOU wrote:

> Ok, it seems http://haxe.org/doc/remoting/client_server will be my
> starting point.
>
> I want to reuse my neko SPOD objects in Flash.
> Is there a way to do this ?
> Maybe with some kind of conditional compiling ?
> Can the data returned to Flash be casted into some "SPOD like" class ?
>
> Thanks again,
>
> Kévin
>
>
> On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Maybe http://haxe.org/doc/remoting/flash_amf will be a good start.
>     Thank you all, I'll take a look at this.
>
>     Kévin
>
>
>     On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Have you looked into haxe remoting- it is much better than a
>         URLRequest call (and sending back xml or the like)
>
>         http://haxe.org/doc/remoting
>
>
>
>
>         On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze
>         <[hidden email] <mailto:[hidden email]>> wrote:
>
>             Hi.
>
>             Maybe using socket would be faster, but it needs you to
>             have a socket server.
>
>             Calling directly a mysql database with flash would be
>             unsafe, because your password would be optainable for
>             anyone who uses your flash application.
>
>             --Blue112
>
>             2009/6/9 Kévin STRUILLOU <[hidden email]
>             <mailto:[hidden email]>>
>
>                 Hi,
>
>                 I'm looking for a better solution than posting a
>                 request with a flash.net.URLLoader to a neko page and
>                 waiting for the results
>                 Any idea ?
>
>                 How about a flash.db package ? :D
>
>                 Kévin
>
>                 --
>
>                 haXe - an open source web programming language
>                 http://haxe.org
>
>
>
>             --
>             haXe - an open source web programming language
>             http://haxe.org
>
>
>
>
>         --
>         Tony Polinelli
>         http://touchmypixel.com
>
>         --
>         haXe - an open source web programming language
>         http://haxe.org
>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
In reply to this post by laurence taylor
(OP: gmail account freezed, answering from the account of a colleague)

Thanks Laurence, that answers to my two first questions: on the server side, they are compiled as "spod extended" classes, on the client side, as "non-spod" classes.
I'm still looking for an answer to the third: on the client side, when I receive data through remoting, this data is actually representing the server side classes ("spod extended" ones), how can they be automatically cast in the "non-spod" class on the client?
I mean I suppose I'll get an array of floats, string, ints, bools, etc., but in the end, I want an instance of the non-spod class having theses built-ins as values. So implementing a couple "serialize/unserialize" function on each and every non spod class might be a way, but I was hoping there might be some more automatic (and elegant) way of doing this?

Kévin & Laurent


2009/6/10 laurence taylor <[hidden email]>

class SpecificObject #if neko extends neko.db.Object #end

would that work?


On Wed, Jun 10, 2009 at 10:18 AM, Kévin STRUILLOU <[hidden email]> wrote:
Ok, it seems http://haxe.org/doc/remoting/client_server will be my starting point.

I want to reuse my neko SPOD objects in Flash.
Is there a way to do this ?
Maybe with some kind of conditional compiling ?
Can the data returned to Flash be casted into some "SPOD like" class ?

Thanks again,

Kévin


On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU <[hidden email]> wrote:
Maybe http://haxe.org/doc/remoting/flash_amf will be a good start.
Thank you all, I'll take a look at this.

Kévin


On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli <[hidden email]> wrote:
Have you looked into haxe remoting- it is much better than a URLRequest call (and sending back xml or the like)

http://haxe.org/doc/remoting




On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze <[hidden email]> wrote:
Hi.

Maybe using socket would be faster, but it needs you to have a socket server.

Calling directly a mysql database with flash would be unsafe, because your password would be optainable for anyone who uses your flash application.

--Blue112

2009/6/9 Kévin STRUILLOU <[hidden email]>
Hi,

I'm looking for a better solution than posting a request with a flash.net.URLLoader to a neko page and waiting for the results
Any idea ?

How about a flash.db package ? :D

Kévin

--

haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
In reply to this post by Lee Sylvester
Hi Lee,

what is the alternative way of doing this at this time?
is there a way we could help you finish things faster?

Cheers,
Signature Laurent Auneau Laurent Auneau - CEO
Succubus
Viadeo Linkedin Plaxo


2009/6/10 Lee McColl Sylvester <[hidden email]>
Hey Kevin,

I'm currently working on a layer for Flash for SPOD integration. Essentially, the SPOD objects will be usable in both Flash and PHP / Neko and you'd use the SPOD objects in Flash as you would on the server. However, when accessed in Flash, the Flash/SPOD layer will use remoting to call down to the server to make the actual updates.

It's a long way from completion, but that's my goal.

Lee



Kévin STRUILLOU wrote:
Ok, it seems http://haxe.org/doc/remoting/client_server will be my starting point.

I want to reuse my neko SPOD objects in Flash.
Is there a way to do this ?
Maybe with some kind of conditional compiling ?
Can the data returned to Flash be casted into some "SPOD like" class ?

Thanks again,

Kévin


On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU <[hidden email] <mailto:[hidden email]>> wrote:

   Maybe http://haxe.org/doc/remoting/flash_amf will be a good start.
   Thank you all, I'll take a look at this.

   Kévin


   On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
   <[hidden email] <mailto:[hidden email]>> wrote:

       Have you looked into haxe remoting- it is much better than a
       URLRequest call (and sending back xml or the like)

       http://haxe.org/doc/remoting




       On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze
       <[hidden email] <mailto:[hidden email]>> wrote:

           Hi.

           Maybe using socket would be faster, but it needs you to
           have a socket server.

           Calling directly a mysql database with flash would be
           unsafe, because your password would be optainable for
           anyone who uses your flash application.

           --Blue112

           2009/6/9 Kévin STRUILLOU <[hidden email]
           <mailto:[hidden email]>>


               Hi,

               I'm looking for a better solution than posting a
               request with a flash.net.URLLoader to a neko page and
               waiting for the results
               Any idea ?

               How about a flash.db package ? :D

               Kévin

               --
               haXe - an open source web programming language
               http://haxe.org



           --
           haXe - an open source web programming language
           http://haxe.org




       --        Tony Polinelli
       http://touchmypixel.com

       --
       haXe - an open source web programming language
       http://haxe.org





--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
You could write it for me ;-)

Seriously, though, I'm still in the planning phase for this project.
I'll let you know when I have something worth looking at.

Best,
Lee




Laurent Auneau wrote:

> Hi Lee,
>
> what is the alternative way of doing this at this time?
> is there a way we could help you finish things faster?
>
> Cheers,
>
>     Laurent Auneau - CEO
>     Succubus <http://www.succubus.fr/>
>     Viadeo
>     <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq> Linkedin
>     <http://www.linkedin.com/in/laurentauneau> Plaxo
>     <http://laurentauneau.myplaxo.com/>
>
>
>
> 2009/6/10 Lee McColl Sylvester <[hidden email]
> <mailto:[hidden email]>>
>
>     Hey Kevin,
>
>     I'm currently working on a layer for Flash for SPOD integration.
>     Essentially, the SPOD objects will be usable in both Flash and PHP
>     / Neko and you'd use the SPOD objects in Flash as you would on the
>     server. However, when accessed in Flash, the Flash/SPOD layer will
>     use remoting to call down to the server to make the actual updates.
>
>     It's a long way from completion, but that's my goal.
>
>     Lee
>
>
>
>     Kévin STRUILLOU wrote:
>
>         Ok, it seems http://haxe.org/doc/remoting/client_server will
>         be my starting point.
>
>         I want to reuse my neko SPOD objects in Flash.
>         Is there a way to do this ?
>         Maybe with some kind of conditional compiling ?
>         Can the data returned to Flash be casted into some "SPOD like"
>         class ?
>
>         Thanks again,
>
>         Kévin
>
>
>         On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>>
>         wrote:
>
>            Maybe http://haxe.org/doc/remoting/flash_amf will be a good
>         start.
>            Thank you all, I'll take a look at this.
>
>            Kévin
>
>
>            On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
>            <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>                Have you looked into haxe remoting- it is much better
>         than a
>                URLRequest call (and sending back xml or the like)
>
>                http://haxe.org/doc/remoting
>
>
>
>
>                On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze
>                <[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>                    Hi.
>
>                    Maybe using socket would be faster, but it needs you to
>                    have a socket server.
>
>                    Calling directly a mysql database with flash would be
>                    unsafe, because your password would be optainable for
>                    anyone who uses your flash application.
>
>                    --Blue112
>
>                    2009/6/9 Kévin STRUILLOU <[hidden email]
>         <mailto:[hidden email]>
>                    <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>
>                        Hi,
>
>                        I'm looking for a better solution than posting a
>                        request with a flash.net.URLLoader to a neko
>         page and
>                        waiting for the results
>                        Any idea ?
>
>                        How about a flash.db package ? :D
>
>                        Kévin
>
>                        --
>                        haXe - an open source web programming language
>                        http://haxe.org
>
>
>
>                    --
>                    haXe - an open source web programming language
>                    http://haxe.org
>
>
>
>
>                --        Tony Polinelli
>                http://touchmypixel.com
>
>                --
>                haXe - an open source web programming language
>                http://haxe.org
>
>
>
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
I was rather thinking of writing it with you, but yes, that was the point. And we are actually several people here that could speed things up if it meets our needs.
Still, you didn't answer my first question about the way of doing without (for today)?

Laurent


2009/6/10 Lee McColl Sylvester <[hidden email]>
You could write it for me ;-)

Seriously, though, I'm still in the planning phase for this project. I'll let you know when I have something worth looking at.

Best,
Lee




Laurent Auneau wrote:
Hi Lee,

what is the alternative way of doing this at this time?
is there a way we could help you finish things faster?

Cheers,

   Laurent Auneau - CEO
   Succubus <http://www.succubus.fr/>
   Viadeo
   <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq> Linkedin
   <http://www.linkedin.com/in/laurentauneau> Plaxo
   <http://laurentauneau.myplaxo.com/>


2009/6/10 Lee McColl Sylvester <[hidden email] <mailto:[hidden email]>>


   Hey Kevin,

   I'm currently working on a layer for Flash for SPOD integration.
   Essentially, the SPOD objects will be usable in both Flash and PHP
   / Neko and you'd use the SPOD objects in Flash as you would on the
   server. However, when accessed in Flash, the Flash/SPOD layer will
   use remoting to call down to the server to make the actual updates.

   It's a long way from completion, but that's my goal.

   Lee



   Kévin STRUILLOU wrote:

       Ok, it seems http://haxe.org/doc/remoting/client_server will
       be my starting point.

       I want to reuse my neko SPOD objects in Flash.
       Is there a way to do this ?
       Maybe with some kind of conditional compiling ?
       Can the data returned to Flash be casted into some "SPOD like"
       class ?

       Thanks again,

       Kévin


       On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU
       <[hidden email] <mailto:[hidden email]>
       <mailto:[hidden email] <mailto:[hidden email]>>>

       wrote:

          Maybe http://haxe.org/doc/remoting/flash_amf will be a good
       start.
          Thank you all, I'll take a look at this.

          Kévin


          On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
          <[hidden email] <mailto:[hidden email]>
       <mailto:[hidden email]

       <mailto:[hidden email]>>> wrote:

              Have you looked into haxe remoting- it is much better
       than a
              URLRequest call (and sending back xml or the like)

              http://haxe.org/doc/remoting




              On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze
              <[hidden email]
       <mailto:[hidden email]>
       <mailto:[hidden email]

       <mailto:[hidden email]>>> wrote:

                  Hi.

                  Maybe using socket would be faster, but it needs you to
                  have a socket server.

                  Calling directly a mysql database with flash would be
                  unsafe, because your password would be optainable for
                  anyone who uses your flash application.

                  --Blue112

                  2009/6/9 Kévin STRUILLOU <[hidden email]
       <mailto:[hidden email]>
                  <mailto:[hidden email]

       <mailto:[hidden email]>>>


                      Hi,

                      I'm looking for a better solution than posting a
                      request with a flash.net.URLLoader to a neko
       page and
                      waiting for the results
                      Any idea ?

                      How about a flash.db package ? :D

                      Kévin

                      --
                      haXe - an open source web programming language
                      http://haxe.org



                  --
                  haXe - an open source web programming language
                  http://haxe.org




              --        Tony Polinelli
              http://touchmypixel.com

              --
              haXe - an open source web programming language
              http://haxe.org





   --    haXe - an open source web programming language
   http://haxe.org




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
The quickest way to get this working is to first take that from the SPOD
classes which is easily serialized and make that your value objects.
Thus, the column data for SPOD objects can be you value objects and can
be reusable in Flash and Neko / PHP. On the server side, each vo will
need to be backed by a custom neko/php.db.Object to handle references to
the manager class, id column identification and so on. That's the
trickiest part. If you can map that to your vo's then all you're left
with is sending the data via the vo's from the flash layer and vice versa.

I was thinking perhaps a factory class could do this work? Or, maybe the
vo's could be created dynamically using some form of template, and then
make the data accessible using __resolve in the db.Object class?

Anyway, thoughts would be welcome.

Best,
Lee





Laurent Auneau wrote:

> I was rather thinking of writing it with you, but yes, that was the
> point. And we are actually several people here that could speed things
> up if it meets our needs.
> Still, you didn't answer my first question about the way of doing
> without (for today)?
>
> Laurent
>
>
> 2009/6/10 Lee McColl Sylvester <[hidden email]
> <mailto:[hidden email]>>
>
>     You could write it for me ;-)
>
>     Seriously, though, I'm still in the planning phase for this
>     project. I'll let you know when I have something worth looking at.
>
>     Best,
>     Lee
>
>
>
>
>     Laurent Auneau wrote:
>
>         Hi Lee,
>
>         what is the alternative way of doing this at this time?
>         is there a way we could help you finish things faster?
>
>         Cheers,
>
>            Laurent Auneau - CEO
>            Succubus <http://www.succubus.fr/>
>            Viadeo
>          
>          <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
>         Linkedin
>            <http://www.linkedin.com/in/laurentauneau> Plaxo
>            <http://laurentauneau.myplaxo.com/>
>
>
>         2009/6/10 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>
>            Hey Kevin,
>
>            I'm currently working on a layer for Flash for SPOD
>         integration.
>            Essentially, the SPOD objects will be usable in both Flash
>         and PHP
>            / Neko and you'd use the SPOD objects in Flash as you would
>         on the
>            server. However, when accessed in Flash, the Flash/SPOD
>         layer will
>            use remoting to call down to the server to make the actual
>         updates.
>
>            It's a long way from completion, but that's my goal.
>
>            Lee
>
>
>
>            Kévin STRUILLOU wrote:
>
>                Ok, it seems http://haxe.org/doc/remoting/client_server
>         will
>                be my starting point.
>
>                I want to reuse my neko SPOD objects in Flash.
>                Is there a way to do this ?
>                Maybe with some kind of conditional compiling ?
>                Can the data returned to Flash be casted into some
>         "SPOD like"
>                class ?
>
>                Thanks again,
>
>                Kévin
>
>
>                On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU
>                <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>                wrote:
>
>                   Maybe http://haxe.org/doc/remoting/flash_amf will be
>         a good
>                start.
>                   Thank you all, I'll take a look at this.
>
>                   Kévin
>
>
>                   On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
>                   <[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>> wrote:
>
>                       Have you looked into haxe remoting- it is much
>         better
>                than a
>                       URLRequest call (and sending back xml or the like)
>
>                       http://haxe.org/doc/remoting
>
>
>
>
>                       On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze
>                       <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>> wrote:
>
>                           Hi.
>
>                           Maybe using socket would be faster, but it
>         needs you to
>                           have a socket server.
>
>                           Calling directly a mysql database with flash
>         would be
>                           unsafe, because your password would be
>         optainable for
>                           anyone who uses your flash application.
>
>                           --Blue112
>
>                           2009/6/9 Kévin STRUILLOU
>         <[hidden email] <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                           <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>
>                               Hi,
>
>                               I'm looking for a better solution than
>         posting a
>                               request with a flash.net.URLLoader to a neko
>                page and
>                               waiting for the results
>                               Any idea ?
>
>                               How about a flash.db package ? :D
>
>                               Kévin
>
>                               --
>                               haXe - an open source web programming
>         language
>                               http://haxe.org
>
>
>
>                           --
>                           haXe - an open source web programming language
>                           http://haxe.org
>
>
>
>
>                       --        Tony Polinelli
>                       http://touchmypixel.com
>
>                       --
>                       haXe - an open source web programming language
>                       http://haxe.org
>
>
>
>
>
>            --    haXe - an open source web programming language
>            http://haxe.org
>
>
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
Lee, you lost me at the middle of your first line ...

I was lamely thinking of writing a "serialize" function that sends through remoting the vars declared in the spod class, and an unserialize function, that reads the stream from the remoting, assigns to vars, and, only for server side, updates on the database (conditional compile). You need to do this manually for each and every class, and that can be a burden ...

But your approach might be a lot quicker to implement, also I'm still wondering what you are actually calling a "value object" and the link with what we could call "factory class" in C++.
Note that I'm an experienced developer, but I'm very new to Haxe, and very new to web/network/server programming.

Laurent


2009/6/11 Lee McColl Sylvester <[hidden email]>
The quickest way to get this working is to first take that from the SPOD classes which is easily serialized and make that your value objects. Thus, the column data for SPOD objects can be you value objects and can be reusable in Flash and Neko / PHP. On the server side, each vo will need to be backed by a custom neko/php.db.Object to handle references to the manager class, id column identification and so on. That's the trickiest part. If you can map that to your vo's then all you're left with is sending the data via the vo's from the flash layer and vice versa.

I was thinking perhaps a factory class could do this work? Or, maybe the vo's could be created dynamically using some form of template, and then make the data accessible using __resolve in the db.Object class?

Anyway, thoughts would be welcome.


Best,
Lee





Laurent Auneau wrote:
I was rather thinking of writing it with you, but yes, that was the point. And we are actually several people here that could speed things up if it meets our needs.
Still, you didn't answer my first question about the way of doing without (for today)?

Laurent


2009/6/10 Lee McColl Sylvester <[hidden email] <mailto:[hidden email]>>

   You could write it for me ;-)

   Seriously, though, I'm still in the planning phase for this
   project. I'll let you know when I have something worth looking at.

   Best,
   Lee




   Laurent Auneau wrote:

       Hi Lee,

       what is the alternative way of doing this at this time?
       is there a way we could help you finish things faster?

       Cheers,

          Laurent Auneau - CEO
          Succubus <http://www.succubus.fr/>
          Viadeo
                <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
       Linkedin
          <http://www.linkedin.com/in/laurentauneau> Plaxo
          <http://laurentauneau.myplaxo.com/>


       2009/6/10 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]

       <mailto:[hidden email]>>>


          Hey Kevin,

          I'm currently working on a layer for Flash for SPOD
       integration.
          Essentially, the SPOD objects will be usable in both Flash
       and PHP
          / Neko and you'd use the SPOD objects in Flash as you would
       on the
          server. However, when accessed in Flash, the Flash/SPOD
       layer will
          use remoting to call down to the server to make the actual
       updates.

          It's a long way from completion, but that's my goal.

          Lee



          Kévin STRUILLOU wrote:

              Ok, it seems http://haxe.org/doc/remoting/client_server
       will
              be my starting point.

              I want to reuse my neko SPOD objects in Flash.
              Is there a way to do this ?
              Maybe with some kind of conditional compiling ?
              Can the data returned to Flash be casted into some
       "SPOD like"
              class ?

              Thanks again,

              Kévin


              On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU
              <[hidden email] <mailto:[hidden email]>
       <mailto:[hidden email] <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>>

              wrote:

                 Maybe http://haxe.org/doc/remoting/flash_amf will be
       a good
              start.
                 Thank you all, I'll take a look at this.

                 Kévin


                 On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
                 <[hidden email]
       <mailto:[hidden email]>
       <mailto:[hidden email] <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>>> wrote:

                     Have you looked into haxe remoting- it is much
       better
              than a
                     URLRequest call (and sending back xml or the like)

                     http://haxe.org/doc/remoting




                     On Tue, Jun 9, 2009 at 11:55 AM, Blue Sans douze
                     <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>>> wrote:

                         Hi.

                         Maybe using socket would be faster, but it
       needs you to
                         have a socket server.

                         Calling directly a mysql database with flash
       would be
                         unsafe, because your password would be
       optainable for
                         anyone who uses your flash application.

                         --Blue112

                         2009/6/9 Kévin STRUILLOU
       <[hidden email] <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                         <mailto:[hidden email]
       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>>>


                             Hi,

                             I'm looking for a better solution than
       posting a
                             request with a flash.net.URLLoader to a neko
              page and
                             waiting for the results
                             Any idea ?

                             How about a flash.db package ? :D

                             Kévin

                             --
                             haXe - an open source web programming
       language
                             http://haxe.org



                         --
                         haXe - an open source web programming language
                         http://haxe.org




                     --        Tony Polinelli
                     http://touchmypixel.com

                     --
                     haXe - an open source web programming language
                     http://haxe.org





          --    haXe - an open source web programming language
          http://haxe.org




   --    haXe - an open source web programming language
   http://haxe.org




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
Hey  Laurent,

No problem. A vo (Value Object) is essentially a methodless class. Ergo,
all it should contain is values, and no intelligence. In a db.Object
subclass, the database column representations can be considered VO type
data. If you can abstract that from a db.Object subclass, then it would
be fully streamable. The rest of the functionality in the db.Object
class isn't required by the Flash layer, anyway.

As for the serializing; haXe remoting already does this for you. You can
send a vo class along the wire to PHP or vice versa, and you'd need
never know it was serialized. It's simply an object when you send it and
an object when you retrieve it. This means you can use the same class at
both ends.

If we can map the db.Object functionality to the VO classes in the
PHP/Neko layer, then it can be used to access the database like any
other SPOD object. It should then only take a little bit of
functionality to get those calls to be made from the Flash layer.

Lee



Laurent Auneau wrote:

> Lee, you lost me at the middle of your first line ...
>
> I was lamely thinking of writing a "serialize" function that sends
> through remoting the vars declared in the spod class, and an
> unserialize function, that reads the stream from the remoting, assigns
> to vars, and, only for server side, updates on the database
> (conditional compile). You need to do this manually for each and every
> class, and that can be a burden ...
>
> But your approach might be a lot quicker to implement, also I'm still
> wondering what you are actually calling a "value object" and the link
> with what we could call "factory class" in C++.
> Note that I'm an experienced developer, but I'm very new to Haxe, and
> very new to web/network/server programming.
>
> Laurent
>
>
> 2009/6/11 Lee McColl Sylvester <[hidden email]
> <mailto:[hidden email]>>
>
>     The quickest way to get this working is to first take that from
>     the SPOD classes which is easily serialized and make that your
>     value objects. Thus, the column data for SPOD objects can be you
>     value objects and can be reusable in Flash and Neko / PHP. On the
>     server side, each vo will need to be backed by a custom
>     neko/php.db.Object to handle references to the manager class, id
>     column identification and so on. That's the trickiest part. If you
>     can map that to your vo's then all you're left with is sending the
>     data via the vo's from the flash layer and vice versa.
>
>     I was thinking perhaps a factory class could do this work? Or,
>     maybe the vo's could be created dynamically using some form of
>     template, and then make the data accessible using __resolve in the
>     db.Object class?
>
>     Anyway, thoughts would be welcome.
>
>
>     Best,
>     Lee
>
>
>
>
>
>     Laurent Auneau wrote:
>
>         I was rather thinking of writing it with you, but yes, that
>         was the point. And we are actually several people here that
>         could speed things up if it meets our needs.
>         Still, you didn't answer my first question about the way of
>         doing without (for today)?
>
>         Laurent
>
>
>         2009/6/10 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>            You could write it for me ;-)
>
>            Seriously, though, I'm still in the planning phase for this
>            project. I'll let you know when I have something worth
>         looking at.
>
>            Best,
>            Lee
>
>
>
>
>            Laurent Auneau wrote:
>
>                Hi Lee,
>
>                what is the alternative way of doing this at this time?
>                is there a way we could help you finish things faster?
>
>                Cheers,
>
>                   Laurent Auneau - CEO
>                   Succubus <http://www.succubus.fr/>
>                   Viadeo
>                        
>         <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
>                Linkedin
>                   <http://www.linkedin.com/in/laurentauneau> Plaxo
>                   <http://laurentauneau.myplaxo.com/>
>
>
>                2009/6/10 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>
>                   Hey Kevin,
>
>                   I'm currently working on a layer for Flash for SPOD
>                integration.
>                   Essentially, the SPOD objects will be usable in both
>         Flash
>                and PHP
>                   / Neko and you'd use the SPOD objects in Flash as
>         you would
>                on the
>                   server. However, when accessed in Flash, the Flash/SPOD
>                layer will
>                   use remoting to call down to the server to make the
>         actual
>                updates.
>
>                   It's a long way from completion, but that's my goal.
>
>                   Lee
>
>
>
>                   Kévin STRUILLOU wrote:
>
>                       Ok, it seems
>         http://haxe.org/doc/remoting/client_server
>                will
>                       be my starting point.
>
>                       I want to reuse my neko SPOD objects in Flash.
>                       Is there a way to do this ?
>                       Maybe with some kind of conditional compiling ?
>                       Can the data returned to Flash be casted into some
>                "SPOD like"
>                       class ?
>
>                       Thanks again,
>
>                       Kévin
>
>
>                       On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU
>                       <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>
>                       wrote:
>
>                          Maybe http://haxe.org/doc/remoting/flash_amf
>         will be
>                a good
>                       start.
>                          Thank you all, I'll take a look at this.
>
>                          Kévin
>
>
>                          On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
>                          <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>> wrote:
>
>                              Have you looked into haxe remoting- it is
>         much
>                better
>                       than a
>                              URLRequest call (and sending back xml or
>         the like)
>
>                              http://haxe.org/doc/remoting
>
>
>
>
>                              On Tue, Jun 9, 2009 at 11:55 AM, Blue
>         Sans douze
>                              <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>> wrote:
>
>                                  Hi.
>
>                                  Maybe using socket would be faster,
>         but it
>                needs you to
>                                  have a socket server.
>
>                                  Calling directly a mysql database
>         with flash
>                would be
>                                  unsafe, because your password would be
>                optainable for
>                                  anyone who uses your flash application.
>
>                                  --Blue112
>
>                                  2009/6/9 Kévin STRUILLOU
>                <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                                  <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>
>
>                                      Hi,
>
>                                      I'm looking for a better solution
>         than
>                posting a
>                                      request with a
>         flash.net.URLLoader to a neko
>                       page and
>                                      waiting for the results
>                                      Any idea ?
>
>                                      How about a flash.db package ? :D
>
>                                      Kévin
>
>                                      --
>                                      haXe - an open source web programming
>                language
>                                      http://haxe.org
>
>
>
>                                  --
>                                  haXe - an open source web programming
>         language
>                                  http://haxe.org
>
>
>
>
>                              --        Tony Polinelli
>                              http://touchmypixel.com
>
>                              --
>                              haXe - an open source web programming
>         language
>                              http://haxe.org
>
>
>
>
>
>                   --    haXe - an open source web programming language
>                   http://haxe.org
>
>
>
>
>            --    haXe - an open source web programming language
>            http://haxe.org
>
>
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
OK, I get it.
First of all, do you acknowledge the "manual and for each spod class" method I described previously as a working one?

Second, to have everything automated, I don't see how this can be made without an introspection mechanism within the language itself.
You need to iterate over your values at some point, either to match them with the table columns, either to serialize them. A template class won't change anything (variable number of template args implemented in Haxe?). And a factory class (I think I understand what you meant by factory class) would need to iterate over values too.
You could use a constant array of string and have a Dynamic object created this way, but I'm not sure how Haxe could access a value of a class object through string rather than plain text.
I mean substituing myObj.myVal = 5 ; by myObj["myVal"] = 5 ; is necessary to perform this.

But again, I'm very new to Haxe (first week actually), and I'm still wondering how the spod classes works at all ... same goes with the remoting system.
All this looks like black magic to me, yet very useful.

Laurent


2009/6/11 Lee McColl Sylvester <[hidden email]>
Hey  Laurent,

No problem. A vo (Value Object) is essentially a methodless class. Ergo, all it should contain is values, and no intelligence. In a db.Object subclass, the database column representations can be considered VO type data. If you can abstract that from a db.Object subclass, then it would be fully streamable. The rest of the functionality in the db.Object class isn't required by the Flash layer, anyway.

As for the serializing; haXe remoting already does this for you. You can send a vo class along the wire to PHP or vice versa, and you'd need never know it was serialized. It's simply an object when you send it and an object when you retrieve it. This means you can use the same class at both ends.

If we can map the db.Object functionality to the VO classes in the PHP/Neko layer, then it can be used to access the database like any other SPOD object. It should then only take a little bit of functionality to get those calls to be made from the Flash layer.

Lee



Laurent Auneau wrote:
Lee, you lost me at the middle of your first line ...

I was lamely thinking of writing a "serialize" function that sends through remoting the vars declared in the spod class, and an unserialize function, that reads the stream from the remoting, assigns to vars, and, only for server side, updates on the database (conditional compile). You need to do this manually for each and every class, and that can be a burden ...

But your approach might be a lot quicker to implement, also I'm still wondering what you are actually calling a "value object" and the link with what we could call "factory class" in C++.
Note that I'm an experienced developer, but I'm very new to Haxe, and very new to web/network/server programming.

Laurent


2009/6/11 Lee McColl Sylvester <[hidden email] <mailto:[hidden email]>>


   The quickest way to get this working is to first take that from
   the SPOD classes which is easily serialized and make that your
   value objects. Thus, the column data for SPOD objects can be you
   value objects and can be reusable in Flash and Neko / PHP. On the
   server side, each vo will need to be backed by a custom
   neko/php.db.Object to handle references to the manager class, id
   column identification and so on. That's the trickiest part. If you
   can map that to your vo's then all you're left with is sending the
   data via the vo's from the flash layer and vice versa.

   I was thinking perhaps a factory class could do this work? Or,
   maybe the vo's could be created dynamically using some form of
   template, and then make the data accessible using __resolve in the
   db.Object class?

   Anyway, thoughts would be welcome.


   Best,
   Lee





   Laurent Auneau wrote:

       I was rather thinking of writing it with you, but yes, that
       was the point. And we are actually several people here that
       could speed things up if it meets our needs.
       Still, you didn't answer my first question about the way of
       doing without (for today)?

       Laurent


       2009/6/10 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]

       <mailto:[hidden email]>>>

          You could write it for me ;-)

          Seriously, though, I'm still in the planning phase for this
          project. I'll let you know when I have something worth
       looking at.

          Best,
          Lee




          Laurent Auneau wrote:

              Hi Lee,

              what is the alternative way of doing this at this time?
              is there a way we could help you finish things faster?

              Cheers,

                 Laurent Auneau - CEO
                 Succubus <http://www.succubus.fr/>
                 Viadeo
                             <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
              Linkedin
                 <http://www.linkedin.com/in/laurentauneau> Plaxo
                 <http://laurentauneau.myplaxo.com/>


              2009/6/10 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]

       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>>>


                 Hey Kevin,

                 I'm currently working on a layer for Flash for SPOD
              integration.
                 Essentially, the SPOD objects will be usable in both
       Flash
              and PHP
                 / Neko and you'd use the SPOD objects in Flash as
       you would
              on the
                 server. However, when accessed in Flash, the Flash/SPOD
              layer will
                 use remoting to call down to the server to make the
       actual
              updates.

                 It's a long way from completion, but that's my goal.

                 Lee



                 Kévin STRUILLOU wrote:

                     Ok, it seems
       http://haxe.org/doc/remoting/client_server
              will
                     be my starting point.

                     I want to reuse my neko SPOD objects in Flash.
                     Is there a way to do this ?
                     Maybe with some kind of conditional compiling ?
                     Can the data returned to Flash be casted into some
              "SPOD like"
                     class ?

                     Thanks again,

                     Kévin


                     On Wed, Jun 10, 2009 at 9:13 AM, Kévin STRUILLOU
                     <[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>

                     wrote:

                        Maybe http://haxe.org/doc/remoting/flash_amf
       will be
              a good
                     start.
                        Thank you all, I'll take a look at this.

                        Kévin


                        On Wed, Jun 10, 2009 at 6:27 AM, Tony Polinelli
                        <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]>
       <mailto:[hidden email] <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>

                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>> wrote:

                            Have you looked into haxe remoting- it is
       much
              better
                     than a
                            URLRequest call (and sending back xml or
       the like)

                            http://haxe.org/doc/remoting




                            On Tue, Jun 9, 2009 at 11:55 AM, Blue
       Sans douze
                            <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>

                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>> wrote:

                                Hi.

                                Maybe using socket would be faster,
       but it
              needs you to
                                have a socket server.

                                Calling directly a mysql database
       with flash
              would be
                                unsafe, because your password would be
              optainable for
                                anyone who uses your flash application.

                                --Blue112

                                2009/6/9 Kévin STRUILLOU
              <[hidden email] <mailto:[hidden email]>
       <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                                <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>

                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>


                                    Hi,

                                    I'm looking for a better solution
       than
              posting a
                                    request with a
       flash.net.URLLoader to a neko
                     page and
                                    waiting for the results
                                    Any idea ?

                                    How about a flash.db package ? :D

                                    Kévin

                                    --
                                    haXe - an open source web programming
              language
                                    http://haxe.org



                                --
                                haXe - an open source web programming
       language
                                http://haxe.org




                            --        Tony Polinelli
                            http://touchmypixel.com

                            --
                            haXe - an open source web programming
       language
                            http://haxe.org





                 --    haXe - an open source web programming language
                 http://haxe.org




          --    haXe - an open source web programming language
          http://haxe.org




   --    haXe - an open source web programming language
   http://haxe.org




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
Hi Laurent,

No, you shouldn't need to do it manually at all. It could simply be a
class that extends the remoting class and performs the logic you need
before retrieving it; abstracted from the SPOD db.Object subclass structure.

I'm still not sure how I'm going to do this, which is why it's still in
the planning phase.  I may need to modify the SPOD classes in the
standard library.  I'm currently chewing on the idea of swapping out the
member variables representing the columns and replacing with a Hash
instance. The Hash could be sent over the wire and used at both ends,
while the db.Object parent class would be swapped for a help class in
the Flash layer.  Again, I'm still not sure, yet.

Lee



Laurent Auneau wrote:

> OK, I get it.
> First of all, do you acknowledge the "manual and for each spod class"
> method I described previously as a working one?
>
> Second, to have everything automated, I don't see how this can be made
> without an introspection mechanism within the language itself.
> You need to iterate over your values at some point, either to match
> them with the table columns, either to serialize them. A template
> class won't change anything (variable number of template args
> implemented in Haxe?). And a factory class (I think I understand what
> you meant by factory class) would need to iterate over values too.
> You could use a constant array of string and have a Dynamic object
> created this way, but I'm not sure how Haxe could access a value of a
> class object through string rather than plain text.
> I mean substituing myObj.myVal = 5 ; by myObj["myVal"] = 5 ; is
> necessary to perform this.
>
> But again, I'm very new to Haxe (first week actually), and I'm still
> wondering how the spod classes works at all ... same goes with the
> remoting system.
> All this looks like black magic to me, yet very useful.
>
> Laurent
>
>
> 2009/6/11 Lee McColl Sylvester <[hidden email]
> <mailto:[hidden email]>>
>
>     Hey  Laurent,
>
>     No problem. A vo (Value Object) is essentially a methodless class.
>     Ergo, all it should contain is values, and no intelligence. In a
>     db.Object subclass, the database column representations can be
>     considered VO type data. If you can abstract that from a db.Object
>     subclass, then it would be fully streamable. The rest of the
>     functionality in the db.Object class isn't required by the Flash
>     layer, anyway.
>
>     As for the serializing; haXe remoting already does this for you.
>     You can send a vo class along the wire to PHP or vice versa, and
>     you'd need never know it was serialized. It's simply an object
>     when you send it and an object when you retrieve it. This means
>     you can use the same class at both ends.
>
>     If we can map the db.Object functionality to the VO classes in the
>     PHP/Neko layer, then it can be used to access the database like
>     any other SPOD object. It should then only take a little bit of
>     functionality to get those calls to be made from the Flash layer.
>
>     Lee
>
>
>
>     Laurent Auneau wrote:
>
>         Lee, you lost me at the middle of your first line ...
>
>         I was lamely thinking of writing a "serialize" function that
>         sends through remoting the vars declared in the spod class,
>         and an unserialize function, that reads the stream from the
>         remoting, assigns to vars, and, only for server side, updates
>         on the database (conditional compile). You need to do this
>         manually for each and every class, and that can be a burden ...
>
>         But your approach might be a lot quicker to implement, also
>         I'm still wondering what you are actually calling a "value
>         object" and the link with what we could call "factory class"
>         in C++.
>         Note that I'm an experienced developer, but I'm very new to
>         Haxe, and very new to web/network/server programming.
>
>         Laurent
>
>
>         2009/6/11 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>
>            The quickest way to get this working is to first take that from
>            the SPOD classes which is easily serialized and make that your
>            value objects. Thus, the column data for SPOD objects can
>         be you
>            value objects and can be reusable in Flash and Neko / PHP.
>         On the
>            server side, each vo will need to be backed by a custom
>            neko/php.db.Object to handle references to the manager
>         class, id
>            column identification and so on. That's the trickiest part.
>         If you
>            can map that to your vo's then all you're left with is
>         sending the
>            data via the vo's from the flash layer and vice versa.
>
>            I was thinking perhaps a factory class could do this work? Or,
>            maybe the vo's could be created dynamically using some form of
>            template, and then make the data accessible using __resolve
>         in the
>            db.Object class?
>
>            Anyway, thoughts would be welcome.
>
>
>            Best,
>            Lee
>
>
>
>
>
>            Laurent Auneau wrote:
>
>                I was rather thinking of writing it with you, but yes, that
>                was the point. And we are actually several people here that
>                could speed things up if it meets our needs.
>                Still, you didn't answer my first question about the way of
>                doing without (for today)?
>
>                Laurent
>
>
>                2009/6/10 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>                   You could write it for me ;-)
>
>                   Seriously, though, I'm still in the planning phase
>         for this
>                   project. I'll let you know when I have something worth
>                looking at.
>
>                   Best,
>                   Lee
>
>
>
>
>                   Laurent Auneau wrote:
>
>                       Hi Lee,
>
>                       what is the alternative way of doing this at
>         this time?
>                       is there a way we could help you finish things
>         faster?
>
>                       Cheers,
>
>                          Laurent Auneau - CEO
>                          Succubus <http://www.succubus.fr/>
>                          Viadeo
>                                    
>          <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
>                       Linkedin
>                          <http://www.linkedin.com/in/laurentauneau> Plaxo
>                          <http://laurentauneau.myplaxo.com/>
>
>
>                       2009/6/10 Lee McColl Sylvester
>         <[hidden email] <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>
>
>                          Hey Kevin,
>
>                          I'm currently working on a layer for Flash
>         for SPOD
>                       integration.
>                          Essentially, the SPOD objects will be usable
>         in both
>                Flash
>                       and PHP
>                          / Neko and you'd use the SPOD objects in Flash as
>                you would
>                       on the
>                          server. However, when accessed in Flash, the
>         Flash/SPOD
>                       layer will
>                          use remoting to call down to the server to
>         make the
>                actual
>                       updates.
>
>                          It's a long way from completion, but that's
>         my goal.
>
>                          Lee
>
>
>
>                          Kévin STRUILLOU wrote:
>
>                              Ok, it seems
>                http://haxe.org/doc/remoting/client_server
>                       will
>                              be my starting point.
>
>                              I want to reuse my neko SPOD objects in
>         Flash.
>                              Is there a way to do this ?
>                              Maybe with some kind of conditional
>         compiling ?
>                              Can the data returned to Flash be casted
>         into some
>                       "SPOD like"
>                              class ?
>
>                              Thanks again,
>
>                              Kévin
>
>
>                              On Wed, Jun 10, 2009 at 9:13 AM, Kévin
>         STRUILLOU
>                              <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>
>
>                              wrote:
>
>                                 Maybe
>         http://haxe.org/doc/remoting/flash_amf
>                will be
>                       a good
>                              start.
>                                 Thank you all, I'll take a look at this.
>
>                                 Kévin
>
>
>                                 On Wed, Jun 10, 2009 at 6:27 AM, Tony
>         Polinelli
>                                 <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>> wrote:
>
>                                     Have you looked into haxe
>         remoting- it is
>                much
>                       better
>                              than a
>                                     URLRequest call (and sending back
>         xml or
>                the like)
>
>                                     http://haxe.org/doc/remoting
>
>
>
>
>                                     On Tue, Jun 9, 2009 at 11:55 AM, Blue
>                Sans douze
>                                     <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>> wrote:
>
>                                         Hi.
>
>                                         Maybe using socket would be
>         faster,
>                but it
>                       needs you to
>                                         have a socket server.
>
>                                         Calling directly a mysql database
>                with flash
>                       would be
>                                         unsafe, because your password
>         would be
>                       optainable for
>                                         anyone who uses your flash
>         application.
>
>                                         --Blue112
>
>                                         2009/6/9 Kévin STRUILLOU
>                       <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                                         <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>
>
>
>                                             Hi,
>
>                                             I'm looking for a better
>         solution
>                than
>                       posting a
>                                             request with a
>                flash.net.URLLoader to a neko
>                              page and
>                                             waiting for the results
>                                             Any idea ?
>
>                                             How about a flash.db
>         package ? :D
>
>                                             Kévin
>
>                                             --
>                                             haXe - an open source web
>         programming
>                       language
>                                             http://haxe.org
>
>
>
>                                         --
>                                         haXe - an open source web
>         programming
>                language
>                                         http://haxe.org
>
>
>
>
>                                     --        Tony Polinelli
>                                     http://touchmypixel.com
>
>                                     --
>                                     haXe - an open source web programming
>                language
>                                     http://haxe.org
>
>
>
>
>
>                          --    haXe - an open source web programming
>         language
>                          http://haxe.org
>
>
>
>
>                   --    haXe - an open source web programming language
>                   http://haxe.org
>
>
>
>
>            --    haXe - an open source web programming language
>            http://haxe.org
>
>
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
Lee,

actually, my question was about how doing it now ...
Meaning, right now, today, without the extention you'll provide :)

L.


2009/6/11 Lee McColl Sylvester <[hidden email]>
Hi Laurent,

No, you shouldn't need to do it manually at all. It could simply be a class that extends the remoting class and performs the logic you need before retrieving it; abstracted from the SPOD db.Object subclass structure.

I'm still not sure how I'm going to do this, which is why it's still in the planning phase.  I may need to modify the SPOD classes in the standard library.  I'm currently chewing on the idea of swapping out the member variables representing the columns and replacing with a Hash instance. The Hash could be sent over the wire and used at both ends, while the db.Object parent class would be swapped for a help class in the Flash layer.  Again, I'm still not sure, yet.

Lee



Laurent Auneau wrote:
OK, I get it.
First of all, do you acknowledge the "manual and for each spod class" method I described previously as a working one?

Second, to have everything automated, I don't see how this can be made without an introspection mechanism within the language itself.
You need to iterate over your values at some point, either to match them with the table columns, either to serialize them. A template class won't change anything (variable number of template args implemented in Haxe?). And a factory class (I think I understand what you meant by factory class) would need to iterate over values too.
You could use a constant array of string and have a Dynamic object created this way, but I'm not sure how Haxe could access a value of a class object through string rather than plain text.
I mean substituing myObj.myVal = 5 ; by myObj["myVal"] = 5 ; is necessary to perform this.

But again, I'm very new to Haxe (first week actually), and I'm still wondering how the spod classes works at all ... same goes with the remoting system.
All this looks like black magic to me, yet very useful.

Laurent


2009/6/11 Lee McColl Sylvester <[hidden email] <mailto:[hidden email]>>


   Hey  Laurent,

   No problem. A vo (Value Object) is essentially a methodless class.
   Ergo, all it should contain is values, and no intelligence. In a
   db.Object subclass, the database column representations can be
   considered VO type data. If you can abstract that from a db.Object
   subclass, then it would be fully streamable. The rest of the
   functionality in the db.Object class isn't required by the Flash
   layer, anyway.

   As for the serializing; haXe remoting already does this for you.
   You can send a vo class along the wire to PHP or vice versa, and
   you'd need never know it was serialized. It's simply an object
   when you send it and an object when you retrieve it. This means
   you can use the same class at both ends.

   If we can map the db.Object functionality to the VO classes in the
   PHP/Neko layer, then it can be used to access the database like
   any other SPOD object. It should then only take a little bit of
   functionality to get those calls to be made from the Flash layer.

   Lee



   Laurent Auneau wrote:

       Lee, you lost me at the middle of your first line ...

       I was lamely thinking of writing a "serialize" function that
       sends through remoting the vars declared in the spod class,
       and an unserialize function, that reads the stream from the
       remoting, assigns to vars, and, only for server side, updates
       on the database (conditional compile). You need to do this
       manually for each and every class, and that can be a burden ...

       But your approach might be a lot quicker to implement, also
       I'm still wondering what you are actually calling a "value
       object" and the link with what we could call "factory class"
       in C++.
       Note that I'm an experienced developer, but I'm very new to
       Haxe, and very new to web/network/server programming.

       Laurent


       2009/6/11 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]

       <mailto:[hidden email]>>>


          The quickest way to get this working is to first take that from
          the SPOD classes which is easily serialized and make that your
          value objects. Thus, the column data for SPOD objects can
       be you
          value objects and can be reusable in Flash and Neko / PHP.
       On the
          server side, each vo will need to be backed by a custom
          neko/php.db.Object to handle references to the manager
       class, id
          column identification and so on. That's the trickiest part.
       If you
          can map that to your vo's then all you're left with is
       sending the
          data via the vo's from the flash layer and vice versa.

          I was thinking perhaps a factory class could do this work? Or,
          maybe the vo's could be created dynamically using some form of
          template, and then make the data accessible using __resolve
       in the
          db.Object class?

          Anyway, thoughts would be welcome.


          Best,
          Lee





          Laurent Auneau wrote:

              I was rather thinking of writing it with you, but yes, that
              was the point. And we are actually several people here that
              could speed things up if it meets our needs.
              Still, you didn't answer my first question about the way of
              doing without (for today)?

              Laurent


              2009/6/10 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]

       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>>>

                 You could write it for me ;-)

                 Seriously, though, I'm still in the planning phase
       for this
                 project. I'll let you know when I have something worth
              looking at.

                 Best,
                 Lee




                 Laurent Auneau wrote:

                     Hi Lee,

                     what is the alternative way of doing this at
       this time?
                     is there a way we could help you finish things
       faster?

                     Cheers,

                        Laurent Auneau - CEO
                        Succubus <http://www.succubus.fr/>
                        Viadeo
                                          <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
                     Linkedin
                        <http://www.linkedin.com/in/laurentauneau> Plaxo
                        <http://laurentauneau.myplaxo.com/>


                     2009/6/10 Lee McColl Sylvester
       <[hidden email] <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>> <mailto:[hidden email]

       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>

                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>


                        Hey Kevin,

                        I'm currently working on a layer for Flash
       for SPOD
                     integration.
                        Essentially, the SPOD objects will be usable
       in both
              Flash
                     and PHP
                        / Neko and you'd use the SPOD objects in Flash as
              you would
                     on the
                        server. However, when accessed in Flash, the
       Flash/SPOD
                     layer will
                        use remoting to call down to the server to
       make the
              actual
                     updates.

                        It's a long way from completion, but that's
       my goal.

                        Lee



                        Kévin STRUILLOU wrote:

                            Ok, it seems
              http://haxe.org/doc/remoting/client_server
                     will
                            be my starting point.

                            I want to reuse my neko SPOD objects in
       Flash.
                            Is there a way to do this ?
                            Maybe with some kind of conditional
       compiling ?
                            Can the data returned to Flash be casted
       into some
                     "SPOD like"
                            class ?

                            Thanks again,

                            Kévin


                            On Wed, Jun 10, 2009 at 9:13 AM, Kévin
       STRUILLOU
                            <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>

                            wrote:

                               Maybe
       http://haxe.org/doc/remoting/flash_amf
              will be
                     a good
                            start.
                               Thank you all, I'll take a look at this.

                               Kévin


                               On Wed, Jun 10, 2009 at 6:27 AM, Tony
       Polinelli
                               <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]>
       <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>

                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>> wrote:

                                   Have you looked into haxe
       remoting- it is
              much
                     better
                            than a
                                   URLRequest call (and sending back
       xml or
              the like)

                                   http://haxe.org/doc/remoting




                                   On Tue, Jun 9, 2009 at 11:55 AM, Blue
              Sans douze
                                   <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>

                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>> wrote:

                                       Hi.

                                       Maybe using socket would be
       faster,
              but it
                     needs you to
                                       have a socket server.

                                       Calling directly a mysql database
              with flash
                     would be
                                       unsafe, because your password
       would be
                     optainable for
                                       anyone who uses your flash
       application.

                                       --Blue112

                                       2009/6/9 Kévin STRUILLOU
                     <[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                                       <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>

                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>


                                           Hi,

                                           I'm looking for a better
       solution
              than
                     posting a
                                           request with a
              flash.net.URLLoader to a neko
                            page and
                                           waiting for the results
                                           Any idea ?

                                           How about a flash.db
       package ? :D

                                           Kévin

                                           --
                                           haXe - an open source web
       programming
                     language
                                           http://haxe.org



                                       --
                                       haXe - an open source web
       programming
              language
                                       http://haxe.org




                                   --        Tony Polinelli
                                   http://touchmypixel.com

                                   --
                                   haXe - an open source web programming
              language
                                   http://haxe.org





                        --    haXe - an open source web programming
       language
                        http://haxe.org




                 --    haXe - an open source web programming language
                 http://haxe.org




          --    haXe - an open source web programming language
          http://haxe.org




   --    haXe - an open source web programming language
   http://haxe.org




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Lee Sylvester
You could try using "#if neko" statements in your db.Object subclasses
to comment out anything Neko specific, then try sending that to and from
Flash using remoting. In your server layer, you'd then have to create a
class with insert, delete, update etc which Flash would call, and pass
the SPOD object as a parameter.  If you get any particularly complex
situations, then you'd have to create a server method to handle it that
Flash remoting could call.

Lee



Laurent Auneau wrote:

> Lee,
>
> actually, my question was about how doing it now ...
> Meaning, right now, today, without the extention you'll provide :)
>
> L.
>
>
> 2009/6/11 Lee McColl Sylvester <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi Laurent,
>
>     No, you shouldn't need to do it manually at all. It could simply
>     be a class that extends the remoting class and performs the logic
>     you need before retrieving it; abstracted from the SPOD db.Object
>     subclass structure.
>
>     I'm still not sure how I'm going to do this, which is why it's
>     still in the planning phase.  I may need to modify the SPOD
>     classes in the standard library.  I'm currently chewing on the
>     idea of swapping out the member variables representing the columns
>     and replacing with a Hash instance. The Hash could be sent over
>     the wire and used at both ends, while the db.Object parent class
>     would be swapped for a help class in the Flash layer.  Again, I'm
>     still not sure, yet.
>
>     Lee
>
>
>
>     Laurent Auneau wrote:
>
>         OK, I get it.
>         First of all, do you acknowledge the "manual and for each spod
>         class" method I described previously as a working one?
>
>         Second, to have everything automated, I don't see how this can
>         be made without an introspection mechanism within the language
>         itself.
>         You need to iterate over your values at some point, either to
>         match them with the table columns, either to serialize them. A
>         template class won't change anything (variable number of
>         template args implemented in Haxe?). And a factory class (I
>         think I understand what you meant by factory class) would need
>         to iterate over values too.
>         You could use a constant array of string and have a Dynamic
>         object created this way, but I'm not sure how Haxe could
>         access a value of a class object through string rather than
>         plain text.
>         I mean substituing myObj.myVal = 5 ; by myObj["myVal"] = 5 ;
>         is necessary to perform this.
>
>         But again, I'm very new to Haxe (first week actually), and I'm
>         still wondering how the spod classes works at all ... same
>         goes with the remoting system.
>         All this looks like black magic to me, yet very useful.
>
>         Laurent
>
>
>         2009/6/11 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>
>            Hey  Laurent,
>
>            No problem. A vo (Value Object) is essentially a methodless
>         class.
>            Ergo, all it should contain is values, and no intelligence.
>         In a
>            db.Object subclass, the database column representations can be
>            considered VO type data. If you can abstract that from a
>         db.Object
>            subclass, then it would be fully streamable. The rest of the
>            functionality in the db.Object class isn't required by the
>         Flash
>            layer, anyway.
>
>            As for the serializing; haXe remoting already does this for
>         you.
>            You can send a vo class along the wire to PHP or vice
>         versa, and
>            you'd need never know it was serialized. It's simply an object
>            when you send it and an object when you retrieve it. This means
>            you can use the same class at both ends.
>
>            If we can map the db.Object functionality to the VO classes
>         in the
>            PHP/Neko layer, then it can be used to access the database like
>            any other SPOD object. It should then only take a little bit of
>            functionality to get those calls to be made from the Flash
>         layer.
>
>            Lee
>
>
>
>            Laurent Auneau wrote:
>
>                Lee, you lost me at the middle of your first line ...
>
>                I was lamely thinking of writing a "serialize" function
>         that
>                sends through remoting the vars declared in the spod class,
>                and an unserialize function, that reads the stream from the
>                remoting, assigns to vars, and, only for server side,
>         updates
>                on the database (conditional compile). You need to do this
>                manually for each and every class, and that can be a
>         burden ...
>
>                But your approach might be a lot quicker to implement, also
>                I'm still wondering what you are actually calling a "value
>                object" and the link with what we could call "factory
>         class"
>                in C++.
>                Note that I'm an experienced developer, but I'm very new to
>                Haxe, and very new to web/network/server programming.
>
>                Laurent
>
>
>                2009/6/11 Lee McColl Sylvester <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>
>                   The quickest way to get this working is to first
>         take that from
>                   the SPOD classes which is easily serialized and make
>         that your
>                   value objects. Thus, the column data for SPOD
>         objects can
>                be you
>                   value objects and can be reusable in Flash and Neko
>         / PHP.
>                On the
>                   server side, each vo will need to be backed by a custom
>                   neko/php.db.Object to handle references to the manager
>                class, id
>                   column identification and so on. That's the
>         trickiest part.
>                If you
>                   can map that to your vo's then all you're left with is
>                sending the
>                   data via the vo's from the flash layer and vice versa.
>
>                   I was thinking perhaps a factory class could do this
>         work? Or,
>                   maybe the vo's could be created dynamically using
>         some form of
>                   template, and then make the data accessible using
>         __resolve
>                in the
>                   db.Object class?
>
>                   Anyway, thoughts would be welcome.
>
>
>                   Best,
>                   Lee
>
>
>
>
>
>                   Laurent Auneau wrote:
>
>                       I was rather thinking of writing it with you,
>         but yes, that
>                       was the point. And we are actually several
>         people here that
>                       could speed things up if it meets our needs.
>                       Still, you didn't answer my first question about
>         the way of
>                       doing without (for today)?
>
>                       Laurent
>
>
>                       2009/6/10 Lee McColl Sylvester
>         <[hidden email] <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>
>                          You could write it for me ;-)
>
>                          Seriously, though, I'm still in the planning
>         phase
>                for this
>                          project. I'll let you know when I have
>         something worth
>                       looking at.
>
>                          Best,
>                          Lee
>
>
>
>
>                          Laurent Auneau wrote:
>
>                              Hi Lee,
>
>                              what is the alternative way of doing this at
>                this time?
>                              is there a way we could help you finish
>         things
>                faster?
>
>                              Cheers,
>
>                                 Laurent Auneau - CEO
>                                 Succubus <http://www.succubus.fr/>
>                                 Viadeo
>                                                  
>         <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
>                              Linkedin
>                                
>         <http://www.linkedin.com/in/laurentauneau> Plaxo
>                                 <http://laurentauneau.myplaxo.com/>
>
>
>                              2009/6/10 Lee McColl Sylvester
>                <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>         <mailto:[hidden email] <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>
>
>
>                                 Hey Kevin,
>
>                                 I'm currently working on a layer for Flash
>                for SPOD
>                              integration.
>                                 Essentially, the SPOD objects will be
>         usable
>                in both
>                       Flash
>                              and PHP
>                                 / Neko and you'd use the SPOD objects
>         in Flash as
>                       you would
>                              on the
>                                 server. However, when accessed in
>         Flash, the
>                Flash/SPOD
>                              layer will
>                                 use remoting to call down to the server to
>                make the
>                       actual
>                              updates.
>
>                                 It's a long way from completion, but
>         that's
>                my goal.
>
>                                 Lee
>
>
>
>                                 Kévin STRUILLOU wrote:
>
>                                     Ok, it seems
>                       http://haxe.org/doc/remoting/client_server
>                              will
>                                     be my starting point.
>
>                                     I want to reuse my neko SPOD
>         objects in
>                Flash.
>                                     Is there a way to do this ?
>                                     Maybe with some kind of conditional
>                compiling ?
>                                     Can the data returned to Flash be
>         casted
>                into some
>                              "SPOD like"
>                                     class ?
>
>                                     Thanks again,
>
>                                     Kévin
>
>
>                                     On Wed, Jun 10, 2009 at 9:13 AM, Kévin
>                STRUILLOU
>                                     <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>>
>
>                                     wrote:
>
>                                        Maybe
>                http://haxe.org/doc/remoting/flash_amf
>                       will be
>                              a good
>                                     start.
>                                        Thank you all, I'll take a look
>         at this.
>
>                                        Kévin
>
>
>                                        On Wed, Jun 10, 2009 at 6:27
>         AM, Tony
>                Polinelli
>                                        <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>> wrote:
>
>                                            Have you looked into haxe
>                remoting- it is
>                       much
>                              better
>                                     than a
>                                            URLRequest call (and
>         sending back
>                xml or
>                       the like)
>
>                                            http://haxe.org/doc/remoting
>
>
>
>
>                                            On Tue, Jun 9, 2009 at
>         11:55 AM, Blue
>                       Sans douze
>                                            <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>> wrote:
>
>                                                Hi.
>
>                                                Maybe using socket would be
>                faster,
>                       but it
>                              needs you to
>                                                have a socket server.
>
>                                                Calling directly a
>         mysql database
>                       with flash
>                              would be
>                                                unsafe, because your
>         password
>                would be
>                              optainable for
>                                                anyone who uses your flash
>                application.
>
>                                                --Blue112
>
>                                                2009/6/9 Kévin STRUILLOU
>                              <[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>
>                                              
>          <mailto:[hidden email] <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>> <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>
>
>                                     <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>                              <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email] <mailto:[hidden email]>>
>                       <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>>>>>
>
>
>                                                    Hi,
>
>                                                    I'm looking for a
>         better
>                solution
>                       than
>                              posting a
>                                                    request with a
>                       flash.net.URLLoader to a neko
>                                     page and
>                                                    waiting for the results
>                                                    Any idea ?
>
>                                                    How about a flash.db
>                package ? :D
>
>                                                    Kévin
>
>                                                    --
>                                                    haXe - an open
>         source web
>                programming
>                              language
>                                                    http://haxe.org
>
>
>
>                                                --
>                                                haXe - an open source web
>                programming
>                       language
>                                                http://haxe.org
>
>
>
>
>                                            --        Tony Polinelli
>                                            http://touchmypixel.com
>
>                                            --
>                                            haXe - an open source web
>         programming
>                       language
>                                            http://haxe.org
>
>
>
>
>
>                                 --    haXe - an open source web
>         programming
>                language
>                                 http://haxe.org
>
>
>
>
>                          --    haXe - an open source web programming
>         language
>                          http://haxe.org
>
>
>
>
>                   --    haXe - an open source web programming language
>                   http://haxe.org
>
>
>
>
>            --    haXe - an open source web programming language
>            http://haxe.org
>
>
>
>
>     --
>     haXe - an open source web programming language
>     http://haxe.org
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Best way to make Flash communicate with MySQL ?

Laurent Auneau
Lee,

thanks, that's what I was thinking I should do.
Laurence suggested earlier this:  class SpecificObject #if neko extends neko.db.Object #end
And I'll go for it!

Laurent


2009/6/11 Lee McColl Sylvester <[hidden email]>
You could try using "#if neko" statements in your db.Object subclasses to comment out anything Neko specific, then try sending that to and from Flash using remoting. In your server layer, you'd then have to create a class with insert, delete, update etc which Flash would call, and pass the SPOD object as a parameter.  If you get any particularly complex situations, then you'd have to create a server method to handle it that Flash remoting could call.

Lee



Laurent Auneau wrote:
Lee,

actually, my question was about how doing it now ...
Meaning, right now, today, without the extention you'll provide :)

L.


2009/6/11 Lee McColl Sylvester <[hidden email] <mailto:[hidden email]>>

   Hi Laurent,

   No, you shouldn't need to do it manually at all. It could simply
   be a class that extends the remoting class and performs the logic
   you need before retrieving it; abstracted from the SPOD db.Object
   subclass structure.

   I'm still not sure how I'm going to do this, which is why it's
   still in the planning phase.  I may need to modify the SPOD
   classes in the standard library.  I'm currently chewing on the
   idea of swapping out the member variables representing the columns
   and replacing with a Hash instance. The Hash could be sent over
   the wire and used at both ends, while the db.Object parent class
   would be swapped for a help class in the Flash layer.  Again, I'm
   still not sure, yet.

   Lee



   Laurent Auneau wrote:

       OK, I get it.
       First of all, do you acknowledge the "manual and for each spod
       class" method I described previously as a working one?

       Second, to have everything automated, I don't see how this can
       be made without an introspection mechanism within the language
       itself.
       You need to iterate over your values at some point, either to
       match them with the table columns, either to serialize them. A
       template class won't change anything (variable number of
       template args implemented in Haxe?). And a factory class (I
       think I understand what you meant by factory class) would need
       to iterate over values too.
       You could use a constant array of string and have a Dynamic
       object created this way, but I'm not sure how Haxe could
       access a value of a class object through string rather than
       plain text.
       I mean substituing myObj.myVal = 5 ; by myObj["myVal"] = 5 ;
       is necessary to perform this.

       But again, I'm very new to Haxe (first week actually), and I'm
       still wondering how the spod classes works at all ... same
       goes with the remoting system.
       All this looks like black magic to me, yet very useful.

       Laurent


       2009/6/11 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>


          Hey  Laurent,

          No problem. A vo (Value Object) is essentially a methodless
       class.
          Ergo, all it should contain is values, and no intelligence.
       In a
          db.Object subclass, the database column representations can be
          considered VO type data. If you can abstract that from a
       db.Object
          subclass, then it would be fully streamable. The rest of the
          functionality in the db.Object class isn't required by the
       Flash
          layer, anyway.

          As for the serializing; haXe remoting already does this for
       you.
          You can send a vo class along the wire to PHP or vice
       versa, and
          you'd need never know it was serialized. It's simply an object
          when you send it and an object when you retrieve it. This means
          you can use the same class at both ends.

          If we can map the db.Object functionality to the VO classes
       in the
          PHP/Neko layer, then it can be used to access the database like
          any other SPOD object. It should then only take a little bit of
          functionality to get those calls to be made from the Flash
       layer.

          Lee



          Laurent Auneau wrote:

              Lee, you lost me at the middle of your first line ...

              I was lamely thinking of writing a "serialize" function
       that
              sends through remoting the vars declared in the spod class,
              and an unserialize function, that reads the stream from the
              remoting, assigns to vars, and, only for server side,
       updates
              on the database (conditional compile). You need to do this
              manually for each and every class, and that can be a
       burden ...

              But your approach might be a lot quicker to implement, also
              I'm still wondering what you are actually calling a "value
              object" and the link with what we could call "factory
       class"
              in C++.
              Note that I'm an experienced developer, but I'm very new to
              Haxe, and very new to web/network/server programming.

              Laurent


              2009/6/11 Lee McColl Sylvester <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]

       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>>>


                 The quickest way to get this working is to first
       take that from
                 the SPOD classes which is easily serialized and make
       that your
                 value objects. Thus, the column data for SPOD
       objects can
              be you
                 value objects and can be reusable in Flash and Neko
       / PHP.
              On the
                 server side, each vo will need to be backed by a custom
                 neko/php.db.Object to handle references to the manager
              class, id
                 column identification and so on. That's the
       trickiest part.
              If you
                 can map that to your vo's then all you're left with is
              sending the
                 data via the vo's from the flash layer and vice versa.

                 I was thinking perhaps a factory class could do this
       work? Or,
                 maybe the vo's could be created dynamically using
       some form of
                 template, and then make the data accessible using
       __resolve
              in the
                 db.Object class?

                 Anyway, thoughts would be welcome.


                 Best,
                 Lee





                 Laurent Auneau wrote:

                     I was rather thinking of writing it with you,
       but yes, that
                     was the point. And we are actually several
       people here that
                     could speed things up if it meets our needs.
                     Still, you didn't answer my first question about
       the way of
                     doing without (for today)?

                     Laurent


                     2009/6/10 Lee McColl Sylvester
       <[hidden email] <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>> <mailto:[hidden email]

       <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>

                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>

                        You could write it for me ;-)

                        Seriously, though, I'm still in the planning
       phase
              for this
                        project. I'll let you know when I have
       something worth
                     looking at.

                        Best,
                        Lee




                        Laurent Auneau wrote:

                            Hi Lee,

                            what is the alternative way of doing this at
              this time?
                            is there a way we could help you finish
       things
              faster?

                            Cheers,

                               Laurent Auneau - CEO
                               Succubus <http://www.succubus.fr/>
                               Viadeo
                                                       <http://www.viadeo.com/recherche/profil/index.jsp?memberId=00212i93f6x1phoq>
                            Linkedin
                                     <http://www.linkedin.com/in/laurentauneau> Plaxo
                               <http://laurentauneau.myplaxo.com/>


                            2009/6/10 Lee McColl Sylvester
              <[hidden email] <mailto:[hidden email]>
       <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
       <mailto:[hidden email] <mailto:[hidden email]>

              <mailto:[hidden email]
       <mailto:[hidden email]>>

                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>

                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>


                               Hey Kevin,

                               I'm currently working on a layer for Flash
              for SPOD
                            integration.
                               Essentially, the SPOD objects will be
       usable
              in both
                     Flash
                            and PHP
                               / Neko and you'd use the SPOD objects
       in Flash as
                     you would
                            on the
                               server. However, when accessed in
       Flash, the
              Flash/SPOD
                            layer will
                               use remoting to call down to the server to
              make the
                     actual
                            updates.

                               It's a long way from completion, but
       that's
              my goal.

                               Lee



                               Kévin STRUILLOU wrote:

                                   Ok, it seems
                     http://haxe.org/doc/remoting/client_server
                            will
                                   be my starting point.

                                   I want to reuse my neko SPOD
       objects in
              Flash.
                                   Is there a way to do this ?
                                   Maybe with some kind of conditional
              compiling ?
                                   Can the data returned to Flash be
       casted
              into some
                            "SPOD like"
                                   class ?

                                   Thanks again,

                                   Kévin


                                   On Wed, Jun 10, 2009 at 9:13 AM, Kévin
              STRUILLOU
                                   <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>
                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>>

                                   wrote:

                                      Maybe
              http://haxe.org/doc/remoting/flash_amf
                     will be
                            a good
                                   start.
                                      Thank you all, I'll take a look
       at this.

                                      Kévin


                                      On Wed, Jun 10, 2009 at 6:27
       AM, Tony
              Polinelli
                                      <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
              <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>
                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>

                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>> wrote:

                                          Have you looked into haxe
              remoting- it is
                     much
                            better
                                   than a
                                          URLRequest call (and
       sending back
              xml or
                     the like)

                                          http://haxe.org/doc/remoting




                                          On Tue, Jun 9, 2009 at
       11:55 AM, Blue
                     Sans douze
                                          <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>
                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>

                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>> wrote:

                                              Hi.

                                              Maybe using socket would be
              faster,
                     but it
                            needs you to
                                              have a socket server.

                                              Calling directly a
       mysql database
                     with flash
                            would be
                                              unsafe, because your
       password
              would be
                            optainable for
                                              anyone who uses your flash
              application.

                                              --Blue112

                                              2009/6/9 Kévin STRUILLOU
                            <[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>
                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>
                                                    <mailto:[hidden email] <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>> <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>

                                   <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]> <mailto:[hidden email]
       <mailto:[hidden email]>>>
                            <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email] <mailto:[hidden email]>>
                     <mailto:[hidden email]
       <mailto:[hidden email]>
              <mailto:[hidden email]
       <mailto:[hidden email]>>>>>>>


                                                  Hi,

                                                  I'm looking for a
       better
              solution
                     than
                            posting a
                                                  request with a
                     flash.net.URLLoader to a neko
                                   page and
                                                  waiting for the results
                                                  Any idea ?

                                                  How about a flash.db
              package ? :D

                                                  Kévin

                                                  --
                                                  haXe - an open
       source web
              programming
                            language
                                                  http://haxe.org



                                              --
                                              haXe - an open source web
              programming
                     language
                                              http://haxe.org




                                          --        Tony Polinelli
                                          http://touchmypixel.com

                                          --
                                          haXe - an open source web
       programming
                     language
                                          http://haxe.org





                               --    haXe - an open source web
       programming
              language
                               http://haxe.org




                        --    haXe - an open source web programming
       language
                        http://haxe.org




                 --    haXe - an open source web programming language
                 http://haxe.org




          --    haXe - an open source web programming language
          http://haxe.org




   --    haXe - an open source web programming language
   http://haxe.org




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org