Events Add an event Speakers Talks Collections
 
RailsConf 2021
April 13, 2021, Online, USA
RailsConf 2021
Request Q&A
RailsConf 2021
From the conference
RailsConf 2021
Request Q&A
Video
Lightning Talks: Brandon Shar
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Add to favorites
388
I like 0
I dislike 0
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
  • Description
  • Transcript
  • Discussion

About the talk

About speaker

Brandon Shar
Web Application Developer Extraordinaire at Bellawatt
Share

Hello there. I'm Brandon Char. I'm a developer. And Bella watts is an awesome company focused on building user-friendly software for the energy industry. And in my capacity there. I'm part of the team that built in maintains the inertia for real Gem. And I do want to make sure to give credit to the initial creator of inertia. As both the original lyrical version and all of the front end packages were created or maintain by Jonathan riding, who is a top-notch guy. And it's been a great help as we built the rails version of his concept. So what is inertia, and why would I want to use it?

I think it would help to introduce it in the vein of a very similar concept that we've heard a lot about this week. And that's Hotwire. We all recognize that modern web dev has changed and now requires increasing amounts of reactivity apps that can accept a full-page load between every new action and have limited user feedback or becoming few and far between. And if you ever used a single page at you, probably agree that the user experience for it is excellent, but if you've ever built, You may not have had that same experience, a single page, app requires you to write a

separate? The I use front end routing to recreate browser features and manage increasingly complex data situation with a real zap. We used to always know like every page mode would bring us the freshest date of the database had to offer with a single page app. That's not a given. So, now we have to manage these new state issues. We introduce even more libraries. Maybe Redux Dukes, graphql. Both hotwire an inertia saw. This is a problem. But where they differ is how they salted. Hotwire said, let's write as little JavaScript as possible and move to sending HTML over the wire. And that's an

awesome solution for a lot of people. But at least for me and I'm sure some of you, I said, hang on tight. I like writing react components. I like view. I like spell. I want to go back to a simpler way about development to, but I don't want to give up on that. JavaScript is as DH mentioned in his keynote, different languages, different patterns, different Frameworks. People differently and at least for me reacts you and smell are great ways to write and reason about front-end code. And this is where inertia comes in and there's that allows you to write performance single-page applications,

using a railsback entrails controllers, real sprouting that you're used to. But with reacts you were spelled on the front end noise. He has no front end routing, no Global State, just the same NBC approach you prefer modern JavaScript on the front it kind of show that. Let's check out a quick at. This is just your very typical generic simplified Twitter client. We can write a tweet. We can delete our own tweets. We can scrollview tweets. We can. We can like or unlike a tweet view replies to tweets, write a reply. And you can see that this is performing like a

single page out. It is there was no page reload these toggles work. Right on the page. And the cool thing I can see is there is only one piece of State in this entire app and it is this Xbox for this little bit of validation. So how does that work? The best way is let's just had a quick feature that you click on a picture of a user right now. We just filter their tweets. So instead let's let's send us to a user profile page. So we'll go here to our user image. And the first thing we'll do is just change that to be a link to users / the user ID. So, how do we make that work? Well, the same

way we always have, we add a route to our user show. We go over there. I use your controller and we have our show method. The only difference is instead of letting rails automatically render us of you. We're going to use the inertia renderer which asks us to provide it with the name of a components. So now when we click this, we end up in a new page, a new page that looks like this. This is obviously a super simple example. So we use a little bit of cooking show. Imagine. You are putting some more Mark out. All this is is just show you their image

show tweets. The user sent show, tweet. The user's liked and some props that we need to make that work. If I do this, I m going to break. Why is that? Well, where do these props come from? Well, that's Do frogs come from the same place? They always have. However, we always gotten data down to the view, the other controller. So now we have our same render function. We just had and we give it a hash of props. We can refresh. Now we end up in this new page with everything. We just asked where in the exact same response of world. We were before the same

enable page app, and now we got a new page. That is it, that is as much energy as I can, possibly tell you about in 5 minutes. I am planning, a short video series, that will dive a lot deeper into this. Would include a ton more info. How did the layout set up? How do we test this? How to get current user prop show up? I clearly didn't put that in the route and a whole lot more. So if you're interested, let me know. Once again, I'm Brandon chart. Thank you very much for watching. I will be in Discord.

Cackle comments for the website

Buy this talk

Access to the talk “Lightning Talks: Brandon Shar”
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free

Ticket

Get access to all videos “RailsConf 2021”
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Ticket

Interested in topic “IT & Technology”?

You might be interested in videos from this event

November 9 - 17, 2020
Online
50
93
future of ux, behavioral science, design engineering, design systems, design thinking process, new product, partnership, product design, the global experience summit 2020, ux research

Similar talks

Jamie Gaskins
Masters of Arts in Christian Apologetics at Trident Technical College
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Vladimir Dementyev
Team Lead at Evil Martian
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Santiago Bartesaghi
Software Engineer at Rootstrap
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free

Buy this video

Video
Access to the talk “Lightning Talks: Brandon Shar”
Available
In cart
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free
Free

Conference Cast

With ConferenceCast.tv, you get access to our library of the world's best conference talks.

Conference Cast
949 conferences
37757 speakers
14408 hours of content