289 karma · joined September 13, 2011
NYC
http://www.ryanhaywood.com http://www.github.com/lsdafjklsd
Things that are a deal breaker for me:
Template language... You can call it 'separation of concerns' all you want, but just let me generate templates using the language I already know, JSX is great
State management... I cut my teeth with Ember professionally for a few years, and really loved it up until I built a data intensive app. Having state spread across different controllers is great when you have many different routes and pages, but if one page turns in to a photoshop like app, controllers make a terrible state management tool. It doesn't seem overly complicated to me to use redux along with react-redux's connect function to connect regular functions returning JSX to your state object. Looking at Vue.js, it seems like I need to learn Ember-lite + Angular (custom directives).
It's been much easier to pull all app state into a central, db like structure, and allow components to connect and query that structure for whatever data they need. It makes making changes to components in the future easier, because all of my data is normalized in a structure, and it's all possibly available to any component in the app.
I've found that with MVC, if you design the private state a certain way, and in the future need largeish independent components to coordinate, well, you're going to have a bad time.
So redux or not, I'm definitely a fan managing state as it's own separate thing, and having components able to query and connect to that data structure, without having to pipe props down a tree of components, which leads to an app that's hard to change.
The tooling is the best. Figwheel is hot reload that never goes down, devcards is revolutionary, and a browser repl for live in editor evaluation...
> significantly different from the existing javascript code base you already have
It actually isn't. Clojurescript is basically javascript that's immutable first, has underscore in it's core library, and then a bunch of other awesome language constructs. The libraries use the same patterns, re-frame is a nicer, more succinct abstraction over react-redux.
> poor interop to the existing js ecosystem
The interop might be the best out there. Seriously you can write javascript in clojurescript. you can straight up import es6 jsx javascript into your clojurescript code. (thanks Google Closure)
> For javascript, that crowd of alternatives is so much larger
I mean, what are the options? Clojurescript's benefits are so much more than the language. The real pluses for clojurescript are the Google Closure compiler, hot reload, browser repl, devcards, front end libraries. The language is the cherry on top. There are no alternatives that have a comparable platform not completely alien to JS developers.
PS Ramda it eats lo-dash and its imperative API for lunch. It's for power users, everything curried, higher levels of abstractions. Pick it up and learn it, it'll make you a better programmer.
Next stop Clojurescript. Om next is a library where you can get a feel for a Falcor + Relay stack in like 70 lines of code all without the specific tech bloat. David Nolen is a UI profit, just follow him.
a: These are what are known as "Guidos.
b: (chuckles) Yeah, Sweetie, I don't think they actually like to be called that.
a: But they do.
a: That's what they call themselves, although interestingly, not all Guidos are of Italian descent.
b: Really?
a: While the styles and mannerisms are based on Italian-American tropes, the Guidos can be of any ethnic background.
a: They gather at the Jersey Shore.
a: The male bonding is near homoerotic.
a: The friends or "bros" are more important to them than family.
b: Right.
b: And how do you know all of this?
a: I stumbled across a compelling documentary about them.
a: The anthropologist in me was fascinated.
Om.next takes code you writes and makes it go.
What we really need is a translation of om.next to javascript. That library summarizes all the good ideas from Netflix and Facebook into a small library for every day use. The fact that it's in Clojurescript makes it a non-starter for others, too bad because it's a really great eco-system.
edit, list technologies: React + Redux is a good start, but we need composable queries and a router (falcor) or reconciler (om.next) that manages data fetching / caching. JLongster has done some experimentation here with datascript integration https://github.com/jlongster/redux-experiments/blob/master/s...
.my-component {
.header {
...
}
}You would just see header floating around in the markup, unsure of where it's namespaced.
Also I disagree that you shouldn't modularize your CSS. We now create a CSS file who's name corresponds with the class name.
/styles
/components
my-component.css
and in the markup<div class=".MyComponent-wrap">
<div class=".MyComponent-title">
...
</div>
</div>With CSS like that you always know where a style is declared, and the order of the classes do not matter.
More on the issue: http://nicolasgallagher.com/about-html-semantics-front-end-a...
edit: I also had no previous Google Voice account to transfer FWIW
GraphQL doesn't mean moving to stateful components, it's just a nicer way to have a singleton data store because instead of chunking and passing a map around, components can declare which data they need. In that system components are still read only, and dispatch to external pure functions.
David Nolen does a great job talking about the trade offs and the evolution of everything in this talk https://www.youtube.com/watch?v=ByNs9TG30E8& I highly recommend it!
So basically I'd do any serious development with Clojurescript. Elm is a really cool thing with a small community that's fun to mess around with.