Homebrew [WIP]NTRDB

OctoNezd

*insert some funny quote here*
OP
Member
Joined
Aug 11, 2016
Messages
234
Trophies
0
Location
Moscow
XP
219
Country
Russia
upload_2017-2-27_20-16-56.png

Installed SSL properly
 
  • Like
Reactions: adrifcastr

DiglidiDude

Member
Newcomer
Joined
Oct 8, 2014
Messages
18
Trophies
0
Age
30
XP
122
Country
Canada
I've been looking at the code and have successfully deployed the python site on my local environment.

However, I'm really confused : Why did you use Python to code the backend of your website?

This is gonna sound like a subjective and elitist opinion, but when I see the lengths you go through to implement basic website features like route-handling, POST/GET HTTP requests, database and REST Api, and yet certain routes don't render well due to having the wrong Content-Type being applied or something revolving around the way you manipulate response headers, and judging from my 4 year+ career experience in web development, I wonder if it would have been better to write it in NodeJS using the ExpressJS engine with a few middlewares thrown in?

Again, not trying to be an ass. I don't have much experience with Python aside from writing file transformation and manipulation scripts that I run once and forget about, but I really believe it could've been done with much less time and efforts using at least some HTTP server framework for Python that's similar to what ExpressJS can do. Response headers are handled manually, which is error-prone and won't scale well in the future.

I think this is some impressive code, don't get me wrong, the complexity of the process is impressive, however there's without a doubt a much faster and easier way to write the backend of your website that's also less error-prone.

This is what's not making me want to contribute to the codebase; There isn't enough abstraction with the way you handle serving HTTP requests, making it more painful than it should be.

