[conspire] Update for BALE
Rick Moen
rick at linuxmafia.com
Wed Jan 8 12:00:10 PST 2020
Quoting Texx (texxgadget at gmail.com):
> I didnt actually know how it worked.
> I presumed (I now know falsely) that it digested a text file and inserted
> dates it generated on the fly.
That could be done. In retrospect, I deeply question the need for a
database store for this application, in the first place. Seems to me,
such templating can (as you say) be done just as well with flat text
files as back-end storage.
Where you need a database is where there will be possible contention /
concurrency issues (doesn't apply) or where you need to keep an ongoing
record (not needed). The MySQL 'Events' table holds hundreds and
hundreds of rows of BALE events going back years, plus events for the
next three months in the future (generated each month by that
NewMonth.py script). Which is nice, I guess, but not anything I
actually need.
At the time this LAMP application (autobale) replaced my previous
static, manually edited plain-HTML page, the new page was actually
completely dynamic -- i.e., each page load caused the PHP interpreter to
make a thundering herd of MySQL queries to find all entries in the
Events table for this month and the next month, plus more queries to
get from MySQL the descriptions of all the groups. The PHP program then
gussied up that row data for HTML presentation and delivered the
finished page to the user. And does this Every. Single. Time. the
page loads.
A long time later, I got around to questioning that design: Wait, the
page get assembled from scratch with each and every page load? But,
that's crazy, because it's the same page all month long, and changes
only when the month changes. That was when I converted the Python and
PHP from dynamic per-load operation to a cron job that ran exactly once
on the first of each month.
In turn, that was part of what enabled me to eliminate the need for
mod_php running in my Web server, which I no longer consider an
acceptable security risk.
But if I were writing a reimplementation from scratch, I'd also lose the
database, as a totally unnecessary complication.
> I dont know enough to teach Python, WHY do you THINK Im ASKING for someone
> to teach it?
Deirdre handed you a great gift, in her recent posting about which
online resources, in particular her tips about Udemy's Python developer
course, and about freeCodingCamp.org’s 4-1/2 hour Python class on
YouTube.
The question is: Are you smart enough to accept that gift?
http://linuxmafia.com/pipermail/conspire/2020-January/010020.html
> Regarding organizing it, I dont know anyone to teach it, (see above!)
Maybe you aren't.
> It seems the Lugs have outlived their original charter.
It seems you might not be listening.
More information about the conspire
mailing list