What I Learned From Building a Framework

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 96

  • @ceving865
    @ceving865 Рік тому +20

    Silly video! Every job is too easy if you ignore all problems. The problems are: cyclic dependencies, mutually exclusive states, promises, garbage collection. This video says nothing about that.

    • @abdirisakmohamed5664
      @abdirisakmohamed5664 Рік тому +25

      Relax man. he's not building the next React competitor😂

    • @aotearoa74
      @aotearoa74 Рік тому +6

      I don't think it's silly at all. The whole point of it is to build your own framework as a learning exercise (and not to come up with the next framework to rival React, etc). Learning by building is a great strategy. The issues you raise are all valid though and I don't see why this "toy framework" can't be used as a platform/ starting point for experimenting with solutions to those issues.

    • @Rivederchee
      @Rivederchee 9 місяців тому +2

      @@aotearoa74 Plain JS is a fair competitor of React.

    • @preystation6870
      @preystation6870 Місяць тому

      garbage collector lololol... React fanboy detected

    • @joe_hoeller_chicago
      @joe_hoeller_chicago 7 днів тому

      Not sure how that has anything to do with anything. If you really know how to code, none of this is an issue.

  • @0xPanda1
    @0xPanda1 Рік тому +54

    now you need to build a vscode extention for it

    • @awesome-coding
      @awesome-coding  Рік тому +24

      This is actually a really good idea for a video - Thank you!

    • @greyshopleskin2315
      @greyshopleskin2315 Рік тому

      Unneeded. Make a neovim plugin

    • @hanzofuma
      @hanzofuma Рік тому +2

      Well it should be an LSP plugin.

  • @DavidAlsh
    @DavidAlsh Рік тому +9

    Haha I love this. I did something similar, wrote a framework to help me learn how they work. I ended up writing a framework leans on a compiler to convert templating syntax into the equivalent React code (preact) and it worked really well. At compile time you can statically modify property mutations to getters/setters that trigger re-renders.
    I am now writing a lighting fast bundler in Rust and will add my framework compiler (transformer) as a Rust plugin for that bundler haha.
    No one will use it, but I have learned so much in the process

    • @awesome-coding
      @awesome-coding  Рік тому +2

      This sounds really interesting!
      I'd love to see a repo with your work if you are willing to share it.

    • @mich_thedev
      @mich_thedev 11 місяців тому

      That is so fucking cool

    • @mich_thedev
      @mich_thedev 11 місяців тому

      I myself went ahead to build NixixJS when I couldn't understand how use state in React worked

  • @akrishnadevotee
    @akrishnadevotee Рік тому +30

    I'd love a more detailed video teaching these concepts in detail if possible. Very useful, thank you

    • @awesome-coding
      @awesome-coding  Рік тому +4

      Sure thing! I'm planning more in depth topics this year.
      By the way, you can check my Explained playlist ( ua-cam.com/play/PLi0P3bAJieris4x636iTMg3Ti3N7-aTH6.html ) where I'm going through some of these concepts in more detail.

    • @aotearoa74
      @aotearoa74 Рік тому +1

      +1 A video of a deep-dive into signals would be interesting too:)

    • @awesome-coding
      @awesome-coding  Рік тому +1

      @@aotearoa74 FYI - I have a Signals in depth look video you might find useful: ua-cam.com/video/bUy4xiJ05KY/v-deo.html

  • @lopsanggurung5870
    @lopsanggurung5870 Рік тому +6

    Feature Requests:-
    1. Lifecycle methods.
    2. :if, :else-if and :else directives, so that the element would get mounted and unmounted from the dom rather than display block or none. (Idea, may be use for this like how alpine.js does.)
    3. how to perform enter, exit animation in element mount and unmount.

  • @luis96xd
    @luis96xd Рік тому +1

    Wow, amazing video! You really know the basics or core concepts of a language, everything was well explained and I think it is awesome, thanks!

    • @awesome-coding
      @awesome-coding  Рік тому +1

      Glad you liked it! I really appreciate your comment! Thank you!

  • @harshilparmar9076
    @harshilparmar9076 Рік тому +2

    Happy New Year! I was just wondering you've started 2024 by building a framework. So I can't imagine how significant it's going to be for the rest of the year!

  • @TechBuddy_
    @TechBuddy_ Рік тому +3

    Awesome video
    Oh and Happy new year 🎉

  • @naranyala_dev
    @naranyala_dev Рік тому +2

    exploration is not bad, exploration is the journey, enjoy the journey

  • @ryanleemartin7758
    @ryanleemartin7758 Рік тому +10

    The DOM apis and web standards good enough now. This is the secret that frameworks don't want you to figure out. It's not evil, it's just inertia.

    • @awesome-coding
      @awesome-coding  Рік тому

      Good point!

    • @loquek
      @loquek Рік тому +1

      My personal opinion, which is very personal, is that after 15+ years of webdev, web standards is awesome BUTTTT, it's also the slowest moving object in the room. I deeply miss Macromedia Flash, which had type support, built in documentation and comments, build API etc... as someone who wants to build immersive, different and interesting interfaces... web standards will leave you wanting in this domain. That's not to say it's not amazing for highly accessible web documents... or run of the mill displaying of semantic data.
      Frameworks aren't trying to keep secrets from you, it's solving problems you might not even have run into yet, and if that's the case for you, that's great 🙌

    • @awesome-coding
      @awesome-coding  Рік тому +1

      @@loquek Good points!
      By the way:
      - Tell me you are wold without telling me you are old
      - "I deeply miss Macromedia Flash"
      😂✌

    • @ryanleemartin7758
      @ryanleemartin7758 Рік тому +3

      @@loquek Great points, particularly the slow moving nature of standards!
      I don't literally mean framework vendors are literally keeping secrets. It's just that as the need for frameworks and build steps is reduced, it's not in their interest to advertise it.

  • @Sibearian_
    @Sibearian_ Рік тому +9

    I AM going to use ur framework

    • @Sibearian_
      @Sibearian_ Рік тому +11

      In production

    • @joseph0x45
      @joseph0x45 Рік тому +2

      😂

    • @Don_XII
      @Don_XII Рік тому +1

      @@Sibearian_😂😂😂

    • @vaisakh_km
      @vaisakh_km Рік тому +4

      😂 i am already excited about the countless nights i am going to be spending on fixing production failures

    • @awesome-coding
      @awesome-coding  Рік тому +1

      @vaisakhkm783 have a little faith in my skills!

  • @nomadshiba
    @nomadshiba Рік тому +3

    i would use MutationObserver, since other frameworks and libraries or just vanilla js can change the dom

    • @awesome-coding
      @awesome-coding  Рік тому +1

      Interesting - definitely an avenue worth exploring.

  • @narrei666
    @narrei666 Рік тому +2

    when do you prefix variables with dollar sign?

    • @awesome-coding
      @awesome-coding  Рік тому +2

      This is a good question! There are no "official" guidelines for this.
      In general, I follow these two rules:
      - When working with "special" objects that are in one way or another reactive. RxJS Observables usually end in a $. State is a proxy object containing a collection of signals. This is why I decided to use the $ in this case.
      - Maybe more common is to use $ variables when working with DOM elements. This clearly denotes that a specific variable or collection contains DOM elements.

  • @Septumsempra8818
    @Septumsempra8818 Рік тому +6

    Brilliant! Now we need a router.

    • @awesome-coding
      @awesome-coding  Рік тому +3

      And a state manager, and client side rendering, and a few more useful tings

  • @vaisakh_km
    @vaisakh_km Рік тому +3

    Awesome framework :)

  • @MikeNugget
    @MikeNugget Рік тому +1

    Would be great to make tutorial how to make minimal framework

  • @anyadatzaklatszjutub
    @anyadatzaklatszjutub Рік тому

    good job man, awesmoe, inspired me to do the same

  • @vaughan6562
    @vaughan6562 Рік тому +2

    2024 , year of the micro framework

    • @awesome-coding
      @awesome-coding  Рік тому +2

      I actually believe this will be a trend - everybody is eager to clean up their act and remove bloat and clutter.

  • @tapabratapalchowdhury507
    @tapabratapalchowdhury507 Рік тому +1

    is really dsa necessary to learn ?

    • @awesome-coding
      @awesome-coding  Рік тому

      dsa?

    • @tapabratapalchowdhury507
      @tapabratapalchowdhury507 Рік тому

      @@awesome-coding Data Structures and Algorithms

    • @awesome-coding
      @awesome-coding  Рік тому

      @@tapabratapalchowdhury507 Ah, got it.
      Yes! Honestly, in my opinion these are a must. While not obvious at first, while your experience grows and you'll be involved in more complex work, having a very good grasp of these building blocks will be really useful!

    • @tapabratapalchowdhury507
      @tapabratapalchowdhury507 Рік тому

      @@awesome-coding I know Array and matrices ,Strings , searching , sorting and recursion will this good for freshers and can you please tell me in which topics cover dsa to get good packages ?

  • @wlockuz4467
    @wlockuz4467 Рік тому +2

    0:10 "...nobody will end up using it"
    Famous last words.

  • @vpetryniak
    @vpetryniak Рік тому

    Hello. Can you please recommend a good video crash course for Java?
    I wrote C/C++ and TypeScript a lot. So do not need to listen for 4 hours what a variable is. Just sans something fast, maximum information in smallest time about Java. So that I can learn fundamentals quickly.

    • @finnbarm
      @finnbarm Рік тому +1

      I'd recommend building a project instead. The syntax isn't all that different from C++ in many ways so I don't think you'll have problems.

    • @awesome-coding
      @awesome-coding  Рік тому

      Hey! If you have experience with C/ C++ learning Java will be a breeze.
      The way I usually dive into a new language is to look at some live coding sessions.
      I have a few small ones on my channel where I'm looking at the "core features":
      - ua-cam.com/video/B1STms-n3yU/v-deo.html (Java)
      - ua-cam.com/video/MovjVwGa9F4/v-deo.html (Kotlin)
      By the way, if you want to get into the JVM world, I suggest you look at Kotlin (a lot of job openings, and way more expressive than Java).
      Here is me building a REST API with Kotlin and Ktor - ua-cam.com/video/xKmLZ9cIWss/v-deo.html
      Now, regardless of your previous experience, if you really want to go deep into the language, I always recommend this book - www.amazon.com/Head-First-Java-Brain-Friendly-Guide-dp-1491910771/dp/1491910771
      Hope this helps :)

  • @joe_hoeller_chicago
    @joe_hoeller_chicago 7 днів тому

    “Reactivity” -> data bindings.
    (Has nothing to do with Reactive Programming.)

  • @roooooooooooooooooooooooooooot

    Do you have a discord server?

    • @awesome-coding
      @awesome-coding  Рік тому

      I did for a while, but it was not really taking off, and it took time for me to maintain it.
      You can reach out to me via Twitter at any time - twitter.com/AwesomeCodeClub
      When the community will grow a bit more, I'll try to bring back the discord server as well.

  • @allan_archie
    @allan_archie Рік тому +1

    Vue had it right all along

    • @awesome-coding
      @awesome-coding  Рік тому

      I'm not sure if "all along applies" since they had 3 major releases, all of them containing braking changes, but I get what you are saying.

  • @evccyr
    @evccyr Рік тому +1

    Awesome's Awesome videos

  • @napapt
    @napapt Рік тому

    Well an improvement would be to avoid so many loops on the DOM elements, at 3:40 I can count 6 redundant loops that could be converted to 1 using the Arrays.reducer function

    • @johndoe5113
      @johndoe5113 Рік тому +3

      The purpose of using these array methods is to make the code more readable. He could also just write the code imperatively to improve performance, but it would create less maintainable code, which is not a very high priority for an educational video and unideal for most codebases.

    • @awesome-coding
      @awesome-coding  Рік тому +1

      Thank you for the suggestion!

    • @doc8527
      @doc8527 Рік тому +1

      It's a bit weird to me that your intention is correct for performance purpose, but the end solution is purely wrong. "Array.reduce" as the name suggests is to compute/reduce to a value from the array. From the code itself with multiple filter/forEach, it's clear that it's not directly computing anything as an end result, and it's also trying to do something above the regular array function. So the solution is to use the regular "for loop" instead of messing around array function. Using "reduce" is an abuse and less performant in the worst case.
      Also, he's doing a lot of [...el.attirbutes] for unknown reason, this part is highly skeptical for me, and it seems like the video author misunderstood about the use case of immutability (I blame "React" here :P). I could be wrong though. Maybe he did it for good reason.

    • @awesome-coding
      @awesome-coding  Рік тому +1

      @@doc8527 Hey! I'm glad you mentioned [...el.attributes] - this is a really good question.
      So the idea is this:
      el is a DOM element. el.attributes is of type NamedNodeMap which doesn't have access to your usual filter / forEach / map array methods. So by using [...el.attributes] I am destructuring the Node Map intro an actual array which has access to those nice to use methods.
      I'm sure that this is not the most efficient / optimal approach, and you can iterate NamedNodeMaps directly, but it's not as clean and nice as the implementation I did in my opinion.

  • @Dino-Kupinic
    @Dino-Kupinic Рік тому

    hey, I like your videos. But could u use other "stock" videos? Always seeing the same ones in your videos feels lazy

    • @awesome-coding
      @awesome-coding  Рік тому

      Thanks for your feedback!
      I'll renew the batch in 2024 ✌️

  • @mayukhchakraborty5364
    @mayukhchakraborty5364 5 місяців тому

    Just a minute; your voice is so simillar to Cars On (Asphalt 9 - Unite Legends)... So you are that same person?

  • @jediikk
    @jediikk Рік тому +3

    Have you just recreated HTMX in front of our eyes?

  • @uuu12343
    @uuu12343 Рік тому +2

    How DARE you say that I wont use your framework >:(

  • @anuragannu8930
    @anuragannu8930 Рік тому +1

    great video, but try to create a detail one, or try to teach each block or step a little bit more.

    • @awesome-coding
      @awesome-coding  Рік тому

      It's on my list! Thank you for your suggestion!

  • @coolemur976
    @coolemur976 Рік тому +2

    You can "create" your own framework. But you cannot support it. And you cannot use it in business. Welcome to real life.

    • @awesome-coding
      @awesome-coding  Рік тому +1

      It looks like there are very few things you can actually do in the real life 😅

  • @vigneshwarrv
    @vigneshwarrv 10 місяців тому

    Dude why this video is not getting enough traction !!!!!

    • @awesome-coding
      @awesome-coding  10 місяців тому +1

      That's what I'm always asking myself after every new video 😅

  • @waelltifi-2023
    @waelltifi-2023 Рік тому

    i feel so sorry for the people who actually think this developper life is a good life ... i am a web developper and i am only doing it to have a chance to leave the 3rd world , if i was born in the 1st world , i would never enter this field

    • @awesome-coding
      @awesome-coding  Рік тому

      😅 in all honesty it has its highs. After all, it's a pretty easy lifestyle.