Re: Domain Registering and Hosting/Website Funny Business

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Keith Smith via PLUG-discuss
Date:  
To: Main PLUG discussion list
CC: techlists
Subject: Re: Domain Registering and Hosting/Website Funny Business
Hi Steve,


On 2022-07-29 23:38, Steve Litt via PLUG-discuss wrote:
> Hi Keith,
>
> Your PHPprogrammer.Org site is a work of art. The aesthetics of the
> top picture is
> perfect. Your text has the right sans-serif font and the right line
> height --- it's
> not crammed together. I have terrible vision but I find your site
> emminantly
> readable. On future construction, I'm going to *make sure* to use line
> height and
> paragraph separation just like yours.


Your very kind. I struggle with design. I do not recall most of the
HTML and CSS, or even the PHP/MySql. It was an experiment mainly to see
if an exact match domain will help a website rank. On it's face I would
say yes... but an exact match domain is not needed.

>
> You mentioned somewhere that your menu isn't responsive. I like your
> menu because it
> collapses the rightmost 5 menu items into a triple horizontal line,
> which everybody
> now knows to click on for either a menu or options. I don't know how
> you did that --
> - it's a pretty good trick. I saw your @media screen and (max-width:
> 400px) {.navbar
> a {float: none; width:100%;}} in styles.css, but I don't understand how
> that hid
> your 5 rightmost links, and I *certainly* don't understand how that
> made the triple
> horzontal line icon show up. Like I said, quite a trick.


There are people a lot better at this stuff than me.

I learned how here :
https://www.w3schools.com/howto/howto_js_topnav_responsive.asp


>
> If I were to make a website like yours, I'd use plain HTML with CSS.
> What I'd use
> PHP for is an actual application where the user has add/change/delete
> tasks.
> Shopping cart, social media, web based replacement for normal computer
> programs,
> etc. 
>
> I've stayed away from PHP all these years because I heard it had some
> horrible
> security problems, including something about global variables. Have
> those been fixed
> yet?


I keep hearing about these things. In 2007 I took over a custom
shopping cart that had registered globals turned on. It was a massive
app. It took me about 80 or so hours to convert it to PHP5 from PHP4
and all the code to manage variables to include form input. I was very
concerned I was going to fail. Much to my surprise I was able to fix
the registered globals issue and upgrade to PHP5 with only one or two
bugs.

So yes registered globals was a security issue. I think registered
globals was removed in PHP7.

I don't know who defines what a good programming language is, however
some developers really hate on PHP. I fell in love with PHP around PHP3.

PHP5 had a decade long lifecycle. Version 6 died on the vine and never
became a release. 7 has been good because it has better performance.

I have not spent the time to understand why some hate on PHP. It runs
on upwards of 80% of the internet. I use Plesk on my VPS and Plesk was
created using PHP/MySQL.

WordPress, Drupal, Magento, Joomla were all created using PHP/MySQL.

>
> You mentioned MVC. Everybody has a different definition for MVC, and
> the "MVC" I've
> seen on Ruby on Rails apps has been, in my opinion, awful. I've heard
> the purpose of
> MVC is to separate appearance, data, and business logic. To my way of
> thinking, CSS
> is perfect for defining appearance, Postgres or MySQL or MariaDB or
> even SQlite,
> exclusively handles the data. I might suggest a fourth thing beyond
> appearance,
> business logic and data: Utilities enabling the user to interact with
> data: Heading-
> click sortable picklists, menus, and maybe even a screen generator.


For me I like MVC because it is very straight forward. The url is like
this somewebsite.tld/controller/method/arguments....

The Model is the SQL code, the Controller is the brains, and the view is
were the data is combined with the layout and sent to the browser.

Easy to program. Capture the URL, break it into pieces, instantiate the
controller class, call the method, and send any argument to the method.
Overly simplified, however that is the gist.


>
> 22 years ago, before I heard the rumors of PHP security problems,


As today, in 2000 security problems were caused by the programmer not
doing things to protect and sanitize incoming data. I like using
mod_rewrite to capture the URL in the root index.php file. Build the
program so there is no direct access to any of the underlying scripts.
Sanitize the data, do a check to verify the controller class exists and
the method exists, and call a boot strap script that pulls it all
together as in a router and the request is run and the output sent to
the bowser.

There will always be security issues. A little prevention goes a long
way.



I made a PHP
> tutorial that culminated in a trivial add/change/delete application (I
> think CRUD)
> is the current buzzword). It's at
> http://troubleshooters.com/tpromag/200004/200004.htm#_part2 . If you
> ever want to
> work on a FOSS YAML or even JSON defined screen generator, I'll help
> you. It should
> be *much* easier on PHP+HTML than it was in the old days of 80x25 CLI
> screens.
>


