Comments (2)
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).
- 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.
- 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.
Pull request #29 adds support for lazy vs eager init. . .
from typhoon.
Related Issues (20)
- Invalid shift exponent in `calculateHash` HOT 4
- Plist Integration in Ios App Extensions
- Not compiled Xcode 9.3 HOT 2
- Flash back crash at startup HOT 1
- Carthage error 65 HOT 4
- Unable to compile after migrating from 3.5.1 to 4.0.5 HOT 5
- Resolve-by-type for ViewController using storyboard HOT 8
- TyphoonDefinition.withClass + classOrProtocolForAutoInjection => Making both work together HOT 1
- PodSpec 4.0.6 HOT 1
- Circular reference level depth HOT 8
- Multiple instances injected into view controller when using storyboard reference HOT 2
- Not all test are run on Travis, example app exception HOT 1
- TyphoonDefinition withConfigName:bundle: does not behave as expected when running tests
- TyphoonStoryboard swift not working HOT 1
- ios 13 Beta crash HOT 2
- cannot run tests HOT 1
- Insecure functions (malloc and memcpy) are used HOT 3
- Injecting a simple object through modularized assembly causes crash
- Framework target HOT 3
- How to get an instance from Typhoon? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typhoon.