Your Privacy

This site uses cookies to enhance your browsing experience and deliver personalized content. By continuing to use this site, you consent to our use of cookies.
COOKIE POLICY

Skip to main content

Return to jQuery

Return to jQuery
Back to insights

I’ve been at UDig for just shy of a year now, and in that time, I’ve primarily worked on a single client project. By the time I joined the project, the UI technologies were already established. In the name of simplicity, the team decided to go with a JQuery-based UI backed by Spring’s Thymeleaf templating system. While I would have probably made different choices, we’ve made a functional, solid UI from these pieces. I’d like to take a few minutes to explore some of the good, the bad and the ugly parts of this particular stack in a modern web-application context.

The Good, i.e. Things I Like

Even in 2018, there are still some benefits to using jQuery. Setup is quick and easy, and at this point, almost everyone knows jQuery. Following from that, jQuery has been around for so long that for anything you want to do, there’s 5 different plugins for it, each with their own level of customizability and an online community. It should be noted that this is a benefit only as long as you don’t overload the application with external libraries. While SPA’s are all the rage right now, a multi page structure with a few shared utility files can be used to create a simple and easily understandable separation of concerns driven directly by the structure of your UI.

Thymeleaf is also not without its strengths. It’s basically a more reliable iteration on the concept of JSP’s. The reliability comes in the application of default values, where you can render a Thymeleaf template even if your server response has a problem. Though it is less of a concern these days, it’s worth mentioning that server-side rendering allows for a lighter client-side load in your app, which can be handy if your users are on older or cheaper hardware.

The Bad, i.e. Things I Don’t Like

I had forgotten how error prone and painful direct DOM manipulation could be. Before this, I spent a few years working in Angular and I grew comfortable having a layer of abstraction between my JavaScript and the DOM. Along the same lines, I also miss the componentization and “auto-magic” behavior that comes with newer frameworks like Angular or React (e.g. 2-way data binding). A lot of these things are quality of life improvements for us that make us lose less hair hunting down an incorrectly typed CSS selector and the like. It follows that the more state you introduce into your application, the worse this disconnect becomes.

The Ugly, i.e. Things No One Would Ever Like

Without enforced structure, it becomes extremely easy to write “spaghetti code”. This has been a concern with JavaScript through it’s lifetime, and one that newer frameworks seek to curb to good effect. At different points in the development of our app, we’ve had to go back through and rework more than a few modules because they were tending towards unmaintainable. The silver lining here is that it’s easier to pull jQuery apart and put it back together in a new structure than something more rigid.

The other real pain point is this: The only way to load up a javascript version of your Thymeleaf objects without a separate ajax call is couched in a global variable. This is less than ideal. Placing these into a “Data” or “Globals” namespace object helps with this a little (as far as readability is concerned, anyways). But if you have more than one programmer working in the UI, it’s liable to get hairy pretty fast.

As newer web technologies move forward and mature, more and more frequently we encounter situations where jQuery is not the right or best choice for any given situation, but there still exists a scope of problems where simple, quick and flexible solutions may be preferable over something more structured or complex. In those situations, jQuery is still a viable option.

Digging In

  • Software Engineering

    When There’s Too Much to Fix: How Smart Prioritization Unlocks Revenue at Scale

    Every operations team has a backlog. The question isn’t whether you can clear it — it’s whether you’re clearing it in the right order. For most teams, the honest answer is no. And that gap between the order work gets done, and the order it should get done is quietly costing organizations millions. The Volume Problem High-volume exception processing shows up across […]

  • Software Engineering

    Creating Reusable Code Templates to Reduce Client Project Startup Time

    In consulting, one of the least visible but most expensive phases of a project is the beginning. Teams can spend days or weeks setting up repositories, agreeing on structure, wiring basic infrastructure, and solving problems that have already been solved many times before. Code templates are a practical way to reduce overhead while improving consistency. […]

  • Software Engineering

    Player Three Has Entered the Game: How AI Is Finally Bridging the Divide Between Design and Engineering

    As AI begins to become more prominent in our day-to-day lives, I find myself in a unique position. As a practicing software engineer and UI/UX designer, I am genuinely happy to see the introduction of AI tools begin to take shape in our industry. But more importantly, I am happy to start seeing the effects it is having on what has historically been a pretty challenging relationship: the […]

  • Software Engineering

    The Disappearing Middle of Software Work: Why the Bookends – Strategy & Impact – Matter Most Now

    Here’s a question nobody in enterprise software wants to sit with: what happens to the middle? Not the middle of the org chart. The middle of the work. The vast, expensive layer of effort that has defined enterprise software delivery for thirty years—translating what the business wants into working code. The requirements-to-implementation pipeline. The “build phase.” […]

  • Software Engineering

    Zero-Code Telemetry with OpenTelemetry’s OBI

    Full distributed tracing and exception capture for any application — without writing a single line of instrumentation code. View the source code on GitHub → The Premise Observability is essential for understanding what’s happening inside your services, but instrumenting an application by hand — adding trace spans, logging calls, and metric counters throughout your codebase […]

  • Software Engineering

    Building a Consultant in the Trenches: How Playing Offensive Line Shaped My Consulting Career

    People often ask me the same question when they find out that I played college football: “Do you miss it?” On the surface, it’s a bad question with an obvious answer. Yes. However, if I give myself a minute to sit with that question, the answer is more nuanced. Yes, I miss playing football, but […]