Home > Articles > Web Development

  • Print
  • + Share This
Like this article? We recommend Conclusion


In spite of writing about it, I'm not Python's biggest fan; I tend to prefer structured languages such as Java and C++, which provide advanced features out of the box, such as thread safety and good performance. However, Python is competing hard to become a mainstream language. Many large and wealthy organizations are adopting Python as their principal language. It's entirely possible that early objections to Python will eventually end up sounding like the old arguments for Pascal versus C!

Some of my earlier Python articles explored the nexus between legacy C++ code and its integration with Python. This is an area in which Python excels because it allows for legacy C++ code to be invoked using Python facilities. This design potentially extends the lifespan of the C++ code, while at the same time making beneficial use of the exception-management tools in both languages.

In this article, I've explored the use of the Python SQLAlchemy and Java ORM components. This technology traditionally has a pretty steep learning curve (in the Java world). But in Python SQLAlchemy you get a technology that's concise to code and easy to test. It's also fast.

The Java ORM facilities are very mature and tied into the whole enterprise Java JEE ecosystem. This connection makes Java ORM enterprise-ready and framework-rich. However, the cost involved is that it's complex to set up and program Java persistence solutions. That's not too hard if you're doing Java persistence coding every day, but a beginner may not find it so easy.

For my performance comparison between Python and Java, I employed a pretty naïve use case—inserting 100,000 rows into a table. The result was a blistering victory for Python.

Given that many organizations are seeking to reduce spiraling IT costs, one school of thought aims to eliminate whole languages, such as C++ or Java. If such a language is selected for elimination, existing code in that language is moved into maintenance or legacy mode with little or no new development taking place. Instead, new development is pushed into a language such as Python.

I've been arguing for a few years now that the very frameworks that have helped Java become the mainstream language may now be essentially too complex. The cost of new and continued adoption for Java may become prohibitive.

  • + Share This
  • 🔖 Save To Your Account