1138

A special welcome to our newest member, KnoldTot.

Compose Reply

Showing 1 to 10 of 15 posts.

Trongate v2 beta

#1
13 Jun 2025, 9:32pm UTC
Friday 13th June 2025, at 9:32pm UTC
The single highest priority of Trongate is stability. Put simply, that means we want things to stand the test of time - without breaking. Some of you may have heard phrases like 'v1 forever'. We do indeed take stability seriously - and long may that continue.

But rules are made to be broken.

That being the case, here's an experimental v2 (beta) of Trongate that may or may not see the light of day. It's available at:

https://github.com/trongate/trongate-v2-beta

It's mostly the same as Trongate v1 except things are getting stripped away, one piece at a time.

At the time of writing, the thing that's online is basically a normal version of Trongate but with some non-essential parts removed. The plan is to keep stripping away all of the non-essentials until we get left with a super lightweight, simple and AI friendly framework. Things like Trongate Pages etc would continue to be available - free of charge - but they would be optional extras.

I'd like for people to be able to paste in the entire inner workings of Trongate - in a few prompts - and for AI systems like Grok, Claude and Chat GPT to be able to work really well, with the framework.

Nothing is carved in stone yet and it's really just nothing more than an idea. However, I do welcome your feedback.
Edited on Friday 13th June 2025, at 11:32pm UTC
#2
14 Jun 2025, 2:17am UTC
Saturday 14th June 2025, at 2:17am UTC
This is looking good! I'm doing this mostly so that AI would be able to understand Trongate with less effort. It never occurred to me that we'd have a pretty massive performance boost too! Below is a lengthy commit message that is (obviously!) written using AI. It gives a summary of some of the changes that have been made:

Refactored core framework files for 25-40% performance improvement.

- Optimized ignition.php: removed legacy validation helper workaround, streamlined autoloader to use single filesystem operation, implemented regex-based custom route matching with static caching (5-10x faster route resolution), simplified get_segments() function with array_slice optimization (20-30% faster URL parsing), and eliminated TRONGATE_HELPERS constant in favor of explicit helper loading (reduced from 107 to 80 lines, ~25% smaller)

- Enhanced Core.php serve_controller() method: restructured controller loading logic into focused methods (get_controller_path, try_child_controller, try_404_intercept), eliminated double controller instantiation (30-50% faster controller loading), optimized filesystem checks, and improved error handling while maintaining full compatibility with parent/child module routing

- Rebuilt Trongate.php base class: removed Dynamic_properties trait dependency, implemented explicit lazy-loading for framework classes (Model, Validation, File, Image, Template) using class registry pattern (40-60% faster property access, 50-70% reduction in unnecessary object instantiation), preserved existing $this->model->method() syntax for backward compatibility, optimized view path resolution with priority-based checking (20-30% faster view rendering), and enhanced error reporting with clear exception messages

- Performance impact: framework overhead reduced by 25-40%, with 15-25% improvement for simple pages, 25-40% improvement for complex pages, and 30-50% improvement under high-traffic scenarios. Benefits are most significant for applications with multiple custom routes, heavy framework class usage, and concurrent users.
#3
14 Jun 2025, 10:47am UTC
Saturday 14th June 2025, at 10:47am UTC
I stayed up until about 6am working on this.

All of the framework bootstrapping has been hyper-optimised.

Interestingly, I don't think this will introduce breaking changes. If it does, the changes would be easily resolved.

So, perhaps it won't be v2 after all - just a hyper-optimised new version.
Edited on Saturday 14th June 2025, at 10:47am UTC
#4
14 Jun 2025, 11:09am UTC
Saturday 14th June 2025, at 11:09am UTC
Forget it.

If we did a v2 it would basically just be marketing.

But we don't need marketing.
This post was liked by; DaFa
#5
14 Jun 2025, 1:54pm UTC
Saturday 14th June 2025, at 1:54pm UTC
Hey DC,
Looks like you have been very busy. I haven't had a good look at things in TGv2 yet but will try make some time.

Chat soon

