Web development in 2023
There are more fertile forums for a discussion like this, but hey, I like it here. Plus I have a feeling there are a few developers in the TPF membership.
I've been getting back into coding, trying to update my professional skills after many years of mostly updating and fixing something that was launched in 2015 (Note: I'm not referring to TPF, which is running on someone else's software). Now I've begun to look round at the landscape again, I see things have changed.
There seems to be a split between two entirely different philosophies of application engineering. On one side we have the single page application (SPA) JavaScript frameworks like React (plus Nextjs) and Vue. These things really got going around 10 years ago, moving away from the traditional website model or MPA (multi-page application). With SPAs, different views are rendered (and actions completed) in the browser without loading a new page or refreshing, using JavaScript to invisibly communicate with the server. Often, all the necessary HTML, JavaScript, and stuff are downloaded once, when you log in.
A whole ecosystem has developed around these frameworks (and Node), that makes using them much easier than it was back when I was building stuff. Examples of SPAs are Gmail, Netflix, Facebook, and Airbnb.
But the MPA model is still going strong. Where a server-side back-end written in Python, Ruby, PHP, or Golang is important (and this will continue to be the case for many or most complex projects), it's a lot of extra effort and maintenance headache to add another massive layer of complexity, not least because the front-end SPA that consumes the back-end's data has to be written in JavaScript/TypeScript. This is why Python, Ruby, and PHP frameworks remain popular. Examples of MPAs are Amazon and other eCommerce sites, Medium, TPF, and most websites.
And now we have things like HTMXbased on the Hypermedia Driven Application architecture (which, unlike SPAs, respects HTML)and Hotwire/Turbo, so we can get MPAs (or at least, server-based applications) working fast and app-like from within a server-side framework without having to do lots of JavaScript.
Since things like HTMX now allow developers to build applications that feel like SPAs, I'm tempted to go down that route so I can stick primarily with Python, whose popularity is second only to JavaScript. However, JavaScript frameworks are very fashionable, and I've been trying them out. Great for small applications and sites, but a large system would be a whole other matter. That said, people have done it successfully.
Like @Michael, I've toyed with the idea of building forum software for TPF so I can bring the data and codebase under our control. I asked ChatGPT how long it would take and it gave me two answers: either 6 months to a year, or 18 months to 3 years. The latter estimate is more realistic for a full-featured (and extra-featured) forum platform. I can't dedicate that much time to it unfortunately.
(Talking of AI, I've yet to try GitHub Copilot ("Your AI pair programmer"). Looks like it could save a lot of time.)
Generally, everything is in flux. I get the impression some projects are getting into trouble because of their eager embrace of frameworks that are immature and changing in fundamental ways year after year. I've read stories from teams that built applications with React only to scrap them and start again with a server framework.
I want your thoughts. Primarily I want to know about the experiences of developers, but even if you have no idea what I've just been talking about, any thoughts about the state of web applications and websites today is welcome.
I've been getting back into coding, trying to update my professional skills after many years of mostly updating and fixing something that was launched in 2015 (Note: I'm not referring to TPF, which is running on someone else's software). Now I've begun to look round at the landscape again, I see things have changed.
There seems to be a split between two entirely different philosophies of application engineering. On one side we have the single page application (SPA) JavaScript frameworks like React (plus Nextjs) and Vue. These things really got going around 10 years ago, moving away from the traditional website model or MPA (multi-page application). With SPAs, different views are rendered (and actions completed) in the browser without loading a new page or refreshing, using JavaScript to invisibly communicate with the server. Often, all the necessary HTML, JavaScript, and stuff are downloaded once, when you log in.
A whole ecosystem has developed around these frameworks (and Node), that makes using them much easier than it was back when I was building stuff. Examples of SPAs are Gmail, Netflix, Facebook, and Airbnb.
But the MPA model is still going strong. Where a server-side back-end written in Python, Ruby, PHP, or Golang is important (and this will continue to be the case for many or most complex projects), it's a lot of extra effort and maintenance headache to add another massive layer of complexity, not least because the front-end SPA that consumes the back-end's data has to be written in JavaScript/TypeScript. This is why Python, Ruby, and PHP frameworks remain popular. Examples of MPAs are Amazon and other eCommerce sites, Medium, TPF, and most websites.
And now we have things like HTMXbased on the Hypermedia Driven Application architecture (which, unlike SPAs, respects HTML)and Hotwire/Turbo, so we can get MPAs (or at least, server-based applications) working fast and app-like from within a server-side framework without having to do lots of JavaScript.
Since things like HTMX now allow developers to build applications that feel like SPAs, I'm tempted to go down that route so I can stick primarily with Python, whose popularity is second only to JavaScript. However, JavaScript frameworks are very fashionable, and I've been trying them out. Great for small applications and sites, but a large system would be a whole other matter. That said, people have done it successfully.
Like @Michael, I've toyed with the idea of building forum software for TPF so I can bring the data and codebase under our control. I asked ChatGPT how long it would take and it gave me two answers: either 6 months to a year, or 18 months to 3 years. The latter estimate is more realistic for a full-featured (and extra-featured) forum platform. I can't dedicate that much time to it unfortunately.
(Talking of AI, I've yet to try GitHub Copilot ("Your AI pair programmer"). Looks like it could save a lot of time.)
Generally, everything is in flux. I get the impression some projects are getting into trouble because of their eager embrace of frameworks that are immature and changing in fundamental ways year after year. I've read stories from teams that built applications with React only to scrap them and start again with a server framework.
I want your thoughts. Primarily I want to know about the experiences of developers, but even if you have no idea what I've just been talking about, any thoughts about the state of web applications and websites today is welcome.
Comments (102)
It's like doing classic ASP again.
I think that before doing any of the demanding technical stuff (programming and whatever else is needed), one first needs to work out a philosophy of using technology to begin with.
See Cal Newport's Digital Minimalism for more on this.
What does Cal say, and why do you think it's important? Is it something like, stop scrolling through Instagram and go for a walk instead?
I used to write Ruby on Rails and Flash, among other things. This year I decided to try to brush up, so I did some things in Python and Django, with minor Javascript on the side. Then I thought it might be fun to chip away at a philosophy forum, so I grabbed Misago, which is written in Python (although the developer is going to move away from Python and towards a more Javascript-centric approach in the future). It was fine, but also underdeveloped. I looked at some other open source forum software, and eventually settled on NodeBB, which is written in NodeJS. I tinkered with that for awhile, got a working forum running with some nice bells and whistles, but had to leave it in limbo due to time constraints. After that I joined TPF.
Instead of building a forum software from scratch, why not leverage and customize an open source option? Vanilla/Plush seems decent for your purposes, but you could self-host for much cheaper if you are able to provide the technical labor. NodeBB, Vanilla, Misago, Flarum, and Discourse are some of the open source options I looked at. Using NodeBB with the Lavender theme seemed like the best option for a philosophy forum, although Misago is also very clean.
Quoting Jamal
I also noticed that the asynchronous Javascript approaches have made strong advances, where it used to be more common to have scripting languages like Ruby or Python serve the backend. Supposedly speed is king, and Ruby and Python aren't fast enough (even though the initial page load of an SPA can be quite slow).
I'm really not caught up on all of the details, but it seems like the older approach catered to a low barrier to entry, with languages like Ruby and Python being easy to learn. Now I see more emphasis on speed, scalability, and monetization. With Rails you could get a website up and running very fast, but one-off websites seem to now lean towards website builders, a CMS, or a corporate hosted solution. Robust backends are probably going to become less common, although a lot of that probably depends on what happens with phone and tablet software.
Quoting Jamal
Yes, and I think this is why static HTML/Javascript is making a small comeback. There is a greater cognizance of maintenance and updating costs. In general it seems that the magnanimity of the tech boom is behind us. Cost and monetization loom larger than they once did when we were dazzled by the novelty and the low-cost-relative-to-the-past.
Yes, its the best option. I was only toying with the idea of building my own from scratch because I was getting back into development and wanted a meaty project. NodeBB and Discourse are the two I like the look of most. Vanilla is good too, but I dont want to get involved with anything PHP (I know everyone says its great these days but my experience was traumatic). Id never heard of Misago. Looks great, and codewise I like it better than NodeBB and Discourse, mainly because I like the combination of Python and JavaScript. I shall try it. Thanks for the tip :up:
On the state of things now and the future, I think you're both right and wrong. It's true that the front-end frameworks are the most visible and fashionable area of web development noweven non-developers I know have heard of Reactbut (a) people are realizing that on big projects where there's a lot of data involved, frameworks like Rails and Django perform better and are easier to maintain, (b) many are saying that things are moving back to the server frameworks now that the speedy front-end user experience of SPAs can be achieved, and with much less hassle, and (c) most front-end applications depend on an API built with something like Django anyway, so even when React is being used, something like Django is being used too. Some would say that this is for legacy reasons, but I actually think it's because Python is so strong right now, and getting stronger. Even if Django falls out of favour, other Python frameworks like FastAPI and Flask will take over. It's a lively area, though less visible than the front-end stuff.
(In fact, you could say that the existence of the big front-end frameworks is a consequence of legacy as much or more than the continuing presence of Django and Rails: browsers only understand JavaScript and there's no way out of that right now. In software terms, browsers are old technology, in which backwards-compatibility is a big issue.)
Quoting Leontiskos
It's because they're good-quality languages, and because they're powerful. And if Rails and Django seem easy at first, it's because they're well-designed frameworks and have been around a long time. React, Next.js, and Ember can be confusing because their way of working is intrinsically messy. It's painfully obvious that they're immaturealthough things are much better than when I started using them in 2013. Serious business logic behind the API endpoints is more often implemented in Rails and Django than it is with React and Node.
And the more that asynchronous JavaScript becomes an integral part of Rails and Django developmentbut without using big front-end frameworksthe more I expect to see them thrive. So I don't agree that robust back-ends are on the way out except where they were never really needed.
What we see is at the level of small-to-medium websites, the server-side frameworks have lost out, and that's probably as it should be. At this level, we have (a) static site generators or primarily static sites and immediate interactivity with asynchronous CRUD to a backend API, and (b) as you mentioned, website builders like Squarespace and Wix.
Quoting Leontiskos
Yes, I started using static site generators about ten years ago, and these days they're the norm for developers' own websites. The challenge was always how to integrate them with content management, but this can be done now, and paid blogging platforms may go in that direction. If we could only get non-devs to start writing everything in Markdown instead of WYSIWYG, life would be better.
Quoting Leontiskos
Indeed.
[sup]GitHub pull requests: https://madnight.github.io/githut/#/pull_requests/2023/2[/sup]
[sup]TIOBE Index: https://www.tiobe.com/tiobe-index/[/sup]
[sup]PYPL Index: https://pypl.github.io/PYPL.html[/sup]
[sup]Stack Overflow survey: https://survey.stackoverflow.co/2022/#programming-scripting-and-markup-languages[/sup]
[sup]Web frameworks: https://survey.stackoverflow.co/2022/#web-frameworks-and-technologies[/sup]
It's clear that JavaScript dominates in web development, as expected, but Python is so strong in general that it's obviously not going away (the rise of AI has given Python an extra boost too). And among the web frameworks Django is only just behind the front-enders and Microsoft.
That strikes me as an overestimate. I've built business CRMs used by a FTSE 100 company in a few months.
Although I guess if you were just doing it in your spare time then it will take much longer.
Cool. I used to be dead against non-semantic CSS like Tailwind, but the arguments in its favour are persuasive. I think it depends what you're building. If it's content-focused, semantic makes sense, but if it's highly interactive, things like Tailwind look good.
I've been building a few things with NextJS for practice. I guess that fits in the stack roughly where Inertia does for you (I'd never heard of Intertia). Although--devil's advocate--don't you think the architecture is questionable when you're using not only two but three frameworks? (I'm not counting Tailwind since most projects use a CSS framework anyway)
Quoting Michael
Yeh, I've been enjoying the JavaScript frameworks too, but I continue to question them.
Quoting Michael
Not everyone can be as awesome as you. :wink:
As someone who sucks at styling, Tailwind is a godsend. Perfect for component based frontends like React. I can see it being a pain in the ass if you just do raw HTML.
Also this is convincing.
Good article. As I say, I do find the arguments convincing now. But I dont think its essentially about which technologies youre using, but rather the nature of the thing youre building. Anyway, its not a huge deal for me, although I dont know if Ill ever get over my disgust at looking at all those long strings of atomic classes.
This is a pretty balanced article.
Then I said what about security:
(Come on Plush, give us Markdown support please. EDIT: Plush just confirmed to me that they will only ever support BBCode, not Markdown :angry: )
Quoting Jamal
That would definitely be a meaty project, but rewarding if it could be done. Misago is the Python frontrunner, which is why it was my first choice. Unfortunately it is provided by a single developer who works on it in his spare time, but he is talented and I am sure he would appreciate help (see <this post> regarding the current plans for Misago). NodeBB and Discourse have multiple full-time developers along with the attached commercial interests, and therefore possess more stability. I agree regarding Vanilla and PHP.
A crucial factor in my considerations was long form vs short form discussion formats, as a philosophy forum requires a more long form format. A lot of the newer, asynchronous forum frameworks cater to short form discussion and phones/tablets (Discourse does not even support pagination). They are becoming a blend of forums and instant messaging, running away from phpBB in a way that strikes me as both good and bad. If the architecture is suitable one could restyle them for long form purposes, but I am not great with CSS so I wanted something compatible with long form discussion right out of the box. Plush is good on this score, and Misago looks and feels a lot like Plush.
NodeBB's architecture can support long form discussion, and there is also a prebuilt theme that matches such a use case (Lavender). I also like NodeBB because it is modular (utilizing themes and plugins) and there are lots of different people working on it and contributing. It allows a lot of customization without having to reinvent the wheel. In essence, I settled on NodeBB because it is open source, it is well-developed (commercially backed), it has a strong community, and it is compatible with long form discussion. (I am also on a budget, and I could run a small forum on Misago or NodeBB for $10 a month.)
Quoting Jamal
Okay, interesting! That makes a lot of sense, and it is encouraging to me. I suppose I was extrapolating from the idea that frameworks like Next.js could create a uniform and apparently simple Javascript landscape (with the addition of Rust). I was assuming that the creation of a less complex and less layered web approach might take hold, and that even if architectural simplicity leads to certain difficulties (such as the fact that a language like Rust is unwieldy when compared with Python), these could be overcome by tools that abstract away some of the low-level idiosyncrasies for less advanced programmers, as AI is already beginning to do. But my thoughts here were largely conjectural, and I hope I am wrong. In any case, you are certainly right that a more robust backend will always be required for the most important and ambitious projects.
Quoting Jamal
Good points. You are correcting my premature thinking in helpful ways.
Thanks for your thoughts. I didn't know you were a developer. I don't think I could call myself a developer at this point, although I could get back into it fairly easily.
Its unfortunate that Misago isnt more active. As things stand, I suppose it would have to be NodeBB or Discourse. Ill install them both and try them out. I tried Discourse a while ago and quite liked it, but I didnt pursue it. The big headache in either case will be migrating the data. My familiarity is with relational databases so Id probably be more at home with Discourse, which uses PostgreSQL. What is certain is that neither has a big button that says Migrate from PlushForums.
Quoting Leontiskos
Im curious: what is it about, say, Discourse, that steers things away from long-form discussion? From what I could tell when I tried it, navigating a discussion was easier than on other platforms, and it made composing long posts much more pleasurable than here (same with NodeBB: full-screen distraction-free editing, for example). Maybe Im missing the obvious, but pagination isnt a requirement for long-form is it? Although it occurs to me that pagination is better for SEO.
Quoting Leontiskos
Im really just going by intuition and doing my usual contrarian thing. Sometimes it leads me in good directions. I havent really been a developer for years, since I was a bit stuck in maintenance with the last project I was involved with. But yeh, Im getting back into it nicely.
I think its great. Most code is indented anyway, even when what you actually need is curly braces. Python enforces it so its all you need, and readability is then assuredand improved, in my opinion. Its never been an issue. Ive hardly ever had problems with it when working with other peoples code, for example. Occasionally you get an IndentationError but its no big deal.
Quoting SophistiCat
Ive only used it for web development, associated modules, and scripting, but its a true general purpose language and designed as such. Its used to build many kinds of applications, for machine learning, data science, etc. Whether there are advantages beyond the obvious ease of use, flexibility, and readability, I dont know. I dont claim it could replace all the Java in the world. I like the way it looks and its a lot of fun to use.
Haha - yes, I agree with all of that.
I have three instances of NodeBB running locally, one on Postgres. NodeBB was originally built with MongoDB, but it runs on Postgres just fine. That's what I deployed it on. I think that compatibility was added sometime in v2.
Quoting Jamal
The simple answer is that I wanted pagination, even prescinding from its SEO favorability. Infinite scroll on a long-form philosophy forum didn't seem right to me. NodeBB offers both, and individual users can even change the setting on the client side. So I'm not a great person to ask about Discourse, as I never installed it. I have it on good authority that it is a bit harder to install and consumes more resources, but those aren't deal breakers. Both platforms are robust, with more to offer than Plush. Granted, I have come to appreciate the simplicity and distraction-less nature of Plush.
I did get the vague sense that NodeBB was more open to accommodating long-form forums, perhaps because they claim to be the successor to phpBB and therefore cannot totally abandon that format. But this is a rather whimsical intuition. I also wanted the "discussion" pages to have a single-column, no frills UI that was deeply content focused, and the NodeBB Lavender theme fit that bill. I actually style my TPF client that way.
I had a lot of picky details that I wanted, and NodeBB was able to fulfill almost all of them. For example, I can set the number of upvotes a user is allowed daily, and, separately, downvotes. I can set this according to the user's post count or status if I want. I can ditch the reputation system. I can place limitations on users' ability to post (e.g. can't post twice within 10 minutes). I can have a sub-forum only visible to paying users, where the merits of internal features can be debated. Maybe Discourse can do all of that too. I am sure that larger features, such as moderation queues for new users and forward-links to replies, are available on both platforms. I will say that the NodeBB community is remarkably active and responsive (but this may also be true of the Discourse community).
Quoting Jamal
That's fair. This could be a cool way to get back into it. I do advise against starting from scratch. I had that idea until I installed Misago and started digging into the Github history. There are many more features than I had anticipated, especially when it comes to security, moderation, IP tracking, etc.but I think ChatGPT has already given you a good sense of what is involved. Also, after I joined I realized more concretely that TPF has one thing no other philosophy forum has, and that no forum software can create: a healthy community of users. Without that, it's all just window dressing.
When I joined TPF I was thinking about these questions regarding forum software way too much, but now I'm wishing I had taken more notes. Granted, I was mostly comparing NodeBB, Misago, Plush, Xenforo, and phpBB. My knowledge of Discourse is scant.
Whatever you decide, I think a forum software would benefit from having a philosophical client. The things you guys have suggested and requested from Plush seem spot-on, and are much more thoughtful than the short-sighted requests I have seen from the business world.
Firstly, there is no "the best" framework or languages for programming: it depends entirely on what the project is that one is developing.
Personally, for web development, I am not a big fan of using (what was traditionally) client-side languages as server-side (such as javascript with Express.js and Node.js for servers) nor newer languages (like Python with python flask) as they are slower and tend to have been been pentested much less than other, more traditional, server-side languages (like Java, PHP, etc.). The tradeoff is that they are easier to program in and they are the fad.
My philosophical approach to web projects is minimalism (viz., keep it simple stupid), compartmentalization (viz., always, always, always separate code so that it is modularized: cleaner, more scalable, easier to read, and takes up less storage), documentation (viz., always document what the heck this thing does, and pick languages and frameworks that are well-supported: easier to get people to work on the project, easier to teach them, and easier on you to develop with it), and secure (viz., don't pick the newest language, framework, or library on the block, it takes time for ethical hackers to find vulnerabilities); so I love minimalistic MVC (model-view-controller) frameworks with amazing documentation that utilize very well-known and well-established server-side languages, such as Laravel.
PHP is my favorite server-side language, as it has a long track record, great documentation, its dynamically typed but gives the option of statically typing (with type naming), and is fast.
With regards to libraries and frameworks like React and Angular, it is important to know that it all runs client-side, which adds runtime on the user's browser. Although it is beneficial to run some stuff on the client-side, to save server-side runtime, it is important not to over-bloat the client side; which I worry happens with those kinds of libraries and frameworks for a lot of projects who picked them just because they are in style right now. I would rather keep it simple, and use pre-compiled TypeScript for client-side operations, and keep it absolutely minimal to save client-side runtime.
If you are trying to revamp this website, then please do not hesitate to contact me if you need any help; as I would not mind helping out with a site like this that I enjoy using. What are you guys currently using for the client-side, server-side, query, and style-sheet languages?
Would I be correct in saying that Plush only supports a sub-set of BBCode, i.e. not all the tags are implemented (e.g. tables)?
I agree. In my original post I was examining what I see as two competing paradigms of web development today, but it's no doubt true that solutions lie in between.
Quoting Bob Ross
Quoting Bob Ross
Quoting Bob Ross
Flask is older than Laravel, and Python is older than PHP. Python's most popular framework, Django, was released in 2003, before all the PHP frameworks that are still going (I think, pretty much). Django and Python have a very strong reputation for security; PHP does not (an unfortunate legacy of wilder times, no doubt, which the language has put behind it). Generally, your Python/Javascript vs. PHP/Java dualism doesn't reflect history or reality very well.
If you love PHP, cool, I have nothing against it (except bad experiences and personal taste). I'm not interested in cheerleading for anything or in anyone else's cheerleadingbut let's get the facts straight.
Quoting Bob Ross
I won't argue with any of that.
Quoting Bob Ross
Yes, and from a development perspective the front end frameworks can be so bloated, it takes discipline and coordination to keep things under control. But when the aim is a speedy responsive user experience, and given that browsers are powerful enough for the job, SPAs can be a good choice. But I see where you're coming from and as I said in the OP, I believe it's becoming possible now to achieve the superior user experience from within server frameworks like Laravel and Django, but without adding a whole Javascript framework to the mix.
So despite your odd view of Python, we kind of agree.
Quoting Bob Ross
Thanks Bob.
Quoting Bob Ross
As mentioned in the OP and the ensuing discussion, I'm not hosting TPF myself and I don't have any control of the code. It's hosted by PlushForums, built on Vanilla, which you'll be happy to know is written in PHP :grin:
I don't know. Last I checked, Plush documentation was virtually non-existent. You must be right though.
:up:
Will respond tomorrow.
Yes, but this is not so unusual. I have never used a BBCode editor that supports all possible BBCode tags.
Hello Jamal,
Fair enough.
From my experience, I have seen python being used as a server-side language only relatively recently (but perhaps I just havent been around the right groups of people who love Python). Originally, people (as far as I know) used Java, C#, and PHP. If someone was running a website, it was most likely PHP or Java (and not Python). If python was used for web servers before PHP/Java (like Django) in a stable fashion, then I am simply unaware of it and will have to read up on that.
I still think Python isnt the greatest language for a server-side language, but we can just agree to disagree on that.
I am not familiar with Django (unfortunately), but I see PHP progress as providing ample evidence of it being thoroughly abused and tested by the community. I doubt, although I havent looked yet, that Django doesnt or hasnt fallen prey to most (if not all) of what PHP has. If Django has been a stable web server framework since 2000s (with its fair share of CVEs and community testing), then I think it meets my criteria of having a good track record; although I wouldnt use it since it runs Python as its server-side language (:
I will have to checkout Django sometime though. Is it minimalistic or bloated?
Interesting!
Great, I didn't realize.
Quoting Leontiskos
Aside from wanting to control the data and code, I'd actually be perfectly satisfied with the way Plush works with just a few changes, like better tools for moderation, "zen mode" post composing, Markdown support, dark mode, and ignore lists. (I know that for dark mode I could just use Stylebot as you suggest, but this is about built-in functionality; as admin I need to see what most people see).
Quoting Leontiskos
I know what you mean. At first when you think of how to build a forum it seems easy, but there's a lot more to it.
Quoting Leontiskos
This is what makes a decision to move to another platform a big and difficult one. Incidentally, it always sounds odd to me when I see people saying that discussion forums are dead (because Reddit, social media, and Discord). I guess my experience is not normal.
Quoting Leontiskos
:up:
Although the Plush folks assure me that PlushForums will be maintained for the foreseeable future, they don't seem very interested in adding new features, perhaps because they've been putting most of their efforts into their new platform https://insta.forum/ (totally moving away from long-form, so not suitable for us).
Just to set the record straight...
There were three things you said or implied that I took objection to: (1) that Python is a new language or at least a new language for web development, (2) that Python and/or Python frameworks have not been properly tested and are unstable or insecure, and (3) that PHP belongs in the same language ballpark as Java.
What I did not claim is that Python was used in web development before PHP was; as far as I know the Django guys were the first to use it to build websites. But twenty years (since Django was released) is a decent length of time, and its record is very good. And yes, PHP has always been more popular as a way of building websites.
Regarding (3), you could just as easily classify things like this: Java and Python are general purpose languages that can do anything, and on the other side you have PHP and JavaScript, which are just scripting languages. (But I'm not making value judgements here, just illustrating different ways of looking at it)
Quoting Bob Ross
It's a difficult question to answer without knowing what you mean, but depending on which way you look at it, it's both. Flask, on the other hand, is certainly minimalist. But Django adheres strongly to conventions and paradigms, such as DRY, and the separation of concerns of MVC (although they use different nomenclature and slightly different structure, namely model-view-template), so it's a good coding experience. Things never got messy for me in Django, as they definitely did when I was building in JavaScript frameworks.
But since you don't like Python, there's little point in wasting your time on it. And PHP these days seems to be significantly faster than Python (that's what they say at least, though whether this results in faster websites and web applications is another matter). So I say, enjoy your PHP :cool:
I abhorred these things when they first came out. If your internet is not good or perhaps is throttled due to reaching an allotted usage level, nothing would ever load and worse never told you it didn't. They seemed to have improved it by forcing a manual redirect/better fail-safes in more robust frameworks but there was nothing like clicking a link or performing an action and the browser itself telling you "hey it failed" right when it did so you knew to refresh or try again later. Just my 2 cents.
Sure it was nice if say you had a website that served another function other than a forum and the user can dynamically load the latest forum posts if they wanted to without having to pull double queries from the site and the forum database for efficiency or a site like Twitter or stocks that benefit from instant updates or things that change from one second to the next.
edit: On an active forum makes sense, so any new posts/threads just pop up a few seconds after they're posted. But for a niche blog site, especially authored by just one or two people where the only new content is posted every other day or few days is really not needed imo. but people like knowing they have all the latest shiny bells and whistles, even if seldom used.
Yep, although as you say, frameworks are dealing with that now, but I think it still partly depends on the willingness of developers to provide for it, as with accessibility more generally.
Code splitting is easy so this isnt a problem.
Which websites for example offer this truly "one page" browsing in entirety?
Where you visit example.com and every action or section never changes the URL regardless of the intricacy or specificity of the action?
Most all I've seen redirect to certain URLs (say example.com/billing or example.com/billing/pay) but load (presumably blank) templates for each URL section that are then filled with the specific information via JS or "SPA" if I understand the term correctly. At the very least a /terms or /about page. I can't recall a single website that operates as you describe, unless I'm misunderstanding the concept.
https://mail.google.com/
SPAs still use changing URLs, which in this context are called routes, corresponding to route handlers in the JavaScript. The page itself is not loaded.
Actually, these SPAs have the ability to change the URL without actually loading a new page. One of the most common SPA Frameworks is REACT, and there's a package called React Router that allows the frontend code to both detect and change the current URL without actually loading a new web page.
Because if this, you've most likely visited websites which were SPAs but which you couldn't tell were.
According to one article I found, Gmail slack Trello Netflix and grammarly are all SPAs.
It should be noted that these websites don't actually operate with only one http route, but they do only need one route dedicated to serving the frontend resources. They still need many routes to serve data to the one single frontend.
Quoting Jamal
Quoting flannel jesus
I was just thinking about the sites and applications I use, and thought of some more: Rome2Rio, Google Maps, Airbnb (edit: just to be clear, I mean the browser applications/websites, not the phone apps).
Well sure, but what is an email web client but a collection of notes, albeit most sent by others and to and fro. If you do anything but opening a note or adding to it (responding to an e-mail) say, changing account settings it does a full redirect to a different URL.
See, right now, my internet is throttled (or something) and I can't even access the Help (?) or Settings (gear icon) button no matter how many times I click the damn thing. You can't even right click it and get the actual URL to open in a new tab because it's too busy loading 50 different things I DON'T EVEN NEED AT THE MOMENT OF ACCESS. LOL. Come on. See my perspective.
Oh look now it just opened. And I STILL CAN'T CLICK A LINK UNDER THE SUB MENU. Nor can I right click it!!
I'm grateful you don't experience what I do. But for the many who do. It's a nightmare. And it's still happening. lol
oh look now i'm offline. see. it's frustrating. and this is the largest company in the world. very annoying. like i were an anti-humanist trying to piss technology users/computer people off. i could not think of a better way. just saying.
Gmail settings will not load a new page. Google account settings will take you to an entirely different website. Otherwise, I'm not sure what you mean; there's a lot of functionality in Gmail. I suspect the kind of example you're looking for is a traditional website model, but rendered as an SPA. Something like https://nextjs.org/docs is a good example. Not sure how it works over bad internet though.
Maybe. Looks interesting...
I do, in terms of what has been used historically by-at-large, think that python is relatively new to the web development game; but I stand corrected insofar as I was unaware of Django being so old.
I wasnt saying that they havent been tested or are necessarily unstable, but like JS frameworks they havent been around nor used heavily enough for enough eyes to pentest it as rigorously as older ones; but I see that Django is pretty old so that may not be the case for that framework. For example, newer frameworks made out of newer server-side languages (like using JS for it in Node.js server) introduces new vulnerabilities that know one originally thought to test (e.g., prototype pollution). Its not that they werent tested, but rather that it takes time to sort these kinds of things out; so I just error on the side of a more well known and used language.
For web development, yes; as a language, all else being equal, no. PHP is a compiled and interpreted language that is dynamically typed; whereas Java is a compiled language that is statically typed. In my opinion, Java is bloated.
Thats fair. I was not aware of Django, so I stand corrected on that part; but I do think, by-at-large, PHP has been used a lot more, and thusly has had a lot more eyes on it, than Django for web development purposes (but I could be wrong).
I get what you mean, but I wouldnt classify them this way. Java and Python are very different languages (e.g., one is significantly slower than the other, one is tabular, one statically typed the other dynamically typed, etc.). I dont consider Java a general purpose language, but I guess any language, when you think about it, could be technically used for anything (if one really wanted to).
Likewise, PHP and javascript are traditionally meant for very different purposes: I personally like to keep it that way. The former is a server-side language, the latter a client-side language. JS, as far as I know, is purely dynamically typed and PHP is a hybrid. I am not sure what you mean by a scripting language, but PHP is by-at-large only used for websites and that is because that is honestly only where it prevails.
I view python as a really good recreational programming language, meaning that I love using it for personal scripts that I create where I am being lazy and dont care about optimizing runtimes or memory. However, I get people use it for more than that.
Cool. I will take a look.
I like to think I am open minded (;, I will take a look and give it a shot. It is not that I dont like Python, but, rather, I dont think it is a good server-side language for web development: it is great for recreational use. Python is basically normal English in terms its syntax and diction.
Oh, I will :wink:
Right but if you had a good internet connection in the first place the literal only advantage/difference between not changing a page to going back to the main email listing in a click of an X button is vanity and perhaps a non detectable fraction of second. It's vanity. No utility. Sure if your internet fails and it lets you click an "X" to return back to an email listing if you happened to have the setting page for a prolonged period of time for some reason without a connection (which I doubt it does) perhaps an email title and the few words included in the preview might be useful. But other than that I fail to see any utility or useful difference between the two (direct page loading vs. single page AJAX loading. Also remember you're describing AJAX deep down at the end of the day, SPA is one version of a larger picture. AJAX vs. HTML page loading, that's what I'm referring to.)
SPAs don't require Ajax.
Quoting Bob Ross
Maybe I wasn't clear. If you look at the context of that quote, you'll see I did not wholly endorse that classification but offered it as an equally legitimate alternative to yours, in that it is one that is often used. Obviously I'm aware that Java and Python are fundamentally different.
Quoting Bob Ross
But that's what Django is, so like I say, there isn't much point.
Otherwise :cool:
:up:
There comes a point sometimes when the magic just gets in the way. But all the tools we use have some level of hidden magic (unless, I don't know, you're doing assembly or machine code), so it's about finding the right level. In my world the framework that's famous for hidden magic is Rails, whose principle is "convention over configuration". On the other side, the Python folks say "explicit is better than implicit." The two are definitely in conflict.
I've moved into doing Laravel in PHP, and it has quite a lot more magic than vanilla Express, BUT I feel almost all of the magic is genuinely helpful, positive, and it's fairly easy to dig and find out exactly what most of the magic is actually doing - I don't think there's too many bits of it that have created a downside for me.
One magic thing that's a little annoying for me lately is actually how it handles user sign in sessions. I've got a bug related to sessions and it's so hard to find out what's going on there!
I feel your pain.
Plush seems like it's working pretty well. I really like the feature where I can click on the title bar and return to the post I just quoted. My concern is that Plush seems near the end of its lifecycle. If you look at the second half of my post <here>, you can see a number of the things Plush hasn't managed, despite requests. Most of that stuff has been standard for years now, along with ignore lists and strong moderation tools. If Plush won't budge on those things, then I have to wonder if they are in maintenance mode, nearing their expiration date. NodeBB and Discourse don't show evidence of this lifecycle issue.
Quoting Jamal
Yes, definitely.
Quoting Jamal
Yes, I understand.
Quoting Jamal
I think your experience is not normal because your moderation is not normal. I think that's why your forum is so much better than the alternatives: you have superior moderation and your moderators have a good grasp of philosophy.
Quoting Jamal
Wow, this completely confirms my doubts.
Quoting Jamal
My switch from Rails to Python/Django was somewhat painful, and that is another extraneous reason I avoided Discourse. I didn't want to work in Rails immediately after switching from Ruby/Rails to Python/Django.
P.S. One significant feature that NodeBB hasn't yet managed is composer keyboard shortcuts. For example, Ctrl-i won't give you italics.
Is this maybe the reason why some sites are quite slow in loading? I guess they must be the ones with a huge content. Do you know any of them --that use this method-- so I can check if this is true?
I Just read about SPAs and they say that they can also load resources dynamically, according to the interaction with the user. This makes much more sense, doesn't it? I do that in my programs in Python. I don't import everything at start but according to if and when a certain module or group of modules are needed. Why loading everyhting at start if some of them are not to be used, esp. the time-consuming ones? I consider that inefficient programming.
But because of the high speeds, large amounts of RAM and the huge storage spaces available, a lot of the once respected rules of effective and efficient programming are being violated since a few decades ago.
You might have understood that I am an old-timer ... Right. My passion for programming has started even before PCs were born! And I like to still respect those rules. I feel very lucky that I started so early. I had the opportunity to develop a strong ability in problem solving. Not only in programming, but in other areas too. Because what else is programming than problem solving? :smile:
Plush Content Ltd financial statement Feb 2023
They have 1 employee and £1,745.42 in the bank.
If you mean SPAs in general: Gmail, Airbnb, Rome2Rio, Netflix.
If you mean the ones that load everything up-front, rather than those that use code splitting, Im not sure. It can be hard to tell. I think it was the normal way around 5-10 years ago.
Yes, I meant that. Of course it might difficult to tell. But each now and then I see huge "home" pages --where the word "home" has lost its meaning-- or some huge single-page sections of the site. And I'm wondering why? Why should one have to scroll for hours in order to find an information? Even if you try to use "Search in page", it doesn't help because the single page grows dynamically as you scroll down. (But at least this is done dynamically.) Quora has a lot of such sections and one has to bear that awful system. The more logical and also "human" way is to split pages abd have an\ numbered index of links for jumping to a certain page no. Exactly how it is done in TPF (topics, comments, mentions, etc.).
As of today Ive got Discourse running now on a host that does managed Discourse hosting. Some people on meta.discourse.org say theyre very reliable. I think this is the way to go. I dont want to deal with hosting. These folks take care of backups, software updates, and all the rest, while I have the power and control of the Discourse admin (e.g.,
) and members get most of the features they've been asking for for years.
I actually set one up there a few years ago and didnt pursue it just because I wasnt in the mood or I didnt want to face the data issue. This time I hope to see it through, some time in the next weeks or months. In the meanwhile Ill invite testers once Ive fine-tuned it (this week probably but I dont know when Ill get around to it).
Quoting Leontiskos
Yep, and Discourse would take care of most of the feature requests, Im guessing?
Quoting Leontiskos
Glad you think so :smile:
Quoting Leontiskos
It's kind of a small thing, but I use that all the time, including here. Of course, when using Markdown you don't need it so much because it's so easy to just type the markup.
Think of a website as a book. In traditional MPAs (multi-page apps), you ask the website to give you a page. You read it and then ask for another page. In SPAs (single-page apps), you ask the website to give you a book. There are still pages but you don't have to ask for the website to give you them each individually.
So in a way the "P" in "SPA" and "MPA" is a bit of a misnomer.
Although even this analogy is a little off as with code-splitting you do get given each page individually, but it only gives you the new stuff, e.g. the particular block of the website that is about to change. You don't have to be sent all the surrounding stuff as well. This makes it faster.
What I undestood is what https://www.techtarget.com/whatis/definition/single-page-application-SPA says, which is not what you are saying.
Anyway, thanks.
Sweet. :up:
So on NodeBB a lot of the customization comes through themes and plugins, which can be substituted, created, shared, etc. But the access to this customization is somewhat host-dependent (and this is especially true when it comes to hosts that do not allow command line SSH server access). If a similar thing holds with Discourse, then I would suggest double-checking that the hosting company allows that deeper level of customization (and ideally command line access). You could easily leverage the deeper level of customization if you have need in the future, given the many developers among your users.
Quoting Jamal
Yes, I certainly think so.
Quoting Jamal
Oh, I use it all the time as well. Small things like that can make a difference when two competitors are so close.
Quoting Jamal
This sounds great. I am of course willing to help as I am able, although I should say that this is precisely the time of the year that gets busy for me.
I actually don't think we'll need SSH access, and I don't want to need it. I'd prefer to separate off my coding and sysadmin type work away from TPF as much as possible (even though I was briefly toying with the idea of building my own). The host says they'll install any plugin we want, including any we write specifically for TPF. And there's an active community of Discourse coders making new plugins.
Quoting Leontiskos
Thanks, your guidance will be valuable since you have all this forum configuration experience, but I won't burden you too much. :smile:
Cool. I think that's all you need.
Quoting Jamal
Sounds good. :up:
I was thinking of hitches that could be preempted, and one thing did come to mind. It seems that your users aren't fond of the reputation system. For example, they enjoy the ability to 'like' posts, but they won't accept it at the cost of replacing the user's visible post count with their reputation. I agree, and I had already found a plugin to sideline reputation in NodeBB even before I joined TPF.
From what I know of Discourse, they tout their "trust system" (reputation) and their "gamification." Jeff Atwood was a CEO and founder of Discourse, and he was also one of the founders of Stack Exchange. He is big on gamification. My guess is that the reputation system is a cornerstone of Discourse, and is no more avoidable than infinite scroll. It may be worth checking into this and seeing to what extent it can be circumvented. It is one thing that would bear on your users' desires.
Good point. I just had a look. Likes are quite heavily integrated but it is just about possible to remove them, it seems. I mean, its easy to hide them with CSS or remove the icon from the post menu, but then it takes some faffing around to remove the various references to likes elsewhere.
Anyway, I think you have to go to the users profile to see how many theyve accrued, so its not like the number appears under their name in discussions. There are badges, which are connected with likes (at least by default), that do show in the user popup in threads, but they can be turned off.
Ill have to read the discussions that were had here about it to remind myself of how it works on Plush and what people didnt like about it.
Okay, that sounds pretty similar to NodeBB. I can neutralize the logic of reputation so that it does not trigger any events or rewards, and I can remove the visible number that would appear under their name in discussions (last I checked), but it remains visible in the user's profile.
Quoting Jamal
Sure. Just from my fallible memory, there was a minority of users who "voted" against both likes and visible reputation, a smaller minority of users who "voted" for both likes and visible reputation, and a plurality of users who "voted" for likes but against visible reputation. Plush supports both minority positions but not the plurality position. That is, on Plush if you turn on likes, then a user's reputation is automatically displayed on every post (instead of their post count).
If it's an obituary for a cat or memoirs of the owner of said cat, sure. At that point it might as well be a single page website with a floating sidebar of whatever section you wish to scroll to or at least a fixed menu of the sort. I suppose it does save browser memory- the content not being rendered by the browser and stored in the JavaScript as text, especially images or videos not rendered and when changed they are thus freeing up the memory from any images or video previous rendered when you change to the new "page".
But for anything useful like a public forum or guestbook, or say billing or payment application where an action could have been made from another avenue ie. by phone and needs to be updated, it really ought to communicate with the server, wouldn't you say? Am I wrong? if so, how and why. with examples.
I get the concept (I think?). For a small or medium sized business. You load every single item (thousands), image link, and description (often lengthy) when someone visits your homepage? That doesn't seem efficient to me. I suppose it simply loads the blank "default item" page and clicking the item individually loads its information? That would still require every single item in inventory's ID, picture, title, and usually price to be loaded from the first homepage visit. That seems a bit much.
Sure for many places, a restaurant or small business it seems fine that just links to an image of a menu or something. Not sure what greater benefit an SPA would offer as opposed to HTML-based page browsing from the user's end? (assuming they have a good connection)
Not if you use code-splitting. On the initial page load it just pulls down something like "index.js" and then runs the code in that. When you click the "/about" link it pulls down "about.js" and then runs the code in that. If you go back to the home page it re-uses the "index.js" that has already been downloaded. And the same if you return to "/about". This can make for a faster user experience and reduce the load on the server.
Quoting Outlander
Yes. Many SPAs will use Ajax. I was just pointing out the technical point that SPAs and Ajax are independent technologies.
As for "AJAX vs. HTML page loading" as you say, again it's a matter of allowing for a faster user experience and reducing server load. With an SPA when navigating to the second page of a discussion it only needs to return a JSON object of the second page's post data and then rebuild the section of the page that displays the post, whereas with an MPA it has to return all the HTML for the entire page as well as run any additional processes/queries to generate any of the surrounding data (e.g. using TPF as an example, the list of categories and the logged-in user's mention, comment, and discussion count).
No I get it. The constants of the site are loaded (header/footer ie. core HTML structure, images, universal JS/CSS, etc) and any content can be a simple albeit long string along with functions needed only for the specific page vs. requesting the aforementioned over again. Although I was under the impression all browsers "cache" the aforementioned and minus the 1-1 handshake that the server is still reachable, which would have to be done anyway to request "about.js" or whatever new content medium in the first place, doesn't seem to differentiate the two methodologies by very much? Perhaps I misunderstand. Fair enough. However..
[hide="Reveal"][/hide]
:up:
Cal Newport is Professor of Computer Science at Georgetown University.
And he wrote a book about it. (Which I actually bought last week, and I rarely buy books. This one's a keeper.)
Very good, though on the face of it it just seems like common sense. I suppose a systematic approach would be good though, so Ill give it a tentative :up:
Id be interested to see the details. Interested to a degree somewhere between mildly and rather.
Or else, I selected three reviews/summaries:
https://blog.rescuetime.com/digital-minimalism/
https://www.techtarget.com/whatis/feature/Digital-minimalism-explained-Everything-you-need-to-know
https://www.samuelthomasdavies.com/book-summaries/business/digital-minimalism/
When you're attempting to contribute to a discussion it's better to go into more detail than "just read this book". If you're actually interested in this discussion, maybe you'll tell us about it when you've finished.
Thanks for alerting us all to its existence though.
Besides, I seem to be the only one here in this thread following this theme. You did say any thoughts on the state of web applications and websites are welcome. Perhaps a separate thread is in order.
Yes, it's cool, I just wanted a bit more detail, that's all. No worries :up:
Quoting baker
Could be interesting.
I was bored so spent the last day and a half building an experimental JSON-powered JavaScript framework. The idea came to me whilst getting my hair cut.
https://github.com/on-js/on-js
Very cool. That use of attributes reminds me of HTMX.
Yeah I like the approach a lot.
I see you're using Typescript. I've stayed away from it so far, but I'm appreciating the static typing in the server-side languages like Crystal, so I really see the benefit. Plus it's doubtful I'll be able to stay away from JavaScript frameworks as much as I want to, so I guess I'd better start using it.
By the way, amongst the front-end frameworks, I've found Svelte to be the most enjoyable to work with.
My first time trying it. It takes some getting used to. I'm finding it more complicated that PHP's static typing.
Quoting Jamal
I've been using Preact at work. I like how small and fast it is. Briefly tried Vue and had a glance at Svelte, but my colleague is suggesting htmx for future projects so that's what I've been doing recently and what inspired me to make this.
There's just so much to learn. :shade:
I'm also in the process of building a PHP framework, inspired by Laravel but much smaller and faster. I just keep getting distracted by other things. :lol:
It's a work in progress so not yet open source but parts of it are public anyway so check it out if you're interested: https://github.com/wtframework
I'm particularly proud of the SQL statement builder (https://github.com/wtframework/sql). My intention is to allow for the full spec. Just need to finish off some CREATE and ALTER stuff (mostly to do with partitions).
Hey, everyone is building a framework these days. :grin:
Quoting Michael
I'm on board. I'd attempt to go down that route exclusively if I could choose all my tech myself (and use a compiled language on the server).
Funny to see how the frameworks come and go. Below is a chart plotting interest in frameworks over time.
I just saw this bit. Great stuff, but the SQL stuff is a bit yikes to me.
Cool name.
You might also say "what the fuck?" ;)
Hence the name.
Exactly what I was worrying about, how greatly PHP has changed, or "advanced" allegedly.
I'm a solid "OOP'er" as that is, in my eyes, the peak "pinnacle" point of PHP advancement. The last and only paradigm shift as far as I judge.
Anything beyond that has always been a hard pass for me. Simply for reasons of not being needed.
The furthest I go into modern PHP (post 2007) is the use of the double scope (::) operator and even that is for convenience/compatibility purposes.
As example, this is the only use case of the newly introduced scope operator in my framework:
And that's of course out of necessity. I view myself as fairly adept in PHP, at least in the period of time I was most active in it. Hopefully things haven't changed too much...
How about
[code=php]
class Person
{
public function __construct(
public readonly string $name,
public readonly int $age
) {}
}
[/code]
I had to Google the "readonly" stipulation. What realistic (or even atypical) case scenarios can you provide that warrants its explicit use?
Never did "cast" variables ie. string, int, boolean, etc. Didn't see the need to do so if everything it interacts with can handle errors/unexpected inputs, be they common or rare, properly.
Edit: with the exception of certain required internal functions, however in this manner:
I'd much rather a default function-level based "error handling" (ie. not integer detected therefore, perform this) than a top level PHP error that breaks whatever the user is doing (and often the site or at least the specific action page in the process).
You might want to get the name after creating the object.
New way:
Old way:
They're optional. But it's to enforce good coding. If you're expecting an integer then you should write your code such that you only ever give it an integer. If at some point a string is being passed then you've coded it wrong. Strict typing ensures that these mistakes are picked up in development.
I've only recently started back with statically typed languages after a couple of decades of freedom, and it's been good. It does encourage good coding and it does allow you to fix stuff more easily.
No different than
Is it? Not on my end at least.
That allows for public reassignment.
Often times you don't want that which is why such properties are usually protected or private.
Perhaps a better example would be:
Doesn't one generally not "publicly" reassign variables from a helper/framework class?
Say I'm incorporating your framework into whatever PHP project I'm working on. I'd have $myclass and $yourclass, respectively. What reasons would someone who is clearly not "public", as in a full on admin level code editor, edit a property of another class? It can't be for some "security exploit" since they have the full code and could just edit it from the parent class.
If they choose to break the code, even unintentionally, perhaps they shouldn't even be coding in the first place.
What I mean is for example, I use Twilio, a well-known telecommunications framework.
So I could have a thousand different variables going on that range from different classes and functions ($appOne, $appTwo, $functionOne, etc) and there will still be only one "helper" or "external" class. Say in this case $twilio.
So there's no reason to randomly change an independent variable that corresponds to a new class or object just to do so.
Say there is an important object I want to re-use I could just use one line of code to "store" it, statically or dynamically with a "&="
There would be no reason for me to manually code/reassign at the top level (meaning I literally can access anything) the following
That would be asinine and utterly intentional. If I can access the parent code I can easily change anything about it anyhow.
Am I making sense? I swear I know what I'm talking about, I'm not trying to be difficult or whatever.
That's the entire purpose of things like public, protected, private, readonly, final, typing, interfaces, abstract, etc; to ensure that developers do things properly.
Quoting Outlander
In reality things aren't this simple. People are fallible, we forget things and get tired. And especially with open source software, not every contributor is going to immediately know everything about every function and class and whatever. Being able to see at a glance 'protected "name"' immediately tells them that they're not supposed to do '$class->name = 'foo'''.
Think of it as inline documentation with automatic error checking.
Yeah, sure. Again just trying to better understand not to argue purely for the sake of doing so, but- actually no I get it, especially the latter comment. I'm not an "open source" guy so I'm sure you understand my "that's a solution in search of a problem" mindset. Myself, and many others have gone through painstaking measures in attempt to facilitate HTML based interfaces can perform any reasonable, common-use coding in and of itself, perhaps replacing the need to code altogether.
Quoting Michael
I get that completely. But just to ponder. As a hypothetical. Couldn't all that be resolved by using a simple prefix to the variable? Example (and I do this in mine, sometimes, as do others) ... let's use your WTFramework.
Any common variable a person would use $name, $id, $session, $user, etc.... whatever it is...
Instead use a prefix so it would be
$_name or $wtf_name
literally
So no person would ever overwrite a variable in virtually 100% of use cases whatsoever.
I do get the point you want people in an open source framework to access and adjust variables and in a modern PHP dev environment the inline warnings are very useful.
Anyway, nice meeting a fellow coder on here.
Seriously I think TPF or even the two of us should have an old fashioned "code off".
Say a simple guestbook. A page of static content anonymous users can post comments on, sans db, stored as text files. I think that would be interesting. If you have the time.
That used to be how things were done, but then PHP introduced "protected" and "private" visibility precisely so that we didn't have to do this.
But, and correct me if I'm wrong, doesn't that simply put/shift the onus onto the lower developer to use quirky/prefixed variables now?
Example, in running your code, I just got a fatal runtime error "unable to access protected property Person::$name ".
So it's not like it actually frees up the use of the literal verbose name of the variable itself. It just makes it so "Ok now I have to use use '$name2' or '$variable2' instead of what comes firsthand in mind." as far as secondhand development/utilization of a framework goes.
No, it means you're not allowed to change the name.
So you would agree it is more of a safety net for inexperienced coders versus an actual, functional progression in and of PHP itself. If I want to intentionally change the name, variable, or anything for that matter, of an open source framework I dang will do so from the source code seeing as it's free and open for me to do so if desired.