- 39
- 107 451
Code and Stuff
United States
เข้าร่วมเมื่อ 15 ม.ค. 2023
Join my adventures as I write code, build projects, and explore the latest in technology.
A New Type of Component Library: Mishka Chelekom
Mishka Chelekom is a brand new open-source component library for Phoenix applications. It uses a unique code generation approach that prepares your project for future updates.
See how Chelekom provides a solid starting point for Phoenix developers, despite being in its early stages (v0.0.1)!
Links
Screen recording software I use (affiliate): screen.studio/@Yy75o
Mishka Chelekom Docs: mishka.tools/chelekom
Mishka Chelekom Repo: github.com/mishka-group/mishka_chelekom
Demo repo: github.com/ChristianAlexander/chelekom-demo
Timestamps
Intro - 00:00
Getting Started - 00:52
Advantages of Code Generation - 2:27
App Demo - 4:32
Some Challenges - 5:06
A Great Opportunity - 5:49
See how Chelekom provides a solid starting point for Phoenix developers, despite being in its early stages (v0.0.1)!
Links
Screen recording software I use (affiliate): screen.studio/@Yy75o
Mishka Chelekom Docs: mishka.tools/chelekom
Mishka Chelekom Repo: github.com/mishka-group/mishka_chelekom
Demo repo: github.com/ChristianAlexander/chelekom-demo
Timestamps
Intro - 00:00
Getting Started - 00:52
Advantages of Code Generation - 2:27
App Demo - 4:32
Some Challenges - 5:06
A Great Opportunity - 5:49
มุมมอง: 2 880
วีดีโอ
LiveView JS: The Comprehensive Guide
มุมมอง 3.9Kหลายเดือนก่อน
Unlock the full potential of Phoenix LiveView with this comprehensive guide to LiveView JS commands! In this video, I’ll cover: - All 19 LiveView JS commands in detail - Examples and use cases for each command - Tips for combining commands to create powerful interactions - Best practices for using LiveView JS in your projects Whether you're new to LiveView or looking to level up your skills, th...
Automating Advent of Code Setup with Igniter
มุมมอง 1.4Kหลายเดือนก่อน
This year I’m doing Advent of Code differently by incorporating the Igniter library, from the makers of the Ash framework. With 25 days of coding challenges, there can be a ton of boilerplate to wrestle with. What if I could generate each day’s template on the fly? It turns out, Igniter makes it easy to generate Elixir code! Links Screen recording software I use (affiliate): screen.studio/@Yy75...
Phoenix Analytics: open-source view tracking, in your app!
มุมมอง 2Kหลายเดือนก่อน
A brand new Elixir package was just posted that brings analytics directly into your Phoenix applications. Check it out! Links Screen recording software I use (affiliate): screen.studio/@Yy75o Analytics demo site: theindiestack.com/analytics PhoenixAnalytics on GitHub: github.com/lalabuy948/PhoenixAnalytics Author of PhoenixAnalytics: x.com/mrpopov_com
Flavors of OAuth 2.0 - A Visual Guide to Common Flows
มุมมอง 1.2K2 หลายเดือนก่อน
Every developer should know about OAuth. In this video, I break down five key OAuth 2.0 flows: including Authorization Code, PKCE, Device Code, Token Refresh, and Client Credentials. Perfect for developers looking to understand how modern authentication works. Whether you're new to OAuth or looking to refresh your knowledge, this visual explanation will help you grasp the concepts quickly. Idea...
Building a Real-time Collaborative Whiteboard (with live_svelte)
มุมมอง 1.9K2 หลายเดือนก่อน
Discover how to create interactive, multiplayer web applications using live_svelte! Combine Svelte's excellent developer experience with Phoenix LiveView's real-time messaging to build collaborative apps-all without relying on third-party services. In this tutorial, you'll learn to: * Set up a live_svelte project * Create a real-time collaborative whiteboard * Implement multi-room functionality...
Read the Room: Measuring Air Quality with Rust and Elixir
มุมมอง 2.6K3 หลายเดือนก่อน
Join me as I build a non-trivial air quality measurement app using Rustler, bridging the gap between Rust and Elixir! Along the way, I'll show how GenServers and Phoenix PubSub can help manage state and send the latest measurements to the browser. Links Screen recording software I use (affiliate): screen.studio/@Yy75o Project source repo: github.com/ChristianAlexander/air_sensor Rustler: hexdoc...
A new open source error tracker in Elixir!
มุมมอง 1.6K3 หลายเดือนก่อน
A brand new package was just posted that brings Sentry-style error tracking directly into Elixir applications. Check it out! Links Screen recording software I use (affiliate): screen.studio/@Yy75o ErrorTracker on GitHub: github.com/elixir-error-tracker/error-tracker Demo project branch: github.com/ChristianAlexander/open_csp/pull/1/files
Chunked Responses: Scaling File Exports for Production
มุมมอง 1.9K3 หลายเดือนก่อน
While it's possible to build file export features that work on your machine, it's important to keep track of memory usage. Using Elixir's Stream module and chunked responses, it's possible to dramatically reduce memory consumption per request-allowing your application to go further without needing massive servers. In this video, I walk through the process of optimizing a demo app's CSV export f...
Simplify React and Phoenix using Inertia JS: A quick look
มุมมอง 4.5K4 หลายเดือนก่อน
Some of the hardest parts of React development are routing and data fetching. The Inertia JS library, originally from the Laravel community, was recently brought to Phoenix by the folks behind SavvyCal. Join me as I walk through a couple of demos that show how Inertia can fit into modern monolithic applications. Links Screen recording software I use (affiliate): screen.studio/@Yy75o Project sou...
Extending Phoenix LiveView with Hooks
มุมมอง 1.9K4 หลายเดือนก่อน
Phoenix LiveView is typically enough to build an app, but there are times where it is necessary to boost performance or get access to browser-native behavior only available to JavaScript. Luckily, LiveView has an escape hatch for these scenarios: hooks! Join me as I walk through the process of building a simple countdown timer app with LiveView, and then improve it with a little JS. Links Scree...
How fast is your Elixir code? Find out with Benchee!
มุมมอง 1.4K5 หลายเดือนก่อน
Benchee is a common microbenchmarking package used in Elixir and Erlang to measure the performance characteristics of functions. In this video, I show how to use Benchee with real examples-from the new OTP 27 JSON support to sorting algorithms and even Advent of Code solutions. Links Livebook Code: gist.github.com/ChristianAlexander/6c64b2df15f1dec395b341199b416e9a Screen recording software I u...
Native JSON in OTP 27! (Elixir, Erlang, Gleam)
มุมมอง 2.2K5 หลายเดือนก่อน
Erlang OTP, which runs all Erlang, Elixir, and Gleam apps, now has built-in support for JSON. Soon, this will eliminate the need for third party libraries to use the web's most common data serialization format! Here's a quick preview of what the new JSON support looks like! Links Demo repo: github.com/ChristianAlexander/json-otp-27 Screen recording software I use (affiliate): screen.studio/@Yy75o
How to Track Faces in Live Video with Elixir: Quick Tutorial
มุมมอง 1.3K5 หลายเดือนก่อน
How to Track Faces in Live Video with Elixir: Quick Tutorial
Boost Your AI Projects: Cloud GPUs + Elixir (Step-by-Step)
มุมมอง 1.2K6 หลายเดือนก่อน
Boost Your AI Projects: Cloud GPUs Elixir (Step-by-Step)
Transcribe Podcasts with Whisper AI & Elixir in Livebook
มุมมอง 1.4K6 หลายเดือนก่อน
Transcribe Podcasts with Whisper AI & Elixir in Livebook
Build a React JS Full Text Search - No Backend Needed
มุมมอง 1817 หลายเดือนก่อน
Build a React JS Full Text Search - No Backend Needed
Real-Time Techniques: Polling, Long Polling, Server-Sent Events & WebSockets
มุมมอง 3617 หลายเดือนก่อน
Real-Time Techniques: Polling, Long Polling, Server-Sent Events & WebSockets
Build a GPT Haiku Generator (Simple AI Tutorial)
มุมมอง 176ปีที่แล้ว
Build a GPT Haiku Generator (Simple AI Tutorial)
Fine-Tuning GPT 3.5: From Generalist to Specialist
มุมมอง 2.4Kปีที่แล้ว
Fine-Tuning GPT 3.5: From Generalist to Specialist
Building a ChatGPT Slackbot with Javascript
มุมมอง 443ปีที่แล้ว
Building a ChatGPT Slackbot with Javascript
First off, everyone should venture into making their own Mix.Tasks. It's cool to to see how these builtin powers of Elixir are being used to do some cool stuff easily.
Good video, remind me a lot about shadcn
We try to provide a better experience and much more possibilities over time than JS libraries
Great stuff! Thanks for sharing, I will check it!
Much better than shadcn-ui in terms of maintainability and control. Thanks!
We will try to refatctor the ui and add more components to be better in terms of ui too. thank you for your support
@ thank you for authoring a very useful library that could potentially be widely adopted
@@norbertocammayo2334 ♥♥
Good
If I modify the generated component, update the library, and re-run the generator, how do the new generations merge in with my changes?
I think it wouldn't, however the git diff should be enough to sort this out by yourself
@@QuentinDurot Got it. So the onus is on the library user to merge in upstream changes to generated components.
Hello, dear friend. I put a lot of thought into this during development. The generator shows you the diff, and as a developer, you need to manage itوthere's no other way around it. Even if there wasn't a generator and you used an independent plugin, you would always have the latest version.
However, we followed a unified approach across the entire component and will continue to improve it in the future. Each component has a property named class, which essentially serves as your custom class, so there’s no need to modify the component itself.
I genuinely appreciate the time and effort you put into creating this video. Your feedback are incredibly valuable, and it’s exciting to see others exploring and engaging with the project. We’re working hard to improve it and truly value community input like yours. I hope you make more videos about it in the future. Thanks again!
This short video was everything I imagined. It even covers some features we forgot to highlight in the documentation. Thank you for all your hard work and feedback. The issues will be resolved on the master branch as soon as possible. This video is the perfect starting point for developers to begin.
Thank you! Thank you! Been waiting for this video.
Awesome
You rock!
I really enjoyed this video!, can you please make a video with phoenix elixir api authentication with svelte. It would be really appreciated.
Thanks for the feedback and the suggestion! I'll consider it in the future. In the mean time, I have covered live_svelte which has a very interesting and productive developer experience.
well $hit .. this quality is comparable with Fireship :O .. and it's about Elixir / Phoenix where I am switching right now from JS madness :O 🙌 perfection!
Thanks for the very kind feedback, and welcome to Elixir and Phoenix!
I'm coming back to Elixir since the end of 2017 and I found your channel and it has great tutorials. Thanks for sharing your experiments. I can't believe how much Elixir has grown there are so many so great projects and Livebook is insane.
Thanks, and welcome back to Elixir!
Why does this sound like Htmx? Are these both trying to do.same thing or are different? Thank you for this video
Htmx and LiveView JS commands are similar, but different. While they both use HTML attributes to provide frontend and backend interactions, Htmx attributes are directly written and perform API calls. On the other hand, LiveView JS commands are written in Elixir and serialized to an HTML attribute by the LiveView renderer. These commands don't perform API calls, instead relying on the websocket connection to the corresponding server process and receiving compact diffs in response.
@CodeAndStuff Thank you very much for explaining this. Appreciate your efforts. Then this is closer to SignalR
I can tell that an Ash walkthrough from you would be excellent!
I just found your channel and I can't believe how few subscribers you have. This is some top quality content!
Same here. Subscribed !
Coming from years of frontend development, you using tabular-nums in there *really* made this great :D I love slapping that class onto any numbers in any table. I even stopped telling designers about it, they sometimes notice and really appreciate that nice little touch.
I’m glad I’m not the only one! Font designers put so much work into variants all for us to just use the default and move on.
What if you wanted to extend this example by having some sort of refresh or live reload happen when the timer hit zero? Would you be able to use a Hook to send an event to the server from the JS code?
Hooks are able to push to the server through the pushEvent method: hexdocs.pm/phoenix_live_view/js-interop.html#client-server-communication
Seriously good walkthrough of the JS commands. Thank you! You mentioned that the next version of Phoenix won't come with a modal, why is that? It seems like it's a common and important component to have.
Thanks! I found out about the modal removal from core_components while researching this video. It turns out modals won't be used in UIs generated by the phx mix tasks, so this PR removed the modal when changing the generator: github.com/phoenixframework/phoenix/pull/5900
I got in love with elixir through you and another youtuber, and you both mention the amazing stuff about elixir that are not live-view related Where can I learn about the awesome stuff you can do with a genserver and a websocket in pheonix?
Great work. Thank you.
Amazing video!
I may have watched atleast 20 videos and this is the one I have liked. Keep up the good work!
This is really good, but PKCE is now recommended as a best practice for all client types, as is issuer identification
I'd highly recommend reading through the IETF draft for OAuth 2 Security Current Best Practices - it explains those more and what threat vectors exist. In decentralised landscapes like say Mastodon* and the Fediverse, there's also an initial flow known as Dynamic Client Registration, and a new internet draft I'm co-authoring called Client ID Metadata Documents, which tackle obtaining a client_id and potential client_secret without having to register with the authorization server ahead of time. *Mastodon doesn't currently implement DCR, but something similar to it.
Loved how you grouped the commands!
Thanks for the great tutorial! Answered my questions about how to add a little custom JS to the front-end in a maintainable way.
Awesome video!
Your videos are great! Thanks for share!
This is cool stuff! Thanks 🙏
Excellent. Why no modal in the next version of Phoenix?
Looks like it's part of an effort to simplify the code generated by mix phx.gen.live. github.com/phoenixframework/phoenix/pull/5900
Why the decision to use inline render method and not have the dom elements in heex files?
It just simplifies the visuals for teaching.
Great video! I have been looking into LiveView JS functionality to see if these pieces you show could be used for optimistic UI updates. Can those JS commands you show respond to the server? and could they be used for this use case shown in this video from time 3:05:26 th-cam.com/video/jXyTIQOfTTk/w-d-xo.htmlsi=QrgTSO9dm-A47jf9&t=11126 Or would you need to use something like Live Svelte?
That's a bit of a tricky one. There's some documentation on optimistic UIs in the liveview docs (here: hexdocs.pm/phoenix_live_view/syncing-changes.html), but it doesn't directly cover the optimistic create use case. If you strictly want the exact same behavior as that tutorial-updating the UI with a page-local state-you probably should use something like Live Svelte or build a traditional SPA (but you can still use Phoenix Channels with it to make the comms go over a websocket and enable server-to-client push). Technically, this could be written as a phx hook, but I imagine it'd be more complicated than it would be worth. If your requirements are a bit more flexible, look at async assigns (docs: hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#module-async-operations). In my experience, most of the time spent waiting for a create operation isn't a result of a slow network link. With async assigns, you can create a placeholder assignment on the socket with a loading and error state. The server can immediately push a patch to the page to show a loading indicator or optimistic item in a table, then when the processing finishes it can patch to look like a complete entry. I'm considering making a video on async assigns in the future because it's a pretty interesting solution to things like this. Let me know if you end up pursuing any of these paths!
@@CodeAndStuff Thanks so much for the reply and info. I will look into the info you have provided. I would love to see a video on the async assigns. I am wondering if there are ways to make live view sites feel as snappy as SPAs. I find navigating live view sites a bit slow compared to spa.
By far the best overview I've ever seen!
I found this through Harrison Richardson's LinkedIn post, and I'm so glad I did. Thank you so much-it was definitely worth checking out!
@CodeAndStuff Thank you for this great tutorial. Please do a tutorial about Ash's Spark library, next time.
Thanks! I'll consider it in the future
really good! the repo is super useful as well. Thanks :) as suggestions for future videos I'd be interested in phoenix streams or forms, in case it helps
Thanks for the idea!
Great stuff thank you! Really want to learn Elixir at some point, LiveView + Svelte looks like my endgame stack
🔥
LV makes JS front-end more chaotic
Thank you for all the great tutorials. Would you prefer doing it this way for future applications opposed to bringing in something like livesvelte?
I'm glad you've enjoyed the videos! It depends. I'd choose livesvelte or inertia if the project strictly requires a library that only plays well with a framework like Svelte or React, or if the team working on it has deep experience with those frameworks and timelines are tight. The best stack is the one that a team is most productive with, and tradeoffs are unavoidable. That being said, you can get a ton out of the box with LiveView JS-bailing out to hooks when / if needed. I'd definitely recommend trying out a LiveView-first approach and seeing if it meets your needs, knowing you have options.
this is so fucking cool, thanks man!
at 12:47 you make the comment that the next version of phoenix won't include a modal by default. Where can I read more about that plan?
x.com/rootcert/status/1836035549377003551
github.com/phoenixframework/phoenix/pull/5900
Thank you so much!!
Excellent overlap of introductory information and high-quality production!
this is awesome. great job
Are you hacking my brain? How do you always know what I want to know 😅
You caught me!
Awesome project.
Yours are the best tutorials on elixir man. I would really love to work with elixir instead of java :(
Thanks! I’d love to write Elixir at work too, but companies love their JS, Python, Ruby, etc… Some day Elixir will catch on!
Your channel is such a gem for the elixir community. High production value, great scripting and a admirable host. Like it a lot
Thank you! I've been having a lot of fun sharing projects with this community. Comments like these keep me motivated!