But really, don't take it personnal, I'm not dissing you, I can tell you're well-versed in Python and are very comfortable in that language just by reading your code, so I know you'll make it in the end. All i'm saying is, with how simple that website's use is (essentially it's a web interface for CRUD interactions with your plugins database coupled with authentication for plugin authors to update their own publications themselves) it could've been done faster and easier, and less error-prone.
 
Last edited by DiglidiDude,

thunderjackl

Well-Known Member
Newcomer
Joined
Oct 5, 2016
Messages
74
Trophies
0
Age
34
XP
87
Country
United States
I've been looking at the code and have successfully deployed the python site on my local environment.

However, I'm really confused : Why did you use Python to code the backend of your website?

This is gonna sound like a subjective and elitist opinion, but when I see the lengths you go through to implement basic website features like route-handling, POST/GET HTTP requests, database and REST Api, and yet certain routes don't render well due to having the wrong Content-Type being applied or something revolving around the way you manipulate response headers, and judging from my 4 year+ career experience in web development, I wonder if it would have been better to write it in NodeJS using the ExpressJS engine with a few middlewares thrown in?

Again, not trying to be an ass. I don't have much experience with Python aside from writing file transformation and manipulation scripts that I run once and forget about, but I really believe it could've been done with much less time and efforts using at least some HTTP server framework for Python that's similar to what ExpressJS can do. Response headers are handled manually, which is error-prone and won't scale well in the future.

I think this is some impressive code, don't get me wrong, the complexity of the process is impressive, however there's without a doubt a much faster and easier way to write the backend of your website that's also less error-prone.

This is what's not making me want to contribute to the codebase; There isn't enough abstraction with the way you handle serving HTTP requests, making it more painful than it should be.

But really, don't take it personnal, I'm not dissing you, I can tell you're well-versed in Python and are very comfortable in that language just by reading your code, so I know you'll make it in the end. All i'm saying is, with how simple that website's use is (essentially it's a web interface for CRUD interactions with your plugins database coupled with authentication for plugin authors to update their own publications themselves) it could've been done faster and easier, and less error-prone.
Question: would I have to take a computer science class at my high school to go to college for anything related to computer programming?

Sent from my SM-G550T1 using Tapatalk
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
it could've been done faster and easier, and less error-prone.
Yeah man, just use PHP next time, it's pretty much built for handling web requests, setting response type headers is as simple as "header('Content-Type: application/json');", there's seriously no reason to have done it in Python /s

Dude wrote it in what he knows, using the methods he knows. Maybe Node is easier for you, PHP is easier for me, hell RPG may be easier for some 80 year old IBM programmer, but that doesn't mean it's the answer to his problem. If you want to contribute, cool, contribute, but don't bash on the way he implemented it because "it could be easier". There's easier things than Node too.
 
  • Like
Reactions: OctoNezd

OctoNezd

*insert some funny quote here*
OP
Member
Joined
Aug 11, 2016
Messages
234
Trophies
0
Location
Moscow
XP
219
Country
Russia
Yeah man, just use PHP next time, it's pretty much built for handling web requests, setting response type headers is as simple as "header('Content-Type: application/json');", there's seriously no reason to have done it in Python /s

Dude wrote it in what he knows, using the methods he knows. Maybe Node is easier for you, PHP is easier for me, hell RPG may be easier for some 80 year old IBM programmer, but that doesn't mean it's the answer to his problem. If you want to contribute, cool, contribute, but don't bash on the way he implemented it because "it could be easier". There's easier things than Node too.
Code:
self.send_header('Content-type', 'application/json')
 

adrifcastr

Well-Known Member
Member
Joined
Sep 12, 2016
Messages
2,038
Trophies
0
XP
1,947
Country
Germany
@OctoNezd NTRDBI requires the links to be direct links for raw plg files. please find a way to reject links to zip files, and point it out in red that raw plg file-links are needed, else the plugins won't be downloaded by ntrdbi
 

OctoNezd

*insert some funny quote here*
OP
Member
Joined
Aug 11, 2016
Messages
234
Trophies
0
Location
Moscow
XP
219
Country
Russia
@OctoNezd NTRDBI requires the links to be direct links for raw plg files. please find a way to reject links to zip files, and point it out in red that raw plg file-links are needed, else the plugins won't be downloaded by ntrdbi
How about auto-unzipping? I know that some people adds .zip links because there multiple regions
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    They should bring advertisements like this back LOL.
  • BakerMan @ BakerMan:
    or that german ninja turtle commercial
    +1
  • K3Nv2 @ K3Nv2:
    Forgot to buy BBQ sauce at the store so made my own ffs
  • RedColoredStars @ RedColoredStars:
    Blues Hog BBQ sauces are pretty good.
  • K3Nv2 @ K3Nv2:
    My insurance has a thing where if I do a virtual visit they'll just send me a $100 gift card to Walmart I'm about to sell a company my medical history for $100 lol
  • BigOnYa @ BigOnYa:
    My insurance has a thing called, " Nope, we aren't paying for that." that they like to use on us all the time. Then we play the "Ok we will go to some other insurance company." then they miraculously say ok we will pay for that.
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    Well look at what the cat dragged in!!!
  • BigOnYa @ BigOnYa:
    Hey, do you feel any older?
  • K3Nv2 @ K3Nv2:
    No I don't
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, not right now
    +1
  • BigOnYa @ BigOnYa:
    @K3Nv2 That's my phrase, stop it
    +1
  • K3Nv2 @ K3Nv2:
    Your phrase is I'm not drunk
    +1
  • Xdqwerty @ Xdqwerty:
    I feel a discomfort in my throat
  • SylverReZ @ SylverReZ:
    BigOnYa after a long day.
  • AlbertJulian @ AlbertJulian:
    I got scammed last year by some internet fraudsters who made away with my crypto worth $210,000.I almost lost my life because i was so frustrated and was depressed..5 months ago a friend introduced me to {Assets lab} a crypto recovery company.At first i was very scared because then i was afraid because of the bad experience i had ..Three months ago i decided to contact {Assets lab} and I made my complain to them and they took some information and assured me that they will assist me recover my crypto .. They helped me throughout the process and so far so good they have recovered 95 % of the money that was stolen from me..Today am a happy woman and i will continue to spread the good news.. Contact {Assets lab} for any of your funds lost to scams.. They are the best..Below is their contact informaation Name : ASSETS LAB RECOVERYEmail: [email protected] / Whatsapp: +17126004729Telegram: @Assets_labWebsite: https://lab-assets.tech/
  • Xdqwerty @ Xdqwerty:
    Reported
  • K3Nv2 @ K3Nv2:
    Mario kart 8s been out ten years now due for a 9 any time soon
    +1
  • DTApple @ DTApple:
    Maybe in the upcoming Direct?
  • K3Nv2 @ K3Nv2:
    Probably saving it for a switch 2 announcement
    +2
  • DTApple @ DTApple:
    Ay!
    +1
    DTApple @ DTApple: Ay! +1