CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Milestone 02 Dec 2020 23:28 GMT  (Read 5415 times)

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #30 on: 4 Dec 2020, 10:03:43 pm »
As is, this is not scalable which was my claim way back before any code was even provided but I had different reasons then.

And again when people say "not scalable" I genuinely have no clue what they're talking about, as if they're just looking for problems that don't exist or fail to understand how to scale for performance; much less how to use actual design patterns that fit the data instead of shoe-horning a single design model into doing everything whether it fits or not.

The very thing I've seen client after client the past decade.

However,  it does introduce a real scalability and complexity problem because so many files are required for a particular section such as users CRUD.
Which do you want? Separation of concerns with efficiency of load, or single massive files that are impossible to maintain that waste time with dead code.

.process.php -- does the data handling, may pass off to another for sub-functions.
.content.php -- outputs the result

Thus that user admin panel gets:

        /actions/admin/pages/users
          users.controls.ini.php                                       24 B
          users.create.content.php                                    325 B
          users.create.process.php                                   1222 B
          users.createSuccess.content.php                             284 B
          users.delete.process.php                                    646 B
          users.deleteFailed.content.php                              276 B
          users.deleteSuccess.content.php                             278 B
          users.edit.content.php                                      266 B
          users.edit.process.php                                     1734 B
          users.editSuccess.content.php                               279 B
          users.list.content.php                                      200 B
          users.list.process.php                                      341 B
          users.process.php                                           462 B

The direct users.process.php determines which of the sub processes to load and run. One .process.php each for create, delete, edit, and list. Extra .content.php for things like success/fail. It's not rocket science, and we're not pissing all over memory loading the create/delete/list when all we want to do is edit!

Where's the "complexity" of that? That's as simple as it gets!
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #31 on: 4 Dec 2020, 10:29:21 pm »
Side note, trying to get PHP 8 working... won't talk to mariaDB for me, doesn't FPM properly, has that same dipshit overloading rules as PHP 5.5 that nobody f***ing asked for...

I'm not impressed.
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #32 on: 4 Dec 2020, 10:46:54 pm »
Alright, got past the overloading issues by adding ...$compatibilityGarbage as a final parameter

