[NFBCS] Which language should I use? Opinions please!

Paul York paul at yorkfamily.com
Fri Jan 21 04:01:24 UTC 2022


Depends on your main goal. If you mainly want to get it up and running and
update the game with your new ideas, then PHP7 is going to be the easiest
by a mile. Modern web development is significantly different from what you
might be accustomed to with PHP or ASP or similar.

If your goal includes learning something shiny and new, then PHP definitely
is not that. A game like LOTGD doesn't NEED a modern framework, but it
could definitely benefit from one.

The challenge is that there are COUNTLESS options when you start mixing and
matching frameworks. You can find yourself completely overwhelmed trying to
make choices and live in fear of committing to the wrong thing.

A relatively pain-free option is just to pick a company like Microsoft who
has made "opinionated" decisions for you. ASP.Net Core + TypeScript + a
client framework (see below) is an easy choice, things change more slowly,
and you can go one place to find help. Their documentation and free
online training is in a different league from literally every other
choice...probably combined.

That said, it's not as "sexy" as some of the other choices. If you go
the non-MS route, then as with Aaron, I'd recommend Node.js + TypeScript as
your server-side framework. In a modern app, the server is mostly only
responsible for things like authentication and managing data on the server.
It's mainly a "web service" host. You'll likely also choose to use
Express.js or Next.js as a framework on top of Node.

The user interface is no longer generated dynamically on the server as you
did with PHP. Or at least not exclusively. Modern apps often use a static
HTML page and update the data dynamically using JavaScript (a process once
broadly referred to as AJAX). For example, a page may "fetch" data from a
server running Node.js. The server returns the data as JSON and the page
updates the screen without reloading the page.

You can use "vanilla" JavaScript to do this if you want to avoid some of
the complexities of a framework.

But a framework does add some nice things like compartmentalizing code into
containers, "binding" HTML element values to JSON values, page and
component "routing", and a lot of other stuff you may or may not use.
Regardless, I also agree with Aaron that React and Vue are the two most
popular frameworks. I've grown fond of Svelte lately, as it is (to me) much
more intuitive. Also replaces Express/Next with "SveletKit", making a nice,
integrated solution. Personally I'd say Svelte > Vue > React in terms of
ease of "comprehension," but you can reverse that order in terms of
adoption and number of folks using it.

Regarding sockets, I'd lean towards just using the JavaScript fetch API and
creating a RESTful web service on the server. Sockets are another layer of
complexity. There are places where you need them, but I'd try my best to
design around them.

And you can't forget the database on the back end. Firebase is honestly the
easiest thing going if you don't need SQL. And it's cheap. And includes
hosting. But if you need more or want to host it all yourself, then MongoDB
or MySQL/MariaDB are the obvious choices.

If it helps at all, I'm teaching my Internet Programming course this
semester using Node+Svelte+Firebase. I'm teaching my Database course using
MariaDB. Past semesters, I've taught Internet Programming using ASP.Net
Core+SQLite (or MySQL or SQL Server...I've taught that course far too many
times) and was very happy with that, too. Most of my major "live" web
projects are written in ASP.Net Core with "vanilla JavaScript" (i.e., no
client framework) and I don't regret that choice.

What I do regret is how much time I spend agonizing over these choices each
and every time I teach this course or start a new project. Sorry that the
answer is so much harder than the question. ;)

Best,
Paul

On Thu, Jan 20, 2022 at 6:29 PM Rayn Darren via NFBCS <nfbcs at nfbnet.org>
wrote:

> Good afternoon all,
>
>
>
> Several years ago I ran a text based role playing game written in PHP5. I
> want very much to restart that game and rewrite it from the ground up. My
> question is, which language should I use? PHP7 with  SQL for databases and
> with HTML/CSS for styling of course? Python? Java? jQuery? Something else
> entirely?
>
>
>
> Please note this IS NOT  a MUD, not in the traditional sense anyhow. For
> those familiar it was originally written on forked PHP5; the Legend of the
> Green Dragon codebase.
>
>
>
> I have a whole folder of written out ideas, storylines, quests, crafting,
> races, focuses etc. none of it is coded though. several of these projects
> have been started and are in various levels of completion, but I don't want
> to have to depend on someone else to update code/fix bugs and would love to
> completely customize things for myself.
>
>
>
> Thanks for any suggestions in advance!
>
>
>
> Thank you,
>
> Sarah Hale
>
> Work: 714.852.3238
>
> Email:  <mailto:sarah.hale at siteweaver.org> sarah.hale at siteweaver.org
>
>
>
>
>
> _______________________________________________
> NFBCS mailing list
> NFBCS at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
> To unsubscribe, change your list options or get your account info for
> NFBCS:
> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/paul%40yorkfamily.com
>


More information about the NFBCS mailing list