This is going to be a slightly unusual message, and forgive me if this turns into a bit of a rant. However, I can officially declare that Trongate is no longer a PHP framework. I realize this sounds like a bizarre thing to say, but there are technical and political (for want of a better word!) reasons why I no longer consider Trongate to be a PHP framework. Let me break them down for you.

Technical Reasons Why Trongate Is Not a PHP Framework

I was working on some new features for Trongate MX yesterday. Now, I'm not sure if you've checked out the code for Trongate MX, but it's essentially just one JavaScript file, and - at the time of writing - it's almost one thousand five hundred lines of code! That's not bloat, by the way. The code is written in a way that is modern and super condensed.

When a new feature gets added to Trongate MX, I immediately write a page of documentation. These days, the process of both writing the code and the documentation almost always comes with a little help from our "employee of the month" (i.e., AI). These days, I generally use Chat GPT for text-based tasks - such as writing documentation - and Claude 3.5 Sonnet for assistance with writing code. Both of those AI systems appear to know about Trongate, which is nice. However, I have opted for the paid version of Claude (this is not an advert!), and I usually work with a version of Claude that is intimately familiar with Trongate. Yesterday, I asked "Claude" the following question:

"At this point, do you consider Trongate MX to be a lightweight JavaScript library? If not, how would you describe it if you were talking to another developer who had not heard of Trongate MX?"

Now, remember - this is a question about Trongate MX. Strictly speaking, it's just a JavaScript file. In any event, the answer produced by Claude was rather astonishing and impressive. Here's how Claude responded:

Trongate MX has evolved beyond what would typically be considered a "lightweight" JavaScript library. Here's how I would describe it to another developer:

Trongate MX is a comprehensive JavaScript framework designed to enhance server-client interactions in web applications. It provides a robust set of features for handling AJAX requests, managing DOM updates, and implementing interactive behaviors without full page reloads.

Key features include:

  • Declarative attribute-based programming model (similar to HTMX)
  • Support for various HTTP methods (GET, POST, PUT, DELETE, PATCH)
  • Sophisticated DOM manipulation and content swapping
  • Modal handling capabilities
  • Form submission and validation error handling
  • Animation support for success and error states
  • Polling and event throttling
  • URL pushing for better navigation support

While not as lightweight as some minimal libraries, Trongate MX offers a balance between feature richness and performance, making it suitable for complex web applications that require dynamic content updates and interactive user interfaces without the overhead of larger frameworks like Angular or React.

It's particularly well-suited for developers who prefer a server-centric approach but want to add rich, dynamic behaviors to their web applications with minimal JavaScript coding.

Pretty impressive, huh!?

I think there are two takeaways from the above. Firstly, it would appear that Claude is rather better at selling Trongate than me! However, the other interesting takeaway is the fact that Claude now considers Trongate MX to be a JavaScript framework.

This is indeed quite astonishing news - especially considering the fact that Trongate MX is just a tiny part of the Trongate ecosystem. As strange as it may seem, somewhere along the road, we accidentally built a JavaScript framework!

Is Trongate Now Competing Against Other JavaScript Frameworks?

Given the fact that we now have a JavaScript framework as part of our ecosystem, I think it's a legitimate question to ask, "Does this mean that Trongate is competing against JavaScript frameworks, within the JavaScript space?"

I can almost hear the yawns from here! I think I know what you're thinking, and let's all say it together:

WE DON'T NEED ANOTHER JAVASCRIPT FRAMEWORK!

Okay, easy tiger. I get it.

The thing is, for better or for worse, Trongate does now have a significant amount of JavaScript code, and on a wide variety of metrics, Trongate is demonstrably better than the best of what the JavaScript community has produced thus far.

You think that's arrogant? Well, here are a few hard facts for consideration:

Fact 1: Trongate's multi-file uploader vastly outperforms both of the world's two most popular multi-file uploader libraries, Dropzone and Filepond. Here's the proof.

