Coder Social home page Coder Social logo

Comments (2)

jasperblues avatar jasperblues commented on August 19, 2024

Hi Bruce,

You're asking in the correct place, because I haven't set up a mailing list yet. . . (I think its about time that I did).

  1. All objects in Typhoon are instantiated in a lazy fashion - the object is not built until its asked for. For an object that has a heavy instantiation there's currently no way to mark it for eager instantiation, however you could easily work around this by fetching when you set up the container.

Regarding singleton vs prototype: A prototype is a new instance of an object, while a singleton is a shared instance. You should generally use prototype (especially for mobile) because these will be cleaned up (i.e. dealloc'd) when no longer referenced. . . However, you sometimes need a true shared instance - e.g. RootViewController or something that holds shared state.

  1. Its possible to group components using separate files (for XML style) or categories (for block-style) . . however its not currently possible to set up child/parent containers.

If you like I can open an issue for either of the above features - eager instantiation and/or child contexts.

Jasper Blues
Landline: +63.2.826.2489
Skype: jasperblues
LinkedIn Twitter

On Jul 5, 2013, at 11:39 PM, Bruce Flowers [email protected] wrote:

I'm just asking here since I hadn't seen another forum, but please let me know if I'm not in the right place:

Does Typhoon have a provision for lazy instantiation for objects? Is the "prototype" scope for this purpose? Could you explain a little more about this?

Is there any way to initialize "child" contexts, which would be aware of the main one? If so, is it possible to do deferred initialization of child contexts?

Thanks,
Bruce


Reply to this email directly or view it on GitHub.

from typhoon.

jasperblues avatar jasperblues commented on August 19, 2024

Pull request #29 adds support for lazy vs eager init. . .

from typhoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.