6 ms·
Is it just me or is understanding those examples virtually impossible if you're not intimately familiar with that particular framework? Then again... I guess th
by nilsb 4y ago
Is it just me or is understanding those examples virtually impossible if you're not intimately familiar with that particular framework? Then again... I guess that's the author's point.
- ris58h 4y agoYeah. It's the issue with the framework not the language.
- throw_m239339 4y agoThe examples use CDI (dependency injection through annotations) and yes, these annotations become hardwired to the business objects... Java has some kind of traits now through interfaces so it's not much of a problem today.
- mrkeen 4y ago> Java has some kind of traits now through interfaces so it's not much of a problem today. Well that's the article's premise, right? Opening sentence: Java is good by modern standards, from a technical perspective Later on: Java’s culture eschews common sense approaches > so it's not much of a problem today. Every Java codebase I've worked on in my career has had plenty of this crap in it. The culture has settled on doing it this way.
- democracy 4y agoWhat non-java codebases you worked on (of similar magnitude) that didn't have plenty of crap in it?
- HelloNurse 4y agoJava encourages doing things like they were done 15 years ago because rewriting reams of low-value boilerplate with delicate architectural impacts is neither fun nor (at first sight) valuable. Typical immature enterprise organizations tend to extend the system with low-risk new features instead of refactoring and remaking old stuff.
- matsemann 4y agoWhy is that magic always hated when it comes to Java, but praised when Django or Ruby on Rails do it?
- tcbasche 4y agoI think most senior or experienced Python developers tend to steer clear of Django. It's just that you don't hear about it because it's mostly junior / less experienced developers writing about Django online. edit: having said that, I wish we would be more skeptical of magic frameworks like Django in the Python community at least. Things like 'get_object_or_404'[1] should be burned to the ground. [1] https://docs.djangoproject.com/en/4.1/topics/http/shortcuts/#get-object-or-404 https://docs.djangoproject.com/en/4.1/topics/http/shortcuts/...
- cutler 4y agoSweeping generalisation or what?
- mwcampbell 4y ago> Things like 'get_object_or_404'[1] should be burned to the ground. Why? A shortcut like that is useful all the time when writing URL handlers (views in Django).
- tcbasche 4y agoWhat does the object have to do with http status codes? It completely entangles the HTTP layer with the database model.
- vault 4y agoSo we should also get rid of `.orElseThrow()` (by default a `NoSuchElementException`)?
- tcbasche 4y agoIf it was .orElseReturn404 then yeah. My point is HTTP codes have no place outside of HTTP endpoints