Code: [Select]
public function query(
$name,
$module = 'common',
$tableName = false,
...$compatibilityGarbage
) {
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

benanamen

  • Full Member
  • ***
  • Posts: 168
  • Karma: +16/-0
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #33 on: 5 Dec 2020, 12:00:52 am »
In admin/pages/users I see 14 files related to user (not counting internal_setPermissions as it may not exist for other tables, not sure.)

Then in queries/admin there are 8 more files for users.

Then in queries/user there are 4 more user related files

Then templates/default/php there are 2 more user specific files

That is 28 files to deal with users so how are you going to tell me there is only 2 files needed? I didn't see any code that generates the ridiculous amount of 28 files just for one table.

Quote
And again when people say "not scalable" I genuinely have no clue what they're talking about

What is so difficult for you to understand? Right now you have 1 table. If you are going to create an actual application, the code needs to be able to "scale" or grow if that word help you better, to many more tables.

If it is true that every table is going to require 28 files then that qualifies as "not scalable". You will just end up with a monstrosity of code when it is not whatsoever needed.

Quote
Scalability is all about handling growth. A successful web application needs to seamlessly and efficiently accommodate growth

Its not that complicated. Your current architecture will not efficiently accommodate growth whatsoever, thus not scalable.

Additionally, as you currently have it, you have to completely wipe out an existing database in order to use your code. Why in the world should anyone have to delete their database in order to use your code? (Some slack given as I know it is still early on)

Quote
Restructure of existing tables is the part I dread implementing. I always hate doing that. New table clean off the shelf? Easy-peasy lemon squeezy. ONE FILE.

Of course you dread it. If you didnt have such a complicated architecture it would no problem to do anything with the database.

Clean off the shelf is a one time deal so easy peasy doesnt even matter. Not even sure why you are jerking around with an installer in the first place. It takes two second to import an sql dump.

Quote
Thus that user admin panel gets:

Sure looks like alot more than two files to me and those are just the ones in that folder.

Quote
Where's the "complexity" of that? That's as simple as it gets!

28 files for ONE table???? That's what you call simple? So every time I add a table my file count increases by 28?
« Last Edit: 5 Dec 2020, 12:27:58 am by benanamen »
To save time, let's just assume I am never wrong.

John_Betong

  • Full Member
  • ***
  • Posts: 218
  • Karma: +24/-1
    • The Fastest Joke Site On The Web
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #34 on: 5 Dec 2020, 12:33:53 am »
@Jason Knight,

is it possible to separate the Application and System files so that I (and others) can create their own web-pages? At the moment any changes will be overwritten by updates and bug fixes.

Also please move the CSS, JavaScript and image files preferably into an /assets/ directory. At the moment all the files which are available to Joe Public are buried in the system path folder and overwritten on every update!!!

The following is a system of allocating paths that has worked very well for quite a number of years on another PHP FrameWork.

https://github.com/John-Betong/jb-squire3

Code: [Select]
<?php declare(strict_types=1);
defined('LOCALHOST'
|| 
define('LOCALHOST''localhost'===$_SERVER['SERVER_NAME']);

// BASEURL used for CSS, JavaScript and images files stored in /assets/ folders
define'BASEURL',  
LOCALHOST 
 
'http://localhost/thisisatesttoseeifitworks.tk/public_html/'
 
'https://thisisatesttoseeifitworks.tk/'
);   

define('APPPATH''ANY-DIRECTORY/003-app/');
define('SYSPATH''ANY-DIRECTORY/003-sys/');

header('Location: ANY-DIRECTORY/index.php');
« Last Edit: 5 Dec 2020, 12:39:15 am by John_Betong »
Retired in the City of Angels where the weather suits my clothes

benanamen

  • Full Member
  • ***
  • Posts: 168
  • Karma: +16/-0
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #35 on: 5 Dec 2020, 12:40:53 am »
At the moment any changes will be overwritten by updates and bug fixes.

all the files.... overwritten on every update!!!

This is a direct result of Jason refusing to use git.
To save time, let's just assume I am never wrong.

John_Betong

  • Full Member
  • ***
  • Posts: 218
  • Karma: +24/-1
    • The Fastest Joke Site On The Web
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #36 on: 5 Dec 2020, 12:57:19 am »
@benanamen,

Quote
This is a direct result of Jason refusing to use git.

https://github.com/John-Betong/jb-squire3
The file system I proposed in the link above would mean that the current milestone_02_Dec_2020_23_28 would be the ANY-DIRECTORY an additional application directory would be added and relevant files moved from the system directory.

Also CSS, JavaScript and images moved to a Joe Public viewable folder.
« Last Edit: 5 Dec 2020, 01:03:47 am by John_Betong »
Retired in the City of Angels where the weather suits my clothes

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #37 on: 5 Dec 2020, 01:00:47 am »
<snip>removed ranting about use of font and size bbcode</snip>

And seriously guys, wah wah wah I have to upload 100k of files for an update making 100% certain we have the update? This is an issue?!? WTF.

Stop bitching about problems that don't exist!

We don't have DB driven pages yet, so lah-dee-dah, if you're writing ACTUAL .process.php/content.php/static.ini.php/.static files for unique pages that are NOT part of the default install, what the blazes are you overwriting? The default page? Fine, delete before you upload big honking deal!

Do you folks not even know how to apply uploads safely?!? Dafuq!
« Last Edit: 7 Dec 2020, 03:54:47 am by Jason Knight »
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

John_Betong

  • Full Member
  • ***
  • Posts: 218
  • Karma: +24/-1
    • The Fastest Joke Site On The Web
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #38 on: 5 Dec 2020, 01:08:26 am »
@Jason Knight,

Quote
And seriously guys, wah wah wah I have to upload 100k of files for an update making 100% certain we have the update? This is an issue?!? WTF.
That is not the issue - the problem is that user's application web-pages will be overwritten by your web-pages on every update.

It looks as though the benefit is far too difficult for you too comprehend :(
Retired in the City of Angels where the weather suits my clothes

benanamen

  • Full Member
  • ***
  • Posts: 168
  • Karma: +16/-0
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #39 on: 5 Dec 2020, 01:10:05 am »
This is an issue?!? WTF.

Stop bitching about problems that don't exist!

Do you folks not even know how to apply uploads safely?!? Dafuq!

Sure it's an issue! Since you modify the header of every single file even if there is no code change whatsoever it is impossible to know what you changed with out doing a compare of every single file one at a time.

You have obviously never had to work with anyone but yourself.

John, Squire Rethink is available. I am sure you will find it much easier and cleaner.
https://github.com/benanamen/squire-rethink
« Last Edit: 5 Dec 2020, 01:13:38 am by benanamen »
To save time, let's just assume I am never wrong.

John_Betong

  • Full Member
  • ***
  • Posts: 218
  • Karma: +24/-1
    • The Fastest Joke Site On The Web
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #40 on: 5 Dec 2020, 01:30:55 am »
@benanamen,
I have updated the multitude of links on my site - your GitHub Repository is now cloned and uploaded to my site. I hope to  look at it later today.
https://thisisatesttoseeifitworks.tk/[/url]
« Last Edit: 5 Dec 2020, 01:44:01 am by John_Betong »
Retired in the City of Angels where the weather suits my clothes

benanamen

  • Full Member
  • ***
  • Posts: 168
  • Karma: +16/-0
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #41 on: 5 Dec 2020, 01:34:39 am »
I just made a slight change. Make sure you have version 1.5
To save time, let's just assume I am never wrong.

John_Betong

  • Full Member
  • ***
  • Posts: 218
  • Karma: +24/-1
    • The Fastest Joke Site On The Web
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #42 on: 5 Dec 2020, 01:55:03 am »
@benanamen,
> I just made a slight change. Make sure you have version 1.5


Updated, many thhanks.

May I suggest adding the version number to the page somewhere, possibly in either the header or the footer.
Retired in the City of Angels where the weather suits my clothes

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #43 on: 5 Dec 2020, 08:35:23 am »
That is not the issue - the problem is that user's application web-pages will be overwritten by your web-pages on every update.
Uhm... no, because those would be separate FILES from the base system? I mean literally if you're adding your own static pages, or your own "actions", those would be separate files that do not exist in the base install.

The only things that would/should conflict:

contents of /actions/static/pages/default
contents of /user.ini.php

Nothing else should need 'changes" that aren't bugfixes that are reported and fixed for the next milestone.

At least if you're using the default template, and one can always just make another template directory with another template to represent unique changes. NOT that one should be playing that deep with it at this point.

... and even then, that's what making a new .template.php file and doing Template::load is for.

Not sure you're using it right or grasping how it works.

Because adding a static page involves creating a directory and two files, those are separate and would not be overwritten. Because a new action is a new directory with new files, those would not be overwritten... Because each action or subpages would separate its markup into a new .template.php file, those would not be overwritten...

So what "application" nonsense are you talking about?
« Last Edit: 5 Dec 2020, 08:37:20 am by Jason Knight »
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

John_Betong

  • Full Member
  • ***
  • Posts: 218
  • Karma: +24/-1
    • The Fastest Joke Site On The Web
Re: Milestone 02 Dec 2020 23:28 GMT
« Reply #44 on: 5 Dec 2020, 12:04:33 pm »
@Jason Knight,

> So what "application" nonsense are you talking about?

The separation of “application” files would allow me to personalise the front screen layout, fonts, colours, content, add/remove links, etc.

At the moment the “system”  updates include the original front screen again and again. All my changes are overwritten.

The current “system” fails with PHP 8.0 and I expect many small “system” updates to make the “system” compatible.

Surely you can see the benefit of an “application” folder and also having an “assets” folder. As mentioned this folder structure has worked well for many years allowing security  incremental updates not to affect the “application”.

I am reluctant to personalise the front end and have to repeatedly update the “system” folder.



Retired in the City of Angels where the weather suits my clothes

 

SMF spam blocked by CleanTalk

Advertisement