+1 for the require_once method. The best example for this (since we are in
the javascript world) is requirejs. http://requirejs.org/. They have
mentioned that they support rhino runtime as well. Also I don't think it's
a bad design considering the fact that we are talking about scripting.
Scripting always has scenarios where you need to run a particular script
only once.

Cheers!


On Tue, Oct 8, 2013 at 1:18 PM, Dilshan Edirisuriya <[email protected]>wrote:

> Hi,
>
> Is there anything similar to subject? Looked into the docs and could not
> find any.
>
> Above function is needed for cyclic module dependencies. I know its a bad
> design to implement such way but there are few scenarios this will be
> needed.
>
> 1) If there is cyclic dependencies we may have to come up with a common
> module. But if there lot of modules, the number of common modules can
> increase and it will end up being hard to manage.
>
> 2) We may have to add a function level module injection. Again this will
> have module inter-dependencies.
>
> PHP itself has this capability. Also NodeJS uses a cache in such a
> scenario when there is a dependency it will retrieved the previous object.
>
> Can we have such a function under Jaggery?
>
> Regards,
>
> Dilshan
>
>
> --
> Dilshan Edirisuriya
> Senior Software Engineer - WSO2Mobile
> Mob: + 94 772245502
> http://wso2mobile.com/
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chan (Dulitha Wijewantha)
Software Engineer - Mobile Development
WSO2Mobile
Lean.Enterprise.Mobileware
 * ~Email       [email protected] <[email protected]>*
*  ~Mobile     +94712112165*
*  ~Website   dulithawijewantha.com
*
*  ~Blog         blog.dulithawijewantha.com<http://dulichan.github.io/chan/>
*
*  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to