Thanks appreciate the offer. If you were able to do CRUD back in the
day you are on your way. That is where I started.

> I wish I'd seen PHPprogrammer.org in May 1996, a month before I started
> Troubleshooters.Com. I'd have for sure made Troubleshooters.Com look
> more like
> PHPprogrammer.org. However, Troubleshooters.Com now has hundreds of
> pages, and the
> ones more than a decade old don't even use CSS.


In 1996 I surfed the web for the fist time. Did not understand the
opportunity. With I could go back.

I think 1996 PHP was not yet PHP I think it was FI. Just a collection of
code that helped a guy publish his website. I think he called it
Personal Homepage.

Was not long though before a community was formed.

PHP did not become dominate until around 2004.

>
> Because Troubleshooters.Com has hundreds of web pages, I've always had
> trouble
> making its home page. If you want a laugh, view the
> Troubleshooters.Com home page on
> October 12, 2002:
>
> https://web.archive.org/web/20021012120831/http://troubleshooters.com/troubleshooters.htm


As I recall even as late as 1998 I saw websites like yours and they were
the norm. Remember the term Web2.0? Hope I have it correct. That was
a long time ago.

In 2006 I built a business website for myself using PHP/MySQL. I store
that content, menus, etc in a series of DB tables and my template was a
collection of includes. Head was one, menu another, footer, and content
area. It was before I learned about mod_rewrite so the url contained a
record number for the article. Something like MyDomain.tld/article=1

>
> If redirections delay you (I used redirections back then to shoehorn
> three domain
> names into one $75/month hosting account), the redirections should
> clear in about 15
> seconds.
>


You must be an old guy like me. And the the world is our oyster.

I'm old and a little slower than I used to be... however I am not out.

I think PHP has at least 10 more years before something else comes
along.


