(February 11, 2018 at 8:40 am)Grandizer Wrote:(February 3, 2018 at 9:27 pm)KevinM1 Wrote: There are various PHP template engines that do something similar. Templates can inherit from one another, so you'll generally have a master layout template, and then templates for various things (blog side bar, interactive map, repeating items, etc.). It's a lot like ASP.NET Web Form masterpages.
If you're interesting in taking a look, I use Twig because it comes as a part of Symfony (a lot like how Razer is the default for ASP.NET MVC): https://twig.symfony.com/
Are you a lecturer in a computer-related course, by any chance? You write like an academic uni professor when explaining this stuff.
Haha, no, I'm just a freelance developer who's spent far too much time on various forums and Stack Overflow. I've also dabbled in a lot of stuff:
C
C++
C#
PHP
ASP.NET Web Forms
ASP.NET MVC
Ruby
Perl
JavaScript
While syntax changes between languages and platforms, there's a lot of connective tissue between languages. Like, there's a clear lineage from Rails (a Ruby web framework) to ASP.NET MVC and Symfony (a PHP web framework), and likely Django (a Python web framework). PHP is written in C, so its syntax is very similar. It also has built-in Perl-like functions (especially regarding string manipulation). And so on.
If there's one thing I want the OP to learn, it's that unless you're writing OS code, or something where speed is paramount (like, say, the code that handles SpaceX rocket internal sensors and/or control surfaces), there's multiple ways to solve any given problem, and that human-related concerns (readability, extensibility, etc.) need to be a part of the final calculus. Because, as much as code is written for computers, it's also written for humans, even if that human is just you months/years down the line.