AMA with: Mark Volkmann (codebar Winter Lit Fest)

Ask Me Anything with
Mark Volkmann
@mvolkmann

On February 24 and 25, we are giving you a chance to ask questions of PragProg author Mark Volkmann as part of our Winter Literary Festival in partnership with codebar.

Mark Volkmann is the author of Server-Driven Web Apps with htmx and a Partner and Distinguished Engineer at Object Computing, Inc. in St. Louis. As a consultant, Mark has assisted many companies with JavaScript, Node.js, htmx, Svelte, React, Vue, Angular, Swift, SwiftUI, and much more. Ask him about web development, htmx, the programming languages he works with, or anything else—really!

Everyone commenting or asking a question will automatically be entered into a drawing to win one of the author’s books.

In addition, from from February 24 to March 2, as part of our Winter Literary Festival with codebar, you can use promo code 2025WinterFest to save 40 percent on purchases at pragprog.com. We’ll donate 20 percent of the net income from the promotion back to codebar after the event.

Offer not valid where prohibited or restricted. Offer not valid on previous purchases. The Pragmatic Programmer: 20th Anniversary Edition is not eligible for discounts, as we do not publish it.

Hit Reply to post your question below. The author will check in periodically to answer your questions.

3 Likes

Hello everyone! What would you like to know? I’m passionate about simplifying software developer which is a big part of what attracted me to htmx. I has also drawn me toward investigating a programming language you probably thought was dead … Smalltalk. Ask me about that as well.

3 Likes

Hi Mark,

I’ve noticed that people who are using specific technologies tend to form communities that have their own unique personality. Sometimes that is driven by the tech-founder/language author, and sometimes by the members who advocate for the tech. For example, the Ruby community was heavily shaped by Yukihiro “Matz” Matsumoto’s philosophy of developer happiness. The Elixir community seems very supportive and driven by a loyal base of developers who are deeply invested in it.

What’s the htmx community like?

Thanks,
Margaret

2 Likes

Nice! Where do you think Smalltalk fits today? Where are people using it? Where do you think they should use it?

1 Like

The htmx community, led by the creator Carson Gross, is really into funny memes. Carson posts many of those. The community is also careful about not bashing competing alternatives and tries to be honest about the potential weaknesses of htmx. That said, I don’t personally feel that htmx has many weaknesses. :wink:

2 Likes

There are a few places in the world where Smalltalk still has a sizable following. Those include Germany (where most of the development of Squeak Smalltalk takes place), France (where most of the development of Pharo Smalltalk takes place), and Argentina (where most of the development of Cuis Smalltalk takes place). Squeak, Pharo, and Cuis are all free, open source implementations. In my opinion, Smalltalk is a great option for applications that don’t require extreme speed and interaction with non-Smalltalk libraries. That’s not to imply that Smalltalk is slow or that it can’t interact with non-Smalltalk libraries. It can do those things. But if we’re writing an app with strict performance requirements and lots of calls to C libraries, I would choose Zig.

The main things that attracted me to Smalltalk are its beautifully minimal and concise syntax and its wonderful development environment. I have written about Smalltalk extensively in my blog at Mark Volkmann's blog.

2 Likes

Hello Mark,

I came across htmx a year or two again and got turned off by the idea of complex markup in HTML. I’m back again and I don’t think that feeling has subsided :slightly_frowning_face:

I’ve seen some criticisms of htmx like this piece by Jason Knight and the sarcastic response by Carson Gross himself. But the much-needed certainty/clarity is lacking.

What would it take to get an unrepentant unbeliever like me to give htmx a shot? Or better still where do you think htmx shines best: simple websites or just as simple add-ons to web pages kind of like Stimulus JS and the likes?

Thanks in advance for the response!

2 Likes

I think what it takes to convince yourself that htmx is a worthy alternative to frameworks like React is to:

  • Believe that the attributes htmx adds to HTML really should be part of HTML. Carson Gross would love for HTML to gain those features and then deprecate htmx.
  • Implement the same web app in both htmx and any other framework and then compare the number of lines of code and the complexity of the code. I think htmx really shines here.
  • Accept that htmx can’t do everything that other frameworks do and add the use of another client-side JavaScript library for extra dynamic behavior. Alpine.js works nicely with htmx because both just add attributes to HTML. My book shows many examples of using htmx and Alpine together.

