Aaron
00:00:00 – 00:00:01
It going with Colleen?
Good.
Yeah.
So we we got it going pretty fast.
The in terms of she generates the configuration, and then I build the builder based on the configuration.
And now we're working on the full loop.
So I'm gonna build the blueprint and then feed it to her, and then we're gonna, create an actual query and run it on a dataset, and actually have that that happen.
So we should have that going pretty quick.
That was super easy.
Yeah.
There's, like, only a couple small things, like technical stuff.
We don't need to get into it Mhmm.
Too much on the podcast, but we Colin and I are kinda just like making choices, and then we're gonna run it by you later.
Aaron
00:00:43 – 00:00:45
Great.
That's awesome.
Yeah.
That's sounds pretty fast.
Aaron
00:00:48 – 00:00:51
Seems pretty great.
Do you feel good about it?
Yeah.
Yeah.
I, I gotta talk with her about pacing and, like, making sure that I understand where she's at and what we have left on her plate.
And so we'll have this integration.
And then I also need to map out we have, like, a demo meeting to run on Friday.
So, like, a catch up status meeting with almost said the name of the company, with those guys.
Aaron
00:01:25 – 00:01:26
Yeah.
And then I just wanna think ahead to what do I want to show them?
What would be a good, like, goal for us to so that they could see progress.
Because we're making lots of progress.
It's just I think it helps people to actually see things.
Aaron
00:01:47 – 00:01:50
Yeah.
Is it just us, or is it another everybody show and tell?
It's more than us, but I don't think it's like the gigantic show and tell thing.
Aaron
00:01:57 – 00:01:58
Okay.
They're doing it every 2 weeks, so it might be that.
I don't know.
But that'll be fine.
Like, they'll like to see what we have.
We'll we'll have something cool.
I just gotta decide, like, what I want, and that's gonna be my goal.
And then I'll just we'll just work our asses off to get there.
And then Colleen, see how much she can that's basically I just need to know, like, what okay.
What does she have left?
And where what's her pace?
And what's how quickly can we get it done?
The client has this internal goal of end of March, which I kinda not sure that Colleen's on the same page with me terms of that goal right now.
Aaron
00:02:35 – 00:02:35
Mhmm.
But also I can't blame her because she's trying to move and Yeah.
Has many things happening.
So
Aaron
00:02:41 – 00:02:42
Yeah.
She does.
So that's fine.
I just need to know what's up.
And and I guess I'll be our pinch hitter rails developer if we have to go there.
Yeah.
Which will be terrible.
I'm so slow at rails.
But I can actually do it, so it would be okay.
I think we'd be I I could do it.
It would be okay.
Aaron
00:03:04 – 00:03:15
Yeah.
It would be fine.
Especially since she's got a lot of it set up already.
Hopefully, she's done a lot of the the hard work and we can fill in wherever needed.
I think so.
It's looking good.
Aaron
00:03:17 – 00:03:24
Good.
Yeah.
I know one thing she has left is still, relation.
What what did you say?
Aaron
00:03:25 – 00:03:29
Refinements and relationships.
So I don't think right now if she were
Aaron
00:03:31 – 00:03:46
No.
Like, if you wanna filter on a related attribute, like manager dot first name, I don't think she supports that yet.
How's that different from refinements?
Is that what you're wondering?
Yeah.
I don't I don't get it.
So, like, you said manager?
So, like, that's a
Aaron
00:03:51 – 00:03:53
Yeah.
So if, let's say,
Like a role manager, is that what you're talking?
Yeah.
Yeah.
Yeah.
Yeah.
Aaron
00:03:56 – 00:03:58
So if you're filtering out
User roles with first name.
Oh, sorry.
Go ahead.
Yeah.
If you gonna help me.
Aaron
00:04:04 – 00:04:34
If you have your filter set up on employees and the employee model has a manager relationship or a and let's stick with manager.
And you wanna find employees whose manager's first name is Sean, you could just put in employee dot or rather you do manager dot first name.
And so it would automatically inspect the related model.
So okay.
Employees have many managers.
That really sounds like a refinement to me.
Aaron
00:04:40 – 00:04:42
Well, employees have one manager.
But
But, yeah, whatever.
It's got a relationship.
Aaron
00:04:46 – 00:04:59
No.
So the difference is refinements look across a whole bunch of rows, and this would just be like finding the manager where first name is Sean.
Not Well, it really is only a has one relationship.
Okay.
Yeah.
Yeah.
Yeah.
So there so we have a approach.
If you have a has one, we do this, we call it a Has one relationship.
Aaron
00:05:09 – 00:05:10
To or whatever.
To.
Yeah.
And then if you have many, then it's a refinement.
You could then you could do further filtering on that has many relationships.
Aaron
00:05:18 – 00:05:21
Exactly.
You could refine further if you wanted.
Yeah.
Got it.
Yeah.
Oh, that's sweet.
Okay.
Aaron
00:05:25 – 00:05:56
So right now, she supports, like, show me employees whose first name is Sean, but not show me employees who have a manager with the first name of Sean, if that makes sense.
So she she supports all the basic, like, single level attribute filtering.
We just need to get multiple levels, like nested relationships built out.
So that is kind of a kind of a big one.
I don't know how big it is and how big it is in rails.
Aaron
00:05:57 – 00:06:04
It's somewhat straightforward in Laravel, but so I'm sure it will be in rails as well.
Aaron
00:06:09 – 00:06:10
So she
still has a like, I say that is with total confidence because I know so much about rails.
Aaron
00:06:15 – 00:06:27
Yeah.
Yeah.
She still has that.
She still has refinements.
But I think I think those should come quickly now that she's got the whole problem space loaded in her head.
Yes.
Okay.
So I have a question for you.
Aaron
00:06:29 – 00:06:30
Tell me.
So filters that the class that she's building Mhmm.
They generate 2 things.
Mhmm.
Well, really only 1.
Like, they they you they take a blueprint, and they give you back the blueprint.
Okay.
But they also then give you the conditions.
So, like, the configuration, basically, of how the query builder could be built.
Yep.
So when the the because maybe this is a hot wire problem.
Maybe the way that I have it set up is so an initial when I initially load the query So first of all, the the controller that so you're on a page, whatever page.
You wanna have a query builder on this page.
Mhmm.
So you would, in your controller Mhmm.
I think there's layer of loss controllers too.
In your controller, you create an instance variable, which is, you know, configuration, and that is the filter dot to array.
Aaron
00:07:35 – 00:07:35
Yep.
That's basically what it is.
Aaron
00:07:36 – 00:07:37
Mhmm.
So I have to know the filter there.
So I have to know because I've built my filter.
I have to know my filter there in the controller.
Aaron
00:07:42 – 00:07:42
Correct.
In the way I have now set up is further requests to update the query builder.
Aaron
00:07:53 – 00:07:53
Mhmm.
They hit my own controller that I built for refine.
Aaron
00:07:59 – 00:08:01
Okay.
Got it.
So add a add a criteria into a group that hits my controller.
I add it and then send it back.
Aaron
00:08:12 – 00:08:15
K.
So
I use as my logic, you know, to initially build the blueprint.
So, like, the way the Hotwire thing works is in in one case, like, if you change to start let's do this example.
This will this will be easier Okay.
To understand.
If I change the, yeah, if I change the clause, so if it equals to not equals to whatever.
Right?
Yep.
Because the way the Hotwire approach works is I just rerender the whole damn query builder, and then Hotwire knows, like, the only part that changed is this chunk.
Aaron
00:08:50 – 00:08:50
Mhmm.
So just insert it right there.
Aaron
00:08:52 – 00:08:52
K.
That small little piece that changed.
Aaron
00:08:54 – 00:08:55
So it
makes it really simple.
I didn't have to actually build any special code to, like, generate to make the change and, like, regenerate the template.
It just rerenders it and dumps it in.
Right?
Aaron
00:09:03 – 00:09:04
Love it.
K.
The problem is in order to regenerate the entire query builder, I need the conditions.
Correct.
Aaron
00:09:14 – 00:09:16
You need the whole configuration.
Yeah.
And the blueprint.
Right?
Yep.
So I need both those things.
Aaron
00:09:18 – 00:09:19
Uh-huh.
What I'm doing now is sending them up via query params.
So the blueprint query param, conditions query params.
Aaron
00:09:26 – 00:09:26
K.
So first of all, that, to me, I just did it temporarily because I thought, like, I just need this for now because I don't actually have a filter yet.
But now Colleen and I are working together and I have an actual filter.
Seems like instead, what I should do is have the filter generate the conditions for me again
Aaron
00:09:46 – 00:09:46
Yes.
On that second request.
My refined controller has no idea what filter I should be using.
Aaron
00:09:55 – 00:09:55
Correct.
So what we were thinking of is basically sending the filter name instead of, like, the entire serialized conditions back and forth again.
And then we look up the filter based on the name.
Is that what you do, or is that even not a problem that you have?
Aaron
00:10:11 – 00:10:22
No.
It's totally a problem.
And that is more, more of a problem when you wanna rebuild a filter from, like, a unique ID.
URL.
Mhmm.
Like a URL.
Yeah.
Exactly.
Aaron
00:10:25 – 00:10:43
So the filter itself sends out, so when you call filter to array and you get all of your configuration that includes the conditions and everything, in there, there's a way there's an identifier to get back to the class.
What's it called?
I can look.
This is an exciting podcast.
Aaron
00:10:49 – 00:10:57
I know.
We're gonna we're gonna read code out loud on a podcast.
Five stars only, please.
0 people will listen to this.
Aaron
00:11:02 – 00:11:09
Okay.
So in the 2 array method, there's a key called type.
Yeah.
Okay.
And
Okay.
We that's like a string, which is like a description right now in, like, the sample data that I have, but that could be, like, the class name.
Is that what you do?
Aaron
00:11:17 – 00:11:30
Well, kind of.
So I disassociate the class name and give it a unique key, basically.
In case I ever wanna refactor my classes in the future, it's not tied to the back end implementation.
It's just tied to a magic string.
Aaron
00:11:31 – 00:11:47
Yeah.
And so we have the we have the idea of, registering aliases.
So I could say employee filter, its alias, my IDE is still gonna refactor everything correctly.
This map of aliases to filters?
Aaron
00:11:52 – 00:11:57
There is a there's a register alias method, or there's Oh,
Aaron
00:11:58 – 00:11:59
On, yeah, on the filter.
Aaron
00:12:01 – 00:12:01
This
is exactly what I was gonna suggest that Colleen does.
Yep.
So because you can, like, you can constantize classes.
Mhmm.
But instead, I we may still end up having to do that.
Constantize is a little bit unsafe, so we didn't wanna just take user input and be, like, constantize, which it means, like, take user input and, like, turn this into a class and then execute the method.
Aaron
00:12:22 – 00:12:23
Oh, yeah.
That seems bad.
Because you could do almost anything with that.
So we don't wanna do that.
So instead, what I was thinking was we could have, like, a a white list, basically, of names.
And doing what you're saying would be essentially that.
So we would have, like, we just create a name for the filter.
You could rename the classes, I guess, if you wanted.
But then Yep.
And then, hopefully, we could just store the class itself.
That's a little weird.
I'm not sure we'll be able to do that.
Aaron
00:12:49 – 00:12:51
say that again.
I I missed that part.
Hopefully Right.
So I'm gonna subclass.
Aaron
00:12:53 – 00:12:54
I subclass the base filter class.
Yep.
Mhmm.
And then I call this add alias Mhmm.
Method.
Yeah.
What am I gonna call the when when would I who calls the add alias method?
Aaron
00:13:07 – 00:13:24
Yeah.
So we have in Laravel, we have the concept of like service providers that kind of boot up at the beginning.
And so we have a filter service provider and that's where you register all of your aliases.
So you would just do it in some service class.
Oh, there's like a little bit of config basically, but you can run code.
Mhmm.
Aaron
00:13:29 – 00:13:46
There's like when it's when it's booting, when the app is booting, you're allowed to, like, do some setup.
And in that setup, I say, hey.
When you see the string employee, here's the fully qualified actual PHP class that you should use instead.
And that way
I'm not aware of a Rails thing for this.
What I was thinking was the, the base class itself could just keep track of, like, on as a class level, like, a static variable.
Like, it could it could keep track of registered filters itself.
It could.
It could be When they're when they're created and they're initialized, then we would just add it.
Aaron
00:14:09 – 00:14:23
Yeah.
But then when it comes a little better programming.
When it comes back in and you're looking for the one that matches the magic string employee, when it comes back in, you haven't newed it up yet.
And so it wouldn't be registered in the static method, would it?
It would be the cloud register the class itself.
So so I don't know if it'll work.
This is what I was thinking.
So, like, I create I've I base I create a new filter with the filter base class.
The filter base class is, like, on initialize.
Aaron
00:14:45 – 00:14:51
That's why that's why we have I'm sure that Rails has some kind of service provider concept where it's like
Aaron
00:14:52 – 00:14:57
You gotta set up you gotta set up the world before you can run anything.
Yeah.
I'll ask Colleen.
She probably knows.
Aaron
00:15:00 – 00:15:01
I've never done anything
like that, but we probably have it.
Aaron
00:15:02 – 00:15:31
Yeah.
Tell her or I can tell her, but, there's a there's a couple of, methods in the PHP one for registering aliases and then getting the class out, based on the alias that you've registered.
But, yeah, you shouldn't have to send the conditions and everything back.
You can just send your magic string refined.
We'll look up the correct filter, create the filter, pass the blueprint in, and then return it all.
Aaron
00:15:36 – 00:15:41
Are they doing construction at your house?
Because they're doing construction in my alleyway too.
No.
It's just my my house cleaner vacuuming.
Aaron
00:15:45 – 00:15:58
They're aggressively breaking up concrete right behind my niche headquarters.
Like, perfect, like, 3 feet behind it.
Yeah.
So that's been fun.
Okay.
Aaron
00:15:58 – 00:15:59
Anything else on that?
Aaron
00:16:01 – 00:16:21
Now that we have, lost all of our listeners, we can finally talk in private here.
Okay.
So just a couple of things on my side.
There was that new Laravel admin panel that was released this week called Filament.
I sent you a link.
Aaron
00:16:22 – 00:16:47
Actually know the guy that one of the guys that built Filament, he did some work for Resolute a couple of years ago.
I hired him to do some Tailwind and Larabell work a couple years ago.
So I got on a call with him and he, like, walked me around filament and how everything works.
And I think it would be and I told him about refine and kinda showed him what we're up to.
And he seemed really excited.
Aaron
00:16:47 – 00:17:20
And we talked about getting a plug in done for it and potentially, like, doing a revenue share if, you know, affiliate style, that kind of thing.
So I think that would be I think that that's gonna be a really good channel for us because there are now at least 3 of these configured back end configuration driven admin panels.
Mhmm.
And they're all in Laravel, which is great because then we just have to write a thin wrapper on top of it to to match whatever the framework is or the admin panel.
Yeah.
That's worth doing.
Some of the like, my first thought with some of the stuff is, like, their pricing is so wonky.
Aaron
00:17:26 – 00:17:26
I don't
know if it's better, but Filament's free.
I'm rolling my eyes really hard right now.
Aaron
00:17:33 – 00:17:34
Yeah.
Yeah.
So then it's like, alright.
Yeah.
So you wanna add query builder functionality to this and
Aaron
00:17:40 – 00:17:41
Perfect.
Thousand dollars.
Yeah.
Yeah.
The intersection of the people using that and wanting a $1,000 query builder is very small.
Aaron
00:17:50 – 00:18:14
Yeah.
Unless it's unless it's an agency and they're building out their entire back end in one of these admin panels and they're like Yeah.
We have money.
I don't know I don't know why anybody's, you know, not charging, but we have money to pay.
So and I think that is a pretty common use case now where these agencies will, like, grab one of these admin panels off the shelf and then implement everything in there.
So, really, what we need is plug ins and then some sort of channel to to make sure that they know it exists for the admin panel that they're using.
Aaron
00:18:26 – 00:18:28
Yeah.
Exactly.
Which which Yes.
If we do the affiliate thing, maybe that's the maybe it's up to we're leaving it up to our partners to do that.
But
Aaron
00:18:37 – 00:18:39
Yeah.
And I think it's one of those
Aaron
00:18:40 – 00:18:58
Yeah.
It's one of those things where they're probably not gonna have many third party, you know, plugins for a long time.
And so it would be good to even just get a link in their docs for a while.
Nova is a different thing because they have a ton of third party plug ins.
But Oh, they do?
Alright.
Perfect.
Yeah.
That seems like the biggest no brainer of all time.
Aaron
00:19:04 – 00:19:09
Yep.
I agree.
There are literally thousands and thousands of people using Nova.
Yeah.
And it's like a third party plugin system.
So like, people can like, look to pe people like look for stuff and then,
Aaron
00:19:16 – 00:19:21
yeah.
Yeah.
There's, nova packages.com and then you don't have to,
like, get an announcement list if you do a new plugin.
Do they ever do that or no?
Aaron
00:19:26 – 00:19:42
I don't know.
That I'm not sure about.
But it's nice because you don't have to, like, sign up in their app store or anything.
It's just it's just literally, PHP packages that you compose or install, so there's no gatekeeping or anything.
Aaron
00:19:43 – 00:19:45
So that's nice.
Yeah.
Cool.
Yeah.
That sounds great.
Now we just have to actually finish a thing to actually have a
Aaron
00:19:55 – 00:19:57
thing Yeah.
But it's finished
Aaron
00:19:58 – 00:19:59
Yeah.
Exactly.
Yeah.
Which we would.
Yeah.
Yeah.
And I'm gonna need a little breather after this
Aaron
00:20:08 – 00:20:11
I think client you'd project definitely will.
Yeah.
I'm getting I'm getting tired.
I'm getting a little carpal tunnel y, so I'm like Oh.
I gotta figure out how to I'm gonna man I'm actively managing it so that way I can get through this, and then I gotta rest up, sort that out.
The problem is, like, I had this I did not have I had this problem before, and then I got rid of it by getting an office and having, like, a nice ergonomic setup, Mhmm.
Which I could, like, do the standing, do the sitting.
And I'm in I've so I got kicked out of my co working space because of COVID, and then the like, reasonably, and I'm glad that that we did.
But that meant that now I don't have that ergonomic setup.
So I did it in my basement, which was fine for the few, like, summer months that we had there.
But it's winter, and now it's, like, it's 58 degrees down in my basement.
Aaron
00:20:56 – 00:20:58
Oh, no.
That's too cold.
Yeah.
So my fingers are cold and, like, it's hard to type because I'm cold.
And I'm down here today because the house cleaner's upstairs, and I don't.
We don't shop
Aaron
00:21:06 – 00:21:07
Oh, yeah.
I heard.
Yeah.
Basically while we're doing that.
Yeah.
So it's like so instead, usually, what I'm doing is I'm sitting on a couch with my laptop, which is exactly why I got the co working space
Aaron
00:21:19 – 00:21:20
to begin
with because I was doing that for, like, a year, and it, like, causes all kinds of problems.
Just slouching over my laptop all day and cause wrist pain and trigger finger.
That's a fun one.
Aaron
00:21:31 – 00:21:34
Is a space heater a viable option?
I have a space heater
right underneath me right now.
Aaron
00:21:35 – 00:21:37
Oh my gosh.
And it's still 58?
Yeah.
That's not gonna do squat in this basement.
It's large basement.
I don't have it looks like I have a space down here, but, really, it's just an I'm sitting in a hole in the ground.
There's there's no it's not finished at all.
It's, the floor looks like concrete, and it it kind of is, but do you know how they made the concrete floors?
What they did was they took, the floors, like so everything was coal powered when this house was built.
It's a brick 2 flat in Chicago.
And so there's coal dust and stuff, like, all over the place.
And there was just piles of it and mountains of it and basements that everybody had.
Also, everybody's basements used to flood regularly.
So you just didn't use your basement.
It was like you just had your coal furnace, and then, you know, in the summers, nobody went down here because it would literally be a swamp for parts of the year.
Then most of the city kinda drained, and it stopped doing that.
So then people were like, oh, that's kinda cool.
Like, we could have a better floor in our basement that's easier to clean, and it's not coal dust.
So they took the existing coal dust and then mixed it with concrete stuff and just did it in place on the floor and created concrete floors.
So my floors are, like, wavy hills.
There's not there's not a level surface in the entire basement.
So what I had to do in order to even be down here was build, like, a wood floor on top of it so that it's, like, level.
Because I used to try to sit down here and work with my chair, but my chair would just start rolling.
Like so I'd have to, like, hold myself up to the desk or, like, jam my knees underneath the table.
Aaron
00:23:14 – 00:23:15
Wedge yourself in?
Yeah.
So that's my basement.
It's I've put, like, a Japanese screen thing behind me, so it looks
Aaron
00:23:21 – 00:23:22
very professional.
Yeah.
Aaron
00:23:23 – 00:23:26
does.
You would never know.
It's a full room.
Yeah.
It's awesome.
It also has terrible air quality.
In the summer, I Yeah.
Do some stuff and just, like, circulate the air.
But in the winter, I'm not doing that.
And then I've got, like, a fancy ass industrial air filter thing, but it's too big a space.
It's the whole
Aaron
00:23:44 – 00:23:44
Yeah.
War.
And it's a sieve.
Like, it does the wind is just, like, kinda blowing through here a little bit constantly.
Dude,
Aaron
00:23:52 – 00:23:54
I understand why you're working on the couch now.
Aaron
00:23:56 – 00:23:56
Yeah.
I don't I don't like it down here.
This is a cave too.
Like, it's dark down here.
Today, it's sunny, so I'm happy.
So there's like a little bit of sun.
I don't have windows either.
That well, I have windows, but they're all glass block and they're like short because it's a little, you know, it's below grade.
Right.
So it's not yeah.
Although this is basically, like, what I lived in for my first apartment when I moved to Chicago.
So I'm been moving up in the world.
Aaron
00:24:21 – 00:24:22
Yeah.
Literally.
Yeah.
That apartment is awesome.
We had, air conditioning and, the heat, and it was in the roof.
Right?
Because this you can't put dots underneath.
If you're, like, refitting your basement to be like a they call them garden apartments.
Garden with quotation marks.
Aaron
00:24:39 – 00:24:39
Mhmm.
Aaron
00:24:40 – 00:24:41
It does.
So you're turning your basement into a garden apartment.
Well, you can't put your ducks in the floor because there's nothing down there.
So you put them in the ceiling.
So then in the winter, like, the the hot air is trying to blow down.
Aaron
00:24:56 – 00:24:56
Mhmm.
And I remember, like, we had one we had a couple days while we were living there where it was, like, below 0, and it could not get the house above 50.
It was, like, the air it was, like, just hanging out above on the ceiling just, like, hot air just up there.
And there was this you know, we're trying to, like, use fans to, like, get the air down and yeah.
Fancy.
Aaron
00:25:17 – 00:25:20
Fancy.
Sounds like you need to move out of Chicago is what it sounds like.
We are.
Did you know that?
I'm also trying to buy a house right now
Aaron
00:25:24 – 00:25:24
while Yeah.
Aaron
00:25:24 – 00:25:31
crap.
Definitely.
You're definitely gonna need a break.
Yeah.
Well, hopefully, we're getting closer.
Aaron
00:25:34 – 00:25:46
I think I think the break is coming eventually, and I think it will have been worth it in the end, but we knew it was gonna be miserable upfront, which yep.
Some reason we still were like, yeah, let's do it.
So, all right.
Yeah.
Let's just wrap it there.
I guess I gotta get back to working with Colleen.
Aaron
00:25:53 – 00:25:54
Okay.