Filter
Exclude
Time range
-
Near
setterは悪 javabeansは悪
3
85
プログラミング言語Javaの有名なクラスライブラリの名前もジャワ産コーヒ豆をもじってJavaBeansですよね。プログラミング言語の方が有名になりすぎちゃいました。ちなみに日本最大だった、プログラミング言語Javaの掲示板に今のSNSのスタイルと全く同じな俺の投稿が残ってるはず。
「JavaScriptのことでは?」と、冗談なのか素なのかわからんコメントしてる人多いが、JavaScriptのJavaはジャワコーヒーのことで、最初のロゴもコーヒーカップでした。
2
9
1,815
Day 52 📚✨ – Studied the last 2 short topics in Java – Images, graphics & JavaBeans overview Finally completed my Java syllabus. Now all that’s left is revision & PYQs Hope this exam goes well... still nervous :)
Day 51 📚✨ Wasn’t well for the past 2 days, but feeling better now so I studied 2 Java units today. AWT (Unit II): Windows, frames, graphics, UI controls, layout managers, menus, dialogs & event handling.
4
20
597
Apache TomEE 10.1.5 is now available: buff.ly/EOfypNy TomEE delivers enterprise application containers and services based on, but not limited to the Enterprise JavaBeans Specification and Java/Jakarta Enterprise Edition Specifications.
1
2
15
1,400
Replying to @dr_duchesne
they've been hiring h1b for 30 years, and Oracle has innovated exactly nothing since then ...probably still selling 1995 Oracle 8i with JavaBeans as their flagship product
15
614
Learned Java Socket Programming 🚀 — real-time client-server communication. Explored JavaBeans for reusable components 💻 Now diving into advanced Java & real-world apps. Always learning🔥 #Java #JavaDeveloper #Backend #SocketProgramming #JavaBeans #TechIndia #BuildInPublic
4
114
Covered JDBC in JSP (scriptlets cleanup), built clean MVC setup with Servlet (controller), JSP (view), JavaBeans/DAO. Forward vs redirect clicked. Revised old LC problems → tomorrow: Online Stock Span (monotonic stack locked & loaded). Grind mode on
7
102
What will be the result of the code? → {"name":"Laptop"} → {"name":"Laptop","price":50000} → {"price":50000} → {} → Compilation error Note: By default, for serialization/deserialization, Jackson relies on the JavaBeans specification, meaning only getter and setter methods are taken into account.
3
3
43
3,548
I wouldn't characterize JavaBeans as outdated. The concept is pretty robust and often used. Spring is a huge example of beans in use.
2
312
Apache TomEE delivers enterprise application containers and services based on, but not limited to the Enterprise JavaBeans Specification and #Java / Jakarta Enterprise Edition Specifications. Apache TomEE 10.1.3 is now available for download: buff.ly/F5o28zp #opensource
2
9
1,090
Please don't do that. Don't replace classes with records just because "it's less verbose". This is technically wrong and poor engineering. The JEP 395 explicitly states that : "While records do offer improved concision when declaring data carrier classes, it is not a goal to declare a "war on boilerplate". In particular, it is not a goal to address the problems of mutable classes which use the JavaBeans naming conventions." (openjdk.org/jeps/395) Why is it wrong ? The notion of identity is important in OOP. A class is perfect to model something that has a stable identity despite some of its characteristics changing over time. For example, a Person might be identified by her name or SSN. Then, her age, address or hair color might change, without changing her identity. Same for a bank account: its balance might change over time, but it's still the same account, defined by its accountId. Having a stable identity is very important in many circumstances, for example when the instance is used as a Map key, or put into a HashSet. Records don't allow this. Their component values define their identity. If you model a bank account with a record, anytime you withdraw some cash, it becomes another bank account. Or, in Josh's example, anytime an Order is added to the Cart, the Cart identity will change and become another Cart. Records are fine for DTOs though (they won't be mutated anymore at this point, and probably not put into Hash* collections), or to model "multi-component value types", such as a Point3D(int x, int y, int z). So what should I use ? Use classes to model complex, mutable objects where not all fields define the object's identity. Ex: User, Order... Also, the presence of annotations on fields is generally a strong hint to use a class. Use records to aggregate multiple immutable values togegther, where changing a single value changes the whole agregate's identity. Think "composite prilitive type". Ex: Point2D, Address, Date. Make the right choice based on real technical reasons, not merely on perceived verbosity.

15 Nov 2025
I don’t know when the last time I created a setter is. I use constructors. I try to whenever possible let Java records create the getters, if I have internal state I want the consumer of a type to have access to. And I don’t make types public, most of the time. record Cart(@Id int id, String sessionId, Set<Orders> orders){} it doesn’t get more concise than that
2
3
10
1,338
Replying to @Zyigh @brandur
I think it’s to comply with the Javabeans standard.
2
173
15 Nov 2025
Replying to @brandur
Honestly this isn’t Java-the-language’s fault. I was using Java since the 1.0 days. It’s always been a tad verbose because of naming and the JavaBeans recommendations, but it was the stupidity of the “enterprise Java” solutions and the people embracing it that made it bad. The whole “everything needs an interface and an implementation defined” crowd, the dependency inject everything wave, that style everyone in Apache commons embraced, etc etc etc. it made any attempt to write simple things in a Java project tedious.
2
13
8,193
30 Oct 2025
Bean...JavaBeans...ウッアタマガッ( #gotanda_mobile
2
1,668
アウトプット 応用情報 JavaBeans →再利用可能なソフトウェアコンポーネントを作成するためのJavaの仕組み。プロパティを持ち、getter/setterでアクセスし、引数なしのコンストラクタとシリアライズ可能であることが特徴。 #プログラミング学習 #駆け出しエンジニアと繋がりたい #今日の積み上げ
4
100
Pythonを使ったコンピュータサイエンスの教科書でも「これはJavaか?」と見紛うような酷いコードサンプルが載ってるのがありますよね。 クラスを作成する際に全ての属性に対してわざわざ不要なgetterとsetterを定義し、しかもJavaの疑似プロパティであるJavaBeansと同じ規約名で作ってあったりとか…😇
Replying to @miura1729
Pascalらしい書き方をしていなくて評判が良くなかったって読んだ記憶がある
1
1
7
2,625
Apache TomEE delivers enterprise application containers and services based on, but not limited to the Enterprise JavaBeans Specification and Java/Jakarta Enterprise Edition Specifications. TomEE 10.1.2 is now available for download: buff.ly/TzK1kAu #opensource
1
6
1,589
117….javabeans
1
4
49
Replying to @trq212
I’m going to have Claude Code try to write Entreprise JavaBeans v1.0 (circa 2001) and watch it have a nervous breakdown
2
209
22 Aug 2025
Replying to @kawasima
90年代の大昔ですが JavaBeans もそういう思想のが何かあったなぁというのを思い出しました 他にも当時何かそういう配線でやるというのがあった記憶がなんとなくありますけども、記憶の彼方です うまくいきませんよね
1
9
6,727