Hacker News new | past | comments | ask | show | jobs | submit login
Introducing the Famous Framework (famous.org)
145 points by dumindunuwan on June 24, 2015 | hide | past | favorite | 90 comments



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.


There's a reason for that: http://todomvc.com/


That's not a reason.


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.


For what it's worth, I quite enjoyed when re-frame did this.

https://github.com/Day8/re-frame

It looks like Famous is going for something similar, but I'm not enjoying the reading nearly as much.


Yes, indeed, this approach from Famous is VERY similar (in structure) to both: - re-frame (https://github.com/Day8/re-frame) and - the Elm Architecture. (https://github.com/evancz/elm-architecture-tutorial/).

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.

Can't tell you what an advantage that is.


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?


http://famous.org at least shows some code samples, but I agree - it'd be nice to see a real interface, as opposed to an animation.

It would also be great to see how Famous isn't a re-skin of MVC with a React-flavored API.


Agreed. Right at the bottom of the post they link to samples in their Github repo[1] if you're still looking to find what what's going on.

[1]: https://github.com/Famous/framework/tree/develop/lib/core-co...


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.


Checkout http://milk.samsung.com built using famous.

Stackoverflow has lots of famous snippets.


Not a great example: a) US-only b) breaks the back button


Doesn't work on mobile either.


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??


spoiler alert: interface unusable on retina macbook pro


I agree with you, but when you go to the main page of the project [0] it looks cool and I might use it soon.

[0] http://famous.org/


That's for the Famous Engine though, not the Famous Framework.


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.

For instance in pseudocode:

    useData = (data) ->
        munge(data) + calculate(data)

    setupPipeline = (input, output) ->
        input
            .pipe cleanup
            .pipe useData
            .pipe format
            .pipe output

    application = ->
        setupPipeline stdin, stdout

    test = ->
        setupPipeline mockInput, mockOutput
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:

    useData = (data) ->
        munge(data) + calculate(data)

    application = ->
        useData stdin.getInt()

    test = ->
        assert.equal -1, useData 42
        assert.equal 0, useData 100
        assert.equal 1, useData 99
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.


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.


I have to reply because I can't edit.

To the down voters:

Function(numberOfStates) is a function call with data being passed in.

Function(stateMachineFactory) is dependency injection.


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).

[1] http://c2.com/cgi/wiki?WhatsaControllerAnyway


One could do worse than having a look at: https://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html


It took me quite a bit of scrolling to figure out that Famous is some sort of JS UI system.


Tell me what it is.

Tell me what it is.

Tell me what it is.

Tell me what it is.

Tell me what it is.

Tell me what it is.

Oh.


Hmm...it's got a user and a machine...k...

Inspired by turtles, LEGO and ICs, k...

"Or with JavaScript in general" -- there's a hint

"Web Frameworks: Given that we're building a web framework" -- well, I wouldn't call it a given, but -- mystery solved!


Ha, this was exactly my thought process when I was reading!


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.

There are some open source projects that adds turn key components to famous, like famous-flex https://github.com/IjzerenHein/famous-flex by Hein Rutjes. If you want demo's, then there's the famous "fan site" http://famousco.de/links/


> that does css transitions to do animations

I thought it used WebGL to render animations.


you can choose your render target. thats why there is so much abstraction.


Is absolute positioning all you need for smooth animation like gsap?


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.

[0] http://famous.org/framework/ [1] https://github.com/Famous/framework/tree/develop/lib/core-co...


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.


> 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 framework isn't gonna be ... famous.


When I came to the realization this isn't satire, another piece of my soul died.


Is this satire? I can't tell. :/


I was certain that it was satire until about 50% of the way through. I scrolled to the bottom and sure enough... Github repo...


But then the repo has things such as: http://famous.org/framework/hello-framework.html

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.


"please don't let it be another JS framework, please don't let it be another JS framewo....ahhh man !" :P


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."


Famous is probably most famous for making the front page of HN.

It does look like a cool JS framework though.


Seeing how Famous is pretty much yesterday's hype, I'm curious to see whether it can still become relevant.


What is today's hype?


Tomorrow's yesterday's hype.


Last time I checked? Mercury or Om. But neither of them comes even close to the level of hype famous had (back when it was famo.us).


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.


Their first launch was May 2014. The thing they released then mostly didn't actually work, but was very heavily hyped anyway.


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).

[0]: https://web.archive.org/web/20130715000000*/http://famo.us

EDIT: Here's the January 2013 beta marketing website: https://web.archive.org/web/20130110063331/http://famo.us/


Didn't you know? Famo.us for 15 minutes?


Days since last new JavaScript Framework: 0


Don't worry, my new Flux implementation will take your mind off of that!


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.


So much hate for these guys, it's amazing.


I would characterize it as "skepticism".


I wouldn't.


Looks interesting. Haven't heard of BEST, is there any documents or articles out there?


Seems the same as Web Components/Polymer. Not sure why neither are mentioned...


Strange SSL cert on that website - it looks like the site is only partially encrypted and firefox cant detect who it's verified by.



It looks great, but I am trying to get documentation of the famous-cli command "deploy".. no idea of how it works..


The source code is on Github if you want to check it out (https://github.com/Famous/famous-cli)


I've seen Famous around for a while, what makes this different than what they were doing previously?


"Let Angular be Angular, let React be React, and let Famous be famous"


I am curious of what blog-engine they are using. It looks very similar to Medium


According to my wappalyzer it is Ghost http://imgur.com/QAjVXlg https://ghost.org/


This has been around for a while, what's introducing it today?


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...


So is BEST just MVC but a with a different name?


Ah, pathetic Famous as usual.


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.



No. No, it isn't.

And even if it were, it's possible to have a useful response beyond a webcomic link that every idiot posts when anything new happens.


That was a joke... but I guess when it comes to front-end frameworks, we can't laugh.


Regurgitated links are not jokes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: