Hi James!

You're right I wrote a lot about the relation between "component 
definition", "update-system fn" and "system customization" but very little 
about BigBang...

Basically with the minimal code provided 
<https://github.com/milesian/BigBang/blob/master/src/milesian/bigbang.clj> 
(only 
11LOC)  I tried to highlight the difference between an *"updated system"* 
and a *"started system"* (an updated system using component/start fn). A
 "started system" can only use those update(s)-system that happen "*before 
start *(update-system % component/start)*"* or "*before getting out of 
start function invocation *(update-system % #(comp fn4 fn3 component/start 
fn2 fn1))." 
And taking into account that all update-system functions receive and return 
the component, we can derive that all before update(s)-system functions can 
be compose in the last one *(update-system % #(comp ... fn6 fn5 *fn4 fn3 
component/start fn2 fn1* fn0 fn-1 fn-2 fn-3 ... ))*

BigBang only adds 2 keywords *:before-start :after-start* and lets you 
think and write your update(s)-actions with more clarity  (and you can 
reuse them better too)

You can check this example code with different started system actions and 
results
https://github.com/milesian/bigbang-example/blob/master/src/bigbang_example/core.clj

And if you look at the "decomplected" actions (identity 
<https://github.com/milesian/identity/blob/master/src/milesian/identity.clj>
, aop <https://github.com/milesian/aop/blob/master/src/milesian/aop.clj>, 
co-dependency 
<https://github.com/tangrammer/co-dependency/blob/master/src/tangrammer/component/co_dependency.clj#L37-L50>)
 
you can realise that they are really minimal and simple

So summarising, BigBang easy you to write better your stuartsierra system 
customization code

I hope that this explanation helped you :)
Thanks a lot for your review!
Juan










El viernes, 12 de diciembre de 2014 00:42:12 UTC+1, James Reeves escribió:
>
> I've read through the README, but I still don't feel like I understand 
> what problem this library is trying to solve.
>
> Could you perhaps provide an example of something that's hard to do with 
> just Component, and easy to do with BigBang?
>
> - James
>
> On 11 December 2014 at 17:31, JUAN ANTONIO Ruz <juanant...@gmail.com 
> <javascript:>> wrote:
>
>> Hi folks, 
>> I wanted to share here BigBang, my library proposal in customization the 
>> way stuartsierra/component system starts.
>>
>> I'll copy here "*Why did I write this library*?" 
>>
>> After trying to get working Aspect Oriented Programming and Reverse 
>> Dependency Injection in stuartuartsierra/component systems I realized that 
>> system customization topic wasn't treated as it deserved
>>
>> Once I wrote this BigBang lib, my previous tries (AOP 
>> <https://github.com/milesian/aop> and co-dependency 
>> <https://github.com/tangrammer/co-dependency>) come up with more better 
>> design, indeed this BigBang library is basically a very tiny and simple 
>> pattern, but very useful :)
>>
>> I think can be interesting to get a read to this README 
>> <https://github.com/milesian/BigBang/blob/master/README.md> because 
>> besides presenting my solution pattern, I tried to highlight and review 
>> very basic and  important topics as can be "what is a component?" or "how 
>> does your system start?"
>>
>> Hope you enjoy it!
>>
>> https://github.com/milesian/BigBang
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to