[Red5] SharedObjects outside of ApplicationAdapter?
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.
> Yeah i did think about doing it that way, but it felt like i was then
> 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
> 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
> 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
>> 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
>> 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:
> Sent from the Red5 - English mailing list archive at Nabble.com.
> Red5 mailing list
> Red5 at 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
More information about the Red5