Skip to content

Commit a160714

Browse files
authored
imrpove formatting (#4)
1 parent e27d3b2 commit a160714

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -410,35 +410,42 @@ end
410410
Yes I agree. It's early days and I'm open to syntax improvement ideas. This is really about it being conceptually less ugly than the alternative, which is to jump around between lots of files. In the existing alternative to using this gem the ugliness is not within each individual file, but within the overall hidden architecture and the hunting process of jumping around in complex interactor chains. We can't see that ugliness but we probably experience it. If you don't feel or experience that ugliness then this gem may not be the right fit for you.
411411

412412

413-
- Is this interactor/interactor-contracts compatible?
413+
- Is this interactor/interactor-contracts compatible?
414+
-
414415
Yes and we use them as dependencies. It's possible we'd drop those dependencies in the future but unlikely. I think it's highly likely we'd retain compatibility.
415416

416417

417418
- Why not propose changes to the interactor or interactor-contracts gem?
419+
418420
Honestly, I think both are great and why we've built on top of them.
419421
I presume they'd object to such an extensive opinionated change, and I think that would be the right decision too.
420422
If this becomes more stable, less coupled to Rails, there's interest, and things we can provide upstream I'd be happy to propose changes to those gems.
421423

422424
- Isn't this all just syntactic sugar?
425+
423426
Yes, but it's sugar that makes the code easier to read and understand.
424427

425428
- Is it really easier to parse this new DSL/syntax than POROs?
429+
426430
That's subjective, but I think so. The benefit is you have fewer extraneous files patching over a common problem in interactors.
427431

428432
- But it gets really verbose and complex!
433+
429434
Again this is subjective, but if you've worked with apps with hundred or thousands of interactors, you'll have encountered these problems.
430435
I think when we work with interactors we're in one of two modes.
431436
Hunting to find the interactor we need to change, or working on the interactor we need to change.
432437
This makes the first step much easier.
433438
The second step has always been a great experience with interactors.
434439

435-
- I prefer Service Objects
440+
- I prefer Service Object
441+
436442
If you're not heavily invested into interactors this may not be for you.
437443
I love the chaining interactors provide.
438444
I love the contracts.
439445
I love the simplicity of the interface.
440446
I love the way they can be composed.
441447
I love the way they can be tested.
448+
442449
When I've used service objects, I've found them to be more complex to test and compose.
443450
I can't see a clean way that using service objects to compose interactors could work well without losing some of the aforementioned benefits.
444451

0 commit comments

Comments
 (0)