Duration 22:33

.NET Developer tries Java Spring

72 452 watched
0
1.5 K
Published 30 Dec 2022

.NET developer tries the Java Spring framework. Looking at the daily life of a Java developer & some beans. Patreon 🤝 https://www.patreon.com/raw_coding Courses 📚 https://learning.raw-coding.dev Shop 🛒 https://shop.raw-coding.dev Discord 💬 https://discord.gg/xgNS26k Twitter 📣 https://twitter.com/anton_t0shik Twitch 🎥 https://www.twitch.tv/raw_coding 👉 Try Rider https://www.jetbrains.com/store/redeem/ RD5K9-4TXXW-KMV3G-NYWSF-3ZSTP #aspnetcore #spring #java

Category

Show more

Comments - 313
  • @
    @auniquehandle2 years ago " the fuck is a bean"
    same bro, same.
    658
  • @
    @YariRu2 years ago The secret is to use very long class names like. 225
  • @
    @Toradoshi12last year Aspect oriented programming a. K. A. Introducing bugs under the hood is the backbone of spring. 29
  • @
    @rubenvervaeke1635last year Don' t have experience with java & spring and immediately starts out with spring security, that' s brave my man. 11
  • @
    @yeumkyuseoklast year Im amazed at how you could code on the spot in such an unexperiencedthis flawlessly! 60
  • @
    @unhandledexception1948last year I honestly love watching this guy, his humour just brings to life any technical topic. Awesome channel
    ;
    6
  • @
    @Narezaathlast year The one-liner authentication you' ve heard about is probably the simplest spring securitywhich is just adding the library to your maven/gradle id="hidden2" config and maybe an annotation. That is all, like, literally. At the start spring notices you wantsets it up for you, provides you with a default user and password and you can use those to authenticate. Done. If you want to configure it further then yeah, you' ll have to jump through some hoops, like what you' ve experienced. You first specify the route either explicitly or by a matcher, then decide what to do with it: permit access without authentication or allow only authenticated users.
    jpa stands for java persistence api, which should tell you what it' s for
    . ...Expand 14
  • @
    @lucasmonteclast year Also, you can write sql in attributes (annotations) of those query methods. Lifetimes are defined by the type ofyou are creating. have a lifetime, services have another. All is registered automatically on startup. ...Expand 7
  • @
    @oumardicko55932 years ago For any jvm related stuff, i use kotlin. Easy to use, innovative, no complex bs or verbosity. Kotlin has a backend framework called ktor and i can say, the language has some of the best developer experience i have seen. 44
  • @
    @fudosker2 years ago It might seems like complicated staff, but only on start of the project.
    now you can use spring boot which comes as part of code that performs basic configuration at runtime.
    2
  • @
    @IvanRandomDude2 years ago I work with both. Aspnet core is definitely easier to master and is innovating faster than spring. Spring is huge, has like 50 different sub-frameworks . ...Expand 98
  • @
    @you0neville0tubelast year Ef also lets you have setups without having migrations (some default templates do it) if you are just querying all data you wouldn' t have to use linq in ef either. 8
  • @
    @JonneKleijerlast year Insightful! Thanks for sharing your insights.
    could you do a similar video on nestjs?
    1
  • @
    @wlockuz4467last year The only thing stopped me from going completely insane when i used to work with spring was intellij idea. 2
  • @
    @prabhatmaurya74342 years ago Can you try with go lang, it will be interesting. 9
  • @
    @kutilkollast year Man you' re good! That was some quality content, thx.
  • @
    @petru-cristianboza5933last year I' m not sure how asp looks like.
    i do agree on the security part, it seems a bit hard, sometimes like " whack a mole"
    but for complex queries we use jpa specification which allows you to create queries easy to maintain and modify.
    i would agree on the fact that it has somewhat large learning curve, especially if you spend a day on it, but after some time, things do become a lot better: d
    thx for the video
    .
    ...Expand
    19
  • @
    @GavrilosZlast year Im java dev and u are doing great trust me: p. 5
  • @
    @chillydill4703last year " i don' t know what kind of teleportation going on here" cracked me up bad lol.
  • @
    @alexlo56552 years ago Thank u for the interesting video. Did you try to implement asynchronous code in java/spring? It would be interesting to compare asp vs java/spring. 3
  • @
    @BradleyWeston92last year You got further then me: i tried java (+spring) for a side project wrote my business logic and unit tests then tried to integrate with spring got as id="hidden9" far as authentication in a rest api and ended up giving up and quickly rewriting it back in go. Their docs have a long way to go sadly. ...Expand 2
  • @
    @AshishLohia70last year Use spring starter to add postgres, it will add the correct driver.
  • @
    @Dev-Siri9 months ago As someone who is recently getting into c#. Net core, java looks like hell. 2
  • @
    @matstark776last year I think one of the most problems when you' re beginning to learn spring, maven and other things related to java it' s the documentation, sometimes . ...Expand
  • @
    @user-yv7hk7tg2flast year Spring security is a huge topic in spring. I can said i spend over 1 month to figure out what is going on, but no doubt, it is powerfull, but also hard to learn. 2
  • @
    @andym27234 months ago To fully understand spring or spring boot. It helps to understand the jakarta ee native api as it applies to tomcat or jetty. Or full blown with wild fly. . ...Expand
  • @
    @noname785202 years ago From the init of my developer experience i worked mostly on java and i learned dotnet 6 this year. Dude i' m never wan' t to back to use java. . ...Expand 26
  • @
    @m_stf2 years ago Php is the most popular i guess, is there something in it? 1
  • @
    @TheCameltotem7 months ago " bean, what the fuck is a bean" literally thought what you said out lmao.
  • @
    @Beetle_in_the_Anthilllast year Spring is really powerful but it is very huge. But for big enterprise apps it' s one of the best variants. 1
  • @
    @Qrzychu92last year So, i don' t get why people hat on ef core. Just do the repositories at all, the dbcontext is a repository on its own. To get all todos you don' t and i guess, authentication is always a mess: d will you try ktor to compare it to spring?. ...Expand 1
  • @
    @trickyagent127last year Yeah the hardest thing to find is explanations on HOW a lot of this stuff works, though I've found Teddy Smith: has a decent playlist that not only goes into how to use Spring Boot, but also he gives basic explanations on how it works .. ...Expand
  • @
    @lucasmonteclast year You should give this another go with more time. Experience at least creating a cron worker thread.
  • @
    @sauravbhatta53032 years ago Hey dude!
    whats the plan for 23?
    2
  • @
    @nerminkarapandzic5176last year You have probably chosen the hardest part, spring security is very powerful but also really complex (needlessly imo) and the docs/content you can find online honestly mostly sucks. 14
  • @
    @theyreMineralsMarielast year Love it or hate, spring pays the bills. 12
  • @
    @FDominicuslast year How can one expect that there will be no learning curve?
  • @
    @humanardaki7911last year " there are only two kinds of languages: the ones people complain about and the ones nobody uses" bjarne stroustrup
    maybe we can extend this to frameworks as well;
  • @
    @coffee22able2 years ago Actually, i think efcore is much better.
    - i don' t think these magic queries will be suitable for complex real scenarios.
    - i like - many to many is much cleaner in efcore.
    - the generics in java is just converting to objects under the hood, the language design is worse than c#
    .
    ...Expand
    23
  • @
    @akindurosegun2459last year It' s not really magic. So the idea of springboot is to bootstrap your development process, but if you really need to do the most niche stuff, there . ...Expand 2
  • @
    @quachhengtony765111 months ago I like my migrations thank you very much. 1
  • @
    @gylkaglast year I really wish people would stop doing this thing where they try a complex tool they never used before for an hour and give there opinion to an audience. . ...Expand 49
  • @
    @doniyor73707 months ago Spring jpa not having migrations is just that no migrations. Spring just creates the initial schema for you, and nothing else. For actual production m . ...Expand
  • @
    @Do6polast year Try to use php laravel - you will love this framework) 3
  • @
    @sudarshanshah22433 months ago Java is love. Spring boot is expression of it in best of sense.
    everything is easy to configure and conventions are easy.
    anything can i am proud to be a java spring boot developer. It' s breeze to do development with spring!. ...Expand
  • @
    @ethannr1last year I get the vibe you just downloaded intellij and hit record. 2
  • @
    @dennisdepper2388last year As a spring developer i can confirm that spring security is by far the worst spring project. But good job anyway! 4
  • @
    @user-zf1pl6wj4nlast year As a. Net core developer, i don' t find any reason to swtich to java or include in my skills. Everything that is done in java and its frameworks can also be done in c# and. Net. 2
  • @
    @HappyHorgelast year You should definitely try out nest js.
  • @
    @carlosboyanosky80442 years ago Funny watch you kinda lost while doing something new haha. This is how i feel in most of your videos trying to following them xd. 1
  • @
    @SXsoft99last year Meanwhile php laravel, you just run a console command and it generates the entire login scafolding, be it in vanila form, react, vue, etc: 2
  • @
    @lasgegaslast year Java is my starter language. And then got job as dotnet dev. It's so much easier and I can understand my code better. Goodbye to annotation, goodbye to and goodbye to ResponseEntity. One thing I miss is date data type .. ...Expand 5
  • @
    @MsFico2last year Yeah, i have to rant as a person that has been working with spring for about 3 years now.
    first off, spring security is so bad they decided to secondly, beans are actually just singletons and are left over from the og spring. In spring boot they are mainly used for small configuration setups where you have some class that exists and you can' t alter to make it aor whatever else, so you define it as a bean so that you can do di with it. How it works with spring boot is that you create a class, and then specify whether it' s a @service, @component, etc. Something like in. Net core, but instead of having a separate config/program file you' d do it on the class itself with an annotation)
    and finally a rant on jpa. It' s fantastic and magical and that' s the main reason i' m still sticking with spring rather than. Net, i can' t stand the ef core, but many-to-many relations are so bad it' s unbelievable. General rule of thumb in spring developer circle is try to avoid implementing those relations, and if you have to, create an intermediary entity that will have 2 one-to-many relations and then try to avoid fetching them as much as possible. For custom queries we have a ton of different possibilities like querydsl, jpaquery, @query and a whole slew of other options, so it isn' t painful in the slightest (only thing i' d maybe call painful is transaction management since it does too much magic)
    sorry for the rant, and thanks for coming to my ted talk
    .
    ...Expand
    12
  • @
    @nathansnowlast year Hahaha i think you' ll find the single liner login is actually a zero liner login.
    if you simply add the spring security dependency to the adding users, user details services, roles, and authorities is more involved though.
    also the method you wrote to find a student by id, was actually already defined for you because it' s part of the jparepository you extended.
    jparepository has a bunch of predefined methods you can use including save, saveall, findbyid, delete, deletebyid etc.
    also, you can abstract more boilerplate code with tools such as lombok, which will take care of all your getters, setters, constructors and tons more, and also jpabuddy that will help create and configure your entity classes and repositories etc.
    i think with a little more context is worthy of a second opinion don' t you?
    .
    ...Expand
    1
  • @
    @WoodmanFFMlast year Jparepositories are nice - mostly.
    you can define a lot of simple queries by simply adding a method to the interface like boom you can search for the fieldin your table.
    and yes, username, int zipcode, myowncolortypewill work as well.
    the automatic migrations are where it gets difficult - because it doesn' t automagically catch all things it should migrate.
    e. G. You have a field mapped to a varchar(30) and want that to be a varchar(50) it won' t migrate automatically and you' ll end up writing your own migration scripts again
    .
    ...Expand 2
  • @
    @sebastianbejarano350last year " the fuck is a bean" lol hahhahahahha i was like that when i first learned spring.
  • @
    @ankeshkapil3129last year The problem with java is a lot of big corporates are using it in production and thats why it cant introduce any major breaking changes.
  • @
    @plurallyplurally79488 months ago I' m coming from c/c++ & go and i feel like spring meanders a lot! Too many files to create and a lot of unnecessary jargon. It' s giving me . ...Expand
  • @
    @IssaFramlast year I don' t understand why anyone would ever use ef migrations. Great for simple apps but can always be a disaster for enterprise applications. Use actual . ...Expand
  • @
    @VincentFreelast year I' ve been a java dev but i never liked spring. Say clear if you can. I' ve used better things on the jvm for web development like vertx. 3
  • @
    @rofgarlast year Yeah, java dev 9 years of experience here. I agree with you completely, spring sucks. The funny part is, that there are a lot of less known frameworks that are way more intuitive and easy to use. 1
  • @
    @IssaFramlast year Java using property injection seems dirty. Construction injection ftw.
  • @
    @DWS-123last year From my view, i think ef core is better compared to spring jpa. Ef core has more transparent flow for you to see, but spring jpa just gives you magic and . ...Expand 9
  • @
    @kobibr9362last year You need that xcsrf token fo each request. You get it from the previous request and append it to the next one. And why is everyone so mad at spring security? . ...Expand
  • @
    @nicholasferrara80284 months ago Should have tried kotlin with spring boot.
  • @
    @rizaanjappielast year A real world highly scalable apps will need custom tweaking. Dotnet wins.
  • @
    @Hitokiri0010last year Jaja lets not do anything stressful and he goes with spring. 2
  • @
    @jrkmkelast year Itt person who has years of experience in one framework complains about not knowing how to use an equally huge framework instantly.
  • @
    @Vortex-gz8selast year Everyone here in the comments is mentioning they can' t imagine using the auto generated repo queries for complex queries and that is absolutely correct. . ...Expand 2
  • @
    @zvado2 years ago Im a dotnet dev but im transition to java in 3-4 will look for java job. Higher pay more jobs. 6
  • @
    @CameronGellerlast year I decided to keep watching for some weird reason lmao. This vid is so funny lmfao
    dude doesn' t know what dependency injection is?
    he the project has no structure, bestie just copied/pasted code with some minor changes and thinks it' ll work as expected. That' s what i did in my first year
    bro didn' t know what a bean is. Did he google it? Nah, why should he?
    .
    ...Expand
  • @
    @CharlesBurnsPrimelast year It' s not fair to compare a java technology when you are accustomed to. Net. Start with php, perl, or some other janky system and you will be far more impressed with a java technology. 1
  • @
    @adamc16942 years ago I have come across many frameworks (php, jsp, java spring, python jango, dotnetcore) and here is my take.
    orm: steve jobs' s webobjects which component: again webobjects has it some 30 years ago. At first i was soof why the need of all these server side javascript frameworks react, angular, nodejs? After diving in to investigate, my immediately feeling was wtf. After 30 years these web frameworks still don' t have its own dom and therefore must rely on nodejs which came from chrome and then react, angular to run on nodejs. All thesedifferent languages, speechless. Until dotnetcore blazor, my goodness finally.
    it really depends on the complexity of your project. Just to display certain dynamic info or a simple html form php, jsp is fine. And then spring, jango has mvc. Template system make reusable html possible. Dotnetcore razor page mvvm is better than mvc because once your project grow, it will be hard to keep track of which controller to which view. And stateful component blazor is a totally different class. Once matured, third party vendors like mud, syncfusion, telerik can make developing complex ui real easy
    .
    ...Expand
    2
  • @
    @fieryscorpionlast year I use to work with java and always hated its verbosity and awful documentation.
    after trying. Net 5, i never went back.
    i don' t understand thank you for this video!. ...Expand
    15
  • @
    @TheNacropolice2 years ago Java is genuinely a horrid language when compared to things like c#, and even js/ts once you get comfortable with their paradigms. 4
  • @
    @shaikh.quadeerlast year I can write backend with mysql in less than 20 min in spring boot crud app.
  • @
    @hstivggfghyhgfg8359last year Man what the fuck it took me minimum of 40 hours to do all of that and 99% of time spent debugging and configuring.
    how you did it in 20 minutes.
  • @
    @dromedda6810last year Me being a c programmer: dafuq is a factory? 1
  • @
    @YidingHelast year Noted: stay away from spring security. 1
  • @
    @someoneWhoSpeaksAboutlast year C' mon, the whole enterprise is based on spring.
  • @
    @Van4kklast year Try laravel bruv, this is the real one terminal line authentication )
  • @
    @nempk1817last year (java from microsoft) dev trying java, cool i guess.
  • @
    @eddyhanderson69162 years ago I think spring team should think better about the way they give name to things. That' s not intuitive.
    @autowired to indicate injections;
    @bean to indicate wherever that can be injected; wtf.
    1
  • @
    @lucasmonteclast year Net core doesn' t offer not even 20% of what spring does. 4
  • @
    @birkheadclast year Well i' m only 20 seconds into the video but i already spotted your first mistake. Really starting off on the wrong foot with your choice of drink when working in java. 2
  • @
    @spellskreenfullast year If u complain about magic, try laravel xd. 2
  • @
    @orhancekic_last year You are high on video, aren' t you? 1
  • @
    @AlizerLeHaxorlast year As a c# programmer java is like a huge downgrade comparing asp and springboot. 5