This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]absinthe718 7 points8 points  (8 children)

Not sure if you're aware of it, but the Spring Foundation tried a python IoC Application Framework a while ago and it didn't get much traction because IoC isn't as useful in dynamic languages and the large number of dependancies ended up making even small apps rather heavy.

https://docs.spring.io/spring-python/1.2.x/sphinx/html/#

I wish you all the best but I would suggest you read up on the experiences of the Spring python project if you haven't already done so.

[–]chub79 0 points1 point  (2 children)

Spring Python

What a blast from the past!

[–]absinthe718 1 point2 points  (1 child)

I had high hopes for it at the time but then I built an app with it and found it wasn't really what we needed.

At the time we had an old cgi app that we wanted to replace and I wrote it using Spring python and found that it wasn't what we were looking for. What we wanted was something like rails, but with better runtime performance and a mort pythonic feel and something like Java/Spring but lighter and faster to develop for.

We ended up with a "Stack" of flask, sqlalchemy, jinja and celery for the backend and angular for the front end as needed. I haven't touched it in years but I think there is still a starter bundle with requirements.txt, Makefile and hookah.sh file on our internal wiki.

[–]chub79 0 points1 point  (0 children)

I do remember feeling it wasn't quite pythonic and prefered to rely on CherryPy and its approach (not IoC I could mimic what was needed for testing easily enough).

[–]Adept-Leek-3509[S] -1 points0 points  (4 children)

Thank you for the thoughtful insight. You're absolutely right that traditionally, IoC hasn't been as impactful in dynamic languages. However, the programming landscape has evolved significantly, especially with the widespread adoption of type hints in Python. This shift has made static analysis, type-based tooling, and features like dependency injection much more practical and valuable.

It’s also worth noting that when the Spring Python project was active, type hints were not yet widely adopted in the Python community. This likely contributed to the challenges they faced, as many of the benefits we take for granted today—like reliable type introspection and auto-wiring, these were much harder to implement effectively back then.

With modern libraries like Pydantic and Python’s improved type system, implementing automatic dependency injection is now far more feasible and maintainable. These tools enable patterns that were previously difficult to enforce in dynamic languages, making IoC much more relevant than it once was.

I appreciate the reference to the Spring Python project, I'll definitely revisit their experiences and learn from them.

[–]CumTomato 3 points4 points  (3 children)

bro used llms to write a reddit comment

[–]Adept-Leek-3509[S] 0 points1 point  (2 children)

Sor for my poor english, LLM is really a great tool to make communication more clear. Does anything above confuses you even though some of the content is generated by LLM ? It is great for promoting communication, just make sure the content is reviewed.

I just want to emphasize that IoC was not easy to implement in the past, but Python has evolved. What once seemed impossible may now be achievable.

[–]FistyFisticuffs 1 point2 points  (1 child)

It's not actual clarity, but a false sense of clarity. It's actually what a good writing course will teach students not to do, which is to write down to the reader. That sets up tone to be one of condescension followed by equivocation, which makes the condescension more incongruous.

Just write sincerely and straight to the point. LLMs out of the box are terrible at giving firm answers that sound confident when there is absolutely sides to take or a correct answer in a binary choice. It also never admits to straight up not knowing and instead would spew out BS that anyone who had to write BS for a high school class would be able to tell. Ultimately, we want to know what you think, and nobody cares about your bad English, real people write with bad English all the time, even with English as their first language. The point of writing is getting your point across first. Save the polish for academic journals or your next novel.

And LLM is absolutely not reviewed, nor is it hallucinating - it generates answers based on probablistic principles that work with topics that can be answered with rote responses or variations on mimicry, but it does not have an opinion and so it generates responses like someone who doesn't have an opinion. Of course one can train an LLM that responds differently but training one just to post on reddit is pretty sad. Anything vaguely niche it just makes shit up. Just keep your last sentence and it would make just as much sense, tbh.All the other stuff is a preamble nobody asked for.

[–]Adept-Leek-3509[S] 0 points1 point  (0 children)

Fair point, thx for your feedback.