Live data from Hacker News

Introducing the Famous Framework

blog.famous.org

71–80 of 94 posts

Re: Introducing the Famous Framework

#72

Here is an example of a simple useless todo app, good luck with your complex multipage layout... - Every js framework ever

Haha, totally, I hear you.

Part of our decision to prioritize integration with other technologies/frameworks is so that more mature tools like Angular or React can do the heavy lifting on application logic while Famous focuses on animation and layout. We learned a lot about this balance from our time building Famo.us/Angular.

In other words, we're not trying to be 'everything for everyone' out of the gate, but we'd love to be 'something for everyone,' and the 'something' we're focusing on is what what Famous is good at: user interfaces, interactions, and animations.

Re: Introducing the Famous Framework

#77

We use dependency injection to match State names to parameters of Behavior functions—the State numberOfStates gets injected into any Behavior function that lists is as a parameter, like function(numberOfStates). We need to have a talk. First, this isn't dependency injection - you're passing in data. These "Behavior" functions may depend on the data, but that doesn't make this a dependency . Oh, I can understand how y…

> These "Behavior" functions may depend on the data, but that doesn't make this a dependency.

Would you mind clarifying this distinction as you see it?

As far as I can see, x depends on y if and only if y is a dependency of x. This would make the States that Behaviors depend on a 'dependency,' based on your statement above that 'functions ... depend on the data [States].'

These State dependencies (if we can agree on the term) are injected dynamically based on the names of the parameters in the Behavior functions. I'm not one to bike-shed on terminology, but I do think it's fair to say that we have dependencies that we're dynamically injecting. If it looks like a duck and quacks like a duck, it's probably a duck.

Perhaps the distinction you're flagging on vs Angular is that Angular injects a reference to the dependency, whereas Famous injects the value of the dependency?

Re: Introducing the Famous Framework

#78
post #62

We use dependency injection to match State names to parameters of Behavior functions—the State numberOfStates gets injected into any Behavior function that lists is as a parameter, like function(numberOfStates). We need to have a talk. First, this isn't dependency injection - you're passing in data. These "Behavior" functions may depend on the data, but that doesn't make this a dependency . Oh, I can understand how y…

> Any website worth its salt will minify the assets In Angular you'd assign a property called $inject to make "DI" still work even with minification, so it's not really an issue.Or you can explicitly pass a array with dependency names when a service is registered. So there is no issue here. Now I don't know how Famous works and i'm not interested in using that 2M dollars vaporware. I'm just saying.

Many build tools will allow you to simply annotate functions that are meant to have their dependencies injected so you can avoid explicitly typing out the verbose array syntax. (e.g. https://github.com/olov/ng-annotate)

Re: Introducing the Famous Framework

#79

We use dependency injection to match State names to parameters of Behavior functions—the State numberOfStates gets injected into any Behavior function that lists is as a parameter, like function(numberOfStates). We need to have a talk. First, this isn't dependency injection - you're passing in data. These "Behavior" functions may depend on the data, but that doesn't make this a dependency . Oh, I can understand how y…

Wait, are they seriously trying to say that "function(numberOfStates)" is dependency injection?

In angular that's basically how it works. The framework actually calls toString on the functions which actually allow you to parse out the arguments names so the callers know which arguments (dependencies) need to be passed.

Re: Introducing the Famous Framework

#80
One thing that I like with a JS framework is when I can actually play around with a demo or two without cloning the repo. Call me lazy, but I don't see why a framework that is entirely client-side can't just put the demos up?
Post reply on HN