TopPodcast.com
Menu
  • Home
  • Top Charts
  • Top Networks
  • Top Apps
  • Top Independents
  • Top Podfluencers
  • Top Picks
    • Top Business Podcasts
    • Top True Crime Podcasts
    • Top Finance Podcasts
    • Top Comedy Podcasts
    • Top Music Podcasts
    • Top Womens Podcasts
    • Top Kids Podcasts
    • Top Sports Podcasts
    • Top News Podcasts
    • Top Tech Podcasts
    • Top Crypto Podcasts
    • Top Entrepreneurial Podcasts
    • Top Fantasy Sports Podcasts
    • Top Political Podcasts
    • Top Science Podcasts
    • Top Self Help Podcasts
    • Top Sports Betting Podcasts
    • Top Stocks Podcasts
  • Podcast News
  • About Us
  • Podcast Advertising
  • Contact
Not in our directory?
Add Show Here
Podcast Equipment
Center

toppodcastlogoOur TOPPODCAST Picks

  • Comedy
  • Crypto
  • Sports
  • News
  • Politics
  • True Crime
  • Business
  • Finance

Follow Us

toppodcastlogoStay Connected

    View Top 200 Chart
    Back to Rankings Page
    Technology

    Notes On Work – by Caleb Porzio

    Brief thoughts and insights from Caleb. Mostly on work. Mostly while drinking tea.

    Advertise

    Copyright: © 2024 Caleb Porzio

    • Apple Podcasts
    • Google Play
    • Spotify

    Latest Episodes:
    I Do My Best Work When People Are Watching Apr 30, 2020
    Show notes

    As I fight "the war of art", I'm learning more and more about myself and the way I work every day. This episode I talk about my weekly workflow and how I leverage meetings and commitments to do my best work.


    Write Drafts. For Everything. All The Time. Apr 30, 2020
    Show notes

    A new superpower I've been discovering is writing drafts religiously. Any thought or idea I have, I throw up a draft. What can hurt? It has lots of benefits and I'll talk all about them.


    Good/Clear Communication Is The Key To Success Apr 16, 2020
    Show notes

    Writing code and solving problems is fun. Writing emails, blog posts, podcasts, screencasts is NOT FUN (most of the time). I repeat: NOT. It takes serious effort and discipline. That is why it's worthwhile.

    In this episode I talk about my journey from programming to communicating and the struggles and wins along the way. Dig it.


    I Finally Feel Great About Livewire Feb 25, 2020
    Show notes

    Hello friends. I am back with another episode after a little break. Ah, episode 31 I finally feel great about Livewire. It is very true. Uh, so tomorrow I'm going on virtual stage at Laracon online to release live where 1.0 and demo sort of the state of Livewire, how I am building things with live wire these days to everybody.

    And also Alpine. And I've got to say, I feel fricking great. I really do. Um, I don't know if I've ever felt this way about Livewire. So Livewire is one of those things that, it's controversial, it's radical. It's very different than any other way of building apps. And it all started with that little seed of that Phoenix live view post where I just saw this, this basic concept of like.

    Making a click handler in the front end, run a method in the backend, rerender some HTML and swap it into the page. That was the seed. And then basically fast forward one year on this journey of me pushing this paradigm as far as I can and seeing if I, if seeing if it's a good pattern, if it's something that that is beneficial, is better.

    There's obviously some clear advantages, but, but is it workable that that question always lingered for me. It's like, is it a, is it too much magic? Is there too much magic going on? Is this like not going to be, I don't know, future-proof or whatever? I don't know. All the things that you've, you feel when, when something is, is really magical.

    Is it too much magic? Is it, is it too slow? That was the biggest one. That is by far the biggest one. All right, so we're using WebSockets pretty fast. I type into the browser, sends a WebSocket request to the backend, comes back, it's pretty darn fast. Um, you know, I click a button and a modal shows fairly fast, feels pretty much instant.

    Can't use WebSockets PHP suck. Sorry. Use Ajax now. Clicking a button to show modal could be anywhere from instant to laggy, like 250 milliseconds or something. Oh, maybe Livewire is not. Is not the tool, but I kept pushing and I kept pushing and the thing that I would always come back to that I for myself is like, all right, if I throw live wire out the window, I'm basically going to end up rebuilding it myself.

    I never threw it out the window. The way that I love to build apps is really, really simple. Plain blade, and if I need some complex interaction, I try to push this server fetched partials pattern as far as I can where you're sending an Ajax request to get HTML and swapping it into the page. And so basically, I've gone to this thought process a hundred times where I doubt myself so much that I throw it out mentally.

    Like really go there. Like, like a stoic, like, like a really like put yourself in the place of the worst possible outcome in your mind. Put yourself in that place. Livewire is not good. Um, the, you know, inertia or whatever, other ways to build apps are much better. And then honestly, uh, you know, once I shed that, that I don't know if it's fear, uh, defensiveness.

    When I shed those emotions, I end up recreating Livewire anyway for myself. That's what's kind of kept me going. And honestly, at the end of the day when it's dark and it's quiet, I love writing things with Lifewire. It's a really fun tool. I have so much fun doing it. It removes a lot of the pain and annoyances, um, of any other paradigm that I've used.

    Okay. So is it slow? Yeah, yeah, yeah. It might be too slow, but here's, so here's the big revelation that that started to really hit me. The last episode that I published called building, I think I published it. It's at least sitting in the app I'm using to record these things. Episode 30 building, building Trello.

    I can't even see the rest of the title. Something about building Trello with Livewire and that realization, I had that like, Whoa, you if live wire works well enough with JavaScript. Then it you can use it. It doesn't have to be any less efficient than any other paradigm. It doesn't have to be any less efficient than using pure view because a lot of your view components are sending requests to the server to do stuff and it gets stuff.

    So the same can be done with your Livewire components and then the parts that you wouldn't want to make a whole request. That's fine. You know, use, use JavaScript for that. So I made that Trello thing where I had sortable and draggable and I was basically building an optimistic UI with live wire in. It kind of blew my mind.

    It was like, Whoa. So Livewire is more of an API interface for me mentally than like a full on front end framework. Or at least you can think of it that way. Anyway, this is a lot of high level talk, but, uh, Alpine was born out of Livewire because I had this need for like, all right, but what about drop-downs and modals and tabs?

    Those are like the three things that bootstrap always gave you out of the box. And they got, you know, they, they got you pretty far and now we're using tailwind and BOMA and those things don't exist. So what do we do? And Alpine JS is my answer to that. And it started out as, you know, I, people recommended to me that I like, maybe you could solve this, just Livewire, maybe you could make you know some, because basically the syntax you want on the front end is Livewire, but you just want it to react instantly instead of going back to the server.

    So maybe you have like two kinds of data in a Livewire component, like reactive front end data and like back end data. I don't know. I never liked it, so I'm glad I made this decision. But early on I was like, no. Alpine is a completely separate tool from Livewire. I want to make life work right. And I wanna make Alpine great.

    And I want to make them both great in their own right and follow those paths separately. And then if there's, if, if the paths converge, that would be, that would be grand. Um, so I did that with Alpine. I just basically focused on the tool itself. On an Island and focused on making it, uh, you know, a really, really good tool.

    And that's a whole other fun story that Alpine is becoming pretty darn popular. It's like 4,000 stars on get hub. People are contacting me about podcast. People are launching courses about it. Um, it's definitely has a ton of potential. And it's, yeah, it's really exciting. So anyway, Alpine is great. Alpine is great.

    Great, great, great, great, great. Livewire Alpine. Where are we? I'm so live and JavaScript. Y'all have a script. Um, yeah, so I started using Alpine in my Livework components. And you know, it seemed like, Oh, this could be really awesome, but it kind of presented the same hangups that, that using view in your live where components does, it's, it's a little bit hard to integrate.

    Um, but over time I'll say that, that I cracked the code, I cracked the Alpine Livewire code and that that is really the good news. That is the thing that, that makes me feel great about live where now is Alpine and Livewire right now, work really well together in 1.0 locally on my computer. But by the time you're hearing this, it's probably going to be public.

    So the integration is so freaking cool. I wish I could sit and describe it to you. I probably should. That's what this, this whole podcast was supposed to be about. Maybe the next episode will be. On Alpine Livewire integration, how it works, cause it's pretty cool. I really wanted it to be a fantastic integration.

    So I reached for the stars. Basically for me, I reached for, for the, what would I, what in my gut, I know would be the most foolproof way of integrating Alpine and Livewire. There's lots of hacky ways you could do it, but I wanted the pure way I wanted, the way that that led to more flexibility and more, um, capabilities.

    And, uh, and I landed on that. So anyway, you can use Livewire components, sorry. You can use Alpine components in your Livewire components, wherever you want. No problem. And they're not go...


    AlpineJS | Project-L | Building Trello With Livewire (My Revelation) Jan 10, 2020
    Show notes

    Hey friends, lots of new things are going on in my life and I don't have time to tell you about all of them, so I'm just going to pick one. You know what, I'll preview all of them and then I'll tell you specifically about one Alpine is popping off. Um, I think it's hilarious how I put a year of my life, like full time weeks into Livewire.

    And worked so hard on this thing. And then Alpine, I just kind of like farted out and it's probably going to be way more popular than live where it's like the universe is cruel joke on me. Um. But it's not, it's not entirely accurate because a, I basically wrote Alpine for Livewire. You know, like I, I had already learned how to write a front end framework, so it was really easy for me to write.

    And it came out of months and months and months and months of just kind of like chipping away at a problem. And then, I don't know, the solution just kinda hit me all at once. Um, and Alpine is in the JavaScript community and who doesn't love a new JavaScript framework? Like, Oh, it's crazy. You want to be rich and famous.

    Just build a JavaScript framework and everybody will think it's the hotness for awhile. We'll see if it stands the test of time. I mean, I think it will, um, because it is different than it's been. It's the stimulus killer. Like if you've used stimulus, I hate stimulus stimulus sucks. Um, I'm sorry that that was rash of me.

    Stimulus is great in its, uh, ethos and philosophy, but if you ever wrote it, it was LA, LA, LA, LA, LA LA. I do not like it. So Alpine in my mind is the stimulus killer. Um, so I've been refactoring people's stimulus code to Alpine and haven't really run across any shortcomings yet. I mean, stimulus is so simple and dumb anyway.

    Like it's, it does even more than it. So. Anyway, enough trashing stimulus and hyping my own thing. If you're interested in Alpine, go check it out. It's pretty exciting. Okay. That's Alpine. Um, Oh. Which by the way, is the new name for project decks. If you didn't follow that at some point, cause I realized I didn't record any episodes since I talked about project ducks, but that's that.

    So live wire onto Livewire. Um, I am very excited about live where I'm going to be launching 1.0 at Laracon us in fee or lyric on online in February, and that's going to be pretty great. And, uh, but basically, so what I want is to get it, I want to build an app with it personally and get it to where I want it to be.

    Um. And then launch 1.0 so now I'm in that phase where like, okay, I have to start building things myself with it and putting them out there. So I'm going to create like inertia has pink CRM. It's like a little sample app you can download. It's written with inertia. Livewire needs, something like that for sure.

    And I've wanted to do it for a long time, but I've just, you know, kicked the can down the road. Well, I'm, I'm now, I'm drinking from the can. Is that the proper metaphor? So that's what we're going to do. I'm going to create an application. And it's going to be open sourced and it's going to be my idea of what a perfect application written or what perfect live way or whatever.

    How I would write an application with live where it, my goal is to make it your everyday average layer of El app with tables and forms and modals and dropdowns and slide outs and. Date pickers and blah, blah, blah. Maybe some comments, maybe some real time chat, maybe some infinite scrolling, maybe some deferred loading.

    There are tons of opportunities there, and I may a record screencasts about the whole process and put them into a course or a paid subscription thing like Livewire casts. Because, uh, your homeboy has to make some loot on Livewire pretty soon before he goes broke, or his wife kicks him out of the house and makes him get a real job at a local Costco.

    Um, so barring that event, uh. We'll see what I'm going to do with that. So keep your eye out for that. It's actually been really fun already. Um, I haven't the master branch open in one tab of Livewire and then I have the app. I'm building, I'm calling it project L, by the way, because I punted on the name again.

    Um, and I have project L open in another tab. And as I work on it, basically my, my goal is like, I want it to be perfect. So anytime I encounter anything that's imperfect, whether it's Livewire or Leora, Vel I will attack the problem. So that's what I've been doing. So if I already like made a ton of changes to my local Livewire installed to make the whole experience just better and to, you know, hone it, um, because now I'm using it.

    And I want it to be perfect. So, uh, also Laravel I encountered something I wanted and Caravel I hit up Taylor and he liked the idea. So I PRT it to the framework. It's a tiny, tiny thing. But, um, he's totally on board with, with, uh, terraforming of Vela. That's a big word. I'll just say with making changes to layer Velda support live wire and make it better.

    So that is huge that I have his support. Oh, I haven't even got to the trail apart, so. The other day I met a bear and his name was Jonathan Renick. Um, so Jonathan running can I paired the other day and he was kind of showing me around his SAS app that he has. We were talking about like if it even be possible to do something that like that in Livewire.

    He's like, yeah. You know, uh, like how would you do something like this? And he did some really heavy Java script stuff. I mean, this app, that dude's nuts, like he's, he's doing some crazy stuff. This app, he's got like this data table of, of data and you can just like drag and drop on any kind of like an Excel, like in any comp column, um, in a row and like drag rows and edit in batch and really not so stuff.

    And then he's got this report builder where you can like, drag. There's like a column order thing on the left and you can like sort the columns just by dragging them in a different order and the whole page refreshes. So right now it's not written an inertia. It's mostly VJs. And I think turbo links. Um, but I imagine that's probably why he built inertia was basically to like, it's, I remember talking to him in the early days and he was like, should I call it turbo view and restrict it to view or should I open it up?

    And then he named it turbo links and opened it up. But basically, uh, so I started messing with this drag thing. We were pairing on it, how I could make a plugin for live, where to do this, this drag ability. Long story short, I ended up writing Trello in it last night, um, with live foyer in this little draggable utility that we created and the thing, so that, that's pretty cool.

    And it really just kind of showed me like, Whoa, okay. So I, in my mind, I thought live foyers good for like form submissions and little stuff where you'd normally write an Ajax request and then the really nitty gritty fancy stuff. You gotta use Java script or view or something like that. Well, I think I'm changing my tune, especially with Alpine coming out, and here's the route, the revelation I had.

    I'm like, why is it, why is it that this sorting thing is so clean? So here's what we're achieving with sorting, using this JavaScript sorting library. I can have three rows of HTML and I can, let's say that those are stored, they're generated from blades, they're stored in an array in Livewire, like. Called, let's say they're two dues, they're called two dues.

    There's three two dues, and I looped for each them in blade, and I show those three to do's in their own span tags, or maybe their own ally tags within a UL. And if you can drag them around and the JavaScript library while you're dragging, won't really touch the order of the Dom. But then when you let go, or maybe it does, who knows, whatever, when you're dragging, you're messing with the Dom.

    And then when you let go, the Dom is in its final state, right? So if I have F...


    Project X Dec 13, 2019
    Show notes

    Hey there. So let's talk about project X. Maybe you've heard of it, maybe you haven't. So I had mentioned that that last big problem and its solution came out of a conversation with my buddy Mitch Mitch Jameson. He's the best layer of El programmer. You've never heard of. Um, best friend slash brother. Of mine. Um, he not actual brother, but pretty freaking close. Um, yeah, he's a smart guy and I sat down with him and we have some stuff out and after we figured out this, this problem, this big, uh, w I actually want to record an entire episode on him. Um, there are, but I'll, I'll just say this like, it's super important to have people that understand the work you do. And for me, there's not too many of them in real life. My family is not technical. Um, I have technical friends, but not a lot of them live in the area. So I have just a couple. And they're my friends who I see in person often, and they understand what I do because they do it too, or they do something adjacent to it. And it's super duper valuable to have people in your life who you can talk to about your work, you know? Um, in, in my case, my work slash passion and Mitch is largely that person. And I say that under, I want to say understand the work that you do, like, understand your app. Like if you don't have somebody who you talk to a lot. About code. Like if you do have somebody who, you know, I'm talking about, like you get to know each other's projects because you hash things out together and you end up kind of knowing actually a surprising amount about their projects. So I know a decent amount about the project he's working on in his job, the architecture decisions he makes, where they're at in the process, the things he sort of struggling with. And he understands live wire on a pretty deep level because every time I come across something. We sit down and he and I walk them through it and he'll close his eyes and try to wrap his head around it. And neither of us settle for not understanding something. So we, we pretty much never say, okay, unless we actually understand it. And we forced the other person to explain it to us, um, more simply or concretely. So anyway, great guy. Great to have him in my life. Thank you, Mitch. We're sitting down, we've conquered this big problem sort of, and I feel like I have a moment of clarity and I've kept that clarity. Um. On on that problem. And then afterwards I said, all right, now let's, uh, let's tell of all of Livewire. And I'm like, we're on a roll. Here's the last piece. So I did these rounds of little interviews or. Video calls with people to kind of check in and see the heavy Livewire users in the community and check in and see, Hey, how do you like it? You know, what have you, what issues have you come across? What things do you like, dislike? And one of the things that came up multiple times is, well, I don't, I love it, but, uh, you know, when I need simple JavaScript functionality, like honestly, like a lot of it's like drop-downs and noodles and stuff. I don't really know what to use. I use view components because, you know, they work with live wire, but they seem a little heavy handed. And you know, my recommendation has been, yeah, I mean, just right. Vanilla JS, but that kind of sucks. Like. It. It just does. Um, yeah. I guess I don't have to explain myself there. There, there needs to be some middle space between writing vanilla Java script by hand, which makes you feel like you're using jQuery or something and you know, loading all of the world of view in the virtual Dom and all this stuff, like having a view component and a whole build process and Laravel mix and the whole world that kind of draws you into it. What's in the middle. So stimulus is in the middle. Stimulus is a humble JavaScript framework. I think that's how they market it. Like humble JavaScript framework that for the HTML you already have or something like that, which is great. There's no virtual Dom. They don't destroy your Dom. They, they, um, they give a lot of power to you. And the idea is that you can use it with traditional server rendered apps and not have to buy into the whole thing. And I have to give away your entire front end. So it's pretty great and that, you know, in that way. So I've always agreed with the philosophy of stimulus, but stimulus itself is really painful to me. Like I think it's really gross. I don't like it. I don't like the way it looks. You add all these data attributes everywhere and you kind of create your own framework and then you have a JavaScript file that. Kind of maps to your, your controllers, as they call them, which are kind of like components. Um, and you end up doing a lot of native JavaScript in there. And I always feel like, I dunno, I feel like you're kind of reinventing the wheel. Um, from what I've seen from it, I haven't actually used in a production project, so I should say that we're in a real project even. But anyway, Adam way hasn't showed me around his stimulus. Uh. It's code. And I it, I was sorta hoping like, well, okay, add Adam's using it. He's probably using it pretty well. Um, maybe I'll change my mind and I don't think he did. Um, and I don't think it did for him either. It's like it's not a great experience. So what I realized is I just want, I love the view syntax if you couldn't tell based on the Lifewire, but I love the view syntax. V. A V everything, you know, the bind, like binding attributes and the model, you know, binding data. I love the concept of reactivity. I love the concept of changing data and your Dom updating. Um. Yeah. I love all the concepts that Vue has. I just don't want something like view has gotten so big, and like I said, it forces you to buy into it, or at least strongly encourages you slash hypnotizes you. So I want a tool that gives me data binding so I could have a piece of data called show modal, and then do a V bind. You know, on a class, a hidden class to toggle it, or V show, you know, to show or hide the modal. Um, that's what I want. But I realized like, I think that's all I want. I think I could get pretty far with just that. So what if, what if I made, what if I recreated view, but, uh, didn't use a virtual Dom, so we don't have to dig into that. But just. Basically so that it, it didn't, it doesn't hijack the Dom. It does kind of the same thing, but it would not hijack the Dom. We don't have to get into the innards of it. But what if I created view that had no component part like no class parts, you know, a view single file component where you have a template and then the body there. What if I just got rid of the script tag. What if I just got rid of it and all it was was template. And what if you could denote the template to note what's a component right in the HTML. So let's say there's a portion of your HTML that you want to turn into this pseudo view component that I'm about to create this, well, spoiler alert, it's called project X. This product X component, you would add an attribute called X data, which would act as sort of the data object for your view component or your project X component. And then you'd write in Jason right there. So if it was modal. A component, you would have a piece of data called show modal or something. Colin false decided to false. And then inside of that element, any element you could attach X bind to, which is the same as V bind, because you could ex bind class and bind classes. You could bind disabled, disabled attributes. You could a V model on inputs so that you could bind the value of a text element to something to a V texter or whatever. Um. So this syntax kinda hit me in the face. Like actually in this conversation, I'm sitting down with Mitch in a coffee shop and we're hashing out, you know, some ideas. And I'm like, well, what if, what if Livewire had its own kind of JavaScript portion that you could use like Java script template? And I'm like, Oh my gosh, that's going to be just so fricking nuts. And then it ...


    The BIG Update Dec 12, 2019
    Show notes

    Hey friends, it has been a tiny bit. Uh, I'll have, you know that I actually did record a bunch of episodes, but. I wouldn't publish them right away and then I would delete them when I went back to record another one because I don't know, that's just kind of how I am. If I don't get something out right away, I end up second guessing it or looking at it and thinking, Oh, that wasn't well done or it wasn't clear enough, and I'll delete it and then just start something else. So, um, that's a bad habit of mine. And I've, uh, done that for the past, like month, almost a month on this podcast. I swear I've deleted. Probably over six or seven. Um, but that's over. So the big update, um, there's been a lot going on with Livewire and that's partially why they been so many videos and partially why I haven't published them, because it's confusing and it's hard to explain and it's frustrating. And I don't know. I don't want to drag you down with me, but I think, uh, or I'm at a point of clarity. I'm at a point of decisiveness, so let me catch you up a little bit. Um. I've, I believe I've done an episode at some point about protected properties, but here's, here's kind of the gist of this. This is the biggest problem in Livewire, quote, unquote. That's what I titled the, this forum posts that I made. Oh, by the way, there's a form. You should check it out. There's a forum post called help me solve the biggest problem Livewire, and this is, this is, this is a problem that has sort of, I don't want to say haunted me, but it's been around since almost the beginning. So here's the problem statement. Live foyer. Livewire, Livewire Livewire PHP is a one shot deal. When you make a layer of all requests, the whole thing just runs and then spits the HTML out to the server and then the user triggers some update, like a URL change, and it does that. Again, their browser, however, has a long running process, so that's why VJs and these other Java Java script is a, there's a runtime in the browser and it's continuously running and waiting for user interaction and whatnot. So in Phoenix live view, a Phoenix or elixir on the backend is a continuous process. So they can create a parody between the backend process and the front end process. So the user's browser session with their JavaScript, and then the servers backend session. Um, and there can be a one-to-one, so there can be a process for user on the page. So they can do all sorts of nice things. Well, I chose really, really early on to not go that route because PHP just isn't there yet. And our PHP WebSockets and an asynchronous PHP, um, there's, there's stuff about it and there's stuff out there, but they're either require extensions or fancy things that just nobody wants to fanangle with finagle, finagle with. Um, so I chose early on, let's just do Ajax. Let's make Livewire. Let's make it's network transfer protocol, Ajax, and so Ajax is stateless. This is a fancy word, but what it means is so a long running incident, instances, state full, it has a state, you can change it, you can mutate it. It lives in one place. Stateless is something that gets passed around, so live where actually lives in the request and response data that goes to and fro a server. I guess Livewire on the front end is stateful, but on the backend it's stateless. So Livewire keeps, keeps track of what the current state of a component is. Then when you make an update, say a click on something that has wire colon click, it sends an Ajax request with the payload back to the server. It hydrates up the component, um, and then it does a taction and then a dehydrates it back to the new data in HTML, puts it back on the front end and rinse and repeat. So I've probably said that a thousand times. I hope you understand that by now. I think that's something that, that's one of those big key pieces of knowledge to understand. And if you didn't build Livewire, I can imagine it's frustrating to wrap your head around and seems odd. It's like hearing a Ave talk about the virtual Dom and how it just means nothing to you. But if, if you had built it, you would understand. And it's not rocket science. Um, but it's just one of those things that, that, uh, you have to kind of open, open it up a little bit to understand or inspect your dev tools, or, I dunno, hear me spew it enough. Times to understand it. So that's the nature of this problem. Um, the problem comes from, we don't have a long running back end PHP instance. So how does this problem manifest itself? So basically all of the data of live wire gets transferred back and forth, like I said. So if you set a, um, you can pass data into a Livewire component right. So you could presumably pass in an eloquent model. And the first thing people tried to do when I launched live wire was save eloquent models to properties. So they would have a property called post, and they would, you know, set post to an eloquent model out of the database. And then they would get an error that says, Hey, you can't do that. You can only set. Like a a raise or integers or strings to public properties, and the reasoning for that is you're sending it to JavaScript. So I either have to serialize the whole PHP object and DCLI isn't whatever. There's so many weird things and up and things in the back of my mind like, well, I don't want to expose somebody's entire eloquent object to the front end. Like maybe they, I don't know, forgot to hide like a password field or. You know, I dunno, I'm exposing the, some part of their internal system. I'm telling the front end could inspect and see what class it is and what name's base. And I don't know, it just doesn't feel right to me. So that's the problem. And you don't actually need to store things that way. You don't need to store eloquent models. You can fetch them from the database, every update, but it's just not natural for people. So my first, my first plan of attack was I'm going to make protected properties. Uh, what people want. You can store anything in a protected property. And my strategy was I'll store it in a cash in the backend, and then when I'm rehydrating a component, I'll fetch the protected data out of the cash from the backend. So that's what I did. And that, that was me choosing the invisible path. That was me making a feature that was invisible. Now, people, when they're learning live, where they try to set up a public property, and. Uh, to an eloquent model. And they'll say, Hey, you can't do that. Um, try sending a protected property. And they do that and it works fine. And they read the docs and it gives them a little description of the differences and when to use what and they understand and they go, well, they go on their way. It's an invisible feature. They don't understand that it's cash in the back end. Even if they do, it's, they don't really understand the implications of that. So that's what I did. And there's some other wackiness I had to do to accomplish that. So it was a lot of magic. A lot of magic went into making that invisible feature. So then there was a GitHub issue that came in that basically said, Hey, back buttons don't work and my stomach just dropped night cause I, it's one of those things that I realized immediately what it was. It's like, Oh, they have a protected property. They've gone to a new page. Now they hit the back button and the protected property is out of sync with their public properties. Um, kind of a long story why that is. But I dunno, when you hit the back button, it loads a cast result of the HTML, which has all the public data encoded in it. So live wear boots up with the initial data that the component has. But the protected data is like the down the road data. So kind of weird to describe, but. I dunno. Um, so that, that's the issue of public data protected data. There's this drift and the drift happens because there's two paradigms going on in live where now each component has stateful data in a cache that's actually like li...


    Current Roadmap Nov 14, 2019
    Show notes

    All right. So I started recording another episode and basically ended up just talking about where Livewire is headed and thought, well, why don't I name this properly? So calling this current roadmap, I cut the episode off early and I'm just going to rerecord it. So the. A current roadmap of live wire, so live where I'm just wanting to give you an idea of where things are at in my brain and with the project and whatnot.

    So I've talked about it at two conferences now, a bunch of meetups. There's a good solid amount of people in the repository submitting issues and some submitting pull requests and moving the project forward. I'm pairing with people. I've had. Uh, I'm going to basically have like five pair programming sessions this week, total one last week where I talk with people about the project, about their issues with it, things.

    And these are people who are using it and who are in the repository every day. Um. So that the original episode was called keeping my finger on the pulse, and maybe I'll record another episode talking about that, but for now, I just want to give you the roadmap. So the project's getting more solid.

    When I released it at lexicon con, I felt like it was cool. I felt, I felt like the API was there. I felt like I knew, I felt like it was good enough to tag a 1.0 in terms of API. But I didn't feel like it was there under the hood. Um, pretty much the main reason being that it's, it's like 60% JavaScript or 50%.

    I don't know it, it waivers between 40 and 60% of Javas JavaScript, JavaScript core. So the Java script part, that's the tricky part. That's the part that I have to deal with. Browser support, Dom diffing woes. Hear me. Yeah. Um, that's the big one. That's honestly the big one. Um, a lot of that stuff.

    So making the, making it, you know, it's a pretty ambitious project in terms of implementation. Like I'm just solving whackadoo problems all the time, and I want to make sure that a lot of people have used it and tried it with different things and it works seamlessly. And I'm just now feeling like we're getting to that point.

    I'm just now feeling like I'm starting to see that it seems like there's a lot of issues in the repository, but a lot of them are related and now I can start kind of closing them in bulk. And a lot of them are related to dumb diffing. And as I, as I hardened that core, um, those things, you know, just get addressed as we go.

    So I'm feeling good about the project. I'm feeling like it's much more dependable that I'm having these conversations with people and they're going, you know, I'm asking you what are the issues you're experiencing. They named one or two that's known or that I already fixed, and then they say, but honestly, that's about it.

    It really kind of works for me. It just works well. I don't know, and that's really good to hear and I'm hearing that more. More and more. Um, so that's good. Alright. So, and that's the thing I kept telling people and they're like, well, when are you going to tag a release when it and I S or what are your plans?

    And I, you know, when I'm standing at the press releases and everybody's, you know, shoving a mic in my face, like, what are your plans with live layer and wait, okay. Um. Yeah. So what am I plans at that time? I said, well, I'm just focused on getting the core heart. And at the moment I'm not gonna do educational materials.

    I'm not gonna do pro subscriptions or anything like that. I'm going to make the core, you know, ma, you probably have heard different things along the way, cause I often do have ambitions, but I've, every time I settle them back and go, no, no, no, just make the core hard, get people using it in production, get a wide user base that's dedicated.

    Make a tool that's very useful and very good, and then all these things will be added unto you. So that has been, that has been my thinking, and I feel like I'm reaching the end of that point. I feel like I'm, I'm not gonna give a timeline, but I feel like we're headed in that direction of me feeling like this is a good tool.

    It's pretty solid. Now let's start building stuff with it. Let's start teaching people how to build stuff with it. Let's tag a 1.0. Well, let's offer, you know, enterprise support. Let's, let's really make this thing happen. Which is funny because it's, you know, this is like, we're going on 10 months here.

    I'm, this is, I'm in it for the long haul. Like I'm in the long game. And that's something I think about more and more these days is like, that's a lesson I'm sure I've talked about before. Huge lesson I've learned with this tool is like, okay. Um, be in it for the long haul. Like, don't, don't play the short game, play the long game.

    And, and, uh, I dunno, I'm calmer about it now. I'm not as worried about another tool coming up that's bigger and better or something. Like I'm just kind of focused on this and making it good over time. Um, and eventually. With enough effort and with enough a heart, I think it will, um, get, get the recognition that get the amount of recognition that it deserves, whatever that is.

    So, which I hope will be pretty high. So the roadmap ahead of me now, after I start to get some of this stuff on your doubt, which I, like I said, we're getting ironed out. Um, I'm gonna start building stuff. With it. Um, I need to have a project built with it personally before I tag a 1.0 the next big milestone is tagging the 1.0 and there's two things I want to make sure.

    Well, three things that I want to make sure are done before I tag one point. Oh the first thing is I want to, um, I want to have used it in a project myself. The first and biggest thing. So I, I do dummy stuff all the time with it. I use it a lot, but I wanna use it in a real SAS app and I'm sure I'll, you know, leverage that SAS app as like a, maybe a course or just a fruit.

    Maybe I'll pair or I'll stream like me building it or whatever, but, um, I want to build a SAS app with it that's full and functional and I'm sure that I will encounter things that I will modify live wire to meet. But once I have a full SAS app built, that I believe is your average Sassa app. And built and I'm happy with it.

    I will write educational materials. Um, I'll write educational materials. Uh, based off of that. So those are the three things, educational materials, the app. And then the third thing I didn't mention, which is the testing of the app. So I'll use the Livewire testing utilities for the app, but I also want to have a dusk test suite that tests everything in the app.

    And this will be a end to end test of Livewire, basically. So I want to use every feature in live wire inside the app. And I want to have a dusk test suite that tests these things. And the reason being is not that I think everybody should be using dusk when they're using live wire, but it's so that I have something for, um, I have something for Livewire that when I go to tag a new release, I can run it against this entire suite in a real app and get green, and then I will feel a hundred percent good that, uh, that it's safe to release.

    So. Um, so that, that is the plan ahead of me is use it in real stuff and talk about it and make sure it's tested and love it myself in a real application. So then we can tag 1.0 and then we're off to the races and then I'll start the big promotional campaign. Um, I'll go on the road. No, I won't.

    Okay. There you go.


    Choose Invisibility Nov 13, 2019
    Show notes

    Hello again. Uh, this is a serial episode, so I'm recording this one second after I just recorded the last one. So the last episode, we talked about these hard validation problems, and hopefully I illustrated to you some of the issues that really STEM from a difference that I wasn't aware of that I wasn't really, that I hadn't formalized, but I cleared up the difference that there's two types of valid two types of things people are trying to do in an app.

    Then I was able to solve it. When I separated out into two separate methods, validate and validate only, and I think it's going to be intuitive. I'm going to document it up and I think everybody is just going to think it. Uh, it works the way it should work and I'm, I'm so happy with it. Half. So happy with it.

    Like I finally, this has been. Something nagging in the back of my mind that's not perfect. And now in my mind, it's perfect in my mind. Maybe it's not in reality, but I think it's perfect. So I'm putting it to bed, um, and I can move on with my life. Uh, but this brings me to a bit of a bigger discussion.

    Um. This problem I, there's two ways I could have approached this. So, you know, the way I did approach it, um, I also could have approached it a different way, which is actually how I started approaching it. I. You get an a get hub issue where somebody says, Hey, it would be cool if the validation persisted from request to request, you know?

    Oh, yeah, yeah. Okay. We should make that available. Well, how do we do that? Maybe we'll add a config option. Maybe we'll add someone. How would we configure that ability? Okay, well, what if we have a trait called persists validation that maybe you just add used, persists validation. We document it.

    Okay. Right, right. So that's fine. And I actually started that way. I actually have a trait in a sample app called persist validation that I was messing with, and then, okay, that real time validation, they want maybe have a thing called persist validation and only validates specific fields or whatever.

    Okay. Maybe we have used real time validation, whatever. You just keep adding in these options. That describe the functionality, but they don't describe the use case. Um, and this was the road I was starting down, but it felt fuzzy to me, and I just hate adding more documentation for specific functionality that you have to now understand and know you have to understand everything that I understand and, and it's hard for me to understand this stuff.

    So why would I burden every user with that? So basically I had a choice. And I've had this choice a hundred times in Livewire, and every time I come across this choice, I don't realize it. It is that choice right away. But when I do realize that it's a choice between an invisible feature and a visible feature, and by that I mean an invisible feature is something that user will never notice.

    A visible feature is like them looking up how to do a specific thing and adding a trait and whatever. Once I realized that it's, that, that, that, uh, that fork in the road, I just. Choose the invisible, the invisibility route. I just go with the invisible. Um, and that, that's been my path with this whole Livewire thing is like, find the way that people expect it should work, which is so hard.

    And it takes like, user testing is super value. Interviewing people, using it yourself, dogfooding it, thinking about it a lot. Um, those are all the things I employ to anticipate how a user. Would expect it to work and then make it work the way they expect it to work. So basically I picture, like I picture a cartoon character, like walking in space and the road is like filling in as they walk, you know, like, it's like.

    The road is maybe it's like a brick road and the bricks are floating up from the abyss and just kind of assembling in front of them and maybe their eyes are closed in, they're whistling a happy tune, and they have no idea that if the road stops building itself, they'll fall to their death. But it's just magically happening as they go.

    I think that's the, the, and now I literally just came up with that right now. Um, it's pretty off the wall, but, uh, I think it's actually kind of. I think it's kind of accurate. That's what I want Livewire to be. I want it to be a road that assembles in front of you and you have no idea. You think you're just walking and whistling and happy tune.

    But underneath the hood there's like crazy stuff happening, you know, to make this happen. Um, and from an implementation perspective, I tend towards the simple implementation. I tend towards wanting it to be a simple tool with a bare set of, that's another balance. I'm, everything in life is balances, but that's another balance that competes with this value of invisibility.

    The value of a simple implementation, a simple set of tools that the user understands and can manipulate. I think of it kind of like the react versus view dichotomy where VJs has a lot of, um, it has a wider API because it caters to specific use cases with specific API APIs where react is more like a bare set of tools.

    And for those use cases, you can use a, that set of tools to accomplish what you need to accomplish. Um, and certain people like. There's differences in both of them, and there's different things to like with view. It might cater to specific things really well, but because you don't, I actually think that this, this is not an all encompassing.

    This is a reduction of view in react. I'm just saying that, but let's just go with the metaphor and let's just, uh, um, turn these two tools into characatures with view. With a wider API that is more specific for specific use cases for use cases, it, um, it fits the needs really well for those things.

    But then when there's needs outside of it, you feel like you're hacking something, um, or you're doing something that's unintended because it's more opinionated, where react is less opinionated and it's more of a bare bones set of tools. You, uh, when you, it has a slimmer API, so you have to employ more mojo to figure out how to do something and you run the risk of doing it in a not ideal way because.

    You don't understand it that well, the learning curve is higher, but when you run across something that you don't know how it solves you, you pretty much already do that for everything else. So you'll feel okay, you know, I'm mixing and matching techniques to get the job done. Okay, so that's a competing, those are competing values.

    This like, I want to, I want live wear to feel invisible. And also I want live where to fear, feel like a bare bones set of tools that's implemented in a simple way and is a transparent tool. I think that, and that's where react is moving towards with this hooks thing. This like a, you know, this hooks reveal the nature, the true nature of react or whatever, and it.

    Totally steepen the learning curve and a lot of people, it just kind of boggles their mind. Um, it's very confusing. They use effect hook specifically. Um, and it's something in that people talk about a lot. And this, I think this is an example of like maybe Dan AB off and I, I don't know that much about react.

    So again, just go with the metaphor or analogy. So like Dan Habermas was saying, well, I'm going to, let's reveal what, let's provide an API that reveals the way react works. Then. People can use it too. It's two. It's op most optimal. You know, they, you know, I, it makes sense. I understand that temptation.

    Um, where I imagine Avenue has a different approach to his tool, um, view. So anyway, so it's a competing thing where I want live, where to feel invisible. I also want it to feel like you understand how it works so that you can mix and match and be creative with it. It's a very, very hard thing to balance, but I'll say that in general, I choose in visibility as much as ...


    Hard Validation Problems Nov 12, 2019
    Show notes

    Okay. I'm standing here at my desk feeling pretty good for two reasons. The first reason is I solved a pretty hard validation problem in live wire. The second reason is, uh, it's, there's a giant blanket of snow outside and it's been snowing all day yesterday and all night really soft, nice, perfect white snow.

    It's not even Thanksgiving. And we broke our rule and played Christmas music and actually decorated for Christmas because we were just feeling in the mood. Um. And it's just white outside, which is really nice. So thank you for, thank you for that snow. Oh, I solved a hard validation problem and I want to tell you about it.

    So validation, it's been a long road to get where we are, and I thought we were at a good place with validation, but really we were at a good place for demoing validation. I'll explain what I mean by that. So in episode five, I, I just called the evolution of validation and I, I talk about how I went from going, all right, I live way or could not.

    Handle validation at all. By validation, I mean like form validation, like showing this field is required and stuff. Um, forms are pretty common thing and in web apps and so validation's also pretty common and live wire could, there's, this was sort of a fork in the road. I could not deal with validation at all.

    Um, but I wanted, I wanted live wire to support. Some, you know, making validation easier. So what you could do without any, you know, anything official Livewire you could, like at the, the olden days in Laravel, you could create, you can manually create a validator with rules and data, um, and pull it from wherever, from your Livewire data, and then you could run validator Aero validate.

    Or you could run fails, probably put fails in a conditional and then manually, you know, build up, uh, some data for the errors and show the errors and yada, yada. But I wanted it to feel native. I wanted you to feel like you were in a controller method and you could just do. This arrow validate, um, which would be the equivalent of request arrow validate.

    So you could just do this arrow, validate pass in some rules and it would Intuit, it would like link up the rules with the data on the live wire object. And so if you use live where you've probably used validation and you know what I'm talking about, it feels really sleek. It feels really intuitive.

    And I already talked about how it was a long road to get to that point of it feeling intuitive. Um, that's episode five. So since then. Uh, so the, it feels really good and it looks really good for demos, but in reality, there's a problem with it. So the problem is I implemented it in such a way.

    That it's pretty simple. Like you run this arrow validate and actually, you know, does what layer of L does inside and throws a validation exception. And it bubbles up. And I have a little catcher and I catch the validation exception and I pass the errors into the view. So you have an error message bag, so your execution gets interrupted, but your components still renders and you get that errors, message bag, you know, money sign errors, probably arrow has or arrow any or arrow GAT or something like that.

    Um. So that that's the way it exists currently. The problem with that is the errors aren't persisted from request to request. So you have a form and you submit it, and then let's say you have some validation in the submit method or something, and then the validation errors are shown as soon as Livewire makes any sort of update and probably your, your data binding, your input elements.

    So if you have an input element called name, all right, let's start concrete. You have a form with a name and an email. No username and password and the username field is just an input type text, passwords, input type password. They both have wire, colon model username and password, and their data bound to the Livewire component.

    So every time you type into him. They sends an Ajax requests and updates the data on the component. Then you have a submit button that does wire colon click a submit method. In the submit method, you have this arrow validate and you validate that user name and password are required, let's say.

    Okay, so the user's typing in, let's say they don't type anything in and they just hit the submit button. They see this fields required, and then they see this fields required the other field. So they type in the username field and now Livewire sends an Ajax request to update that field and all the validation is just wiped.

    So all the validation messages disappear, but they only updated one field. Now what you'd rather have. Now that's not, that's not horrible, but the default behavior for like without Livewire would be, you would type and the validation messages wouldn't disappear until you hit the submit button again.

    Right. And let's say that you, that you implemented a few JS. Handling of this so you could real time validate and like sundae Jack's requests or whatever, realtime validate it would validate only the field and the validation messages and the other fields wouldn't update unless you updated those field values.

    Very hard to explain. Um, but I hope you're kind of tracking then it's just kind of this, this weird problem that at first felt, it just felt a little weird to me. Like, okay, this is the easiest solution, I'm going to do it, but it doesn't solve all the problems. And then when I would think about a way of handling validation, like maybe had just persist validation from requests or requests, it would break another use case.

    Um, so I just kind of left it and there's, there've been get hub issues submitted about this, and it's kind of jarring. Like people don't expect that behavior. They're like, validation messages disappear after update, you know? And I'm like, yeah, that's actually how it's supposed to work. But I know it's not ideal.

    So what we really did. Uh, so we, I started this big discussion in an issue that somebody submitted to, lots of people have been kind of weighing in on it. And it took me a little bit to figure out, but really like, there's two different kinds of validates. There's probably more than that, but there's two primary primary types of validation in a, in a web app.

    But let's just say in Livewire, there's form validation. So they're like, honest submit, the kind of validation that that happens every time you hit the button. That does the thing. And then there's realtime validation, the kind of thing that might, is probably more common on an auto saving form.

    Um, but even on a, even on a normal like button forms that there's real time validation, they both behave differently with the button you want. Um, you want all the errors to persist, uh, across requests. You want them to sit there, um, with the, with the realtime validation, you want them to update but only update the field.

    So like I explained, it's a little bit hard to visualize, but you can imagine that there's these big differences. So basically I had to sit down and realize that, okay, the first thing I need to do is figure out how I'm going to persist validation from requests or request. So like I talked about in a couple episodes before that, uh, I think a lovely refactor was the, um, was the episode.

    And it's, it's where I refactored LA live lawyers core. To basically the the back end core to do this hydrate dehydrate middleware stack where like the request comes in and I slowly build up the Livewire component from the request with these different middleware slices. And then when the request goes back out, before it goes back out, ID hydrate the instance into a response.

    And then JavaScript stores, it passes it back, yada yada. So this was kind of nice cause all I had to do was add one piece of middleware called, um, I think I called it persist validation. I don't know, persistent err...


    Previous 1 58 59 60 61 62 63 Next

    Related Podcasts

    Reply All

    1

    Reply All Games & Hobbies
    Inside VR & AR

    2

    Inside VR & AR Gadgets
    Note to Self

    3

    Note to Self News
    BrainStuff

    4

    BrainStuff Natural Sciences
    This Week in Tech (Audio)

    5

    This Week in Tech (Audio) News
    Hands-On Tech (Audio)

    6

    Hands-On Tech (Audio) Technology
    footer-logo

    Contact Us

    Toll Free: 844-670-7747

    Links

    • Home
    • Top Charts
    • Networks
    • Apps
    • Independents Podcasts
    • Podcast Advertising
    • Podcast News
    • Contact Us
    • About Us
    • Analytics & Insights

    Stay Connected

      Privacy, Terms of Use & Our Code of Ethics Protecting Content Creators Copyrights