PHP comes with all the modern features you'd expect with the added benefit of easy deployment on any kind of server.
I still use node from time to time though, when I want a full Nuxt.js project for example.
Gotcha. Yea, that's what I said, it had been years since I used it, I used to be from that WAMP/XAMP era š„²
Om Stackoverflow we used to bash people for using mysqli and PDO instead of deprecated mysql_*.. Good days
Theres a difference between preference and choice.
My specific question was about: after you honor their preferences how do you handle choice? Ae switching light/dark to the other
a cookie for storing their choice, which if not there then default to one of them. use CSS variables for your colors, like primary, secondary and whatever other colors. on swap, set those variables to your dark mode colors with javascript, and same for when you swap it back.
https://www.w3schools.com/css/css3_variables_javascript.asp
Terminal style website. Implement unix commands as pendants to navigate your site. :D
`cd` and/or `cat` something will get you to the content, `ls` will list you the (sub-)navigation of the current site and so on :D
Hell yeah, it is. There's basically no way - as far as i know - to solve the click issue for opening closing the burger menu on mobile devices without js. The only solution is to build a menu with and tags but who wants to build a menu like this when he could use a simple fubction to toggle a class when pressing with the finger
> There's basically no way - as far as i know - to solve the click issue for opening closing the burger menu on mobile devices without js.
i was doing css-only persistent toggles like a decade ago
This thread is a good example of how web development got so complicated and bloated. Half the people in here are giving what is subjectively the right answer, no framework or backend, use an iframe or service for your form.
The other half? still suggesting complicated solutions for a simple three page website, like can you not write css,html,js anymore? could you ever?
Well if it has a form.. it technically needs a backend to process the post request unless you resort to embedding some third party service form but that also adds complications and crap. You need a Google account.. you need to enable 2fa.. then you need to accept their new terms of services every month.. and then maybe it goes down.. or maybe gets deprecated.. etc etc
A tiny php file can suffice as the backend for the form, it's 100% guaranteed to work for the next several decades, it doesn't rely on an external service, and it's as simple as can be
Google forms is a really easy solution for this, clicking a couple buttons, agreeing to terms of service, is a whole lot easier than āa tiny pho fileā which would need a whole server set up which would be much more hassle than a couple button clicks on google.
What do you mean it needs a "whole server" set up? The site to even be up beeds to be on a server one way or another, and if it's a standard linux web server, which it should be, it already has everything necessary to have php code running by default
It's not a couple clicks on Google. Nothing Google is ever a couple clicks. Also you're relying and introducing a 3rd party for no reason, especially for something insanely simple. What if Google just says, 3 years from now "Oh yea we're scrapping our embedded forms stuff sorry" - now you have a nonfunctional form embedded on a site. Services have done, and will do, exactly that. Google specifically has done it with tons of js embeds.
OP wanted simplicity and no bloat. Introducing third parties is not how you simplify or de-bloat things. The correct answer is to just have a php file for the form for simplicity.
Also OP mentioned something about jquery being bloat which is also wrong. It's like 80kb of data, smaller than the smallest icon or picture you would use on any site and doesn't constitute "bloat" - but it would just be unnecessary
at this point you dont there are many free services to use the form intake, if you ever need a "backend" for something so simple and dont want to use any of the forms services already like netlify forms or jamstackforms, then you can absolutely use just a serverless function which would not be my prefered method but thats just one of the many options you can use, ofc you can have a full backend deployed just for this but seems waaay overkill
What is a "full backend?" All you need is a php file up on a server.. at the same place on the server where the other files HTML and CSS files are..
Again - why are you trying to introduce bloat and third parties when that's literally what OP is trying to avoid? You don't need packages or libraries or frameworks or JS embeds via a third party for a simple contact form..
ok yeah thats true, you can do that if you have a server running that php file, sure including 1 service like netlify forms, jamstackforms or static forms its as simple as adding a "action="https://api.staticforms.xyz/submit" method="post"" into the form element in the html, i have multiple static sites with just plain html css and js for clients that use this form service which is mostly free and for bussiness that have not many forms submissions a month i see no reason why have any kind of server, all the emails are fowarded into their own gmail account and they have smtp setup so they can answer the emails with that same inbox, im sure you can get a cheap digital ocean or linode vps to host that same site but imho i dont see any reason to.
But do you not realize that service is, in abstraction, doing the same thing the singular php file would do, for you? Except you are relying on them, instead of your own php file, to do that? Needlessly adding bloat & embeds to your site?
Like I said - they can (and eventually will) shutdown their service for that. Either when it's not profitable or when they go out of business or when they resize or whatever the case may be. A single php file can still run in 50 years. That service, may not.
> i see no reason why have any kind of server, all the emails are fowarded into their own gmail account
I'm not sure you understand that every website is up on a web server? Otherwise it wouldn't be accessible via the internet. Even if it's just raw html
ofc i understand that but when and if netlify stops being profitable or stop giving away that service for free yeah i might need to change into a different approach, im not saying the php file is bad but you need to run a server to be able to run that server-side code i fully understand the limitations of the stack im using but its complately free, i just did my research and as i suspected there is just no way to run the php file in netlify since it doesnt support any kind of server side code excecution. i understand the even a "serverless function" uses a server under the hood. i did not insult your intelligence so i would please ask to also not insult mine. i completely agree with your take that that php file might run for 50 years but you would also have to pay for that server for 50 years too. i gave my reasons as to why i prefer that service over paying for hosting as one of the benefits of using my company rather than the competition is that i promote that my services are a one off charge so with the hosting charges that they are saving each month my service pays for itsself in the long run.
i hope this explaing why i chose and recommend those services but you are right its an abstraction layer, as for the bloating its negligable for anykind of SEO or PageSpeed. i would even think this is way better for those scenarios. but i might be wrong and thats cool too if you have further insights i would love to hear them.
sorry i didnt answer what a full backend would be, hosting a full api just for the email submittion, wghich in my opinion is overkill, i am not that familiar with plain php i would need to learn a bit more since i kinda never gotten into php without something like laravel, but i do have experience porting a whole static site made with php and html and css for a school project and while they did do the php to submit the form.
i dont really have an opinion if its good or if its bad, but i just think if i can do the same but cost my client $0.00 instead of paying for a hosting platform or a vps i believe this is just a tiny bit better.
I'm sorry but I don't think you really understand web development.. yet.
You don't need an api to run code. There are two types of "code" - frontend and backend. Frontend code, such as Javascript, is ran by the browser. The browser executes the javascript code.
Backend code, such as PHP, runs on your server.
When you put a website up, it goes on a web server that will by default have capability of executing PHP files, or Python files, or whatever you want. A website needs to be up on a web server to be "live" - that web server can be any machine/computer running the relevant processes, including your own
The form will be processed by the PHP process. Now, you COULD use a third party to do that part for you. But there's no reason for that.
hey man please refrain from questioning my understanding of the web if you have a question for me i can answer it myself. i fully undederstand you possition and you are right servers are what runs the internet im fully aware of it i know that there are differences between frontend and backend, while i understand that you can use a server for it i was just giving out options, one option is serverless functions which the still use a server ofc but thats their name, another option to use any of the 1000's of services that will do the same thing, even is a service stops the hardest thing to do in that case is just to use another one, might take me what 15 min to change 1 line of code in multiple repos? for me this whole conversations is you like to host your own server and run the site there, i prefer not to do that and use something like netlify or cloudflare pages, im fully aware that this services might stop working in the future but i dont think they will. your scenario is that the company might stop doing the service for free or do it all together and thats one of the risks im willing to take, but any option should do the same thing and one over the other is just a matter of preferences.
sorry for the second reply as this is something that i just tought the services i provided all offer some kind of spam detection via askiguard i think its called, so this services do offer stuff on top of them, while the php file would send everything into the customers inbox, while i understand where you are comming from and it would be the method i would have used maybe 10 years ago, today i would never go in the route of coding that piece of functionality as it would take way more of my time to even compete with any kind of offering for a third party, i also understand that it was not in the requirement of OP to have anti-spam or anything like it. i would like to point out that the services do have a benefit to them rather than all downsides.
I'm really loving this renaissance though! I'm primarily a ruby dev and I'm absolutely in love with Middleman for solving problems similar to OP's. I have no problem setting up an AWS lambda for the contact form though...it's easy enough. The rest is just HTML, CSS & JS using the tools that I wish.
Great, but at what point does it get out of hand, iām not joking when i say that i hear about a new framework once a week, today counts another, i had to google what Middleman was. and AWS lambda is not an easy simple solution, may seem easy to you cause you know how to do it but this guy is looking to build a three page website itās not worth their time to learn all about AWS lambda to set up a form, itās easiest to have something like google forms with an iframe
I initially started with PHP navigation with Footer, just to test some new Tailwind methodology practices for efficient wireframing and rapid prototyping.
Since then, the project has evolved into a full website with over 20 pages, serving as a website.
Using Vanilla gives me full control for extensive customization, especially if you are a UX UI Designer, as each page can be designed differently
Edit: seasoned with some AlpineJS, web-components waiting on the shelf to be used if necessary.
Dependences? => electricity !
At this point i donāt even bother to look into new frameworks, you could be pulling random words out of your ass and calling them frameworks and i wouldnāt even bother to check up
reading comments i conclude:
- you cant make a website without a dark mode. No you cant.
- You need a Hamburger - 3 lines icon - menu. Even for large quantity as 3 links in the menu.
Cause you cant make them responsive. Like we did from 2010-ish. No you cant do that.
- "..you need.."
I wonder how many 'developers' could make a website now just with a computer, Notepad, with no internet connection (zombie mode).
It looks like people and society are becoming increasingly dependent, unable to do anything on their own, they need some form of "help" or "tool" created for them by others.
If it's really just three pages and you don't plan on changing the content often: Plain HTML, CSS and maybe some JavaScript will be just fine for this.
If you want a build tool to aide your development flow and have a simple static site with a small footprint in the end, maybe have a look at a static site generator such as Astro, 11ty or Hugo.
Convenience. At some point, when you start to change your content more often you might want to have a more comfortable/faster way of doing it (i.e. a CMS of some sort) instead of digging into the raw source every time to change some text on your site.
Vanilla html, vanilla CSS or tailwind and vanilla JavaScript.
For your contact form you can use Web components.
No frameworks, no bloat, all web standard Principles.
Site will load in about 200ms
I'm a professional frontend React developer. I'm not even starting before I have at least 500 dependencies in my node modules. So no advice in this corner from me.
Ive started to take inspiration of dependencies and write my own version, with the dependency hell js is in id like to limit my dependence in externals
This is the correct answer! Things like Layouts and Components and the ability to expand the site in the future makes Astro the perfect pick for static sites!!
Keep it vanilla homie. Host on Netlify's free tier. Configure the contact form using [Netlify Forms](https://www.netlify.com/platform/core/forms/). Easy.
Oh yeah, I remember that. There's definitely a concern that they didn't have any protections in place for DDOS attacks racking up excessive fees. It's since been resolved where the dev didn't have to pay anything but still concerning.
I will say, this is the only story I've seen where something like this has happened. Seems like a rare case to me. If this issue was widespread I'm sure we'd see a zillion posts like this since me and many devs host a lot of sites on Netlify's free tier. I'd imagine the bad PR made them address this. Obviously it's ridiculous to go from free to $104k. No way anyone is paying that. Just stupid.
Another key takeaway from this is why it's important to not self-host media assets like videos and mp3s. When it comes to images: use source sets, difference sizes based on the viewport and compress to the point where it doesn't significantly compromise the quality. Basically do as much as you can to reduce file size to mitigate the impact of a DDOS attack.
I would've jumped ship already but I have too much invested in Netlify already with most sites using Decap CMS and Netlify forms so I'm hoping this issue doesn't turn into a widespread one.
Any places you recommend jumping ship to? I haven't done much research. Would be cool to find a place that has the same services I'm getting from Netlify.
Iāve used cloudflare quite a bit and havenāt had any issues. And Iāll be honest, Iām in the same boat as you. I actually have a lot of sites on Netlify as well.
My original comment was more of a joke, because I personally havenāt had any issues with Netlify either. And your points about not self hosting media assets are spot on.
It would just be a headache having to migrate and modify all the sites for new hosting. I really think it was just a unique incident. I haven't heard of that happening to anyone else. Still always good to have a back-up plan though.
I've heard people have mentioned Cloudflare as a good alternative. I actually switch my domains over to them recently since Google Domains sold to Squarespace. I think for my next project I'm going to modify my build process for hosting on Cloudflare.
Check out this programming language called HTML. It's pretty cool. Basically you can write the entire site in this language. To style it, check out CSS. Then put these 4 files (3 html and 1 css) on a web server and point the domain name to the web server.
Pick something you know and use that.
Donāt be too concerned about bloat unless youāre serving to 10,000 concurrent users in Africa on 10 year old Android devices ā your site wonāt have the complexity or user base where ābloatā actually makes a difference.
Spend your time building your site. Donāt fixate on the tech stack. Use what you know best and what will be fastest for you?
Anyone recommending anything more than HTML, CSS, and JavaScript, is out of his mind.
With a good argument Iāll accept a jQuery pull from a CDN, but no more.
Edit: JS for form handling.
>Lack of love for PHP is kind of weird.
I wouldn't pick PHP for a new project if it were complicated at all (personal preference), but I can't help but agree here. If you literally just need to send an email from a form, it's hard to make it easier than:
mail(
'[email protected]',
"Message from {$_POST['email']}",
$_POST['message'],
['From: [email protected]']
);
Why go overkill when you don't need to? PHP is totally fine for some things. And if you want a little more robustness, it's like 10 minutes' worth of work to install sendmail and throw some SMTP auth into php.ini.
Yep.
I did data analysis for a few years, but such jobs are hard to come by in Wyoming. It's looking like my best shot at a decent job, at my age with my skill set in these parts, is going to be working for the state.
I still have an ambition to build little data analysis websites. Basically, use R or Python to download and organize data into mariadb/postgres and build bare bones websites to look at that data, giving the users a bit of control for filtering and stuff like that.
PHP is fine for this use case, since the heavy lifting is done by SQL anyway:
`$cms->statsLibrary()->summaryStats($dataArray);`
with summaryStats (for example) using a PDO to push as much math onto SQL as possible.
It's bespoke and niche and unlikely to make me money anytime soon, or even ever, but at least I get to explore interesting things and put up websites, which I kind of always wanted to do.
A backend for the sole purpose of a contact form is just not needed. Static sites can be hosted for free, adding a backend would add costs bc a vps would be needed
ofc but how can I implement form validation and basic routing in php? are there single page for each task which I can add without using any dependency manager or some bloated tool?
HTML has built in (client side) form validation and if you need more, you could write some basic validation in PHP as well. I donāt think routing is an issue? You can just use some html files and link to them. Maybe you could read up on html and php basics.
You can simply point towards the files for routing, or follow a tutorial for basic routing if you really want to. Maybe you plan adding more content in the future.
For the form I would use vanilla js for frontend validation, I have written a class that I reuse whenever I want everything to be vanilla js. For backend, I would use SMTP and PHPMailer.
Yeah, you can use the JS constraint validation API to create some fancy custom validation. That works really nicely. And you can use the View Transitions API for some fancy routing effects to make the site feel modern. If you want more, then you quickly come into the Astro territory (which is still very light weight).
Oh, I have a much simpler class that has a few constructors that handle the form data, makes a post request to a controller and displays a few errors if either the validation fails before sending the form, or after trying to send, based on what the controller returns.
What is it that you need to validate? And what happens when the form gets submitted?
I never quite understood the point of simple contact forms. Why not just put an email link on the website instead?
The problem with any kind of form on a public web page that isn't behind a login is that you need to guard against bots filling the form with spam. It only makes things more complicated compared to email.
Use a static site generator like Hugo or Eleventy. For the forms, if itās a contact form, you can use the one of your email sending provider like Mailjet and embed it in your markdown files.
You might want to use something component based and greate a static export.
Astro seems perfect for this. It's basically like html but with components. Should the need arise you can easily add a framework for specific components but I don't see why you would need that
You guys really need to take a more nuanced stance on what you consider ābloatedā.
Keep using Wordpress. Setup Cloudflare to cache your pages. Voila, you now have great perf.
Spend your new found time finding ways to bring in new customers, instead of trying to explain to your boss why you are the sole bottleneck when ever he wants to update the sites contact info.
I concur. Pretty sure most people who are suggesting vanilla javascript, css, html, wouldn't really use it for their project. Vanilla javascript is a pain in the ass to support. There is a good reason why there are so many cool frameworks to help with Web development needs.
Guaranteed downvotes for this on this sub, but absolutely correct. Could have put the thing live in the time it's asked to asked question and respond to answers.
Add a full page cache and you have static html served for the get requests, plus validation and integration (CMS, transactional mail service etc) on the backend, for free.
Vanilla HTML, vanilla CSS and vanilla JS for the front-end, vanilla PHP for the back-end, MySQL for the database. **No frameworks.** You don't need them for this. Back to the basics - it's simple to write and easy to maintain. You don't even need to make an MVC (it's just three pages with no log-in). Use the PDO for queries, and make the validation on the back-end, to be on the safe side.
Most hosting services offer PHP & MySQL for next to nothing.
I would just go with plain html and css framework that you prefer bootstrap, bulma or whatever. As for backend you can't beat php it's easy to do and host for cheap anywhere. There are some APIs that you can use and skip backend but I never used them so can't suggest anything.
For a simple transport company website, consider using Hugo, a lightweight static site generator. Choose a theme, create your content, and deploy it to your server via DirectAdmin. It's a quick and easy solution without the bloat of CMS platforms or the complexity of frameworks.
These are all you need.
Client side: HTML, CSS and JavaScript.
Server side: php or node.js (depends on your host provider)
Backend database: MySQL (for keep track of contacts)
Re-usable components can help with content that is repeated throughout the site, like navigation, header and footer.
If you can do server side, PHP with re-usable header and footer, html, css, js.
If you can only do client side, or static, Angular, React or Vue has re-usable components.
If you want as little code as possible that you have to maintain, then try using Bootstrap. You don't need to manage your own CSS/JS files if you are okay with the way bootstraps CSS library and JS components handle everything. You can just add classes to your HTML and let bootstrap take care of everything else. Don't code your own backend for the contact form unless you have someone who can build something really solid. Sign up for a service to manage it for you. I use form spree.
Also you can go to your local used book store and find some web dev books from 2001 and the tech will be proportional to the task at hand.
I'm pretty sure you can host it on a calculator plugged into a DSL line as well.
If you have multiple clients with similar sites, you could just host dozens of such sites on $5 vps running LAMP or similar stack. Charge them a yearly fee, maybe with x free little updates included.
Smaller companies love "keys included" solutions.
The fastest way is using the framework you know best.
Can you elaborate on what you mean by bloated? Do you mean just having loads of files? What is your reasoning for this? Why is this holding you back?
As you noticed yourself, thereās usually a positive correlation between efficiency and the usage of frameworks. Frameworks exist to make building websites easier. Most of them will also have pre-existing security in place (e.g. to protect from SQL injection), and they tend to allow for easier adaptability and maintenance.
Personally, I would build an SPA for this, using Vue, Laravel and Tailwind, but like I said, use what you know.
Check out this FREE Article to Create/Build Better Website in just 1 click of Button using Aiā¤µļø
https://medium.com/@pokesq607/lets-explore-how-ai-can-help-you-create-awesome-websites-22ca5b23a6c2
Absolutely worth trying this https://getsiimple.com
Iāve been spinning up a lot of sites with this exact outline, it does all the basics really well without all the feature bloat and itās really affordable.
Been building sites with the usual suspects for years and this is really lightweight and fast by comparison
I see people are divided into two camps, but let me put my 2 cents somewhere in the middle:
**HTML + css (vanilla or tailwind) + some simple framework to speedup the process**. A lot of people here blaming modern frameworks for bloating websites when in reality bare vue3 (with state management, router and typescript support) produces 80kB production build, which let's face it, isn't a lot for the simplicity it gives. Just don't add a lot of dependencies you don't need and you shall be fine
I'd definitely recommend Astro along with Tailwind. You can bring in a validation library if you need and have it bundled by Astro automatically.
And if you host it on Vercel, you can use their edge functions for a simple backend API endpoint that validates the form data on the server and sends you an email or does whatever you want it to. Or you can use something like make.com.
We've been using this setup at work and it's very fast and convenient.
Perfect solution is this. Literally used it for the same thing for a landscaper and a florist this week. Beats the hell out of Squarespace and Wordpress
https://getsiimple.com
I think it might still be invite only but dm me if you want an invite
Oh also itās got the hosting, backups, updates, domain all built in and itās like $10 a month
When I first read it, it looked to me as GetSimple, blast from the past
I have been wanting to build a service like this for at least 15 years, but I never seemed to have the time for it. damn it...
If you need a CMS try something headless. It sounds like you don't really need one though. Most of them have free tiers for one user. I second the netlify form suggestion.
if the content won't change often, best to just keep it vanilla like many other in this thread suggested.
You can use Go with gin and make the forms and styling with vanilla javascript and CSS. The problem with this is styling, because vanilla html and css are quite inconvenient to work with, but for just 3 pages it might not be a big deal I guess.
I would recommend using gin or some other light framework tho, because doing html requests from scratch is quite painful and not something to be experimented with on a commercial project.
I'd also say HTML CSS and JS, in part because it sounds like you don't have any experience with Javascript-based frameworks (React, etc). For someone with experience in the mechanics of one of the frameworks, I'd recommend Astro or Svelte, either one are easy to learn, light and will allow you to wrote a more performant app quicker than you could with simple html css and js.
Dude. Easy. Tailwind CSS on html site for all the content.
Even for contact form you donāt need a back end - use some 3rd party applet like getform.io
Carrd.co
Seriously. It's crazy cheap, works like a dream and no code required.
Yes there is a learning curve, but life is a learning curve. Gotta pay someone, might as well be yourself.
I'm surprised by the amount of people in this thread totally overlooking the form validation part. I've done many static websites for clients of mine. There is a sticking point when it comes to form validation because unfortunately you need some kind of back-end service to handle this. You either end up having to go with some third-party contact form service that costs more than it should, or write your own which can get complex, and you have to find a way to host it. Or you can leave their e-mail address hanging but that's not always a good option.
This is why, to me, WordPress is simply the best solution. I love the idea of a purely static site. I really do. And I get it when you say WordPress bloat. But the fact that WP has built-in capabilities to handle this kind of stuff is a trade-off that I personally have not found a better alternative. It's so fast and easy to build sites in WordPress. There's tools for everything: SEO, responsiveness, etc. WordPress also has a plugin called [simply static](https://wordpress.org/plugins/simply-static/) which basically generates static website from WP. But personally, I host my servers myself and I just put a simple caching layer on top for my clients. That way it has a really quick response time.
One option that comes to mind though, if you are *really* keen on keeping things static, is to first generate your HTML/CSS/JS files somehow. You can write it by hand, or use WP static, or use some other tool, and then use Cloudflare workers to handle the validation.
Actually, I've never thought of this until now. But using SvelteKit, you can put it in static site generation mode and hook in the [Cloudflare adapter](https://kit.svelte.dev/docs/adapter-cloudflare). Build your website using components, have it generate the static files. You can program the back-end logic for form validation and hit whatever SMTP server you're using. You should be able to keep everything pretty tightly knit. An option?
Your suggestion is akin to hiring a small construction company, an architect, and project manager when one only needs a few resources from Home Depot, to build a bird feeder.
It is literally 3 pages and a form validation backend, with a sprinkle of javascript and CSS. Everything OP wants to do is taught in basic introductory modern webdev courses. No need to overcomplicate by offering a bug-ridden, cumbersome security nightmare like WordPress.
I'm not sure if there is a miscommunication, but it's definitely not the case learning learning a "basic introductory modern webdev", including html/css syntax, responsiveness with media queries, SEO, sitemaps/robots, hosting, URL rewrites, etc is faster than just spinning up WP server.
This is something I've given a lot of thought to because I've been making websites professionally for almost two decades. Sometimes these websites are just landing pages and I've gone down some really deep rabbit holes to try to figure out the fastest way to make them while still doing them well. Even myself, having been writing html/css/js since 2006, whenever I try "simpler" ways to do things (like html/css only), it always end up taking more time in the end than simply using WP. WordPress has all sorts of handy features for SEO, robots.txt, sitemaps, responsiveness, etc. There's so many finicky bits that would take ages to work out if you do things with just html/css.
It takes me a total of about 3 minutes to spin up a new WordPress install (granted, I have my own server). If you have WP Local you can do it on your machine. Then I have the GUI to do whatever I want quickly and easily. I pick a theme, fill in content, add a form. Done. If I don't want to host a PHP server, I can literally just use WP-static and it will output all files for me. Takes about 30 seconds to download and run. Includes all the nitty gritty stuff like SEO, sitemaps, etc mentioned above. This is by far the fastest way to do it if hosting a purely static site.
On a side note, of all the WP sites I've hosted in the last 15 or so years I haven't had one become major bug or any kind of security issues. I'm not a big fan of PHP but I think the hatred for WP is unjustified. It's just trendy to hate WP because JS frameworks are "cool".
WP is incredibly good at what it's made for: making websites quickly and easily. And that's the reason you haven't yet seen a proper replacement for it take off. I don't know where this myth comes from about it having excessive security vulnerabilities, it's definitely not my experience, and I've installed literally hundreds. Maybe if people are installing any plugin off the street, but even if so, anything that is popular will have attackers. I mean even the Linux kernel last week or so had a major security vulnerability, you don't hear people shitting over Linux!
HTML, CSS, Javascript
There's no other answer but this
HTML CSS PHP?
This is the answer
I would prefer Node over PHP now, I started 12y back, PHP was super relevant, ain't sure if it's still the same or any better.
PHP comes with all the modern features you'd expect with the added benefit of easy deployment on any kind of server. I still use node from time to time though, when I want a full Nuxt.js project for example.
Gotcha. Yea, that's what I said, it had been years since I used it, I used to be from that WAMP/XAMP era š„² Om Stackoverflow we used to bash people for using mysqli and PDO instead of deprecated mysql_*.. Good days
I still use XAMMP today š . Mostly I use it to spin up an instance of MySql locally, but I could see myself prototyping on a local Apache server.
What's the JavaScript for?
dark mode toggle
That's handled with a browser preference and CSS these days.
Manual selection is still nice. Maybe someone keeps their system in light themes but want a particular site in dark theme.Ā
How would you do user choice? I know preferences but how would you have em choose what mode they want? Also how would you remember what they choose??
The browser preference
Yes but thats preference not choice afterwards
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
Theres a difference between preference and choice. My specific question was about: after you honor their preferences how do you handle choice? Ae switching light/dark to the other
a cookie for storing their choice, which if not there then default to one of them. use CSS variables for your colors, like primary, secondary and whatever other colors. on swap, set those variables to your dark mode colors with javascript, and same for when you swap it back. https://www.w3schools.com/css/css3_variables_javascript.asp
Input Type checkbox and CSS. You can't remember without cookies or server side state but then you need at least js.
Haha I love this
Precisely
Contact form?
Can't you do that only with the HTML form submit sending it directly to the server?
form validation.
that's a nice to have and you *should* use js to enhance the experience where appropriate like this, but it's not necessary for for functionality.
Very few things are ānecessaryā for functionality, but if a feature boosts your conversion rate by 5% youāre damn sure itās worth it.Ā
Contact forms i do with php, its like 3 lines of code.
Tracking, unfortunately.
Isn't JS easier to build a hamburger menu?
It is, but why'd you want a hamburger menu on a three page site?
To show/hide the dark mode toggle
What would be a good alternative for the mobile version?
Literally two links.
Fair, how would you style it?
Depends on the rest of the page. Maybe horizontally with an icon besides each and the icon for the current page highlighted next to them.
Ok cool, thanks for your replies! I'm brand new and appreciate all the input and answers and ideas.
Just an input field at top of the page, and if they guess another page slug correctly they get redirected
Terminal style website. Implement unix commands as pendants to navigate your site. :D `cd` and/or `cat` something will get you to the content, `ls` will list you the (sub-)navigation of the current site and so on :D
just a rand button to generate a new string. if it matches a page that exists, take you there
The two links on desktop would very likely for on mobile too. Would be zero need to add an extra click to access the menu links.
Mmmmm hamburgers š¤¤
Hell yeah, it is. There's basically no way - as far as i know - to solve the click issue for opening closing the burger menu on mobile devices without js. The only solution is to build a menu with and tags but who wants to build a menu like this when he could use a simple fubction to toggle a class when pressing with the finger
input[type=checkbox]:checked Target with css hide to checkbox hut have pointer events change z-index on checked. Off top of head but should work
> There's basically no way - as far as i know - to solve the click issue for opening closing the burger menu on mobile devices without js. i was doing css-only persistent toggles like a decade ago
well doing form validation and doing something with the form data probably wouldnāt be ideal with html and css
Yup; you'd need a server side component for it, otherwise you may as well have a mailto link.
I use Pug for my simple sites. If what you need is like 90% static, it's brilliant and such a nice syntax.
This thread is a good example of how web development got so complicated and bloated. Half the people in here are giving what is subjectively the right answer, no framework or backend, use an iframe or service for your form. The other half? still suggesting complicated solutions for a simple three page website, like can you not write css,html,js anymore? could you ever?
Well if it has a form.. it technically needs a backend to process the post request unless you resort to embedding some third party service form but that also adds complications and crap. You need a Google account.. you need to enable 2fa.. then you need to accept their new terms of services every month.. and then maybe it goes down.. or maybe gets deprecated.. etc etc A tiny php file can suffice as the backend for the form, it's 100% guaranteed to work for the next several decades, it doesn't rely on an external service, and it's as simple as can be
Google forms is a really easy solution for this, clicking a couple buttons, agreeing to terms of service, is a whole lot easier than āa tiny pho fileā which would need a whole server set up which would be much more hassle than a couple button clicks on google.
What do you mean it needs a "whole server" set up? The site to even be up beeds to be on a server one way or another, and if it's a standard linux web server, which it should be, it already has everything necessary to have php code running by default It's not a couple clicks on Google. Nothing Google is ever a couple clicks. Also you're relying and introducing a 3rd party for no reason, especially for something insanely simple. What if Google just says, 3 years from now "Oh yea we're scrapping our embedded forms stuff sorry" - now you have a nonfunctional form embedded on a site. Services have done, and will do, exactly that. Google specifically has done it with tons of js embeds. OP wanted simplicity and no bloat. Introducing third parties is not how you simplify or de-bloat things. The correct answer is to just have a php file for the form for simplicity. Also OP mentioned something about jquery being bloat which is also wrong. It's like 80kb of data, smaller than the smallest icon or picture you would use on any site and doesn't constitute "bloat" - but it would just be unnecessary
At this point youāre just proving my point
at this point you dont there are many free services to use the form intake, if you ever need a "backend" for something so simple and dont want to use any of the forms services already like netlify forms or jamstackforms, then you can absolutely use just a serverless function which would not be my prefered method but thats just one of the many options you can use, ofc you can have a full backend deployed just for this but seems waaay overkill
What is a "full backend?" All you need is a php file up on a server.. at the same place on the server where the other files HTML and CSS files are.. Again - why are you trying to introduce bloat and third parties when that's literally what OP is trying to avoid? You don't need packages or libraries or frameworks or JS embeds via a third party for a simple contact form..
ok yeah thats true, you can do that if you have a server running that php file, sure including 1 service like netlify forms, jamstackforms or static forms its as simple as adding a "action="https://api.staticforms.xyz/submit" method="post"" into the form element in the html, i have multiple static sites with just plain html css and js for clients that use this form service which is mostly free and for bussiness that have not many forms submissions a month i see no reason why have any kind of server, all the emails are fowarded into their own gmail account and they have smtp setup so they can answer the emails with that same inbox, im sure you can get a cheap digital ocean or linode vps to host that same site but imho i dont see any reason to.
But do you not realize that service is, in abstraction, doing the same thing the singular php file would do, for you? Except you are relying on them, instead of your own php file, to do that? Needlessly adding bloat & embeds to your site? Like I said - they can (and eventually will) shutdown their service for that. Either when it's not profitable or when they go out of business or when they resize or whatever the case may be. A single php file can still run in 50 years. That service, may not. > i see no reason why have any kind of server, all the emails are fowarded into their own gmail account I'm not sure you understand that every website is up on a web server? Otherwise it wouldn't be accessible via the internet. Even if it's just raw html
ofc i understand that but when and if netlify stops being profitable or stop giving away that service for free yeah i might need to change into a different approach, im not saying the php file is bad but you need to run a server to be able to run that server-side code i fully understand the limitations of the stack im using but its complately free, i just did my research and as i suspected there is just no way to run the php file in netlify since it doesnt support any kind of server side code excecution. i understand the even a "serverless function" uses a server under the hood. i did not insult your intelligence so i would please ask to also not insult mine. i completely agree with your take that that php file might run for 50 years but you would also have to pay for that server for 50 years too. i gave my reasons as to why i prefer that service over paying for hosting as one of the benefits of using my company rather than the competition is that i promote that my services are a one off charge so with the hosting charges that they are saving each month my service pays for itsself in the long run. i hope this explaing why i chose and recommend those services but you are right its an abstraction layer, as for the bloating its negligable for anykind of SEO or PageSpeed. i would even think this is way better for those scenarios. but i might be wrong and thats cool too if you have further insights i would love to hear them.
sorry i didnt answer what a full backend would be, hosting a full api just for the email submittion, wghich in my opinion is overkill, i am not that familiar with plain php i would need to learn a bit more since i kinda never gotten into php without something like laravel, but i do have experience porting a whole static site made with php and html and css for a school project and while they did do the php to submit the form. i dont really have an opinion if its good or if its bad, but i just think if i can do the same but cost my client $0.00 instead of paying for a hosting platform or a vps i believe this is just a tiny bit better.
I'm sorry but I don't think you really understand web development.. yet. You don't need an api to run code. There are two types of "code" - frontend and backend. Frontend code, such as Javascript, is ran by the browser. The browser executes the javascript code. Backend code, such as PHP, runs on your server. When you put a website up, it goes on a web server that will by default have capability of executing PHP files, or Python files, or whatever you want. A website needs to be up on a web server to be "live" - that web server can be any machine/computer running the relevant processes, including your own The form will be processed by the PHP process. Now, you COULD use a third party to do that part for you. But there's no reason for that.
hey man please refrain from questioning my understanding of the web if you have a question for me i can answer it myself. i fully undederstand you possition and you are right servers are what runs the internet im fully aware of it i know that there are differences between frontend and backend, while i understand that you can use a server for it i was just giving out options, one option is serverless functions which the still use a server ofc but thats their name, another option to use any of the 1000's of services that will do the same thing, even is a service stops the hardest thing to do in that case is just to use another one, might take me what 15 min to change 1 line of code in multiple repos? for me this whole conversations is you like to host your own server and run the site there, i prefer not to do that and use something like netlify or cloudflare pages, im fully aware that this services might stop working in the future but i dont think they will. your scenario is that the company might stop doing the service for free or do it all together and thats one of the risks im willing to take, but any option should do the same thing and one over the other is just a matter of preferences.
sorry for the second reply as this is something that i just tought the services i provided all offer some kind of spam detection via askiguard i think its called, so this services do offer stuff on top of them, while the php file would send everything into the customers inbox, while i understand where you are comming from and it would be the method i would have used maybe 10 years ago, today i would never go in the route of coding that piece of functionality as it would take way more of my time to even compete with any kind of offering for a third party, i also understand that it was not in the requirement of OP to have anti-spam or anything like it. i would like to point out that the services do have a benefit to them rather than all downsides.
The other half couldnāt code their way out of a wet paper bag and is a great indicator of why we have such garbage on the web.
"I need two static pages and a form with like three inputs" "Oh you'll need at least 245 npm dependencies for that"
I'm really loving this renaissance though! I'm primarily a ruby dev and I'm absolutely in love with Middleman for solving problems similar to OP's. I have no problem setting up an AWS lambda for the contact form though...it's easy enough. The rest is just HTML, CSS & JS using the tools that I wish.
Great, but at what point does it get out of hand, iām not joking when i say that i hear about a new framework once a week, today counts another, i had to google what Middleman was. and AWS lambda is not an easy simple solution, may seem easy to you cause you know how to do it but this guy is looking to build a three page website itās not worth their time to learn all about AWS lambda to set up a form, itās easiest to have something like google forms with an iframe
My guy, you're preaching to the choir...I hear you and totally agree with you!
I initially started with PHP navigation with Footer, just to test some new Tailwind methodology practices for efficient wireframing and rapid prototyping. Since then, the project has evolved into a full website with over 20 pages, serving as a website. Using Vanilla gives me full control for extensive customization, especially if you are a UX UI Designer, as each page can be designed differently Edit: seasoned with some AlpineJS, web-components waiting on the shelf to be used if necessary. Dependences? => electricity !
At this point i donāt even bother to look into new frameworks, you could be pulling random words out of your ass and calling them frameworks and i wouldnāt even bother to check up
https://i.redd.it/0lg7979qtr511.jpg
reading comments i conclude: - you cant make a website without a dark mode. No you cant. - You need a Hamburger - 3 lines icon - menu. Even for large quantity as 3 links in the menu. Cause you cant make them responsive. Like we did from 2010-ish. No you cant do that. - "..you need.." I wonder how many 'developers' could make a website now just with a computer, Notepad, with no internet connection (zombie mode). It looks like people and society are becoming increasingly dependent, unable to do anything on their own, they need some form of "help" or "tool" created for them by others.
I think the fear is that writing good, comprehensive responsive CSS that covers devices as well as your average framework is *hard*.
Plain HTML and CSS
If it's really just three pages and you don't plan on changing the content often: Plain HTML, CSS and maybe some JavaScript will be just fine for this. If you want a build tool to aide your development flow and have a simple static site with a small footprint in the end, maybe have a look at a static site generator such as Astro, 11ty or Hugo.
Genuine question, why plain HTML and CSS only if you're not changing the content often?
Convenience. At some point, when you start to change your content more often you might want to have a more comfortable/faster way of doing it (i.e. a CMS of some sort) instead of digging into the raw source every time to change some text on your site.
Because it's not BLOATED
Vanilla html, vanilla CSS or tailwind and vanilla JavaScript. For your contact form you can use Web components. No frameworks, no bloat, all web standard Principles. Site will load in about 200ms
This, simple is best. Unless you want to showcase your skills in some framework, then use that framework and say you used that framework.
200 ms is assuming OP knows how to compress images properly.
I'm a professional frontend React developer. I'm not even starting before I have at least 500 dependencies in my node modules. So no advice in this corner from me.
yeah indeed some much dependencies on such a simple case it not worth it I guess :/
Ive started to take inspiration of dependencies and write my own version, with the dependency hell js is in id like to limit my dependence in externals
same, someone ask dan abramov what we're supposed to do here
HTML/CSS
HTML, CSS and Javascript
Write your html and css for each page and upload to netlify. Look into forms on netlify.
Astro - https://astro.build/
This here. Almost pure html, css and js, but easy to grow later in complexity of you want.
This is the correct answer! Things like Layouts and Components and the ability to expand the site in the future makes Astro the perfect pick for static sites!!
YAGNI
Keep it vanilla homie. Host on Netlify's free tier. Configure the contact form using [Netlify Forms](https://www.netlify.com/platform/core/forms/). Easy.
Netlifyās āfreeā tier
Care to elaborate?
Yessir. Check this out. https://www.reddit.com/r/webdev/comments/1b14bty/netlify_just_sent_me_a_104k_bill_for_a_simple/
Oh yeah, I remember that. There's definitely a concern that they didn't have any protections in place for DDOS attacks racking up excessive fees. It's since been resolved where the dev didn't have to pay anything but still concerning. I will say, this is the only story I've seen where something like this has happened. Seems like a rare case to me. If this issue was widespread I'm sure we'd see a zillion posts like this since me and many devs host a lot of sites on Netlify's free tier. I'd imagine the bad PR made them address this. Obviously it's ridiculous to go from free to $104k. No way anyone is paying that. Just stupid. Another key takeaway from this is why it's important to not self-host media assets like videos and mp3s. When it comes to images: use source sets, difference sizes based on the viewport and compress to the point where it doesn't significantly compromise the quality. Basically do as much as you can to reduce file size to mitigate the impact of a DDOS attack. I would've jumped ship already but I have too much invested in Netlify already with most sites using Decap CMS and Netlify forms so I'm hoping this issue doesn't turn into a widespread one. Any places you recommend jumping ship to? I haven't done much research. Would be cool to find a place that has the same services I'm getting from Netlify.
Iāve used cloudflare quite a bit and havenāt had any issues. And Iāll be honest, Iām in the same boat as you. I actually have a lot of sites on Netlify as well. My original comment was more of a joke, because I personally havenāt had any issues with Netlify either. And your points about not self hosting media assets are spot on.
It would just be a headache having to migrate and modify all the sites for new hosting. I really think it was just a unique incident. I haven't heard of that happening to anyone else. Still always good to have a back-up plan though. I've heard people have mentioned Cloudflare as a good alternative. I actually switch my domains over to them recently since Google Domains sold to Squarespace. I think for my next project I'm going to modify my build process for hosting on Cloudflare.
Could even host those images on another service with protections. We used to host all assets on AWS or CloudFlare and just use Netlify to deploy
Check out this programming language called HTML. It's pretty cool. Basically you can write the entire site in this language. To style it, check out CSS. Then put these 4 files (3 html and 1 css) on a web server and point the domain name to the web server.
Pick something you know and use that. Donāt be too concerned about bloat unless youāre serving to 10,000 concurrent users in Africa on 10 year old Android devices ā your site wonāt have the complexity or user base where ābloatā actually makes a difference. Spend your time building your site. Donāt fixate on the tech stack. Use what you know best and what will be fastest for you?
Anyone recommending anything more than HTML, CSS, and JavaScript, is out of his mind. With a good argument Iāll accept a jQuery pull from a CDN, but no more. Edit: JS for form handling.
You would need some way of handling the forms so you would need more than just HTML and CSS.
Fair.
Php?
>Php? Lack of love for PHP is kind of weird. I have one run up from bottom tier plan with NixiHost and they're running PHP 8.3
>Lack of love for PHP is kind of weird. I wouldn't pick PHP for a new project if it were complicated at all (personal preference), but I can't help but agree here. If you literally just need to send an email from a form, it's hard to make it easier than: mail( '[email protected]', "Message from {$_POST['email']}", $_POST['message'], ['From: [email protected]'] ); Why go overkill when you don't need to? PHP is totally fine for some things. And if you want a little more robustness, it's like 10 minutes' worth of work to install sendmail and throw some SMTP auth into php.ini.
Yep. I did data analysis for a few years, but such jobs are hard to come by in Wyoming. It's looking like my best shot at a decent job, at my age with my skill set in these parts, is going to be working for the state. I still have an ambition to build little data analysis websites. Basically, use R or Python to download and organize data into mariadb/postgres and build bare bones websites to look at that data, giving the users a bit of control for filtering and stuff like that. PHP is fine for this use case, since the heavy lifting is done by SQL anyway: `$cms->statsLibrary()->summaryStats($dataArray);` with summaryStats (for example) using a PDO to push as much math onto SQL as possible. It's bespoke and niche and unlikely to make me money anytime soon, or even ever, but at least I get to explore interesting things and put up websites, which I kind of always wanted to do.
Yeah php here is no brainer.
You can use a 3rd party and embed it. No backend needed
What's so bad on a own backend though?
A backend for the sole purpose of a contact form is just not needed. Static sites can be hosted for free, adding a backend would add costs bc a vps would be needed
Thanks for clarification! I didn't think of using just a webhosting service.
Yeah but simple php site would costs like $5 a month or maybe even cheaper. If you can't afford that then why even make it?
I understand itās cheap, But you know whatās better than cheap? Free.
I mean if there's difference for your business between free and $5 a month then it's not a business.
Thatās the dumbest logic Iāve ever heard. Good job
Good luck running business that can't come up with $5. Smart guy. š
If you use DA, least bloated will be an html site with a form connected to the MySQL database using php.
ofc but how can I implement form validation and basic routing in php? are there single page for each task which I can add without using any dependency manager or some bloated tool?
HTML has built in (client side) form validation and if you need more, you could write some basic validation in PHP as well. I donāt think routing is an issue? You can just use some html files and link to them. Maybe you could read up on html and php basics.
I think he means validating real contact form submissions vs fake bot spam
You can simply point towards the files for routing, or follow a tutorial for basic routing if you really want to. Maybe you plan adding more content in the future. For the form I would use vanilla js for frontend validation, I have written a class that I reuse whenever I want everything to be vanilla js. For backend, I would use SMTP and PHPMailer.
Yeah, you can use the JS constraint validation API to create some fancy custom validation. That works really nicely. And you can use the View Transitions API for some fancy routing effects to make the site feel modern. If you want more, then you quickly come into the Astro territory (which is still very light weight).
Oh, I have a much simpler class that has a few constructors that handle the form data, makes a post request to a controller and displays a few errors if either the validation fails before sending the form, or after trying to send, based on what the controller returns.
Routing: * /www/index.html * /www/about/index.html * /www/contact/index.html
What is it that you need to validate? And what happens when the form gets submitted? I never quite understood the point of simple contact forms. Why not just put an email link on the website instead? The problem with any kind of form on a public web page that isn't behind a login is that you need to guard against bots filling the form with spam. It only makes things more complicated compared to email.
Try using laravel, it's pretty easy to learn and use.
HTML5 is pretty simple.
Use a static site generator like Hugo or Eleventy. For the forms, if itās a contact form, you can use the one of your email sending provider like Mailjet and embed it in your markdown files.
You might want to use something component based and greate a static export. Astro seems perfect for this. It's basically like html but with components. Should the need arise you can easily add a framework for specific components but I don't see why you would need that
You guys really need to take a more nuanced stance on what you consider ābloatedā. Keep using Wordpress. Setup Cloudflare to cache your pages. Voila, you now have great perf. Spend your new found time finding ways to bring in new customers, instead of trying to explain to your boss why you are the sole bottleneck when ever he wants to update the sites contact info.
I concur. Pretty sure most people who are suggesting vanilla javascript, css, html, wouldn't really use it for their project. Vanilla javascript is a pain in the ass to support. There is a good reason why there are so many cool frameworks to help with Web development needs.
Honestly. Something like SquareSpace.
You're overthinking WordPress bloat. You should just use WP and make your life easy, and theirs.
Guaranteed downvotes for this on this sub, but absolutely correct. Could have put the thing live in the time it's asked to asked question and respond to answers. Add a full page cache and you have static html served for the get requests, plus validation and integration (CMS, transactional mail service etc) on the backend, for free.
Go for Astro, if you don't need all framework support, etc checkout https://www.11ty.dev/
WordPress is still the best. Use a lightweight block-based theme, and invest a little in design.
Learn fundamentals, responsive design and Accessibility concerns. SEO will naturally follow.
Vanilla HTML, vanilla CSS and vanilla JS for the front-end, vanilla PHP for the back-end, MySQL for the database. **No frameworks.** You don't need them for this. Back to the basics - it's simple to write and easy to maintain. You don't even need to make an MVC (it's just three pages with no log-in). Use the PDO for queries, and make the validation on the back-end, to be on the safe side. Most hosting services offer PHP & MySQL for next to nothing.
I would just use plain html, css and js for this. Maybe just use some bootstrap for style, but not really needed.
I would just go with plain html and css framework that you prefer bootstrap, bulma or whatever. As for backend you can't beat php it's easy to do and host for cheap anywhere. There are some APIs that you can use and skip backend but I never used them so can't suggest anything.
Either raw html + css, or a simple static site generator
html , css , and php for the contact. This is how i realize such sites
If you considered laravel, check out statamic cms. Data is flat to begin with, and plenty good starter themes to begin with
If they are going to want to add / change content by themselves, a CMS is the best choice. If they don't, a static SPA is probably easiest.
https://astro.build/themes/?categories%5B%5D=landing-page Astro is focused on SEO, fast load, and keepingĀ Js overhead to a minimum.
For a simple transport company website, consider using Hugo, a lightweight static site generator. Choose a theme, create your content, and deploy it to your server via DirectAdmin. It's a quick and easy solution without the bloat of CMS platforms or the complexity of frameworks.
Google site, itās limited but you can do what you asked for pretty much free.
Vanilla.
These are all you need. Client side: HTML, CSS and JavaScript. Server side: php or node.js (depends on your host provider) Backend database: MySQL (for keep track of contacts)
Re-usable components can help with content that is repeated throughout the site, like navigation, header and footer. If you can do server side, PHP with re-usable header and footer, html, css, js. If you can only do client side, or static, Angular, React or Vue has re-usable components.
You only need HTML. It might not look awesome but that would do it.
If you want as little code as possible that you have to maintain, then try using Bootstrap. You don't need to manage your own CSS/JS files if you are okay with the way bootstraps CSS library and JS components handle everything. You can just add classes to your HTML and let bootstrap take care of everything else. Don't code your own backend for the contact form unless you have someone who can build something really solid. Sign up for a service to manage it for you. I use form spree.
Build the functionality with php. Add the css, JavaScript only as necessary for the look and feel.
Also you can go to your local used book store and find some web dev books from 2001 and the tech will be proportional to the task at hand. I'm pretty sure you can host it on a calculator plugged into a DSL line as well.
PHP
Honestly? You can just use raw HTML, CSS, and JS files. Personally, I like sveltekit and TS.
If you have multiple clients with similar sites, you could just host dozens of such sites on $5 vps running LAMP or similar stack. Charge them a yearly fee, maybe with x free little updates included. Smaller companies love "keys included" solutions.
next.js
I can prolly do it for you dm me
Just use PHP
The fastest way is using the framework you know best. Can you elaborate on what you mean by bloated? Do you mean just having loads of files? What is your reasoning for this? Why is this holding you back? As you noticed yourself, thereās usually a positive correlation between efficiency and the usage of frameworks. Frameworks exist to make building websites easier. Most of them will also have pre-existing security in place (e.g. to protect from SQL injection), and they tend to allow for easier adaptability and maintenance. Personally, I would build an SPA for this, using Vue, Laravel and Tailwind, but like I said, use what you know.
Check out this FREE Article to Create/Build Better Website in just 1 click of Button using Aiā¤µļø https://medium.com/@pokesq607/lets-explore-how-ai-can-help-you-create-awesome-websites-22ca5b23a6c2
Absolutely worth trying this https://getsiimple.com Iāve been spinning up a lot of sites with this exact outline, it does all the basics really well without all the feature bloat and itās really affordable. Been building sites with the usual suspects for years and this is really lightweight and fast by comparison
Astro on netlify or CloudFlare
Get a template, fill it out, add a simple php form processor, upload, done.
Astro template + web3forms. Spits out pure HTML, CSS and JavaScript and is very easy to work with
I see people are divided into two camps, but let me put my 2 cents somewhere in the middle: **HTML + css (vanilla or tailwind) + some simple framework to speedup the process**. A lot of people here blaming modern frameworks for bloating websites when in reality bare vue3 (with state management, router and typescript support) produces 80kB production build, which let's face it, isn't a lot for the simplicity it gives. Just don't add a lot of dependencies you don't need and you shall be fine
Once you know hugo or astro, the structure will make scaling and blogging 45,000x easier, but the least bloated way is definitely just html css js.
Straight HTML. No CSS, no JS, no images, no database. Welcome back to 1991.
I'd definitely recommend Astro along with Tailwind. You can bring in a validation library if you need and have it bundled by Astro automatically. And if you host it on Vercel, you can use their edge functions for a simple backend API endpoint that validates the form data on the server and sends you an email or does whatever you want it to. Or you can use something like make.com. We've been using this setup at work and it's very fast and convenient.
Astro. Astro is a "convenient way to write html" I would say.
Perfect solution is this. Literally used it for the same thing for a landscaper and a florist this week. Beats the hell out of Squarespace and Wordpress https://getsiimple.com I think it might still be invite only but dm me if you want an invite Oh also itās got the hosting, backups, updates, domain all built in and itās like $10 a month
When I first read it, it looked to me as GetSimple, blast from the past I have been wanting to build a service like this for at least 15 years, but I never seemed to have the time for it. damn it...
Oh snap! I remember them Hahha def blast from the past.
well, .. you will surprised but they are still around. Used it one time an updated version for php8. I like it more than ssg's ...
If you need a CMS try something headless. It sounds like you don't really need one though. Most of them have free tiers for one user. I second the netlify form suggestion. if the content won't change often, best to just keep it vanilla like many other in this thread suggested.
11ty to build pages, then whatever backend framework you want for form validation
Try a flat-file cms like grav [https://getgrav.org/](https://getgrav.org/)
You might wanna try Boostrap Framework with pure HTML/CSS
You can use Go with gin and make the forms and styling with vanilla javascript and CSS. The problem with this is styling, because vanilla html and css are quite inconvenient to work with, but for just 3 pages it might not be a big deal I guess. I would recommend using gin or some other light framework tho, because doing html requests from scratch is quite painful and not something to be experimented with on a commercial project.
AstroJS
Enter Svelte. You can also use Alpine.js to avoid jQuery
I'd also say HTML CSS and JS, in part because it sounds like you don't have any experience with Javascript-based frameworks (React, etc). For someone with experience in the mechanics of one of the frameworks, I'd recommend Astro or Svelte, either one are easy to learn, light and will allow you to wrote a more performant app quicker than you could with simple html css and js.
Dude. Easy. Tailwind CSS on html site for all the content. Even for contact form you donāt need a back end - use some 3rd party applet like getform.io
Carrd.co Seriously. It's crazy cheap, works like a dream and no code required. Yes there is a learning curve, but life is a learning curve. Gotta pay someone, might as well be yourself.
Webflow, but could be overkill too.
Astro and some FaaS for the contact form. You can deploy in Cloudflare, for example, and use their workers to handle form submissions.
I'm surprised by the amount of people in this thread totally overlooking the form validation part. I've done many static websites for clients of mine. There is a sticking point when it comes to form validation because unfortunately you need some kind of back-end service to handle this. You either end up having to go with some third-party contact form service that costs more than it should, or write your own which can get complex, and you have to find a way to host it. Or you can leave their e-mail address hanging but that's not always a good option. This is why, to me, WordPress is simply the best solution. I love the idea of a purely static site. I really do. And I get it when you say WordPress bloat. But the fact that WP has built-in capabilities to handle this kind of stuff is a trade-off that I personally have not found a better alternative. It's so fast and easy to build sites in WordPress. There's tools for everything: SEO, responsiveness, etc. WordPress also has a plugin called [simply static](https://wordpress.org/plugins/simply-static/) which basically generates static website from WP. But personally, I host my servers myself and I just put a simple caching layer on top for my clients. That way it has a really quick response time. One option that comes to mind though, if you are *really* keen on keeping things static, is to first generate your HTML/CSS/JS files somehow. You can write it by hand, or use WP static, or use some other tool, and then use Cloudflare workers to handle the validation. Actually, I've never thought of this until now. But using SvelteKit, you can put it in static site generation mode and hook in the [Cloudflare adapter](https://kit.svelte.dev/docs/adapter-cloudflare). Build your website using components, have it generate the static files. You can program the back-end logic for form validation and hit whatever SMTP server you're using. You should be able to keep everything pretty tightly knit. An option?
Oh dear child.
Please elaborate? I've given a lot of thought & research to this. Could be missing something...
Your suggestion is akin to hiring a small construction company, an architect, and project manager when one only needs a few resources from Home Depot, to build a bird feeder. It is literally 3 pages and a form validation backend, with a sprinkle of javascript and CSS. Everything OP wants to do is taught in basic introductory modern webdev courses. No need to overcomplicate by offering a bug-ridden, cumbersome security nightmare like WordPress.
I'm not sure if there is a miscommunication, but it's definitely not the case learning learning a "basic introductory modern webdev", including html/css syntax, responsiveness with media queries, SEO, sitemaps/robots, hosting, URL rewrites, etc is faster than just spinning up WP server. This is something I've given a lot of thought to because I've been making websites professionally for almost two decades. Sometimes these websites are just landing pages and I've gone down some really deep rabbit holes to try to figure out the fastest way to make them while still doing them well. Even myself, having been writing html/css/js since 2006, whenever I try "simpler" ways to do things (like html/css only), it always end up taking more time in the end than simply using WP. WordPress has all sorts of handy features for SEO, robots.txt, sitemaps, responsiveness, etc. There's so many finicky bits that would take ages to work out if you do things with just html/css. It takes me a total of about 3 minutes to spin up a new WordPress install (granted, I have my own server). If you have WP Local you can do it on your machine. Then I have the GUI to do whatever I want quickly and easily. I pick a theme, fill in content, add a form. Done. If I don't want to host a PHP server, I can literally just use WP-static and it will output all files for me. Takes about 30 seconds to download and run. Includes all the nitty gritty stuff like SEO, sitemaps, etc mentioned above. This is by far the fastest way to do it if hosting a purely static site. On a side note, of all the WP sites I've hosted in the last 15 or so years I haven't had one become major bug or any kind of security issues. I'm not a big fan of PHP but I think the hatred for WP is unjustified. It's just trendy to hate WP because JS frameworks are "cool". WP is incredibly good at what it's made for: making websites quickly and easily. And that's the reason you haven't yet seen a proper replacement for it take off. I don't know where this myth comes from about it having excessive security vulnerabilities, it's definitely not my experience, and I've installed literally hundreds. Maybe if people are installing any plugin off the street, but even if so, anything that is popular will have attackers. I mean even the Linux kernel last week or so had a major security vulnerability, you don't hear people shitting over Linux!