the right way to organise your code
Вставка
- Опубліковано 1 вер 2021
- In this video you will learn how to organise and properly structure your code as a software engineer.
#organisecode #java #amigoscode
🙊 Subscribe to Amigoscode - bit.ly/2HpF5V8
► Courses Available for free here - amigoscode.com/courses
► Join Private Facebook Group - / 456035171490753
► Join Discord - bit.ly/2wL029v
⭐ Table Of Contents ⭐
🙊 Here are the goods for all my videos video:
► Recommended Books
Clean Code
- amzn.to/2UGDPlX
HTTP: The Definitive Guide
- amzn.to/2JDVi8s
Clean Architecture
- amzn.to/2xOBNXW
► Computer and Monitor
New Apple MacBook Pro
- amzn.to/3464Mmn
Dell 27 INCH Ultrasharp U2719D Monitor
- amzn.to/2xM3nW1
Double Arm Stand Desk Mount
- amzn.to/3aYKKfs
USB C Hub Multiport Adapter
- amzn.to/2Jz7NlL
► Camera Gear
Sony ILCE7M3B Full Frame Mirrorless Camera
- amzn.to/346QIJn
Sigma 16 mm F1.4 DC DN
- amzn.to/2wbic3Q
Sigma 33B965 30 mm F1.4 DC DC
- amzn.to/39G37Fd
Awesome Screen Saver
- github.com/JohnCoates/Aerial
IDE I use for coding
- Iterm
- VsCode
- GoLand
- IntelliJ
- Sublime
💯 You can also follow me here:
► Don't forget to subscribe | bit.ly/2HpF5V8
► Join Closed Facebook Group for discussion and early access videos and courses | bit.ly/2FbuIkx
► Follow me on Instagram | bit.ly/2TSkA9w
► Join Discord - bit.ly/2wL029v
❤️ Thanks for watching - Наука та технологія
Data structures and software design is so important, especially in OOP. There should be more tutorials about these topics. I have seen so much code that is unreadable, unmaintainable and untestable, so I'm glad that you put attention to this topic.
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
@@SquidBeats may Allah guide you, Ameen!
Stick to whatever keeps you afloat and away from harmful stuff. As for rest of things like "the only way" sounds a bit dogmatic which is just the opposite of how God would.
@@SquidBeats jesus is a prophet to God also known as Allah in arabic. hell does exist. and all the bad things you talked about are also sins in islam. God has no partners, he has no sons. God is the one and only, supreme being... its logical.
@@SquidBeats and I thought the Harry Potter fans are obsessed with their books
I can’t tell you how *ON TIME* this tutorial is. I’ve been googling, emailing my professor & my programming mentor + my classmates in my school’s discord trying to help me figure out how to organize my files w o having to continually create new projects each time I want to turn in an assignment. Current set up is so convoluted, the code usually doesn’t compile 🙃 (but that’s a different story lol). Thank you so much for this video. Can’t wait to tell everyone I finally have a solution for my work flow.
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
Your school uses discord? That's amazing. Ours uses facebook ☠
As a full stack web developer this is a worth while video i was looking for
This guy is such a legend. Much love. The content is top class, the explanations are top class. What else do I need? Much love man
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
@@SquidBeats is Jesus God or what is he? If Jesus is god, How come god was killed? And if he is the son god, why did God kill his son? Couldn’t god forgive the sins without killing his son? It’s amazing that I am questioning the fundamentals of your religion, it doesn’t make sense at all
@@MohamedAhmed-rf5bk Plus: how can Jesus be the Son and God at the same Time? And let's say Jesus was killed at that time, how can they kill God? And how can the World or the universe keep working when its creator is dead/gone?
The story is contradictory and doesn't make sense. The only thing that makes sense is that he was a prophet like other Prophets like Mohamed peace be upon them and Mohamed is the last one.
How great that video was for me, I cannot place in word, man! I think that finally understand how to properly structure my projects. Thanks!
THANK YOU, THIS WAS A GOD SEND. Something so simple like file structures almost made me quit using Intellij and use Eclipse. I kept trying to create modules when I didn't really need to and didn't know when to create a project vs module. Then I would fiddle with the files and mess up everything to where they don't run again. This right here explained something so basic.
Nice video. Sometimes I spend hours hesitating the structure of the project is correct or not, this video saves me from the torture!
So you recomend to structure our code as package-by-feature insted of package-by-layer. It makes sense to me. I agree that is more cohesive, less coupled and better modularized
So glad I just discovered this channel. I already knew most of the content for this video but its great to get your understanding and thoughts. It really helped to solidify my own knowledge. You explain it so clearly too. Great video, liked, subscribed and looking forward to watching more of your content. Thank you.
Just for any C# devs out there Java packages are akin to namespaces.
Thanks Nelson, I was a little skeptical about this approach until you mentioned how easy it will be to implement future implementations such as Microservices.
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
Yea thats just click with me too. Also I just realized Django orginize code this way.
I use the Hexagonal Architecture, it's a clean Architecture very used for microservices, its main goal is made with SOLID principles and DDD. Nice video bro 👌🏿🔝👍🏼
Thank you very much for this tip. Learning about common design practices used in real world enterprise application is narrowing down the learning needs and helps to focus on most essential instead, rather than trying to use many of approaches out there.
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
@@gulbalasalamov1367 Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
@@SquidBeats Bru, you're not being what you're preaching. Maybe you don't understand what you preaching (or misunderstood), but Jesus is love, forgiveness, redemption, among other things, but clearly not what you said up there. 1 John 4:18 talks about what kind of love we need to practice. (btw I suggest you to read 1 John at least 10 times, so you understand what Jesus is all about).
May His peace be upon you all.
PS: As a Christian, my apologies to you guys that read this unnecessary comment.
same, although I tried a sort of hybrid approach where each layer has a subpackage that groups elements related to one another (for example, location address goes in the same package as a property). But it ended up being overly complicated because you end up repeating the same package name on the various layers, models, services, etc. they all end up having sub packages with equal names which kind looks dumb
He has the smoothest voice on UA-cam :)
Great Video Nelson, like always! I have an idea for a video. It's about where (and how) to hide some data when requesting a resource. Show us some solutions, like mapping the entity to a DTO, how to do those mappers? The mapper methods should be static? What if inside the mapper I want to fill a list with child entities (in that case the mapper cannot be static, it has to be a bean).
When to use a mapper? Because in my projects usually I start using for user information, but I keep the pattern, so all the entities have mappers.
I don't remember seeing the mapper package (and class) in that video, but it's cool, because it depends on the project.
Best way for create packages is pattern {groupId}.{artifactid}. it will protect from name spaces conflict when you repackage libraries. I usually name shared package as util or common. Thanks for sharing your knowlages.
I am a total beginner so this helped a lot. Thank you
Honestly i am new to java but this feels so informative and eye opening for me. Thank you
This tutorial saved me, from
well-structuring my projects
And do it for a reason 🙂
Thank you, Amigoscode! I have learned plenty from watching your videos and tutorials.
Alhamdulillah allah put you in my way, curently i began a bootcamp in web developement in France, you motivated me a lot and i m thankfull for this. Hafidhaka Allah akhi al aaziz(may Allah protects you my dear brother)
did you find a job in the end
In this video you will learn how to organise and properly structure your code as a software engineer.
As usual, quality and brief contents. I love this.
Haven't watched this yet, but the link just appeared. So enjoying and benefitting from your Docker course that will certainly be following this.
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
i've been searching for a video like this for so long!!!! Thank you!!!!
Big up Nelson, my coding skills are building on your simple to understand tutorials
I like the way you discover those design patterns that are not very often seen on youtube, nice job and keep going :)
After seeing your first video recommended by youtube I clicked the subscribe button without hesitation lol.
Another great video as always! Thank you 🙏🏻
Wa aliakum as salam brother.
Your videos are helping me alot.
I'm planning to switch to Java Spring (Boot) SQL from Node js/ts express mongodb.
I've almost completed nysql mastery course learned triggers events views stored procs, transactions ACID isolation levels indexing. ( a bit left ). Now learning database design. Soon i'd switch to learning spring InshaAllah. Saw your roadmap video after long time. Realized i've progressed, be it slow, but yes i have. InshaAllah will start soon.
Great video!
In my projects I follow this package structure:
controller
service
repository
entity
and where I have classes and interfaces,
I create impl and api sub-packages
If you don’t modularize per feature, it’s not going to scale well
@@jonathanrosado5818 yes for monoliths modularizing by feature is great. My structure was for microservices where a feature would be offered by one service.
My exact observation. I always do top level service, controller, repository, utils, exceptions, config etc at the same level. This is for a micro service. So bro your structure is more for a monolith right? Bro, I love you good work by the way.
You're a very talented and charismatic teacher. Well done! Thank you from Germany. :-)
@Amigoscode. Lovely videos. Extraordinary content. Still waiting on a course for Apache STORM. Possibly even Apache SPARK and Apache Hadoop down the track. Absolutely love your content by the way.
clear explanation and I love to watch over again to fully understand the concept. As I am new developer.
AlhamdoliLah thank you brother JavakaAllahu khairan, this is a really important topic!
Maasha Allah, JazaakAllahu Khair. I really am happy to know your channel man, on a serious note your are my UA-cam Mentor 😊
Your way and methods of sharing knowledge is amazing, I'm learning quite a bit
i have been waiting for this, thanks
This was very useful. Thanks for taking the time to explain your thinking process
Nice content.
I just bought your spring boot jpa course , following my recent entry into java.
Coming from a 5-6years plus background in C#. You made it quit less tiresome picking java which is a bit verbose but cool.
You teach well.
Thank you, very insightful!!!Keep up the good work
Mashaallah, I thank Allah for meeting you. Thanks for the knowledge. I will pray for you that Allah will increase your knowledge of Islam
and programming as well
#amigoscode I can not describe how you do these videos great, very informative, not any out topics, beatiful examples. I love that and appraciate it!!! Please keep continue bro. After looking at your videos, my passion for programming is increasing and increasing. I think many people have learnt programming skills which they need like me.
It would be great for new programmers that making simple Spring Data Rest app, with entity relationships with POST, GET, DELETE the entities tasks. Also, I love your videos whatever its theme
I love the way you teach! Can you also create Red hat process automationmanagement(RHPAM), (BPM) please.
Thank you so much I needed this.
This is a great video about something that is very much overlooked in the coding world. Nice one bro 👍🏼
Demonic profile picture…
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before!
Jazakallahu Khayran bro !
Your lessons are so fantastic.. God bless you. Greetings from Belgium
This is a top-notch brother! Thank you for all you do. JakaAllah Kairan
Very Helpful . Thank You So Much !!!
keep going man , you're the best.
Would love for a microservice app design/creation video on amigoscode; did it in training ages ago but feel you'd do an incredible job showcasing / explaining
Where was this bro... can u share it with me pleaseeeee?
@@stephonking2847 sorry I was saying I did micro services design & implementation during my jobs training & onboarding and was asking Nelson if he could make that next as I feel the way he teaches is waaaaay better than what I got in training
@@quantum598 yeah I agree lol
Thanks! I'd love to see something like this for a FastAPI Python project as well.
Very helpful content. I am grateful. ❤❤
Thank you so much, friend! This is a very useful video!
I really love how you explain it all, very clear. Much love!
Akhi, I love your videos. Big thanks for your hard work. 🤜🤛
Great! Thanks Nelson. Can you talk about how to use DTO?
What about create package like an service , config , controller , entity , util , dao , impl.
i usually do this too. ive seen other open source projects do that too, so I'm sticking with that lol.
It will be good to see react and spring boot project together (frontend and backend), with common maven plugins.
It’s much better to keep them separate
ahh ADORO O TEU CONTEUDO, eu estava numa depressão profunda e quando comecei a ver os teus vidios piorei!! obrigado
desculpa... estava nervoso, é tudo mentira ok? és o melhor
adoro conguitow
valued information brother , I am learning a lot from your videos , thank you I really appreciate your effort
Big Man Amigo, well done bro!
Note for the "golang-standards/project-layout": "It's not an official standard defined by the core Go dev team;" YMMV
Muito bom suas dicas! Greeting from Brazil.
Great video as always! I have a question, what approach do you recommend if you need to use the CustomerDAO for example to access a model in an order use case? Direct usage will violate the cohesion of both packages.
Wouldnt it be wise to pull the needed information from the DB i.e. the information that builds the model and progress from there? That way you will insure looser coupling between the services.
Thanks much sir, Expecting videos on microservices
Oya alaikumussalam oya rohmatollah
thanks for the video.
jazakallahu khoir
Great video!
I use "common", instead of "shared", lol
For the Customer example, I'd add a DTO or Resource like "CustomerDTO" or "CustomerResource"
thank you for this , i have a question if you don t mind , i started having a refreshing course on java so i can jump to spring , i studied java before but i need to refresh my memory , my question is what are the prerequisites to jump to spring framework , what are the must knows to safely start with it , i really appreciate what you do in this channel , baraka allaho fik , best of luck brother
>folders inside folders inside folders
ahhh. So this is the power of Java.
Thanks for this !
iam following all your videos, thanks brother
Thank you a lot. This is very useful and a nice way of structuring source code.
Brilliant! Nelson n Amigoscode team. Brilliant Brilliant! Thanks for sharing your Wisdom! As-salamu alaykum brother!
Nice vid, thanks! Wondering how the frontend structure would fit into this (angular, Vue, etc ...)?
There is a directory that all the front end code goes into
best of the best. thank you for providing this type of knowledge.
Merci pour cette vidéo @amigoscode car elle apprend les bon principes
Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before! .
Nice content, and well explained! Congrats
You should do more video/courses on front end too like Angular
Jajhakallah brother,
Thanks for this video .. very useful 🤩
Thanks for this video and eng sub :)
Always great and useful videos.
Assalamu alaykum. Thanks. It'll be wonderful If you continue this topic and show your real project structure.
Ma sha Allah 👍
Nelson I like your Tutorials on Computer Programming and I would request you to do Tutorial on Node.js
Muchas gracias !
Thanks Amigoscode. Do you use the data transfer object (DTO) to return an object from controller or you simply return the entity?
You should use mapper return DTO because your code will be easier to maintain.
You have a POJO class User and return UserDTO. And imagine that you add some fields to the user class. Thankfully to the mapper and DTO object you are still returning the same userDTO class. The rest of your code even doesn't need to know that the User class has changed.
NEVER CLICKED A VIDEO SO FAST!!!!!
amigoscode keep up the good work
Dear Amigoscode, your video so awesome.
Hello Nelson I love this steup actually we may also add th CustomerDTO and the Exception package
Always good Amigo !
awesome material, thanks!!!
Nice I like it,and can you really make a video on connecting to real database for spring security
Perfect
Thank you too much
Basically he´s organazing the packages by feature, not by layer :)
Thank you for the video! Useful one
Great video! Thanks.
This might be a good way to organize front-end applications but for java usually people organize it by layers. But, I prefer the hexagonal architecture for packaging. It is way more clean
There is pros and cons to package by layer and package by feature
yo, pretty good video.... I was thinking.... based on this folder structure, how it could be applied for the test structure....
keep it up my friend