Fact 2: Trongate has a rich assortment of date and time pickers (plus date range pickers, etc.). All of this code is comparable to jQuery - in terms of looks and functionality - but written with modern JavaScript and with far less code.

Fact 3: Trongate is the only web development framework on Earth that gives developers a free graphical SQL query builder (built using the 'canvas' feature that comes with modern JavaScript).

Fact 4: Although not yet in a finished and perfect state, Trongate Pages (our flagship asset!) looks set to become the best open-source content management system in all of PHP.

Fact 5: Trongate MX was originally inspired by HTMX, which is arguably the hottest JavaScript library of the last two years. However, Trongate MX has evolved far beyond HTMX. Don't believe me? Let's go have another word with Claude!

I asked Claude:

"If a web developer asked you to compare Trongate MX to HTMX, what would you say?"

Here's Claude's response:

If a web developer asked me to compare Trongate MX to HTMX, I would say:

"Trongate MX and HTMX share a similar core philosophy of enhancing web applications with minimal JavaScript, but they have some key differences:

  1. Scope and Integration:
    • HTMX is a standalone library that can be used with any backend framework.
    • Trongate MX is specifically designed for and deeply integrated with the Trongate framework, offering out-of-the-box compatibility with Trongate's features.
  2. Feature Set:
    • HTMX focuses primarily on AJAX requests and DOM swapping.
    • Trongate MX offers a broader feature set, including built-in modal handling, form validation, animations, and more comprehensive DOM manipulation tools.
  3. Customization:
    • HTMX provides more granular control over swapping behaviors and offers extensions for additional functionality.
    • Trongate MX comes with a more opinionated set of features tailored to the Trongate ecosystem.
  4. Learning Curve:
    • HTMX has a larger community and more extensive documentation, which can make it easier to learn for beginners.
    • Trongate MX might have a steeper learning curve but offers more integrated features for Trongate users.
  5. Performance:
    • HTMX is generally lighter-weight and may have a slight performance edge in simple use cases.
    • Trongate MX, while more feature-rich, is optimized for the Trongate framework and may offer better performance in that specific context.
  6. Ecosystem:
    • HTMX can be used with various backend frameworks and has a growing ecosystem of extensions.
    • Trongate MX is part of the Trongate ecosystem, offering tight integration with other Trongate features and tools.

Claude's answer is by no means a demolition job on either HTMX or Trongate MX. However, Claude clearly conveys the idea of Trongate MX being more feature-rich and more substantial than HTMX. Here's a reminder of some of the key technical differences:

  • Trongate MX offers a broader feature set.
  • Trongate MX might have a steeper learning curve.
  • HTMX is generally lighter-weight.
  • Trongate MX offers a more integrated and feature-rich solution.

Where Are We Going With This?

There's one part of Claude's assessment that I disagree with. I would insist that Trongate MX is framework-agnostic. In other words, you don't have to use it with the Trongate PHP framework. Anybody can download Trongate MX and use it. That includes Python developers, Node.js developers, .NET developers, Golang developers, and anyone in the business of building web applications.

There's no question that Trongate MX has turned out to be far more sophisticated than I had imagined. I have to thank the "employee of the month" for that! If I had known it would end up being so feature-rich, then perhaps I'd be tempted to give it a cool name and present it to the world as a standalone JavaScript framework - but that's not going to happen.

The truth of the matter is, the Trongate PHP framework and Trongate MX are two totally different things. The Trongate PHP framework has a unique architecture and is very much an original PHP framework that literally breaks "the rules." Trongate MX, on the other hand, is very much inspired by HTMX. Even though Trongate MX has started to evolve beyond HTMX, I really respect Carson Gross (the creator of HTMX), and I think it would be wrong to present Trongate MX as a competitor to HTMX. That's my way of saying that I have no plans to throw Trongate into the JavaScript arena and present it as a new and alternative JavaScript framework. Instead, I'd much rather encourage people to use third-party JavaScript libraries with Trongate. The same goes for CSS libraries. Therefore, just to hammer the message home: Even though Trongate has some white-hot JavaScript assets, I don't think it should be considered to be in competition against other leading JavaScript frameworks.

