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.
For a UI framework, show me a pretty demo with some example snippet code next to it and I will read on. Otherwise, I'm not motivated -- this is not the way you want people to read about your UI framework.
Of course, both re-frame (in ClojureScript) and Elm have the massive advantage of being in functional languages which allow for FRP, and embrace immutability by default.
This. I can't find a single example of an actual UI you'd build with famo.us on their entire site. How am I supposed to know what makes the framework worth learning if I don't see examples of what it makes possible?
I have to clone this locally, npm install the cli, register with famous, and scaffold a new project in order to see a working demo of Famous in action?? No thanks.
Whoever built that site has an interesting approach to error messaging. Consider this scenario:
Environment:
iPhone 5c
iOS 8.3
Safari
1) Go to milk.samsung.com
2) Milk displays a message suggesting that you access the site from either a desktop or a 'select Samsung device'. For some insane reason though, they provide a link to "Go to milk.samsung.com.
3) Click the 'Go to milk.samsung.com' link.
Result:
You receive the error message, "You are still on the phone".
My conclusion:
If they know that I'm on a phone that they don't support, why give me another link milk.samsung.com??
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 you're confused. You see Angular doing it and reverse-engineered the term. But notice how in Angular it is used to pass services into controllers, services that the controller has a dependency on.
Also, notice how this "feature" is broken in production. Any website worth its salt will minify the assets, which changes function parameter names. You did notice that, right, that your clever little hack works great in your development environment but totally breaks when you minify your code? You are testing things minified, right?
Why would you spend any time at all working on a feature that is fundamentally broken in production? Kill your darlings.
> 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)
> 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?
Because state is data. You operate on data, not depend on it.
My repository depends on a database connection (be it mock or real). It does not depend on what state the tables may be in.
If your function operates on data, it's "passing in data" and not "dependency injection". Hell, otherwise, every function call would involve dependency injection!
Would you accept that a Haskell function could depend on the streams that are bound into it? Not an individual datum, but the stream itself. I'd argue 'yes', in the same sense that you could depend on some model or factory in OO land. The leap is in the paradigm, functional vs OO.
Behaviors in BEST are a functional programming construct—they project streams of data into a return value. Note that Behaviors are automatically re-evaluated every time one of their dependent States change, which introduces this 'stream' functionality.
I'd argue that these streams are dependencies and that they're being injected into these functions (hence DI,) but honestly, at this point we're just bike-shedding about terminology :-).
I do want to make sure, though, that this functionality is properly communicated, as the State-Behavior relationship is the crux of our framework's design.
Nope, that's still just passing in data, from the point of view of the function receiving the data. Passing data to a function is just a regular old function call.
However, you could consider that the caller of the function could have had the stream injected, depending on the perspective of the rest of the application.
Notice how I've included the test case to illustrate how the dependency injection enables testability, which is critical to understanding the concept. Without DI, the setupPipeline method would take no parameters and explicitly hook to stdin/stdout.
Contrast this example with the standard case of regular-old-data-passing:
Note how inversion of control is not necessary to unit test this function, which is the indication that there is no dependency injection going on there.
If you were using dependency injection for the behaviors, it would imply that the injection is not strictly necessary, and you could instead write the function with a hard dependency. Since the behavior just takes data that whole idea is nonsensical. What would it bind to? Nothing. It's just taking data.
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.
Asking 10 people to explain what MVC is, and you'll get 11 answers ;) ! Having recently done a dive into this area, I would really recommend interested folks to patiently read this great article by Martin Fowler:
http://martinfowler.com/eaaDev/uiArchs.html
The web community has been done a great disservice by people popularising the phrase "MV*".
Yep. There's also some good discussion on the Portland Pattern Repository, particularly this discussion[1] about how the meaning of "Controller" changed from it's original Smalltalk meaning (where it is the component that updates the model in response to user input) to the way it's sometimes used today (as an object which mediates communication between the model and the view).
The core of famous is really an request animation frame loop that does css transitions to do animations with physics. Their demos uses absolute positioning on everything to get flickerfree animations. On top of that they've created various abstractions like angular directives and react components. It's very cool, but for simple animations in react or angular I turn to snabbt.js.
Link to the framework page [0]. I couldn't find any demos there or in other pages, though. I couldn't figure out how to run the examples [1] and there's no live links of em either.
This is not specifically directed at Famous... Why don't you [framework creators] show off REAL freaking apps? Show me a reasonably sized application that handles sophisticated user interactions. How do you handle routing? Data fetching / caching? Production builds? Testing environment? Dealing with your everyday CRUD? It's alright if your framework is meant as a framework that only handles some specific things, show a real-world example of the framework to highlight how it makes things easier/better/simpler/faster. I don't want to see TodoMVC or single-file examples. I know it's absolutely NOT sexy, but it's most of what I'll be having to deal with in my day-to-day work as a developer. (The only frontend framework that I know of that does a tremendous job at this is ember. I don't use ember, but I have nothing but the utmost respect for its developers.)
Specifically to famous: You touch on the topic of building large applications with Famous in this link. Your lack of reference applications (although not necessarily unreasonable, as you just announced the alpha) does nothing to gain my trust as a developer. I'd love to see a non-trivial example application that shows the full picture of what an app would look like.
Thank you... even in TFA, the handlers all seem to be synchronously bound... how do you tie these into async communication channels?
It really bugs me in this day and age, that frameworks are build without async client-server being a first-class behavior at least by example.
While I really appreciate the various demos for say TodoMVC, which allow some framework comparison.... what I would love to see (from TodoMVC or similar) would be an abstracted interface that is expressly async (even if only using setTimeout) via callbacks or promises for the data access. It's part of the story that is very important. Also, a very simple router... perhaps requiring a hello/login/register screen (user:user) and the todo screen.
I know TodoMVC was supposed to be just trivial enough to show something between the various frameworks... that said, I think we really need just a hair more.
It appears to be a web-based GUI toolkit. Something to replace JQuery-UI or Polymer, both of which are minimal.
The web needs something like Apple's Cocoa or Cocoa touch - a very rich GUI toolkit. It looks like this takes some inspiration from that, as some of the names are same. I don't know if it has an solver-based auto layout engine, though.
Anyways, I've been wanting something like this for a while now, as no company has really stepped up to the plate with a real GUI toolkit.
Which has the gem:
"Check out the 'Hello World' example below. When reading through the code, think of the tree as Famous-enhanced HTML and the behaviors as CSS styles on steroids."
So "behaviors" are styles? Why is the first line of a "Hello World" example a load of styles I don't understand?
And it's even more confusing: It talks about "components" but there are IDs which means any resuse would duplicate those IDs on the DOM (I think?) which isn't valid html.
The front-end framework space is highly competitive - There are lots of great options to choose from. Many companies are trying to gain developer mindshare in that area.
Famous, AngularJS, Polymer, React, RiotJS, CanJS, ... All really great options.
I think Famous will have trouble competing with React, Polymer 1.0 and the upcoming AngularJS 2.0 in the current 2D browser-based market. I think if something like Microsoft's hololens gains traction, Famous would greatly benefit - Its 3D features would help it stand out.
Most of the value of a 3D interface is lost when you project it on a 2D screen.
I have the suspicion that actual game dev tools will have the upper hand for VR. Sort of how native development is the way things are done on mobile. I'd love to see the web be universal, but I think there will just be too many shortcomings.
I hear from Famous as UI System, but what is (in simple words) Framework - Engine - The Machine - The User... the blog post is really confusing.
Got it after watch the Website:
"The Famous Framework is a new JavaScript framework for creating reusable, composable, and interchangeable UI widgets and applications. It balances declarative with imperative and functional with stateful, and it's built on top of the Famous Engine."
Wow, things move really fast in this space. Is "back when" May 2015? The only context I have is the "Didn't you just release Famous in May?" quote from the article.
The original hype was when they were in closed beta, which was way more than a year ago. Internet Archive[0] indicates they started promoting it as early as January 2013.
Things do move fast, but hype doesn't move that fast. The reason I'm cautious is that they were extremely hyped before being able to deliver any actual code developers could use and that in the time since the original announcement, well, all of the past two and a half years happened (e.g. React).
From the blog post it looks like alot of good work is being done here. I think most apps out there probably don't reach the level of complexity that would require a rethinking of MVC, but I have seen it and agree that some web applications have reached the need to think beyond what MVC can provide.
If I had to guess, I think some of the first web-related work (on what post-MVC web will look like) began several years ago when 'reactive' programming started becoming a hot topic.
Since it seems a new JS framework comes out pretty much every week, and some people express frustration in trying to filter through the noise, I would say to them that this one is definitely one to keep an eye on.
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?
A shame they don't even mention Web Components or custom elements, considering that much of what they are addressing in terms of composability and interop with other frameworks is exactly addressed by these standards.
This BEST stuff looks great and I'm looking forward to using it. But it will be a nightmare to search for if this stuff takes off. You should consider changing it to something more unique.
The Javascript framework space isn't competitive...it's saturated for the exact same reason that the PHP framework space was saturated.
Javascript and PHP frameworks are all built on top of a language that does everything you need for the web before you even start the framework. Frameworks in both languages are basically an exercise in arranging things according to your personal preferences...and people have a wide range of preferences.
I'm excited about Famous. The initial negative reaction from the community reminds me of the initial negative approach towards React. My gut tells me it is going to be very famous.
Famous came with a "WOW" demo then nothing for 2 years, only mail spam. React lib was available from the get go. Famous is a vaporware, the framework didn't exist when they made the "WOW" demo. They got some funding (2M $) and then they had to build something...
I like the fact that development for applications is moving towards what game code seems to have been using.
Building components and re-rendering with new state when necessary actually much better than what we're currently doing.
Which is why I prefer React over Batman, Ember and Angular.
Btw, I feel like their concept of Behaviour Tree doesnt' really fit in with the Behaviour Tree's I read about.