Hi,
Thanks for your question. You are the first person to post here since we added the super dooper AI validation thing. So, many thanks indeed!
Don't worry. Trongate is still modular and your existing modules will continue to work with absolute minimal tweaks.
The main changes in v2 are simplification and optional model files. The framework is being slimmed down to about a third of its current size, making it faster and simpler. Controller files were getting large, so you'll now have the option to add model files in modules.
The file previously called model.php was misnamed. It only handles database queries and in v2 it will be called db.php. Database queries will use $this->db instead of $this->model.
For example, v1:
v2:
Other improvements are coming, but the core philosophy stays the same. Making the framework smaller also makes it easier for AI systems like ChatGPT to understand, opening new possibilities for Trongate developers.
I may put out a tutorial next week to explain some of the changes that are happening.
DC
6 months ago
#11
5 months ago
#12
Video: How To Prepare for Trongate v2
https://www.youtube.com/watch?v=lqv3eRCAD3U
One very important question: what is the typeface you are using in Sublime Text? I think it uses Menlo-Regular on Mac, but that doesn't seem to be what you are using from the specimens I've seen.
I don't have a broad range of frameworks I've used, but I find they often use `name` for the model and `name_controller` for the controller, but you've switched it around as `name_model`/`name`. I kinda like it the other way, and was wondering your thought on it?
https://www.youtube.com/watch?v=lqv3eRCAD3U
One very important question: what is the typeface you are using in Sublime Text? I think it uses Menlo-Regular on Mac, but that doesn't seem to be what you are using from the specimens I've seen.
I don't have a broad range of frameworks I've used, but I find they often use `name` for the model and `name_controller` for the controller, but you've switched it around as `name_model`/`name`. I kinda like it the other way, and was wondering your thought on it?
5 months ago
#13
Also, is there any reason a module couldn't have multiple modules or controllers, if needed? I assume not.
5 months ago
#14
Hello,
To maybe answer your question,
Frameworks often use `name` for the model and `name_controller` for the controller, but you've switched it around as `name_model`/`name`.
The main goal is to keep everything simple, stable, lean, and fast. In the first part of your statement, I’m assuming you meant “name” refers to the module, not the model. Removing the controller folder actually simplifies things.
Can modules contain multiple modules or controllers?
Absolutely — that’s one of the strengths of Trongate. It gives developers the freedom to structure their modules however they want. If the framework tried to enforce those decisions, it would only add unnecessary bloat.
ps. I used chatgpt to help
To maybe answer your question,
Frameworks often use `name` for the model and `name_controller` for the controller, but you've switched it around as `name_model`/`name`.
The main goal is to keep everything simple, stable, lean, and fast. In the first part of your statement, I’m assuming you meant “name” refers to the module, not the model. Removing the controller folder actually simplifies things.
Can modules contain multiple modules or controllers?
Absolutely — that’s one of the strengths of Trongate. It gives developers the freedom to structure their modules however they want. If the framework tried to enforce those decisions, it would only add unnecessary bloat.
ps. I used chatgpt to help
5 months ago
#15
Thanks. The build process for v2 is going really well. I'm personally putting about 15 hours per day into this and I'm hoping to launch on January 6th. If it gets finished sooner then perhaps we can have some kind of soft launch.
The build process is being guided by the following three things:
1). Get rid of everything that introduces complexity. Simplicity wins.
2). Build from a "syntax first" perspective. That means, figure out what would be beautiful syntax for doing something then work your way back so that the framework handles it.
3). Keep as close to the core technologies (PHP and MySQL) as possible. The framework should just get out of your way and it should feel like working with pure PHP.
Hopefully the third point answers questions pertaining to multiple controllers. If pure PHP can do it and if you want it, do it. It's not the job of the framework to dictate how you should code.
It's going REALLY well and we are ahead of schedule! I'm super excited and I haven't felt this optimistic about a project for several years.
The build process is being guided by the following three things:
1). Get rid of everything that introduces complexity. Simplicity wins.
2). Build from a "syntax first" perspective. That means, figure out what would be beautiful syntax for doing something then work your way back so that the framework handles it.
3). Keep as close to the core technologies (PHP and MySQL) as possible. The framework should just get out of your way and it should feel like working with pure PHP.
Hopefully the third point answers questions pertaining to multiple controllers. If pure PHP can do it and if you want it, do it. It's not the job of the framework to dictate how you should code.
It's going REALLY well and we are ahead of schedule! I'm super excited and I haven't felt this optimistic about a project for several years.
5 months ago
#16
One thing that would be nice is the ability to configure a setting to offset segments by 1 allowing you to have the first segment be the local, and the framework still works automatically knowing that default.com/en/post/1 is `post` id 1 and you can just get the locale value somehow.
Rather than a custom routing and needing to pull segments oneself.
Or do you think that's too much complexity and just easy enough to do manually with custom rules? The problem with custom rules is: it would become hard to drop in a module because you may have to change it to understand that all the segments have moved by one, right?
Rather than a custom routing and needing to pull segments oneself.
Or do you think that's too much complexity and just easy enough to do manually with custom rules? The problem with custom rules is: it would become hard to drop in a module because you may have to change it to understand that all the segments have moved by one, right?
4 months ago
#17
Instead of offsetting all of the segments by 1, just modify the BASE_URL constant within config.php.
With respect - what you’ve posted is classic over-thinking, and don’t worry - almost everybody does it!
I know brilliant developers who use Trongate - top professionals in every way imaginable - and they overthink too. A classic example: "I built a feature that lets Trongate work with [insert-name-of-database], but it’s not a real module, and you have to faff about with internals to make it work."
They’re all smart - with higher IQs than me - and I’d hire every one of them, but they’re overthinking. Everybody is overthinking.
I am the cure for over-thinking - not with lectures or endless tutorials, but by building Trongate v2 so everything is a module and everything is easy. Web development is easy. It has always been easy. Some people with low self-esteem convinced you otherwise. They lied.
Stand with me. It’s going to be a great year.
With respect - what you’ve posted is classic over-thinking, and don’t worry - almost everybody does it!
I know brilliant developers who use Trongate - top professionals in every way imaginable - and they overthink too. A classic example: "I built a feature that lets Trongate work with [insert-name-of-database], but it’s not a real module, and you have to faff about with internals to make it work."
They’re all smart - with higher IQs than me - and I’d hire every one of them, but they’re overthinking. Everybody is overthinking.
I am the cure for over-thinking - not with lectures or endless tutorials, but by building Trongate v2 so everything is a module and everything is easy. Web development is easy. It has always been easy. Some people with low self-esteem convinced you otherwise. They lied.
Stand with me. It’s going to be a great year.