Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Piotr Solnica
@solnic
I think about schemas as types too
Tim Riley
@timriley
I'm gonna need to come up with a different injection scenario for my talk, haha
Piotr Solnica
@solnic
it's an fp object that responds to call but it also very strictly defines a very specific type of data that your app deals with
Tim Riley
@timriley
Yeah, I think I'm starting to get you now
Piotr Solnica
@solnic
so even though we don't instantiate an instance of that "type" a schema still defines "a type"
I can say exactly the same thing about domain types defined by dry-types structs and values
Tim Riley
@timriley
This is true!
Piotr Solnica
@solnic
it's just that source data for these types come from a db, not an http request
Tim Riley
@timriley
Yeah. And I don't care abut injecting them because there are so many. It's completely unwarranted.
So I guess the same rule can apply to schemas
Piotr Solnica
@solnic
yeah, I think DI is a good tool for "service objects"
as in stuff that does something heavy, esp with side-effects
and you may want to replace it, or decorate it, or sutin
Tim Riley
@timriley
Yeah
I hear you
Oskar Szrajer
@gotar
ok all looks to work (basic skeleton), but a little magic to drop in next step
^ magic here ;]
@timriley your blog posts and repos was a HUGE help
it's so kard to glue everything together for the first time, a lot more blog posts and docs needed
Tim Riley
@timriley
@gotar oh cool! So you've got it now?
@gotar yeah, I hope I can write some more stack-specific docs over the next 2 weeks. And my blog posts... Well, they'll get there eventually. They have a plodding pace :)
Oskar Szrajer
@gotar
I manage it somehow but not happy how ;]
Tim Riley
@timriley
Hah, so have you had to use a hack or something? Or it just took longer than you hoped to get to the solution?
because ROM::Relation do not works with basic one - Container::Inject
or hack root for rom::repo, to have base class to limit code repetition, like: https://github.com/gotar/dry-web-skeleton/blob/master/lib/persistence/repo/base.rb#L15
probably other places too, like class around dry-v schema to make it AutoInjectable
Oskar Szrajer
@gotar
if you guys have time, any comments welcome, trying to build as simple skeleton as possibe. Your @timriley is great but to complex to just teach/explain/show different dry-web pieces
Piotr Solnica
@solnic
I'd call dry-web stuff as a pretty advanced thingie (at least for now)
so it's gonna be tough to explain to people who mostly know rails
Oskar Szrajer
@gotar
yeap i will try 3-4h workshops for good devs but rails ways devs
we will see
I already told them something about roda and rom, but they never wrote any app outside rails
then I plan to write some basic roda + rom app, and then go deeper and deeper inside container, auto-inject ...
we will see
Piotr Solnica
@solnic
it's gonna be interesting for sure :D
hanami will be a much much better "entry point" for people, I think
Oskar Szrajer
@gotar
the goal is not to teach dry-w, but maybe someone will pick roda or rom or dry-container for next project
Piotr Solnica
@solnic
yeah defo lots of interesting stuff to learn for people
Oskar Szrajer
@gotar
yeap but it;s special event for *RUG, on TRUGs for last 1-2y I try to explain rom and roda, and they ask for a workshops to sit together and write app in those technologies to learn
hard for them to force themself to try at home
then will will try this way, evangelistaion all the time ;]
ok time to sleep, bye and thx for great support as always :)
Piotr Solnica
@solnic
sure that's a really awesome initiative, thanks for doing that :)
:wave:
Tim Riley
@timriley
@gotar this sounds great, nice work!
What you are doing with that AutoInject hack is actually a lot nicer with dry-component's injector. But I'll see if we can improve the base AutoInject too
With dry-component you can just switch strategies ad-hoc