.NET Developer tries Java Spring

.NET Developer tries Java Spring

Raw Coding

1 год назад

78,472 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Potato
Potato - 31.12.2022 06:52

"the fuck is a bean"
same bro, same

Ответить
Stk
Stk - 21.09.2023 21:35

"Bean, what the fuck is a bean" Literally thought what you said out lmao.

Ответить
doniyor7370
doniyor7370 - 20.09.2023 16:17

Spring JPA not having migrations is just that… no migrations. Spring just creates the initial schema for you, and nothing else. For actual production migrations you have to use something like Liquibase or Flyway which is worse that EF migrations.

Ответить
Plurally Plurally
Plurally Plurally - 20.08.2023 08:21

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 a hard time. I believe the goal of a framework is to simplify the operations in a language but with Spring I don't think its doing that!

Ответить
Dev-Siri 🇺🇦
Dev-Siri 🇺🇦 - 22.07.2023 12:59

as someone who is recently getting into C# .NET Core, Java looks like hell.

Ответить
Quách Hêng Tôny
Quách Hêng Tôny - 31.05.2023 06:36

i like my migrations thank you very much

Ответить
curtisw0234
curtisw0234 - 19.05.2023 05:43

don't be so quick to praise JPA... not a single migration? that will turn into a problem if you have some foresight

Ответить
FDominicus
FDominicus - 24.04.2023 16:11

How can one expect that there will be no learning curve?

Ответить
Hstivggf ghyhgfg
Hstivggf ghyhgfg - 19.04.2023 11:44

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

Ответить
webdriver 5000
webdriver 5000 - 02.04.2023 10:14

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 it´s frameworks can also be done in C# and .Net.

Ответить
Jonne Kleijer
Jonne Kleijer - 29.03.2023 13:25

Insightful! Thanks for sharing your insights.

Could you do a similar video on NestJS?

Ответить
Rizaan Jappie
Rizaan Jappie - 18.03.2023 20:35

A real world highly scalable apps will need custom tweaking. Dotnet wins

Ответить
Rizaan Jappie
Rizaan Jappie - 18.03.2023 20:24

The word bean just puts me off.

Ответить
Scott Sailor
Scott Sailor - 02.03.2023 03:58

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 did something that's wrong, then got the correct thing to work, and is surprised it works?

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?

Ответить
Marc Godhoff
Marc Godhoff - 18.02.2023 23:56

compared to VS all java-like IDEs are looking so ugly...

Ответить
chillydill
chillydill - 03.02.2023 11:25

"I don't know what kind of teleportation going on here" cracked me up bad LOL🤣🤣

Ответить
James K
James K - 02.02.2023 22:43

👍🏽

Ответить
Joseph Gagnon
Joseph Gagnon - 02.02.2023 04:44

I'll take java and spring any day over that Microsoft crap.

Ответить
Bapt Iste
Bapt Iste - 01.02.2023 22:34

magic is not good, it hinders programming comprehension

Ответить
Issa Fram
Issa Fram - 01.02.2023 09:29

Java using property injection seems dirty. Construction injection ftw

Ответить
Issa Fram
Issa Fram - 01.02.2023 09:28

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 SQL scripts for deployment. And all the model classes can be generated easily.

Ответить
Ashish Lohia
Ashish Lohia - 01.02.2023 06:37

use spring starter to add postgres, it will add the correct driver

Ответить
Charles Burns
Charles Burns - 30.01.2023 06:12

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.

Ответить
Temp True
Temp True - 29.01.2023 14:35

thought this was adin ross

Ответить
MatStark
MatStark - 25.01.2023 03:26

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 don't explain the concepts very well and provokes a slow learning. Nice video!

Ответить
n/a
n/a - 24.01.2023 13:42

Man you're good! That was some quality content, thx

Ответить
Nathan Snow
Nathan Snow - 22.01.2023 16:41

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 project and then run it, spring security gives you a login page by default, and there's even developer login credentials logged to the console when the app starts.
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? 😉

