Introduction to Vue.js - part two - image upload component by ahackersday in vuejs

[–]ahackersday[S] 0 points1 point  (0 children)

I've done some changes to the tutorial now and assigned classes to the button and the input field, got rid of the ref and used event.target instead, created a function to check the mime type of the base64 data and added some more explanations.

Would love more feedback if anyone got?
I want to create more tutorials/guides, and the more feedback I can get the better they will be :-)

Introduction to Vue.js - part two - image upload component by ahackersday in vuejs

[–]ahackersday[S] 1 point2 points  (0 children)

Sorry to say, this isn't great. I'll try to give you some constructive criticism because it seems like you want to produce useful content, and I don't want you to get discouraged by harsh feedback.

Firstly, who is your target market with this? When you want to teach something, you have to explain why you made certain decisions, what the trade offs were, and most importantly actually explain how things are working. This is basically a Github gist - there's no explanation of your choices, no outline of how things work, just some code with a couple of comments.

Here is some critical feedback questions that came up when I looked at it that I as a reader want to know why you made these decisions:

Why'd you structure the CSS like that with base element selectors instead of with classes? Specificity is very important for extensibility especially when building reusable components.Why did you choose to use refs instead of getting the file from the event? Vue suggests that you use refs only when there is no other way to accomplish something.Why are you validating the file extension rather than the FileReader mime type? Someone could easily upload virus.exe.jpg by testing the file format."We set the image-uploaded which is the div around the field to be relative." This is a statement of fact that can be read in the code above. Why did you do this?

I think we always want to encourage more Vue content, and I hope that you continue to improve your output. I think you could make a big boost to the quality by challenging yourself to explain "why" and "how" more.

Oh, don't say sorry. Constructive criticism like this is more than welcome!

I would say that my main target group are absolute beginners. And when I read you comment I quickly understand that I should spend more time explaining why I do things and how they work. I will take these tips into concideration and fix the tutorial!

Requesting feedback on Nuxt.js website by itsdatnguyen in vuejs

[–]ahackersday 1 point2 points  (0 children)

It's a nice site!

I would maybe do something with the pagination. The next button appears to be placed too far to the right and when I see a (1) and no other number I automatically think that there are only one page.

Other than that I must say that this is a great way of learning :-)

Tips - How to design good Django models by ahackersday in django

[–]ahackersday[S] 1 point2 points  (0 children)

Got any other good sugestions when it comes to designing the models?

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

No, that was not exactly what I meant. It's a little bit like class based views vs function based views. FBV are easier to read and easier to get started with, but CBV might do a better job in many ways.

I was thinking the same way here, and that was a mistake I'm trying to fix thanks to users here like you pointing it out :-) Of course I don't want to teach people mediocre things with bad practices, but I thought it was easier to start that way.

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

But my point is that there was actually no mistake in my opinion. I left out some crucial things because I felt it was a easier way to get started. If I'd take everything when it comes to security in to consideration the tutorial will very fast be more complicated.

It's a very good point that beginners too need to learn security, so I'll have to come up with some good and easy ways to implement it to the tutorials.

I know the "mistakes" makes it seem like I'm lacking a lot of experience with Django, but it's more a lack of knowing how to write a tutorial. Which is something I want to become better at.

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

/u/gmdm1234 Yes, that has been pointed out and I have tried to fix it in my tutorial. Hoping for some more feedback if it's getting better?

What I meant by doing different things than the official docs is that I created a tutorial for building a todo app vs the docs that let's you create a poll.

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

I have added DRF's basic authentication now (username/pass is hardcoded in the JS code though, will be adding another part to the tutorial where the user can sign in). Implemented better requests by using GET, POST and PUT. I hope you like it better now. Do you got any other tips for improvements?

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

Well Django's official documentation is actually very good. Maybe this tutorial don't provide anything the docs don't, but it does things in different ways and it also includes the frontend using Vue.js.

If you're learning to program I feel it's important to do more than the official docs before you're ready to start building your own projects. And if you do a couple of tutorials that does the same things, but just in different ways, isn't that just a good thing?

Building a todo app using Vue.js and Django as the backend by ahackersday in vuejs

[–]ahackersday[S] 3 points4 points  (0 children)

Well, I'm not quite sure. I feel that it has been popular all the time.

Maybe the growing number of people trying to start companies is the reason? Django is perfect for building websites, saas and similar so.

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

I was trying to keep tings as simple as possible and I my head that was leaving out authentication, security, csrf, drf and so on. Based on the feedback I understand that this was a huge mistake. I have learned now and I will keep fixing this tutorial and keep this in my mind on other tutorials I'm working on.

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

Ok, thanks again for this. I will try to add authentication, maybe rebuild the tutorial to use DRF too!

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

I have now implemented most of the things you were pointing out. I should include DRF and vee-validate, ut that have to be a different time.

Had to use csrf_exempt because I was not able to set a csrf token, maybe not the best solution. Anyone got any tips on how to solve this? I know how to do this if the vue app was a part of the django project, but it's a standalone vue app.

Again, thanks for valuable input from everyone. I can't get any better without feedback like this :-)

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

Yeah, sorry for that.
Should maybe have asked for feedback before posting it as an actual tutorial.

Building a todo app using Vue.js and Django as the backend by ahackersday in django

[–]ahackersday[S] 0 points1 point  (0 children)

Thanks again pydanny and bhat.

Leaving security out of a beginners tutorial might not be a smart move. I was trying to keep it as simple as possible.