Тёмный

Interfaces are NOT types for objects. Here is the real answer. 

Mark Maksi
Подписаться 490
Просмотров 157
50% 1

What if I told you that interfaces are NOT meant to define a type for objects? This is a common misconception in the community since modern frameworks put heavy emphasis on functional programming over OOP. In this video I will show you how to really use interfaces to build powerful applications that are modular and reusable.
The 2 benefits of interfaces as mentioned in the video:
1. Creating a blueprint for classes to let developers know how they should implement those classes.
2. Creating contracts (dependency) between classes. That is also called "dependency injection" which is the fundamental concept of composition design pattern in OOP.
Please note that composition is an advanced concept, and I only touched the surface of it so that I inspire something within you beyond what is common among random internet content.
- Github repo: github.com/mmaksi/typescript-...
- Hashnode article: markmaksi.hashnode.dev/the-un...
Follow me on X:
/ mmxi47
#typescript #interfaces #designpatterns #types

Наука

Опубликовано:

 

8 янв 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@FilipCodes
@FilipCodes 6 месяцев назад
Dependency injection explained very well. Great video :)
@markmaksi
@markmaksi 6 месяцев назад
Thank you!
@0xtz_
@0xtz_ 6 месяцев назад
was waiting for this 👏
@markmaksi
@markmaksi 6 месяцев назад
Thank you. I just feel weird when I see clickbait thumbnails and titles of use types and don’t use interfaces.. so I decided to make this video. Please read the description as well.
@kim92se64
@kim92se64 6 месяцев назад
What a great !!! Awesome work !!! For learning we need a teacher like you and not the documentation (Totally Agreed) Regard from Pakistan
@markmaksi
@markmaksi 6 месяцев назад
Thank you from Syria and Italy. 🇸🇾🇮🇹 Glad you enjoy my videos.
@rajatsingh3517
@rajatsingh3517 4 месяца назад
Types and interface has these own place is typescript, mark has done a grt job summarizing the concepts
@markmaksi
@markmaksi 4 месяца назад
Thanks bro!
@TimoTalksTech
@TimoTalksTech 6 месяцев назад
Another great video!
@markmaksi
@markmaksi 6 месяцев назад
Thank you brother Timo. Thank you for being a support for my potentials. 😎👊🏼
@FurryDanOriginal
@FurryDanOriginal 6 месяцев назад
I haven't even watched the video yet, but already gotta say, thank you! For me it was never a debate as conceptually they represent different ideas, so it was all the more surprising to me as to how many youtubers recommend to always use types (unless interfaces are explicitly needed). Types are shorthands, interfaces are strict, non-dynamic structures for objects. Therefore I use them as such.
@markmaksi
@markmaksi 6 месяцев назад
That’s very true. When I see a RU-vid thumbnail made for clickbaits of use types don’t use interfaces.. I just shake my head. I remember seeing a video where the content creator said “I can’t believe the docs recommend you to use interfaces”. I digged deeper into that RU-vidr and they claimed to have 10 years of experience in software development. 🤔 I really can’t see the point of: 1. Talking about a topic we don’t have knowledge about. 2. Repeating what others say in different format without testing the validity of their information. I wish this video goes viral so that I create some trouble in the community for good. Thanks for your knowledge and can’t wait to hear your feedback on the entire video. Also a hashnode blog is also available in the description box.
Далее
Detailed Overview of The Nodejs Ecosystem
16:02
JavaScript in 100 Seconds
2:36
Просмотров 848 тыс.
Fast and Furious: New Zealand 🚗
00:29
Просмотров 15 млн
Java Is Better Than Rust
42:14
Просмотров 160 тыс.
Functions vs Classes: When to Use Which and Why?
10:49
Просмотров 148 тыс.
3 ways to reduce the size of your docker images
17:20
Why Use Design Patterns When Python Has Functions?
23:23
STOP Using Classes In JavaScript | Prime Reacts
14:02
Просмотров 228 тыс.
Why I'll always use Typescript over Javascript
18:17
Просмотров 16 тыс.
Красиво, но телефон жаль
0:32
Просмотров 1,5 млн