Ответить
Marco G
Marco G - 21.01.2023 12:16

requestMatchers("/secret").permitAll() - this should be pretty obvious why it's not asking for authentication... anyRequest() matches all requests which are not matched explicitly and .authenticated() means they require authentication.

Ответить
Ruben Vervaeke
Ruben Vervaeke - 21.01.2023 02:45

Don't have experience with Java & Spring and immediately starts out with Spring Security, that's brave my man.

Ответить
Vladyslav Zolotarov
Vladyslav Zolotarov - 20.01.2023 17:21

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.

Ответить
Bradley Weston
Bradley Weston - 19.01.2023 22:03

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 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.

Ответить
Dromedda
Dromedda - 18.01.2023 19:52

me being a c programmer: dafuq is a factory ?

Ответить
Jorgen Johansen
Jorgen Johansen - 18.01.2023 15:11

You should definitely try out Nest JS 😄

Ответить
Sebastian Bejarano
Sebastian Bejarano - 18.01.2023 01:58

"The fuck is a bean" LOL Hahhahahahha I was like that when I first learned spring

Ответить
oasenjoyer
oasenjoyer - 17.01.2023 18:07

ITT person who has years of experience in one framework complains about not knowing how to use an equally huge framework instantly.

Ответить
James Lee
James Lee - 17.01.2023 07:23

Puny mindset. Complains about everything. Not even worthy of being called an engineer.

Ответить
WoodmanFFM
WoodmanFFM - 17.01.2023 01:57

JPARepositories are nice - mostly.
You can define a lot of simple queries by simply adding a method to the interface like "findByUsername(String username)" and Boom you can search for the field "username" in your table.
And yes, "findByUsernameAndZipcodeAndFavoritecolor(String username, int zipcode, MyOwnColorType favoritecolor);" will 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.

Ответить
Narezaath
Narezaath - 15.01.2023 16:03

The one-liner authentication you've heard about is probably the simplest Spring Security authentication, which is just adding the library to your Maven/Gradle config and maybe an annotation. That is all, like, literally. At the start Spring notices you want authentication, sets 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. :)

Ответить
Davy Jones
Davy Jones - 13.01.2023 23:42

Well actually it’s very funny to watch, like monkey trying understand how hammer and nails work 😂
Man, you just need to spend some time reading how that works. If you put Java Developer to C# you will see the same helpless behavior

Ответить
human ardaki
human ardaki - 13.01.2023 01:40

"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 ;)

Ответить
Dan Howard
Dan Howard - 12.01.2023 18:41

When are you going to do WPF vs JavaFX? Oh yeah you won't because you'll understand then how shitty WPF is.

Ответить
Alan Smith
Alan Smith - 12.01.2023 01:35

Spring is awesome.

Ответить
Andrej Ladislav Kováč
Andrej Ladislav Kováč - 11.01.2023 21:09

You should try String in Kotlin

Ответить
akinduro segun
akinduro segun - 11.01.2023 10:33

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 are tons and tons of configurations you can do, I'm talking XML or Configuration classes, it uses the builder and Factory patterns heavily for this. Great video bro

Ответить
Vortex
Vortex - 10.01.2023 19:00

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. You aren't supposed to. The auto-generated queries are only for getting entities for updating. For complex and/or read-only queries you write JPQL (Java Persistence Query Language) which looks very much like SQL. You can also just write native SQL. You do both by using the @Query annotation, in the case of native sql you add a "nativeQuery = true" property to the Query annotation along with your query.

Ответить
arghya mitra
arghya mitra - 10.01.2023 15:25

Bro just a suggestion to u , first learn in depth then compare with any framework, if u just copy pasting code from places u will find everything difficult.

Ответить
Ankesh Kapil
Ankesh Kapil - 10.01.2023 14:07

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

Ответить
Van4kk
Van4kk - 10.01.2023 12:41

Try Laravel bruv, this is the real one terminal line authentication ))

Ответить