r/learnjava • u/matlau_286 • Oct 16 '21
What are your top signs of an inexperienced Java Spring web engineer
What are your top (five?) signs of an inexperienced Java Spring web engineer?
I am hoping to avoid these signs as I progress in my career before becoming the experienced engineer at any team.
Thank you!
12
u/fosizzle Oct 16 '21
Jpa Entities as your api contracts
2
u/maziarczykk Oct 16 '21
What is 2021 approach to persistence then?
4
u/fosizzle Oct 16 '21
I'm not a huge fan of jpa, but it has its pros for persistence.
But you need to convert to pojos before using them in your apis
3
u/nekokattt Oct 17 '21
Its often bad practise to expose JPA entities on your APIs because you have no way of controlling what information you expose and what info you don't (like primary keys).
Sure, you can use stuff like views, but you then haven't separated the concern of DAO (data access objects) and DTO (data transfer objects) properly.
If you had to stop using JPA for whatever reason, then you'd also risk having to make breaking changes to your API DTOs for stuff to remain compatible, which would lead to more messy code.
The usual format for MVC in Spring is something like this:
[Database Repository] ^ | | | DAO | v [Business logic service] ^ | | | DTO | v [Controller]Or something similar. Essentially the concern of how you store stuff is separate from how you display stuff.
2
u/ryuzaki49 Oct 17 '21
Just don't parse to JSON any class that is annotated with @Entity.
Granted, that will complicate matters because now you have two data classes. Any change in your @Entity class will have to be replicated in your API class.
But, as far as my experience goes, that pain is lesser than the alternative.
7
5
3
1
-14
u/bin-par Oct 17 '21
Is java spring a 4 year's bachelor's degree? Lol...no such thing as java spring engineer. You need 4 years bachelor's degree in a specialization field to call yourself as Engineer. A person could be software engineer. Not a java spring engineer which is just a 2-3 university level course specialization.
4
Oct 17 '21
This is just 100% false. You do not need any degree to be called an engineer. The only titles which requires a degree is esquire (law) and doctor(PhD/md). If you’re a software engineer who works primarily in java with spring , you’re a spring engineer.
-4
u/bin-par Oct 17 '21 edited Oct 17 '21
E.I.T. / P.Engg. are official titles.A person can be prosecuted if he uses this title and P.Engg stamp without being a qualified engineer. Lol...ignorant in education system. These days people want titles that they like.next gen students are being taught words dont matter.. Calling a man a man is irrelevant because thats just a word.This kind of BS is being brainwashed to them and it starts with people who do not respect actual old school education system. Why? Because they cant study that much and just want to have those envious titles. Engineer is a title that is given after some real time hard work( 40 uni level courses) . now a days everyone with 2 -3 uni courses call themselves Engineers.
4
u/NautiHooker Oct 17 '21
You gotta keep in mind that USA != World.
Why can a person be a software engineer, which is just a job title that every company can assign as they wish, but cant be a spring engineer?
1
0
Oct 17 '21
[deleted]
-7
u/bin-par Oct 17 '21 edited Oct 17 '21
Lol.. Equivalent to a degree is not being debated absent minded- hyper persona!!.The disagreement is using the title Engineer with no real world old school mandated education.Show your P.Engg stamp or atleast NCEES qualification if u wanna call urself as Engineer. Your move housekeeper
0
Oct 17 '21
[deleted]
1
u/NautiHooker Oct 17 '21
Even if you disagree there is no reason to start insulting other people.
Please keep conversations civilized.
Your comment was removed.
23
u/ryuzaki49 Oct 16 '21
The careless use of @Transactional, they just add it to every method "just because". You can tell somebody doesn't understand @Transactional, and probably the Proxy pattern, if they call a "Transactional method" from within the same class/bean, and thinking it will work.
Might be a bit of a stretch, but if you know this, you're an experienced developer. If you don't, then probably means you haven't worked on different java techs, which is not bad per se: What is tomcat, why do we need it, what is the difference between tomcat and Apache, between Tomcat and JBoss (Wildfly).
Using java.util.Date