Why I Use Django Function Based Views

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 139

  • @DennisIvy
    @DennisIvy  3 месяца назад

    Don't forget to check out my Complete Django course! dub.sh/NvGboTI

  • @malayparmar504
    @malayparmar504 3 года назад +111

    Hey Dennis, recently in February I got a job as a Backend Python Developer and I really want to thank you for all the Django tutorials because I learnt Django from scratch from your videos...
    Thank you for all the knowledge ❤️

    • @DennisIvy
      @DennisIvy  3 года назад +21

      Wow congratulations! Thanks for sharing that with me, it keeps me motivated :)

    • @malayparmar504
      @malayparmar504 3 года назад +1

      @@DennisIvy Thank you very much

    • @Feronom
      @Feronom 3 года назад +2

      Very good! When did you start learning?

    • @malayparmar504
      @malayparmar504 3 года назад

      @@Feronom Dec 2020

    • @Feronom
      @Feronom 3 года назад +3

      @@malayparmar504 and you already got a job! Wow I am both jealous and impressed. How did you get it? Just sending resume or?

  • @jonoisedev
    @jonoisedev 3 года назад +45

    I like function based views also. I feel more in control :D

  • @frankkiogora
    @frankkiogora 3 года назад +6

    Hey Dennis, I have brushed up my django skills alot especially connecting postersql or MySQL with Aws and also using S3 to serve static files.
    You have also helped me alot to get rid of my imposter syndrome, I never realized I knew alot until I took some time to create some django projects . Thanks man and continue doing that awesome job and may God bless you + your fam

  • @vinifootz
    @vinifootz 3 года назад +5

    I've been programming in Python for 2 years now, I'm using Django in my Work, and it's great to see how you approach these kind of concepts, keep going bro !

  • @CodeWithTomi
    @CodeWithTomi 3 года назад +13

    I use both function and class based views, and i don't use class based views unless i need to use it... i think sticking with function based views is preferable and understandable

  • @geetcyberlab5108
    @geetcyberlab5108 3 года назад +8

    Well for me, I have been using function based views back as 2016 until 2019 when I changed to CBV and I remember it took me like 3 serious months to understand how the CBV was structured

    • @DennisIvy
      @DennisIvy  3 года назад +1

      I definitely enjoyed classed based views when I started using them. Took me a bit to understand them also.

    • @geetcyberlab5108
      @geetcyberlab5108 3 года назад +2

      Sure... I have to go back and review my previous projects that i developed using FBV and changed them to CBV making my backend retrieve queries faster...

  • @iosefespiritu678
    @iosefespiritu678 3 года назад +1

    Hey Dennis! I just wanna thank you for making Django Tutorial videos. You're one of the reasons why I successfuly deployed a Web-based system in my work. Keep up the good work!

  • @yikebermisganaw4816
    @yikebermisganaw4816 Месяц назад

    You are great instructor 🎉.I really appreciate how you understand things and explain for everyone new to codding.thank you very much Dennis.

  • @cameroneverhart6443
    @cameroneverhart6443 3 года назад

    As someone who is currently taking a coding bootcamp, this video is just....SOOOO right on the money. This was so helpful to me in keeping me sane. We learned function based views first and some "extra credit" was doing things in class based views and I got so lost and discouraged.

  • @Unicorn_rainbow16
    @Unicorn_rainbow16 3 года назад +1

    This video is so helpful. I had this confusion everytime I code and you cleared it. Also I have started creating to-do app and now I m doing modifications in it like contact forms, login form . Also I'm using modelform , bootstraps for navigation. I'm blessed to have your channel. Keep up the good work and I hope that I will learn so many things from your channel and become a good programmer. Thanks a ton Dennis!!!!!!! Also waiting for more fully-fledged projects on your channel.

  • @oparesimon
    @oparesimon 3 года назад

    Please, continue to use function base views for the sake of some of us beginners. It makes learning your tutorials easy to understand and follow. Thanks.

  • @emperorpalpatine7808
    @emperorpalpatine7808 3 года назад +2

    I started out watch your tutorials. After dozens of projects, I still prefer using function based views even for basic stuff except for things like search. I prefer having control over how my logic works as it feel more intuitive.

  • @glaceondev4149
    @glaceondev4149 3 года назад +1

    Tbh Function base views are pretty understandable and i love that And pretty easy to do stuffs!
    Its like the whole control is in your hand!

  • @CodeWithStein
    @CodeWithStein 3 года назад

    Very good video Dennis! I totally agree with you on this. The "magic" you get from using CBV can be hard to understand in the beginning.

  • @11yoyomama
    @11yoyomama 3 года назад +1

    I learned class based as a beginner, and I can confirm it’s a lot harder to use. Now I’m glad I learned it, but for simple projects to learn Django, you’re right, function based is better.

  • @LordFullStack
    @LordFullStack 3 года назад

    Hi Dennis , Thanks for the ecommerce website tutorial . I made a online store for my village ! Which was 3rd build of same website because at first i was not feeling confident . But now i can make a production level django website and start my business ! Not a unique project but yeah i can start with it in my village ! And also due to your tutorials and inspiration i started freelancing and earning income 1000$ per month (₹70,000+ which is more than enough for me and my family ) ! Thanks for your efforts dennis !

  • @jaumemontane3305
    @jaumemontane3305 3 года назад

    Just this weekend I was refeshing this concept of going from Models to Views to Templates and it just clicked to me!
    As it clicked, my thought is that CBV might work for basic things and if you a rush, but FBV are more flexible and easy to use, because they are more easy to understand.
    Thanks for the video! I will start soon your course on Udemy so I expect a lot of FBV i suppose! hehe

  • @josecarlosramirezdelgado7828
    @josecarlosramirezdelgado7828 3 года назад

    I'm kinda beginner, I've used django for 3 months now, and I'm reading the doc, although it seems that class-based views is more complicated, it's more organized and makes your code DRY, but like everything, depends upon what is used for... I'm planning doing my yt channel, thanks Dennis, you're such an inspiration!

  • @diegoabdo2555
    @diegoabdo2555 3 года назад +9

    Every time I use CBV there is a feature that requires overriding methods and I spend like two hours trying to find the way and the code looks horrible. In FBV I always have to write more, but I understand things better and that can be helpful if some day I want to try out node or other framework of that type.

  • @armaghan1196
    @armaghan1196 3 года назад

    I had this question for a long time, this cleared 2 questions of mine! Thanks a lot Dennis!

  • @louisramirez975
    @louisramirez975 3 года назад

    I appreciate your teaching style

  • @chaitanyaasati
    @chaitanyaasati 3 года назад

    Thank you for taking this question. 😇

  • @victormungai
    @victormungai 3 года назад

    I think I will focus more on function-based views now. It is true that class-based views abstract a lot of important knowledge from the learner(such as myself) and so, going in manually and getting my hands dirty is a better way of understanding what's actually happening. That perspective is important indeed.

  • @parmanandchauhan6182
    @parmanandchauhan6182 3 года назад

    i have been working as python django fullstack web developer and thanks to @dennis ,I learned a lot from u

  • @cursoderobotica
    @cursoderobotica 3 года назад

    hello Dennis! I really like class base views! as a beginner this make me the job easy! I know that using classes I don't have full control.. but I don't want to re-invent the wheel, if someone (way much better than me) has doing that job for me 😅 I will use it! (time is critical for me) thank you for your videos!! cheers

  • @TheSoftwareServices
    @TheSoftwareServices 3 года назад

    Yeah Dennis, CBV is like a Magic Mystery, FBV is more explicit , tq for video

  • @kenafriq
    @kenafriq 2 года назад

    Hey dennis good piece of info, you obviously cant drive a car without legs, so basics are quite important

  • @faithademola4713
    @faithademola4713 3 года назад

    I use function based view as well. It feels like I'm the one in control. Thanks for the insight.

  • @thriftsimple561
    @thriftsimple561 3 года назад +2

    Would've like to see code examples of the differences and a brief explanation. Thanks for sharing though!

    • @helloquico
      @helloquico 3 года назад

      it would have been nice..yes

  • @AcademyOmen
    @AcademyOmen 3 года назад

    Thanks Dennis, I definitely agree🔥🔥

  • @crowley5687
    @crowley5687 3 года назад

    Yeah right. It's Good for beginner like me to understand it

  • @sabmus
    @sabmus Год назад

    thanks man! just the advice that I need

  • @Angryman18
    @Angryman18 3 года назад

    Always function based views & also function based component for React

  • @billywang3829
    @billywang3829 3 года назад

    The man is speaking straight facts

  • @mohammadabbaszadeh4603
    @mohammadabbaszadeh4603 2 года назад

    Thanks for great videos. I'm watching almost all of your Django tutorials and am currently building a shopping list webapp, but I want to share my list with other users and I don't know how to do that. Can you maybe make a shopping list of webspp tutorials.

  • @freekeys
    @freekeys 3 года назад

    Agree👍 me too confused that Mistry box at begging😂

  • @euriperez9586
    @euriperez9586 3 года назад

    Anyways thanks for everything Dennis, just bought your course at udemy to support you and encourage to everyone that have benefit from your free tutorials and can afford it to do so. Hope you keep doing fine !

  • @lowkeygaming4716
    @lowkeygaming4716 3 года назад +1

    Honestly I also enjoyed FBV more because the CBV seems to be too vague because it does a lot of stuff in the background however my previous work required the CBV that's why I was forced to learn it.

  • @dhruvilshah9098
    @dhruvilshah9098 3 года назад

    Very helpful sir!, Sir now I think I am very good in Django I completed all your playlist, but now want to be good in Django Rest Framework, please make a playlist like Django for it. Seen many videos but still not able grasp very well

  • @jackieli1724
    @jackieli1724 Год назад

    Great Explanation!

  • @kashaxx
    @kashaxx 3 года назад

    I usually use function based views when I don't know what I exactly wanna accomplish. I usually end up converting them into CBV in the refactor phase to keep everything clean

  • @jhoanmartinezsilva2609
    @jhoanmartinezsilva2609 3 года назад

    Function based views are more customizable, classes based views are faster, I talk from my short experience off course, I use both, anyways, thanks to your channel I became a professional Django developer

  • @adalaw3129
    @adalaw3129 3 года назад +2

    In that case, can we have a class-based views tutorial?

  • @nowyouknow2249
    @nowyouknow2249 3 года назад

    Yes I prefer fbv. It's the same in React, I prefer functional components

  • @abinabraham13
    @abinabraham13 3 года назад

    Can you make a video about rest api , which type of view we use and multiple serialiser and queryset

  • @jeanbarbosa9
    @jeanbarbosa9 3 года назад

    Good point this one. I do prefer class based views, so I always try to adapt it by this way.
    I know that my question it's out of the topic, but what do you think about handle the context in a separated file, like a presenter (a class with many methods that handles the template data) instead of doing this into the view?

  • @poornasaipilla1620
    @poornasaipilla1620 2 года назад

    Thank you Dennis providing a cool stuff for free of cost and learned so much from you ,.. and no one is showing how to render this data provided by DRF to templates , may be by using with class bassed generic views etc. is it not possbile ..or it is possible please make help me to find ou this ..

  • @ap.7g199
    @ap.7g199 3 года назад

    Hey Dennis, first of all thanks a lot for your great videos. Could you make a social media type project please?

    • @DennisIvy
      @DennisIvy  3 года назад +2

      Working on one now :)

  • @unperrier5998
    @unperrier5998 3 года назад

    I realized by listening that experienced programmers will dive head first into the documenation until they figure things out and get a good overview of how they will do what they want to do.

  • @manzourabdalla2279
    @manzourabdalla2279 3 года назад

    Hey Dennis , You are the one who make me begin learning django and i liked it almost , so today i was planning to make a project and i got this error "Object of type QuerySet is not JSON serializable" can you help with this , Thanks :)

  • @siuu3155
    @siuu3155 3 года назад

    Hey dennis, make some tutorials on react js for complete beginners please. ❤️

  • @patrickknows2296
    @patrickknows2296 3 года назад

    Can I combine both in a project? But I need to know, is there anything that CBV can do which FBV can't?
    Honestly, I am more comfortable with FBV because I can understand what's going on because it is more explicit

  • @__arid0__
    @__arid0__ 4 месяца назад

    I worked in fairly large companies and in government. CBV are the norms. Otherwise, your Pull/Merge request will be returned back.

  • @Vesuka
    @Vesuka 3 года назад

    are class based views more powerful than function based views ??? (I'm talking about runtime)

  • @atharvashetty9730
    @atharvashetty9730 3 года назад

    Django rest framework is little bit confusing. If you make a course on it many people including me would like to purchase it

  • @rajkumarr7622
    @rajkumarr7622 3 года назад

    I feel class based view is more organized and function based view is simple and has more control

  • @Ice-on7xs
    @Ice-on7xs 2 года назад

    People who use both: *LAUGHS IN SUPERIORITY*

  • @gabrielaraya3242
    @gabrielaraya3242 3 года назад

    Hi Dennis , Is it ok to use both views in the same proyect?

  • @morp6938
    @morp6938 3 года назад

    But what about if you learn FBV and than you need to use some third-party-app that is build on CBV. Then it's realy complicated to figure out how to reuse it.

  • @mamangcikal1255
    @mamangcikal1255 3 года назад

    what kind of notification have u use for django project such as ecommerce when customer check the product out?

  • @karanshrestha4432
    @karanshrestha4432 3 года назад

    Can you create Django Rest API + reactjs From the base Full tutorial

  • @BehruzbekOtayev
    @BehruzbekOtayev 3 года назад

    Dennis, what do you say to taking Linkedin Python and Django assessment tests? Are you up for it? Would you be willing to share your experience with us?
    Thanks,
    Everyone.

  • @saikatmukherjee8095
    @saikatmukherjee8095 3 года назад

    does function based views make the code slower ??? rather than class s based views?

  • @ajaykryadav
    @ajaykryadav Год назад

    Too good

  • @randheerkumargautam6433
    @randheerkumargautam6433 2 года назад

    How to handle image filed in function-based view to create user profile api with profile image

  • @jj-big-slay-yo
    @jj-big-slay-yo 3 года назад

    cbv-s are not that difficult. it also helps to read django's code. not for complete beginners though. there is a simpler take on them called django-vanilla-views.

  • @tropicalsamurai-animations
    @tropicalsamurai-animations 3 года назад

    Dennis said that you can do anything with both, yet in my first django project I wanted to make the app automatically log in the user after creating an account, and I only found a way to do that with class based views. How could I do it with function based views?

    • @DennisIvy
      @DennisIvy  3 года назад

      Call the login function and redirect the user. I do this in my Django 2021 course, you can look at the source code if you didn’t purchase the course

  • @hakimled4300
    @hakimled4300 3 года назад

    Me too like FBV to CBV

  • @naheliegend5222
    @naheliegend5222 2 года назад

    I stick with function based views. I kinda feel them more.

  • @kirtan__prajapati1827
    @kirtan__prajapati1827 3 года назад

    Nice

  • @ajdemoedable
    @ajdemoedable 3 года назад

    Is it very hard to change an app from function based to class based views later on or not recommended? I mean a small sized app.

  • @MagnusAnand
    @MagnusAnand 3 года назад

    Function based views: for amateurs and the experienced
    Class based views: for the experienced

    • @DennisIvy
      @DennisIvy  3 года назад

      🤣

    • @DennisIvy
      @DennisIvy  3 года назад

      STRONGLY disagree

    • @MagnusAnand
      @MagnusAnand 3 года назад

      I wonder which of the two statements you disagree with?

  • @juneddavada
    @juneddavada 3 года назад

    Hey Dennis , I am following you from 2019 and i have learned Django from your playlist . And i have create a many project and i have hosted many projects also on Heroku Server .
    But now i get stuck at "Django-import-export" module . And i have to create a script which will take backup all the models data in excel from the models in database.
    So please help me to get out from this..

  • @meqdaddev4341
    @meqdaddev4341 3 года назад

    Can't agree more...

  • @pinakastra
    @pinakastra 3 года назад

    Hey bruv thanks for explaining as I always prefer function based views. I'm do need to ask for your help as I need to made a custom user model so that I can have certain extra fields, however I need to remove the password field from required and use otp instead. I'm unable to remove the password field so I initialized it. Anyways if there is some way to contact and ask you please tell me.

  • @creativetech8471
    @creativetech8471 3 года назад

    Does not function Based Views make you repeat code (DRY ?)

  • @taowme
    @taowme 3 года назад

    40 K - sounds good. I had one worth $1,500. I should have sold it.

  • @mehranj73
    @mehranj73 3 года назад

    Is the code of your Django and React course public?

  • @Rahul-gs7vc
    @Rahul-gs7vc 3 года назад

    I like function based view.... But my lead prefer classbased view....

  • @_alexlazar_
    @_alexlazar_ 3 года назад

    Meanwhile I’m here, just built a membership web app with vanilla PHP. I feel a bit inadequate 😂

  • @LIMLIMLIM111
    @LIMLIMLIM111 3 года назад

    We only remember things that we can reason with. If class based view remains black box, chances are, they wont stay in our brains for long.

  • @rajeshsingh5504
    @rajeshsingh5504 3 года назад

    I think for beginners class based view is better

  • @rediyusputra8333
    @rediyusputra8333 3 года назад

    Hi dennis..!

  • @aditya-bl5xh
    @aditya-bl5xh 3 года назад

    I want to make a website that has a feature like facebook group, where there is a group admin and has following, bro can you please help me, I commented on other RUclips channels too, but nobody gave a reply, I hope you'll reply

  • @taowme
    @taowme 3 года назад

    I want to learn Django.

    • @DennisIvy
      @DennisIvy  3 года назад +1

      You've come to the right place ;)

  • @ashikmehermobin9926
    @ashikmehermobin9926 3 года назад

    Vote For Function-Based Views

  • @unuefeejovwoke6609
    @unuefeejovwoke6609 2 года назад

    LightWeightsProjects = "function based views"
    HeavyWeightsProjects = " class based views "

  • @ardabili
    @ardabili 3 года назад

    on class based view i didn't understand how to make multiple model in one views.

  • @younesaitmha
    @younesaitmha 3 года назад

    First view first comment

  • @No_Underscore
    @No_Underscore Год назад

    well, just mix between FBV and CBV in the same file. lol

  • @ShaidaMuhammad
    @ShaidaMuhammad 3 года назад

    You look beautiful.

  • @MuhammadAdnan-vs5cx
    @MuhammadAdnan-vs5cx 3 года назад

    Function based view is better than class based your opinion

    • @DennisIvy
      @DennisIvy  3 года назад +1

      I don’t think they are better, I just recommend to start with them.

    • @MuhammadAdnan-vs5cx
      @MuhammadAdnan-vs5cx 3 года назад

      @@DennisIvywhich you use FBV or CBV?

  • @daytraderph
    @daytraderph 3 года назад

    40k$ ?

  • @mychromebook9935
    @mychromebook9935 3 года назад +2

    Function based views = $$$ + get stuff done + productivity + know how it works. Class based views = just programmers stroking their ego + no productivity + lost time.

  • @salimsuleiman7984
    @salimsuleiman7984 3 года назад

    class based views only make your code look short period

  • @nrikeedev
    @nrikeedev 3 года назад +4

    I don't see any reason to recommend function based views apart from when you are an absolute begginer.
    In my opinion, once you know a bit more of Django you should switch to CBV.
    In a class you can split your code into methods and you can write mixins.

  • @crazycat2969
    @crazycat2969 3 года назад

    sup man

  • @serious6037
    @serious6037 2 года назад

    Sorry to class based view fans, but class based views are garbage if you're not dealing with querys and databases. when it comes to dynamic(live) data which you dont need to save, i prefer function based views.

    • @DennisIvy
      @DennisIvy  2 года назад

      You’re definitely wrong there lol there is nothing that makes making queries with class based views difficult.

  • @miryamelliye
    @miryamelliye 3 года назад

    Dennis please I contacted you😭

    • @DennisIvy
      @DennisIvy  3 года назад

      If you emailed me I'm not sure when I can get to it, I've been flooded with emails and projects so I'm several weeks behind on checking all of that, sorry.
      If its for technical support I don't have the luxury of helping people one on one anymore :/
      Hope you understand..

    • @miryamelliye
      @miryamelliye 3 года назад

      @@DennisIvy No problem!!! Thank you Anyways!! And keep up the good work👏🏼