For the most part I don’t think use of htmx needs to be limited to certain kinds of web applications. However, it’s not ideal for situations where a change in one part of the page requires updates to a large number of other parts (ex. spreadsheets with formulas). It’s also not ideal if operations like scrolling and scaling require getting new data from the server for every small change (ex. tiles in a Google Map).

3 Likes

Gotcha. So apps with state changes are a no go for htmx but it’s great for interactivity when paired with some other library.

I think your response has cleared my mind and heart a bit. I’m not yet a devout believer, but I have surely repented.

Thanks for the response, Mark!

2 Likes

Hello, @Margaret. Could you please edit the link to the book on the post. This is the correct link. The other one leads a “Page Not Found” error on the PragProg site.

Many thanks!

1 Like

@alvinkatojr

Fixed and thanks for finding the issue!

2 Likes

Thanks Mark!

I have another question, this time about htmx! Do you know of any big apps/sites that have been built with it?

Does it have a large community? Has it been adopted by any one language/community/space in particular?

I was curious whether anyone was using it with Phoenix so did a quick search on the Elixir Forum and there’s a thread about it, I’m not sure if you’re familiar with Phoenix LiveView, but if you are, would you agree with any of the comments made in that thread?

To clarify, htmx handles reasonable numbers of state changes very well, just not extreme numbers of them. One of the mechanism by which htmx deals with state changes is that endpoints can trigger events in the browser. Several examples in the book demonstrate that. And Chapter 5 covers integrating with Alpine.js.

2 Likes

These aren’t particularly well-known websites, but I found that these use htmx:

  • Futbin.com: A popular platform for FIFA enthusiasts, providing player databases, squad builders, and more.
  • News24.com: A leading South African news website delivering up-to-date news and information.
  • Money.it: An Italian financial news portal offering insights into markets, investments, and economic trends.
  • Moz.com: A renowned platform offering SEO tools and resources for digital marketers.
  • Fortinet.com: The official site of Fortinet, a global leader in cybersecurity solutions.

As far as programming language communities that seem to like htmx, I get the sense that it has gaining some traction in Python and Go.

I have read about Elixir and Phoenix, but haven’t used them yet. I get the sense that htmx can be viewed as a lightweight alternative to LiveView, especially if the focus is more on HTTP requests than WebSocket communication.

1 Like

I see. Thanks for the clarification and the examples. I think I’ll give htmx a try with some static site and see. It seems to shine well in areas where React and SPA frameworks are an overkill. Wish me luck!

2 Likes

Hello everyone!

I’m your friendly Devtalk bot :nerd_face:

Thank you to all of you who participated in our Spotlight AMA!

This is now closed and all of those who commented above have been entered into the draw - meaning we’re now ready to pick a winner!

The process will be initiated when somebody clicks the special link below:

:arrow_right: :arrow_right: :arrow_right: Devtalk - Dev forum at Devtalk - the forum for developers! :arrow_left: :arrow_left: :arrow_left:

Don’t be shy, we need one of you to help make the magic happen! :sparkles:

1 Like

Thank you for initiating the draw process…

Entering the following members into the draw…

:arrow_down: :arrow_down: :arrow_down: :arrow_down: :arrow_down: :arrow_down: :arrow_down: :arrow_down:

1 Like

And the winner is…

Drum roll…

1 Like

Congratulations @alvinkatojr you are the chosen one!! We’ll be in touch about your prize via PM soon :smiley:

Thank you everyone who entered, and of course @mvolkmann for taking part in our Spotlight - thank you! :blue_heart:

2 Likes

And I’m the “lucky one” once again :smiley:

Thanks again for the response to my question @mvolkmann. It seems the gods have granted me an opportunity to be a believer in htmx. Can’t wait to read the book!

Also thank you @Margaret and everyone at Pragmatic Publishers. And thank you too @AstonJ for always keeping the conversations on DevTalk going. Without you around, the silence would be deafening.

2 Likes