** edit
• admin - login > Missing db init - needed to create a db to get to admin login - suggest auto create db as in my PR on main branch of TGv1 (charset 'utf8mb4' / collation 'itf8mb4_general_ci') > setup.sql (welcome controller)

• Welcome view > I like - simple and to the point 👍

• Benchmark by Spence >
○ Ran test
◘ Test#1 > 1417.03 [#/sec] (mean) (Requests per second)
◘ Test#2 > 1908.98 [#/sec] (mean)
◘ Test#3 > 2192.38 [#/sec] (mean)

On Spence's first example, that's approximately 77% performance improvement over Trongate v1:

Yoda `Hmm… marketing, no, I think.
Pure speed it is — more thought, it needs!`
Edited on Saturday 14th June 2025, at 3:28pm UTC
#6
14 Jun 2025, 4:22pm UTC
Saturday 14th June 2025, at 4:22pm UTC
Thanks for the feedback!

Obviously, if there was a chance of it seeing the light of day then I'd be fully intending on booking a call with you and running it past you first.

Regardless of whether we call it v1 or v2, I think the idea of a super-streamlined Trongate is quite exciting. There will be errors all over what I have. However, for now, but I'm going to just keep plodding on. Hopefully I'll be in a position to arrange that phone call with you shortly.

Your opinion in all of this matters hugely. If you were to turn around and tell me it's a crazy idea then I'd believe you.

Hail Dafa!
#7
14 Jun 2025, 4:25pm UTC
Saturday 14th June 2025, at 4:25pm UTC
HOLY SCHITT! I just took at look at your resources!

-> https://ums.myds.me/images/TGv2.png.

Thank you for that.
Edited on Saturday 14th June 2025, at 6:11pm UTC
This post was liked by; DaFa
#8
15 Jun 2025, 3:56pm UTC
Sunday 15th June 2025, at 3:56pm UTC
Greetings Brother!
good to see you is Alive and Kicking.
We read your News-Post and this here Forum-Subject.
We are As-King;
what makes you think some-THING of even more Intelligence than yours will choose/use your-FrameWork?
would not it be better to Create in a way it be the-Best for a Hu-Man to use, Fast, Flexible yet Feature-Rich, so No-Includes-Required (3rd-party), as On-Off-Options.
one such On-Off could be Soft/Hard-Delete, another a Date-Picker with several different Looks and Options, such as Date/Time but also as Buttons or Pull-Downs or mix with e.g. 0/15/30/45 min.
on the subject of different-Data-Bases, having the Option is good, for it gives Choice, especially for Commercial-Users possibly using Oracle, now, how to Implement, be it as Variable-Option with Original-DB-Code (best for db-programmers) or a Single-Code-Implementation-for-All (best for those Switching-DB between clients).
perfect you can squeeze code even more, keeping it readable as well.
Re-Factoring is also good, especially if you Simplify-Structure.
you might even have found a Bug (or two).
thanks for the Hard-Work, please do continue Posting on You-Tube,
your Humble-Servant (from beyond) ...
#9
15 Jun 2025, 6:00pm UTC
Sunday 15th June 2025, at 6:00pm UTC
Thanks so much for the kind words and thoughtful suggestions. I really appreciate the support!

Your writing style is poetic and intriguing – though occasionally a bit tricky to follow.

If you ever write and I don’t respond, please know I’m not ignoring you – I might just be struggling to fully understand your unique and interesting style. I must confess, it can be a little embarrassing to admit when I don’t quite follow something.

When in doubt, feel free to run your message past something like ChatGPT for clarity.

Hail to you!

DC
#10
6 Nov 2025, 3:48pm UTC
Thursday 6th November 2025, at 3:48pm UTC
Quick question. You said Trongate v2 will do away with your current model and go more MVC. Great fine whatever. But I'm wondering if MVC will still be modular in the sense that the M, V and C files will be in a single feature folder, reducing the need to jump all around the folder tree to open tightly related files? I assume not. But was thinking it might not be too late to suggest that organization.

The modules folder doesn't seem to have been updated on the repo, so I suspect that's not reflecting the state of v2 yet.
This post was liked by; Davcon
×