Open-Sourcing CloudFlare’s UI Framework
blog.cloudflare.com
blog.cloudflare.com
It's a super awesome feeling to have open sourced this after working on it for months, and I think we've done some interesting things. So I want to share our ideas and opinions. I'm hoping to publish more about them in the coming weeks.
closes 30 browser tabs
Also I was trying to get a number of things in a good place, like https://lernajs.io/
From: John Graham-Cumming
Subject: Re: open sourcing cf-ui
Date: Fri, 11 Mar 2016 07:15:56 +0000
This is fantastic! I am really happy to see open source
stuff from www and would love to see this open sourced soon
with a nice blog post describing why we wrote this, what
the transition was like, what the components do.
We've done a tremendous amount of blogging and open
sourcing of systems level stuff and it's great that we can
do the same here. Super to showcase all our technology.
Really nice.
But, oh, those guys reply and that's what you remember?:-)
We have a lot of complexity in our view/component layer where we trying to bring simple workflows to very complicated technical features. Backbone (even with Marionette) doesn't have a strong view composition story, essentially avoiding setting up any patterns.
React's composition pattern is so strong that its hard not to abstract things. The complexity is still there but its easy to follow and extremely simple to test (especially with redux).
There are more reasons, but I have to go now. Hopefully that suffices
There were two primary drivers the led me to adopt Redux.
1) When working with multiple services to build a single view, Backbone models are the wrong abstraction. Redux allows you to work with arbitrary data structures without the need to deal with hooking up events between nested models/collections. It also prevents overfetching or having to resort to nested models when a single endpoint serves multiple views.
2) Managing complex asynchronous flows becomes easier when there's a single source of truth.
The backends for frontends pattern that Netflix and Thoughtworks have written about is another approach to dealing with the multiple services issue, but in reality, it's not an option for every project.
I haven't tested the performance heavily but I'm not really concerned about it.
<Table striped>
<TableBody>
<TableRow>
<TableCell>One</TableCell>
<TableCell>Two</TableCell>
</TableRow>
<TableRow>
<TableCell>Three</TableCell>
<TableCell>Four</TableCell>
</TableRow>
</TableBody>
</Table> <Input />
could return <input class="form-control" />
Now, you don't have to type `class="form-control"` on every single input, and if you want to move away from bootstrap, you can remove it all in one place.However, Elm is still making breaking changes on the language level [1]. To bet on a language like that right now is tough for a larger company.
Also, we're not dropping everything and rewriting it all from the ground up. I'm not sure that Elm has a good story for incremental migrations yet, where React has an excellent one.