News for hackers. Stuff that matters.
Re:How to build a website without frameworks and tons of lib... by fullstackchris on Tuesday July 04, 2023 @05:38PM (#36592833)
> Mind you, Hetzner webhosting starts at 2 EUR! How crazy is that?

Oh yeah?

and netlify is totally free for an infinite amount of sites! how crazy is that?

> We use a short Python script with exactly 45 lines of code. Including comments and blank lines. > > In summary, this is the simple toolchain for building our web: > > Developer updates index.src.html > Watchdog.py detects the file change and ... > ... renders Jinja template into index.html and ... > ... calls Tailwind CSS CLI to generate styles.min.css.

love posts like these that insult literally any other way of doing things except their way, claiming it's "simple" when in the end they don't even show the step by step code or link to any repository that shows how it's done. regardless of "without frameworks or tons of libraries", its esoteric and definitely not an average or common way of doing things (to the rest of us), and clearly DOES use codes (and/or?) a framework!!!

no description of what the heck "Watchdog.py" is, no description of what Jinja - I for one don't know what either of those are, sorry if i'm an "ignorant normie"

simply put, it's quite clear you ARE using frameworks, just in your mind, perhaps, you "aren't"

this whole framework vs no framework vs BS vs BS vs BS has gotten really out of hand, and 99% of devs cant see the forest from the trees

what in the world did i just read

Re:How to build a website without frameworks and tons of lib... by calvinmorrison on Tuesday July 04, 2023 @05:41PM (#36592862)
99% of developers are out her building with php, .net or Java and its fine
Re:How to build a website without frameworks and tons of lib... by teej on Tuesday July 04, 2023 @06:00PM (#36593069)
In 2005 maybe
Re:How to build a website without frameworks and tons of lib... by chefandy on Tuesday July 04, 2023 @06:34PM (#36593375)
Perhaps not 99%, and perhaps not new sites, but I'll bet those three environments combined run more than 80% of sites right now.
Re:How to build a website without frameworks and tons of lib... by calvinmorrison on Tuesday July 04, 2023 @08:04PM (#36594068)
99% of code is boring, closed source, and provides business value. Most people do not work at FAANG, and do not want to. People mostly work at SMBs doing things that are not super exciting, and that's OK.
Re:How to build a website without frameworks and tons of lib... by chefandy on Tuesday July 04, 2023 @10:38PM (#36594935)
Yep. In practice, people wanting to make something cool when they'd be way better off making something boring can be a real multi-pronged liability.
Re:How to build a website without frameworks and tons of lib... by VWWHFSfQ on Tuesday July 04, 2023 @05:56PM (#36593022)
They don't want to use a framework so they wrote their own framework that is most likely shittier and more impossible to debug. Also, now they have to train all their new engineers on their own home-grown shitty/impossible-to-debug framework.
Re:How to build a website without frameworks and tons of lib... by DLA on Tuesday July 04, 2023 @06:04PM (#36593111)
How is a 45 line python script that runs templates hard to debug? You’re calling something “most likely” shitty, but have you seen it? Used it? I find this post and the method they use to produce their site utterly refreshing. What is “shitty” is many dozens (being kind) of JS libraries, complex configurations, and learning multiple tools to produce the same result!
Re:How to build a website without frameworks and tons of lib... by balder1991 on Tuesday July 04, 2023 @06:51PM (#36593523)
Also many frameworks get over bloated and complicated because they’re trying to solve problems for everybody and edge cases that might not interest you. A lot of times you can get some ideas from it and build something simpler.
Re:How to build a website without frameworks and tons of lib... by rcme on Tuesday July 04, 2023 @06:51PM (#36593532)
There’s a certain irony in calling this approach “hard to debug” vs. a library like React with its hooks implementation.
Re:How to build a website without frameworks and tons of lib... by tacker2000 on Tuesday July 04, 2023 @05:57PM (#36593039)
Jinja is a templating framework. You can use it with ansible for example, to replace config values or secrets in a configuration file for different servers, etc
Re:How to build a website without frameworks and tons of lib... by fullstackchris on Tuesday July 04, 2023 @06:03PM (#36593098)
after some research i now know that, but there was no clear link or description of what the heck was going on
Re:How to build a website without frameworks and tons of lib... by chefandy on Tuesday July 04, 2023 @06:39PM (#36593410)
Well, it is a decade-and-a-half old and fairly common in the Python web world. I don't think there's any shame in not knowing what it is if you haven't encountered it, but I also don't think there's any shame in assuming a developer audience reading about web development would at least know how to figure out what it is.
Re:How to build a website without frameworks and tons of lib... by ekianjo on Tuesday July 04, 2023 @07:02PM (#36593617)
Everyone on HN here has heard of Jinja...
Re:How to build a website without frameworks and tons of lib... by motogpjimbo on Tuesday July 04, 2023 @07:10PM (#36593674)
Apart from the person who has "fullstack" in his username.
Re:How to build a website without frameworks and tons of lib... by kiwijamo on Tuesday July 04, 2023 @07:55PM (#36594005)
I know of Jinja only because I have dabbled in some Ansible and Python. Had I not done either I probably would have been none the wiser too.
Re:How to build a website without frameworks and tons of lib... by cowsandmilk on Tuesday July 04, 2023 @07:10PM (#36593678)
When I look at the page, there’s a link on the word Jinja. And the next word is templates. Maybe you aren’t familiar with what a template is, but they are hardly obscure. Here’s a list of large websites that used a Perl-based templating engine a decade ago: http://www.masonhq.com/sites
Re:How to build a website without frameworks and tons of lib... by deadbunny on Tuesday July 04, 2023 @07:41PM (#36593892)
There is literally a link on the word Jinja to the Jinja docs...
Re:How to build a website without frameworks and tons of lib... by ad404b8a372f2b9 on Tuesday July 04, 2023 @06:06PM (#36593130)
It is simple, both templating and hot-reloading are fairly common programing concepts, neither are uncommon or esoteric when it comes to web development.

The specific implementation is irrelevant, you could use any other piece of software to achieve it.

Re:How to build a website without frameworks and tons of lib... by skiptracer on Tuesday July 04, 2023 @06:16PM (#36593212)
Take a deep breath and go for a walk, there's no reason an inconsequential blog post should make you this angry.
Re:How to build a website without frameworks and tons of lib... by spicybright on Tuesday July 04, 2023 @06:38PM (#36593408)
Go for a walk yourself if you can't handle reading criticism without you belittling the writer.
Re:How to build a website without frameworks and tons of lib... by Eldt on Tuesday July 04, 2023 @06:44PM (#36593451)
The writer was belittling the OP so maybe direct that elsewhere
Re:How to build a website without frameworks and tons of lib... by 0xEFF on Tuesday July 04, 2023 @07:30PM (#36593809)
Why are discussions of web development and JavaScript unique in that we can’t discuss alternative methods and trade offs without the discussion devolving into personal attacks and defensiveness?
Re:How to build a website without frameworks and tons of lib... by kgwxd on Tuesday July 04, 2023 @08:34PM (#36594252)
Anyone who has spent a good chunk of their life trying to keep things as minimal as possible after being “inspired” by such articles can understand the reaction. There’s no reason a sensible comment, even if it’s a bit emotionally charged, should trigger your zen master spidey sense. I’m sure they’re speaking from experience and are trying to prevent others from taking the oh so tempting bait.
Re:How to build a website without frameworks and tons of lib... by echelon on Tuesday July 04, 2023 @06:17PM (#36593220)
> and netlify is totally free for an infinite amount of sites! how crazy is that?

Netlify is hot garbage and you should avoid them like the plague.

I built a startup on a second account, invited a team, and then it started charging me for my personal websites on my first account.

I didn't know about this and they cumulatively billed me hundreds of dollars. When my card info changed, they took my websites hard down. I had no idea either of these things was going to happen.

When I told them their support was 100% unhelpful. No refund, not even a restoration of my websites that they completely deleted.

Do not use Netlify.

Re:How to build a website without frameworks and tons of lib... by szasdasdasda on Tuesday July 04, 2023 @06:17PM (#36593223)
if this idiot wrote his project in Go he wouldn't even need frameworks and libraries outside the STD!!!!!
Re:How to build a website without frameworks and tons of lib... by tetromino_ on Tuesday July 04, 2023 @06:30PM (#36593333)
> they don't even show the step by step code or link to any repository that shows how it's done

They describe the steps and provide the clue that it's a 45 line script including blank lines and comments. I think they expect you would be able to quickly replicate their work in a language of your choice and calling out to libraries of your choice.

> no description of what the heck "Watchdog.py" is, no description of what Jinja

The authors expect that their readers know how to google (or ask chatgpt) for simple coding terminology.

Re:How to build a website without frameworks and tons of lib... by chii on Tuesday July 04, 2023 @09:16PM (#36594493)
watchdog isn't simple to write, and 45 lines description is meaningless. After all, you could be `import antigravity`.
Re:How to build a website without frameworks and tons of lib... by shtolcers on Tuesday July 04, 2023 @06:38PM (#36593405)
Remove "fullstack" from your nickname! You have to earn it.
Re:How to build a website without frameworks and tons of lib... by caboteria on Tuesday July 04, 2023 @06:59PM (#36593599)
> Meet Jinja templates, which make our life much easier. Jinja allows us to use loops, include files (navigation bar, footer, etc.) and much more.

> no description of what Jinja - I for one don't know what either of those are, sorry if i'm an "ignorant normie"

The first mention of Jinja had both a description of what it does for them, and a link that you could have clicked to get more information about it. Guess it's easier to post snarky comments on HN.

Re:How to build a website without frameworks and tons of lib... by gerdesj on Tuesday July 04, 2023 @07:01PM (#36593608)
breathe

Why not go back and fix up formatting and grammar within your own post and then hit the reply button.

I do have to agree with you somewhat, but please take it easy. I do note that this Koding Kitty blog entry comes across to me (personally) as utter wankery. For starters, my 53 year old eyes require CTRL + until 150%.

"Too lazy to read?" <smol>fuck off</smol>.

... yep, triggered 8)

"We don't need to store our content in a database. We don't need to deal with plugins. We don't need a visual editor to write our content."

That's nice. I deployed Mediawiki with Visual Editor at work for our documentation needs and it has been wildly successful for us - https://www.mediawiki.org/wiki/Intranet I would never get MS Word addicts to use mark anything or whatevs.

The VM is tiny. We have over two decades of docs in there and the MariaDB tables are 415MB, sorry that's the entire /var/lib/mysql directory, mediawiki DB is 224MB (just checked). There are a fair few additional files - pics etc. We have a full set of ISO 9000 and ISO 27000 docs in there so it is not a trivial store.

Re:How to build a website without frameworks and tons of lib... by mickael-kerjean on Tuesday July 04, 2023 @07:09PM (#36593664)
I am one of those vanilla advocate that is sick of the react for everything approach everyone seem to follow even for simple stuff. To argue the point with code, I made a scaffold with examples of what such web app could look like: https://mickael-kerjean.github.io/skeleton/example/index.htm...
Re:How to build a website without frameworks and tons of lib... by wild_egg on Tuesday July 04, 2023 @07:14PM (#36593716)
> simply put, it's quite clear you ARE using frameworks, just in your mind, perhaps, you "aren't"

You're conflating libraries with frameworks. I see no frameworks listed in TFA so they're not wrong. Seems a weird argument to be getting so angry about

Re:How to build a website without frameworks and tons of lib... by assimpleaspossi on Tuesday July 04, 2023 @07:57PM (#36594022)
Most such blogs are that way--not telling you everything to reproduce what they did--but I did this for 23 years. I never used a framework of any kind. I rarely used someone else's code unless I had to. I had to use npm cause the credit card service required it. I didn't build our own server software. I did use my operating system's builtins.

And I can guarantee that at some point, most of you have visited one of two web sites I created. (My company created far more than that.)

It wasn't hard to do what I did. I'm a programmer, damn it. And I hired programmers to do the same thing. None of them struggled with it.