[Red5] SharedObjects outside of ApplicationAdapter?
Walter Tak
walter at waltertak.com
Mon Jun 23 16:01:48 PDT 2008
You should look at Red5 as it is right now. It works , in a way , and we
should be happy with that. There is room for improvement, or even we might
not know what the best way is and possible your desired solution is possible
but until we aren't experienced enough with the code we have to do what
looks best and have fun with it.
If you find out how to access the SO lateron without passing the reference
to the application/class/scope whatever to your class then you can rewrite a
piece of the code. Afterall I hope most work will be in designing and
writing the application, not the relative minor part 'how to access the SO'
isn't it ?
My personal opinion about the everlasting search for writing 'the cleanest
and most modulair piece of code' is that in the end you spend 50% of the
time on 5-10% of the project and after 3 months you find a better solution
for that hard part and you rewrite that 5-10% of your code in half a day :)
First time we experimented with Red5 it took us 3 weeks to make a simple
database-connection to mysql using it's native driver and getting functional
logs (log4j) It took us that long because we didn't use Red5 in easy-mode
enough and wanted to do 'hard and deep interesting matter' right away.
Regards,
Walter
> Hey,
>
> Yeah i did think about doing it that way, but it felt like i was then
> making
> my external classes dependant on the application, which felt a bit back to
> front. Also i dont entirely like the fact that my shared objects when made
> using the createSharedObject, are kinda hidden away somewhere, like
> pandoras
> box... i guess i could wrap it up though and just let have it return the
> created shared object so my class can make use of it. Again i didnt really
> want to pass over shared objects via the constructor, but i guess its a
> more
> appealing idea than passing over the application.
>
> Thanks for taking the time out to reply though, im finding it too hard to
> solve these problems i keep facing :(
>
>
> Grofit wrote:
>>
>> Im just wondering if its possible to create and use shared objects
>> outside
>> of the initial ApplicationAdapter. As all the tutorials ive seen use
>> ISharedObject, which are only createable through the ApplicaitonAdapter i
>> wasnt too sure, unless i made them in the main app then passed them over
>> in the constructor to my custom object.
>>
>> However in the API documentation i noticed the SharedObject class that is
>> instansiable, so is this the class im looking for? at the moment i just
>> get a connection failed when i try to use and retrieve a SharedObject
>> instance from within one of my classes. Can i only use ISharedObject's
>> that are created within the app, or am i ok to make my own without a
>> scope
>> etc... I also couldnt find a way to attach any listeners to the
>> SharedObject class, so im not quite sure how to do what im after...
>>
>
> --
> View this message in context:
> http://www.nabble.com/SharedObjects-outside-of-ApplicationAdapter--tp18059370p18078126.html
> Sent from the Red5 - English mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.4.1/1513 - Release Date: 22-06-08
> 07:52
>
>
More information about the Red5
mailing list