These are chat archives for orbitjs/orbit.js

31st
Jul 2015
Mx Corey Frang
@gnarf
Jul 31 2015 18:21
Oh hey @opsb
Cool - this one works for people who aren't contribs
So I think gitter might be a little better to use than IRC -- it has history/etc
Oliver Searle-Barnes
@opsb
Jul 31 2015 18:55
@gnarf hey! yeah this is much better, can read back the history without needing to keep my IRC client open all the time
Dan Gebhardt
@dgeb
Jul 31 2015 19:01
@opsb hey there! I was just telling @gnarf that I'm working on a pretty epic refactor
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:01
@dgeb been considering spiking out a rethinkdb port of orbit-firebase (it has joins, firebase doesn't...). Think I'll spend a little time feeling out rethinkdb and getting it set up with deepstream.io (open source server that adds an authorization layer similar to firebase on top of rethinkdb). Have you got anywhere with refactoring the normalized json format?
Ah, was just about to ask where you were with that
What've you been up to?
Dan Gebhardt
@dgeb
Jul 31 2015 19:02
so, I'm introducing the ability for sources to handle multiple operations in a single call to transform
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:02
yep, sounds very good
Dan Gebhardt
@dgeb
Jul 31 2015 19:02
and putting sources in charge of coalescing and diffing their own ops
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:02
that's definitely been an awkward point
right
Dan Gebhardt
@dgeb
Jul 31 2015 19:02
yeah
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:03
so what does a call to transform look like now?
just pass an array in?
Dan Gebhardt
@dgeb
Jul 31 2015 19:03
yes
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:03
right
what about related operations?
Dan Gebhardt
@dgeb
Jul 31 2015 19:03
the tranform connectors are much simpler now
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:03
ah
be interested to see that
always felt like some of the logic should be in the sources
Dan Gebhardt
@dgeb
Jul 31 2015 19:04
yeah ... I will push it all very soon
this simplifies a lot
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:04
great
sounds really good
Dan Gebhardt
@dgeb
Jul 31 2015 19:04
but I haven't started the new normalized form refactor
that's important too
so much to do!
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:05
being able to batch up operations from the front end will be good
Dan Gebhardt
@dgeb
Jul 31 2015 19:05
yeah
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:05
have you thought about how to bundle them up in ember-orbit?
Dan Gebhardt
@dgeb
Jul 31 2015 19:06
essentially with editing contexts
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:06
we have observers in our fork
Dan Gebhardt
@dgeb
Jul 31 2015 19:06
hmmm
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:06
they're fairly nascent but are useful
would be good to bundle them up with the ember lifecycle though
as transformations are blocking it can be slow at the moment
Dan Gebhardt
@dgeb
Jul 31 2015 19:07
yeah, observers can be an anti-pattern
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:07
after previous conversations though I suspect you might lean towards using the service layer to bundle ops up
:)
yeah, I've done it both ways, leaned heavily on a service layer in my java days, used listeners with rails (wisper)
Mx Corey Frang
@gnarf
Jul 31 2015 19:08
Check out the activity on the right
thats pretty neat
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:08
nice!
Mx Corey Frang
@gnarf
Jul 31 2015 19:08
should we make ember-orbit it's own room
?
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:08
there's not many of us at the moment :)
maybe one room is enough
Dan Gebhardt
@dgeb
Jul 31 2015 19:09
yeah, sounds good for now :)
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:09
is anyone using orbit with anything else yet?
I'm hoping we'll bait someone into doing react integration at some point
;)
Mx Corey Frang
@gnarf
Jul 31 2015 19:09
That would be really easy
Dan Gebhardt
@dgeb
Jul 31 2015 19:10
goforit!
Mx Corey Frang
@gnarf
Jul 31 2015 19:10
i think @jmeas was talking about doing a backbone-orbit
Dan Gebhardt
@dgeb
Jul 31 2015 19:11
yeah - that'd be great
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:11
@dgeb my only complaint with just using a service layer is that you can end up with domain logic in the service layer which only gets applied if you call the right methods, as opposed to the dom layer managing it and keeping everything in sync
possibly more sophisticated relationships would do the job though
definitely missing having "through" from active-record relationships
Dan Gebhardt
@dgeb
Jul 31 2015 19:13
yeah, we'll have to think on the best way to provide that
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:13
not to mention scopes ;) I've been itching to add record.relationship.byName() for instance
Dan Gebhardt
@dgeb
Jul 31 2015 19:14
would be sweet
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:14
will hopefully have a little more time coming up to look at ember-orbit a bit more
Dan Gebhardt
@dgeb
Jul 31 2015 19:14
I'm hoping that once this refactor is done and we launch orbitjs.com, we'll get some more interest in orbit
I'm going to be using it pretty full time in a project of my own soon
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:15
yeah, everyone I've spoken to is very interested, but I've warned people off for now
Dan Gebhardt
@dgeb
Jul 31 2015 19:15
fair enough
still a few kinks to work out no doubt
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:15
I think you need to really understand what's going on at a lower level to use it at the moment
yeah
I think it's close though
Dan Gebhardt
@dgeb
Jul 31 2015 19:15
yep
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:16
I'm planning on doing a talk for the ember meetup in barcelona in 2/3 months
reckon that'll be about the right time
Dan Gebhardt
@dgeb
Jul 31 2015 19:16
oh nice! I think so
do you live in Barcelona?
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:16
moved here a month ago, was in Mexico City before
Dan Gebhardt
@dgeb
Jul 31 2015 19:17
ah, I really liked Barcelona when I went there for EmberFest last year
to talk about Orbit ;)
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:17
yeah, it's an awesome city
Dan Gebhardt
@dgeb
Jul 31 2015 19:17
no doubt
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:17
ah yes, I think I saw the slides
nice size
can get around mostly by bike
Mx Corey Frang
@gnarf
Jul 31 2015 19:18
I really want to try to remove the Array/ObjectProxies from the ember-orbit layer
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:18
and it's got a nice mix of urban/outdoor
yeah, the hasOne proxies have been a pain actually
Mx Corey Frang
@gnarf
Jul 31 2015 19:18
we have the schema, we should be able to build things like links without it
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:18
there's some places where I've had to manually unwrap them for equality
was not pretty
Mx Corey Frang
@gnarf
Jul 31 2015 19:18
@opsb i suggest using .id
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:18
didn't have time to dig in at the time though
Mx Corey Frang
@gnarf
Jul 31 2015 19:18
instead
future compatible
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:19
yeah, I mainly do that
collection.contains(object) is a bit more annoying though
guess you can mapBy('id) first
javascript equality...
Mx Corey Frang
@gnarf
Jul 31 2015 19:20
collection.find( record => get(record,id) === id )
shrug
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:20
ha
Mx Corey Frang
@gnarf
Jul 31 2015 19:20
mapBy().contains() prolly easier
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:20
yeah, I think that reads the easiest
Mx Corey Frang
@gnarf
Jul 31 2015 19:21
just double iterations
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:21
yeah
Dan Gebhardt
@dgeb
Jul 31 2015 19:21
that reminds me - want to start using babel?
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:21
having the relationships as proxies in ember-orbit means we could provide those methods though
would love to!
Dan Gebhardt
@dgeb
Jul 31 2015 19:21
:)
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:21
been ramping up use in my app, much nicer!
Dan Gebhardt
@dgeb
Jul 31 2015 19:22
yeah
Mx Corey Frang
@gnarf
Jul 31 2015 19:22
It would probably be worthwhile -- I also wanted to see if we could get codecov.io goin
if we are messing with build chains, we should investigate what that takes
Dan Gebhardt
@dgeb
Jul 31 2015 19:22
sounds good
Mx Corey Frang
@gnarf
Jul 31 2015 19:22
It might be worth writing some benchmarks too
Dan Gebhardt
@dgeb
Jul 31 2015 19:22
yep all good
Mx Corey Frang
@gnarf
Jul 31 2015 19:23
(someone make these issues? :) )
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:23
yeah, would be really useful to have benchmarks against the source api
Mx Corey Frang
@gnarf
Jul 31 2015 19:24
hrm
one thing lame about activity
it doesn't show which repo :/
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:24
?
ah
that's unfortunate
maybe two rooms is the way to go then
I'm easy
Mx Corey Frang
@gnarf
Jul 31 2015 19:25
I still think one room is better for now
Oliver Searle-Barnes
@opsb
Jul 31 2015 19:26
k, gotta go, got an epic migration to do
Mx Corey Frang
@gnarf
Jul 31 2015 19:26
At least until there is a different "community" to talk ember/backbone/react/angular/whatever integrations
Dan Gebhardt
@dgeb
Jul 31 2015 19:27
makes sense
Mx Corey Frang
@gnarf
Jul 31 2015 19:34
hey @dgeb I hate to interrupt a good refactor -- but can you try to reason about orbitjs/orbit.js#172 and the test failure it causes?
Dan Gebhardt
@dgeb
Jul 31 2015 20:36
@gnarf you reviewed all the server mocks in that failing test?
Tyler Kellen
@tkellen
Jul 31 2015 20:43
yo
this is weird
Mx Corey Frang
@gnarf
Jul 31 2015 22:12
@tkellen whats weird?