A Review Of The Trongate PHP Framework

Simplicity and truth are the foundation of the Dao (Dao De Jing)

This site contains affiliate links to products sold by selected self improvement partners. We may receive a commission for purchases made through these links.

In this article, I share my experiences with the Trongate PHP Framework, using the main framework itself as well as the Desktop App.

Five reasons why I chose Trongate

Reason number one: stability

I have two laptops running Windows 8.1. One is ten years old, the other is over five years old. I have used the Trongate framework on several projects using the older one. Some of these are live sites, previously built with CodeIgniter (CI).

These sites are spin-offs/microsites drawn from an art management system that was built with CI version 3 HMVC in 2017. There are others available on Github as standalone projects which can be built upon.

Last year, I was able to use the Desktop app until it got updated and, suddenly, I was getting what I thought were Microsoft-related errors. However, given that there was another option, I went for the main framework.

While the framework requires PHP 8 and above, I had built my sites using PHP 7. I am in the process of moving these sites to Trongate as I value stability and security, as well as speed. My hosting provider has moved to PHP 8 with no option to go back to version 7.

As mentioned before, these sites were built with CI Version 3, using the HMVC design pattern. Nonetheless, they were breaking rather frequently with all the rewrites.

The Modular Extensions for CI 3 had also not been updated in years and I had to be trawling StackOverflow and the CI forum for hacks.

I decided that I would not go for CI version 4. I have entered a critical 12-month period and I cannot have my websites breaking because of problems with software rewrites and dependency issues.

I think there is a particular Native American tribe that would look at the way we do things in the West when it comes to innovation and say something is wrong with our approach. For example, the built-in obsolescence within our digital technologies, both hardware and software.

Trongate reflects the vision of its creator. Like it says on the website

What sets Trongate apart is the belief that it should be not only possible but normal to enhance PHP frameworks without constantly breaking them.

A related yet important reflection of that vision is security. It is pretty much everywhere.

Or, at least, you can implement it everywhere in your apps…

Reason number two: no third-party libraries

While the framework comes with some quite intriguing features, it does not use third party libraries. It comes with its own features such as Trongate CSS, Trongate Pages, the API Manager, Trongate MX, and the Graphical Query Builder. They are all self-contained.

Incidentally, not only is the framework free. The modules are available from the Module Market and are free too. However, there is the opportunity to create and submit paid modules to the Module Market.

On the other hand, there is absolutely no reason for you not to use third-party libraries. The framework is that flexible. I love Bootstrap, especially version 3. However, I am on a trek to reduce technological dependence as much as is humanly possible.

I found out later that there is a Bootstrappy Admin Theme available in the Trongate Module Market. Hooray!

Reason number three: easy to learn

I wonder if this reason ought to come with a caveat. The caveat would go something like this:

If you are approaching Trongate and you have NO experience with programming as it relates to server-side programming, I would advise you to FIRST learn core PHP. Start with procedural, then move on to object-oriented PHP. You will then have built your foundation before moving on to ANY framework.

Of course, that is my recommendation as someone who has taught web and software development in adult, further, and higher education in the UK for more than ten years.

Trongate has a CodeIgniter feel for those of us who use/have used CodeIgniter. As with CodeIgniter, you have flexibility when it comes to programming style. You are encouraged to program in a way “that makes you feel good”. The framework is largely object-oriented; however, it does allow for some procedural PHP.

It also has a familiar feel if you have followed David Connelly’s YouTube™ course “Build an Online Shop with CodeIgniter” (2016).

I am attributing this to his strong background in commercial web development.

Compared to other frameworks, Trongate is VERY easy to set up. As a rapid application development (RAD) tool it can more than hold its own against the top PHP frameworks. If you are interested in benchmarks, they are available for viewing on the site.

Setting up a Trongate site is easy. There are two options:

Option one: The desktop app provides automatic code generation from naming your app, to setting up your database and thus supplying you with the necessary Controller and View files. You can also add modules and modify your app as you go along.

Option two: The main framework which you may go with if you want to get under the hood to figure out how it works and you like doing things manually.

Reason number four: good documentation

The documentation is very easy to follow, and there are good example snippets throughout that you can easily copy, paste and adapt for your own projects. It is always being updated, so do check back often.

There is also an opportunity to contribute to the documentation.

Reason number five: because you can!

I think this speaks for itself. Don’t you?

My experience with the Desktop App

I was able to run this app when it first came out in 2021. I liked the retro look and feel and the ease with which I was able to set things up in order to create a Trongate app.

It did take a little while to understand what the code was doing. This just means that I need more practice in learning how to read code.

Then the first update came out (in 2023?) and, since then, I have been unable to run the app.

I would get the following error. You have probably seen it before with other applications:

The procedure entry point DiscardVirtualMemory could not be located in the dynamic link library (path to Trongate.exe [in this case])

As I mentioned above, I have two laptops running Windows 8.1. Last week, I decided I would back up all my files and reset the machines. The entire process took about ten days (Google Drive can be such a drag).

As an aside: I do have two external hard drives. Erm…looks like they are both failing…

Anyway, even after completely resetting my laptops, the error persisted – on both of them.

I have simply put the error down to a quirk in Windows 8. In the past, I have had to create .BAT files to run Java apps created in Windows 7. I thought that I was facing a similar issue with the Desktop App.

Oh, well…I have chosen not to fight with the system. The main framework still works.

Conclusion

I love the framework for its simplicity and ease of use. I strongly believe that I can rest easy at night knowing my sites won’t break because of software rewrites and security vulnerabilities within dependencies.

My only beef with the framework is that I am currently unable to use the Desktop App on my machines. Perhaps getting a new machine with Windows 10 or 11 might do the trick.

Also, you cannot use an existing database if you are using the Desktop App from scratch. You are better off using the main framework if that is the case.

Hey, no framework is 100% perfect. However, it is great if you can get close to it…

So, if you are looking for a framework that

  • is free
  • is stable yet flexible
  • does not depend on third-party libraries
  • is fast – with benchmarks to prove it
  • is modular
  • is easy to learn, and
  • has good documentation

…do give Trongate a try. If you like it, feel free to give it a star on Github. Or not – LOL!

Simplicity and truth are the foundation of the Dao.

For more information, check out the Trongate website.

The quirky content on the Home Page is not to be sniffed at. Do take your time and go through it. Seriously ponder it.

Thinking out loud: I wonder if the “Wrong” song by Depeche Mode that is featured on the Trongate home page is the one the Smack the Pony comedy team parodied. Theirs was “The Wrong Shoes”. I may share my version of that when I get myself a guitar…

PS: I am preparing another article which will feature the Trongate PHP framework as the perfect case study within the content of innovation and economics. Check this link for an update!

PPS: Thanks to David Connelly for enabling the use of the Trongate logo.

Sources cited

The quote at the end of this article is cited in Chapter 65, Genuine Virtue – The Virtue of Simplicity, in The Dao De Jing: A Qigong Interpretation (2018) by Dr. Yang, Jwing-Ming, p.413. US: YMAA Publication Center.

This site contains affiliate links to products sold by selected self improvement partners. We may receive a commission for purchases made through these links.