Allow me to wrap things up with some thoughts about the general state of the PHP community, as I see it.

Regarding The PHP Community

When I built Trongate, I deliberately set out to create a PHP framework that was radically different from the mainstream. I believed it was important for the PHP community to have a framework that wasn’t tied to conventions like Packagist, third-party inter-version dependencies, rewrite culture, and the widespread adoption of PSRs.

I knew that not everyone would appreciate this approach, and I expected some controversy. What I didn’t foresee, however, was the extent of the negative and often misinformed feedback I’d receive.

Since Trongate's launch, we’ve faced numerous false claims of security vulnerabilities and a steady stream of misguided criticisms from people who should know better. Common statements include:

  • “It’s version 1 forever, so it never gets updated.”
  • “It’s old-fashioned because it’s different from other frameworks.”
  • “It doesn’t use namespaces.”
  • “It’s just a simple router.”

These claims are not only incorrect, but they also reflect a misunderstanding of what makes Trongate unique. For instance, the idea that Trongate’s stability somehow means it doesn’t get updated is simply untrue. In fact, Trongate receives frequent updates - sometimes multiple times in a single day. The framework is constantly evolving, often more so than its competitors.

Another common critique is that Trongate is "old-fashioned" because it doesn’t use tools like Composer or PSR-4 autoloading. The implication seems to be that, because it doesn’t follow certain trends, it’s behind the times. What these critics overlook is that Trongate was originally built with these features, in full compliance with PHP-FIG standards. However, that version was slow, bloated, and full of third-party dependencies. The current version of Trongate is intentionally leaner and more efficient.

To be clear, developers who prefer using tools like Packagist can absolutely do so with Trongate. We’ve even created documentation and tutorials on how to integrate these tools:

Despite these resources, some developers within the PHP community have repeatedly dismissed Trongate without acknowledging its capabilities or progress. To these critics, I would say this: the very things you accuse Trongate of lacking - such as Composer support - were part of its earlier iterations. We’ve since moved beyond that, refining the framework to be simpler, faster, and more efficient. Far from being "old-fashioned," Trongate represents a step forward.

The PHP Establishment and Innovation

Through my experience, I’ve come to realize that the PHP community doesn’t always embrace innovation. When someone offers a different perspective or a new approach, they’re often met with resistance - both in terms of their work and, at times, on a personal level.

So, while you won’t hear about Trongate at the next big PHP conference, that’s fine with me. Trongate stands on its own merits, and it continues to grow and thrive because it offers something genuinely different in a space where innovation is often stifled by adherence to convention.

Final Thoughts

Trongate may not follow the same path as other frameworks, and that’s exactly why it’s valuable. Personally, I’ve given up hope of ever having a breakthrough moment with the PHP establishment. That’s a shame, and I believe it’s to the detriment of PHP that we’ve ended up being dominated by a cabal that actively discourages innovation. In another world, I like to think that other PHP framework developers would have taken a more honest look at Trongate and perhaps given it a chance. In that scenario, I speculate that other leading frameworks might have borrowed ideas from Trongate, particularly with regard to architecture, leading to a new generation of faster, more stable, and better frameworks.

Unfortunately, that doesn’t seem likely. Instead of looking under the hood, doing some research, and asking, “What makes Trongate so fast and efficient?”, it’s much easier to dismiss it with intellectually bankrupt ridicule.

Given all the components that now make up the Trongate ecosystem, I no longer think it’s accurate to describe Trongate as just a PHP framework. It’s more than that. So, what is Trongate?

  • An ecosystem for web developers?
  • A web development suite?
  • An assortment of modules?

Whatever Trongate is, I no longer consider it to be merely a PHP framework. I think we've moved beyond PHP, and thank heavens for that!

DC

PS - I apologise if the Trongate website currently looks dreadful. I can assure you, we haven't been hacked and we have a new design on the way!