> SteveT
>
>
>
> On Thu, 2022-07-28 at 19:48 -0700, wrote:
>> Hi Steve,
>>
>> This is a very interesting read.  Very old school and that is ok
>> because
>> I am old and I like old school. I like most things old school.  I will
>> need some time to digest what you have shared.
>>
>> My first website in 2000 was developed using PERL and some DB that I
>> think might have been an early version of MySQL.
>>
>> I've supported Drupal, WordPress, and Magento.  Not an expert of any
>> one
>> of them, however I did get down in the mud.
>>
>> My second website was a PHP/MySQL home grown CMS.  I've since moved my
>> websites to WordPress.  WordPress has a very large eco system and a
>> substantial learning curve.  I've read and practiced both of the
>> WordPress handbooks - themes and plugins.  Still do not feel
>> comfortable
>> creating themes or plugins for production.
>>
>> As a programmer I like the freedom of creating my website from
>> scratch. 
>> Creating a static website local and then uploading it to the server
>> has
>> it's appeal.  I need to ponder this for a few days or maybe longer.
>>
>> About a year and a half ago I created https://www.phpprogrammer.org/ 
>> from scratch.  It is a simple CMS created using PHP/MySQL.  It was an
>> experiment to see if an exact match domain would aid a website in
>> ranking for that term.  At a high level I say maybe not.... jury is
>> still out and I need to do more analysis.  I'm still learning and
>> Google
>> and the competition are a moving target.
>>
>> For me your approach appeals to me because I like more control.  The
>> drawback is when you get others involved and then you have to be the
>> one
>> who has to do the upgrades to the content and post those upgrades. 
>> Been
>> there and I like to turn the project over to the business owner or
>> others in the company and let them make any change or add content at
>> will.  WordPress is very good for this.
>>
>> I'm thinking of changing https://www.phpprogrammer.org/ to wordpress
>> and
>> taking the present code and make it MVC, add a text/content editor and
>> add access control (users and permissions).
>>
>> Your approach is appealing.
>>
>> I know someone who has some C programs that run on Linux that he feeds
>> data to and it gives him a static HTML website.  He likes things that
>> are minimal.
>>
>>
>>
>> On 2022-07-28 08:50, Steve Litt wrote:
>> > On Thu, 2022-07-28 at 07:44 -0700,  wrote:
>> >
>> > > > One other thing: There's a reason Troubleshooters.Com isn't a
>> > > > Drupal
>> > > > site or a
>> > > > Wordpress site or a Rails site or a Zope site. The minute a
>> > > > database
>> > > > becomes
>> > > > involved, both deployment and backup become much, much more
>> > > > difficult.
>> > >
>> > > How do you create content and how do you maintain it ie, modify your
>> > >
>> > > content?
>> >
>> > The answer I'm about to give is for web pages without frequent (weekly
>> > through every second) changes. If you're making a shopping cart, blog,
>> > or social media site of course you need a database. That being said...
>> >
>> > I make my web pages in VSCode, which is a zen-coding editor. Please do
>> > a web search on zen-coding because zen-coding is the key to high
>> > productivity when writing HTML. I do it right on my computer. My HTML5
>> > is written to be well formed XML so I can easily test with a Python
>> > XML parser and to make debugging easier. Nowadays, after it passes the
>> > XML test, I put it
>> >
>> > The directory/file hierarchy on my computer hard disk is the same as
>> > the one online: I simply use sftp to transfer files. To transfer an
>> > entire site (perhaps your old web host went bad and you're moving to a
>> > new one), you have many choices. Here are two:
>> >
>> > * Rsync the whole directory system
>> > * Make a .tgz on your computer, sftp it up to your web host, ssh in to
>> > your web host, and untar.
>> >
>> > This isn't my first rodeo, so I know my suggestion will be greeted
>> > with howls of indignation:
>> >
>> > 1) HTML is soooooo 1996!
>> > 2) My time's too valuable to code HTML!
>> > 3) I'm not a programmer! (usually spoken with a hint of pride)
>> > 4) I don't know HTML and CSS!
>> > 5) You should use Bootstrap instead!
>> >
>> > Here's the truth about those assertions:
>> >
>> > 1) This is a logical falacy called "Appeal to novelty", described at
>> > https://en.wikipedia.org/wiki/Appeal_to_novelty . New things can be
>> > good, and new things can be bad, so the choice must be made using
>> > other criteria. Note also that "Appeal to novelty" is typically hyped
>> > by those who want to reach into your pocketbook, whether it's a
>> > kitchen remodeller or car salesman wanting you to replace your
>> > perfectly functional kitchen or car, or whether it's a middleman like
>> > Wordpress.Com wanting to insert themselves in the middle of your
>> > STATIC content. Also, HTML is much better now than years ago, CSS is a
>> > work of art, and we have zen-coding editors now to double our
>> > productivity.
>>
>> I do not host or do anything with with WordPress.com.
>>
>> >
>> > 2) Wait til you see how much time you need to spend when your web host
>> > goes bad, and you know that happens every few years.
>>
>> I have S3 backups so I can move pretty fast.
>>
>>
>> > But if time is
>> > really the issue, go ahead and write your static content in Markdown
>> > or Asciidoc and convert it. You still have the source document, no
>> > database necessary.
>> >
>> > 3) HTML and CSS aren't programming. They're just a grammar, and a
>> > pretty easy to learn grammar.
>> >
>> > 4) With zen-coding editors, HTML is much easier to start using, and
>> > much quicker to learn. It's really not much of a challenge. CSS is
>> > dead bang simple.
>>
>> I don't think CSS is as simple as you say.  It is rule based, however
>> there is a lot to know.
>>
>> >
>> > 5) I can't argue to hard about this: Bootstrap is a good product that
>> > can produce good web pages in the hands of a skilled practitioner. The
>> > reasons I personally don't use Bootstrap is it adds over 100K of
>> > download to each page, it's harder to learn and deal with than HTML
>> > and CSS, and if you look at Bootstrap pages in the wild, most don't
>> > pass HTML validation, which means they'll render differently on
>> > different browsers.
>> >
>> > Bottom line: Direct HTML editing is MUCH easier and faster than
>> > everyone thinks, and it yields web pages that look how you want on
>> > every competent browser.
>>
>> This still leaves out the non-technical person. That is the beauty if
>> Drupal and WordPress.  WordPress has 30% market share.
>>
>>
>> I think HTML is not all that easy when you are down in the mud
>> creating
>> web content.  There are some things to know and learn.
>>
>> >
>> > Once again, if you actually need data from users, by all means use a
>> > database. But for information-only pages, HTML/CSS is the better
>> > choice. If a page needs automation not requiring permanent storage of
>> > data, why not do the automation in Javascript?
>> >
>>
>> Good point about JS.
>>
>> > I'm in the process of writing about all of this in detail. See
>> > http://troubleshooters.com/web/ [1] .
>> >
>>
>> Ok so your website has been around for maybe 26 years and has more
>> than
>> 300 pages so I would think your website has at least some authority
>> and
>> I would imaging you get a fair amount of traffic.
>>
>> Interesting approach.  I will need to ponder it for a few days or
>> longer.  I think for someone who is technical and there is no need for
>> others to get involved, your approach is great and I see the benefit
>> of
>> doing it your way.
>>
>> > SteveT
>> >
>> >
>> >
>> > Links:
>> > ------
>> > [1] http://troubleshooters.com/web/i
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss