Syntax Video
How to Build a Website From Scratch
- 0:00 Welcome
- 2:00 Syntax Brought to you by Sentry
- 3:02 How do you build a website?
- 4:54 Start with the design
- 11:06 Choose a Frontend / Components
- 25:22 Real data or fake data?
- 29:49 Do you need a CMS or not?
- 35:16 Choosing a backend language or framework
- 39:55 Testing
- 44:44 Where do you host your website?
- 50:08 Sick Picks
Welcome
welcome to syntax we got one today for you how to build a website or an app we got a really good question from someone I'll just read it real quick because it gives you kind of an idea of what we're talking about is hi guys love the show a question for both of you what is your actual workflow When developing application for example say you're building a list of podcast episodes for a podcast website hypothetically something we've done what are the low-level steps you follow do you use a design um figma pen and paper something else do you wire up the API and first out put um the data or do you use mock dummy data and then wire it up later uh do you work in components in isolation or do you build them in place I'm keing to hear about the effective workflows I thought this was awesome this is the entire show um just how do you build a website right there's there's so many different moving parts to it and not only like what do you use but like what's your approach how do you even think about choosing these types of things so that's what we're going to be talking about today uh with me as always
is Mr Scott tulinsky how you doing today Scott hey I'm doing super good hanging out here it is snowing like crazy we got like a foot of snow just out of nowhere yeah just just shocking wild to me because you like your Instagram story is always hilarious it's like you're sitting in your backyard watching a movie and then like a day later you've got a foot of snow we we had a party like last Sunday outside I was wearing shorts all evening shorts at at night 9:00 so it was like warm enough that you could be just you know chilling in shorts and then a week later you get dumped on by snow of course a couple days right before Halloween so that means I got to go trick-or-treating tonight with with like it is like so cold out west I'm going to be bundled up it's like the absolute worst besid the only way it could get worse for trick-or-treating is if it was raining right now but uh you know the kids are
going to go nuts so it doesn't matter oh man uh So speaking of building a website uh when you do build your website you're GNA goof it up you're gonna screw something up you're gonna some sort of bug that you cannot figure out because the user is using the website wrong and you never thought that that would ever possibly happen uh and for that you're going to need Sentry to help you figure out what's going on with that we had one of the bugs on the new syntax website where I was looking at it and I thought I don't see how this would ever possibly happen I don't see how anyone would ever get in into the situation where they could click this button and they were not in the in the state that they were and uh we used the Sentry uh session replay and boom I was able to see exactly how they did also I got to see them get frustrated and leave the website so check it out sentry.io uh and are were we given the coupon codes still there Scott um I have
Syntax Brought to you by Sentry
been yeah let's let's do it uh sentry.io and use C coupon code tasty treat two months for free all right so how do you build a website Scott yeah you know what for me I think this is going to differ from person to person and and I think that's an important distinction because we all come with our own I don't want to say baggage but our own background of where we learned what we learned got baggage how yeah I got baggage I in fact I need new baggage I've been shopping for luggage that's for sure just about what what type of specific background we have and if you think about it it all kind of starts with the very first visual side of things you know some people would want to go into wire Framing and and really understand the flow of a website before they get into it other people want to get right into that code I'm going get it right into the code kind of person mostly because I
How do you build a website?
have ADHD but also because I'm probably the most comfortable prototyping things out quickly in code and seeing it kind of form in a browser other people are going to go straight to a tool that allows them to start to see things visually in a way like wireframing tools or uh maybe even get right into design tools and skip the wireframing tools um so you know it it all depends on what your background is but also the best way that you can start to visualize something coming together right yeah it's it's kind of funny because building a website much like learning how to do websites is it's not linear meaning that like it's not a set of nice clean crisp steps where you do one one thing next after another and um the larger the team you're on the more that actually does need to be linear the more you actually need a system that is uh has rules and and is a little bit more rigid um so that you can do things a little bit more smoothly rather than sort of just
bouncing around uh from thing to thing so let's start with the the design uh that you have there so you can you can pick up a design tool um or you can just start start winging it like Scott says you can start winging it right away in in CSS I tend myself I tend to fiddle around in figma uh to get a sort of look and feel for for all my websites so I'll get in there I'll get the color scheme down I'll get sort of the layout down I'll build like the the major things like headings text buttons uh cards all of like kind of those look cuz I I feel like it's a bit faster to do that in a figma tool um to play around with things and then once I'm like pretty happy like if you were to look at any of the designs that I've done for any of my websites they're nowhere near a polished Website Layout or a bunch of nice clean
Start with the design
components um it's just kind of like a all right I I think I can see what I'm doing there I do the same thing with recipes when I'm cooking I'll read three or four recipes and and then I just go all right I get it you know I get it and I'm just going to go wing it and for a lot of people they don't like that because they rather just follow every single step and do it linearly but I can just kind of say all right I kind of feel like I know what I'm doing here it'll probably deviate once I get into the code but at least I'm on the right track and I have something that I can work towards because when you're trying to make it look good and fuss with the code it's a little bit frustrating because then you got two things battling against you yeah and and we kind of touched on this in the episode about the new syntax website itself but I personally can get right into building a design system out and then letting the design kind of come together that way so instead of Designing and then going from design to website I'm like I'm working on the
system I'm working on grabbing a font scale grabbing some colors grabbing some palettes and then just tossing things out and I think that does limit limit my designs in a very specific way um because you don't necessarily get that playfulness that you can get with figma moving things around dragging things around getting that kind of quick feedback loop you're more or less working on the structure and if you were to I I'm sure I have some screenshots of this somewhere but like if you were to look at some of the first versions of the syntax site it is apparent that it is like a system based design and not a like creative based design and I I think that is definitely liting which is one of the reasons why I like working with designers so much but if you can't work with designers it's kind of about knowing your limitations right you kind of have to know where you're at in that scheme okay I'm building a website what is my level of design background am I comfortable with design all right if you answer not at all I'm not comfortable
with design you want to get the most TurnKey already predesigned for you thing out there and then just make it look nice designed by engineer is not cute um that's like an aesthetic that like I I swear I was on Hacker News the other day and there was like an open- Source YouTube alternative and everybody's like oh this is so needed and you click on it and it looked like dog beep it looked awful and I I I just comment I was like you know they could have used a design system or pre-made anything and it would have looked a lot better and they're like why don't you Fork it and do it yourself it's like okay well I'm just you know that's positive feedback right there I think if you if you're design if you're an engineer straight up and you don't know design always just use a fully fully designed pre-made thing that you can and then elaborate from there if you are a little bit comfortable take that next step use something like Tailwind or open props something that
gives you more handholding in the aspects of things to build out a more standardized system if you're very comfortable with design yeah go just straight up see CSS to the Dome you know don't add anything else in there and and go nuts with it maybe use some post CSS or some helper libraries here or there or whatever uh me personally uh it all just depends on on what level of comfort you have in being able to make things look nice yourself I was just going to shout out the Brad Frost episode on Design Systems so syntax FM 682 man I love being able to give out those URLs to people um the short ones yeah yeah it's it's so nice because you can just say go to syntax FM 682 you know also another thing I never we never talked about this when we talked about the new website is if you listen on Spotify or iTunes um is it on iTunes as well no it's not it's just Spotify this is It's
a limitation of the thing but if you often we'll shout out an episode and you can go on Spotify and search that number like you could go on on Spotify and search syntax 682 and and that episode will pop up but now there is a button on the syntax website for each episode which will click you through to Spotify and there's some sauce we put in the URL that will hopefully in in every single case show you the episode we're talking about in Spotify because that sometimes it disconnects like okay I see it on the website but like I don't want to listen to it on the website I want to listen to it in Spotify so we have that now so check it out yeah can we go shorter Wes can we go shorter oh Scott just uh sent me a short domain name that's available I oh syntax. FM 682 that that that's pretty easy to say you
could and we're not gonna say it because a couple of you listeners like to jack things once we mention them so we can't say it yeah I'm I'm sending I'm just sending some links here it is it's pretty attractive looking so um that's true yeah okay we we'll think about that one folks we'll we'll keep you we'll keep you in the loop if we decide to go with it yeah next next thing we have here for choosing is like you need to choose what you're going to build your front end in here and maybe I should outline all of the the major topics we're hitting on this episode you have the design you have you're choosing your front end components you have your data database possibly CMS um you have your backend languages testing host in deployment uh and then whatever else we sort of stumble upon so let's talk about like choosing a front end like are you going to template it out in something and likely yeah yeah likely you're going to pick something that will Aid you in
Choose a Frontend / Components
templating out and turning it into HTML at the end of the day because there's very few people that are going to code up a header and then create a new HTML page and then you have to copy paste the header onto the other one right or or maybe put some frames in there that's what we did in the olden days where you have header. HTML and you just have a frame Set uh so you can use the same header on every single website um we're not going to do that right so you probably need some sort of way to templated out and that might look like uh either a serers side templating language uh like like pug or what what are the other ones that are really popular handlebars what's the one that ejs was one what does laravel use larel blade blade yeah yeah do you remember ejs did you ever used that one yeah yeah I used that one yeah ejs was really popular before it was I think it was for
D Jango right did is that what it was used I remember it being used in like um JavaScript MVC before like backbone got popular there was this thing called JavaScript MVC that used that to template everything out but you can also choose a run end framework probably most if you listen this podcast due to the type of person that listens podcast you're going to reach for uh either like react or spelt or a framework remix next spelt kit uh any of the number other Frameworks that are out there and that is going to both Aid you in doing all of your routing handling your image assets as well as templating out making reusable components so that you can use things like your head or your footer your newsletter subscribe throughout your entire application yeah and you can also just use straight up HTML you know I mean html is a a language that's made
for this type of thing it's scaffolding out things and whether not that's being developed on the server side I mean let's take into account your most basic website your most basic website could straight up just be five pages those five pages have some information on them it's not not going to change you could be the type of person who says oh let me build that in one of these fancy front end Frameworks and then spit it out to be a static site or you might be the person that says hey you know what I'm just going to keep it as simple as possible use no JavaScript unless I need it for anything maybe I'm building I mean heck you can build carousels now with CSS so you can remain as little JavaScript as possible as you want on this thing did I tell you what I did for my website um yeah so I I'll tell you where I'm at with my my course platform right now is so my course platform is not the actual like there's a couple parts to it um the back end is is a a
react application it's all Dynamic and it's server or client rendered and that's all like a fun react app but the actual like marketing websites um those are vanilla JavaScript and HTML right and I've been using for many many years I've been using pug to template out those pages because it worked well I can do things like Loop over the videos and render out a list of videos you can create reusable components I can share throughout all the marketing websites and like I've sort of reached like the end of that being what I want to do for the next one um and I I probably eventually I would like to get it the entire thing onto like a a framework like nextjs or spelt kit or something like that but it's not really something I want to do just yet so like I'm kind of in this in between area so what I did is I I'm building my next course website
in react but I'm just I'm just using react for the ability to be a template engine meaning that like like I'm not using any of the like client rendering or whatever I'm simply just using it so I can write all of my components and I can compile them in and then I just use react. render to stream string on the server HTML yeah and then just spit out HTML because I don't I don't need any of the client side stuff but I also want to look a little future facing being like well I probably will write this in react at some point or I'll write it in some component-based framework so if I'm going to be doing a little bit of work on a new website it's much easier to write it in jsx and and do all the loops and everything that I'm used to um and then that way when it comes time to rewrite this thing I I'll won't have to change that one from hug into so it's I wrote a whole template like Express has this idea of like a template engine and
I wrote my own template engine which was a react template engine hey you know what we did something very similar on level up before we moved to spel Kit when I was moving from meteor to without meteor Step One is what I did is I had the server just straight up returning react render to string and then I then took that and was in fact rehydrating it on the client but you know people look at these Frameworks and they say I got to use nextjs I got to you could you could just return that react and then rehydrate it if you want you can do all that yourself it's not the most fun I think the rehydrating part is where it gets to be less fun but if you like you're saying I mean you can take that code pipe it through a function essentially and get HTML out of there and in fact uh that's kind of what you're doing with serers side rendering react you're just have a rehydrating
step and you can do it with felt you can do it with view you can do it with any of these things and it works really well um so definitely definitely an option there if you're the type of person who who doesn't need that client side stuff and and you do like working in these componentized ways or Heck if you like working in componentized manners you can just straight up use web components as well here either way we're getting into the weeds here basically you just need a way of authoring your structure for your page and you can largely choose to do that whether or not it is in a front-end JavaScript framework in an HTML any sort of way whatsoever you need a way to structure your HTML to get it on the page now how do you build and test these components well you could have couple options for building these components you can just throw them on a page and have them in context and this works well if you're trying to move fast right I'm
maybe already hitting a database I have the data ready to go or perhaps it is fake data or perhaps it is temporary data that is real but not final either way you're working on these components in context of where of which they will live on the website I'm designing a header hey it's going to go in the header of the website and I'm going to see it in action there's another way of working on component components though and that's in isolation and in isolation is something that you would see in libraries like storybook um story book or history are the way that types of way people do things and in fact another way that's kind of underlooked is something that I do sometimes I just put them in a div and make that div resizable and then I can just see that div resizable now story book offers way more features in terms of you know interactively passing props and having all your knobs and widgets and and tests and stuff in there as well but M for the most part the idea of building them in place vers in
isolation means that in isolation you can see a component and you can test it in various different ways different container sizes uh different contexts making sure it works as long as the data gets passed into it correctly you can really fine-tune that component in my experience working in isolation works much better on long-term big projects you're building out a big project it has a lot of components has multiple people working on it docu you need to document those things yeah you need to make sure that they work in various use cases working in isolation makes a lot of sense if you are working on a website and it's just a website you and your buddies are just you are going to be working on there's there's no need to add storybook to that thing or that type of flow it's just going to slow you down totally I for the syntax website we have like a show card component M um and
that's when you visit the syntax website there's like a big one for the latest episode and it's black and then you have um a grid of 2 by five or whatever of the latest show cards and then when you go to the shows page that's also the show card right because they they look a little bit different and they act a little bit different um but they are primarily the same card so when I was working on those cards it was nice to be able to have all of them on a single page and say okay well I'm I'm making a change to the card and I want to be I want to make sure that I'm not goofing it up for light or dark mode or these different situations where they might be right like where where it's really wide or really small especially because we are using container queries so you're trying to size that big number uh you want to make sure oh make sure it doesn't go too big and make sure it doesn't go too small and there's a lot of tricky trickiness when you get into those components that can literally live
anywhere um and if that's the case building in them in isolation or at least just having a page where you dump every possible instance of them yeah so you can see them all at once and you're not like playing whacka moole where you change one thing you go oh shoot that that broke it on this instance yeah and and that's a whole thing and people often feel like if I want to test these things or look at them in isolation I now have to bring in some other dependency or and that's the whole thing story book it's its own process it's its own whole entire app that runs within your app you don't got to do that if you don't want to uh we have two pages on the the syntax website that are live that you can see and they're sloppy because we're they're just there for our own personal use but we made this stuff public right um forward syntax. FM components and slthe are two kind of dumping grounds that I made to dump things in to test them the the forward slash components is a page where I just throw any single component in and it
will show it narrow it will show it wide it will show it extra wide and then show it in a movable container that even outputs the width of the container so I can see and test directly and that's these are just like quick little things I also have like an inverse section as well and then the forward slash themes allows me to see a component in all the different themes so that way if you want to test something out and see how it adapts to different themes yeah yeah I use this stuff all the time but you don't need fancy tooling for this you can just go ham I also so um on the colors page I need to fix this because it's slammed up against your colors but I I wrote a component that um pulled the computed variables off the HTML document so like any variables you put on root I was having trouble trying to figure out um what they actually were computed wise you know if you use Cal or clamp or anything like that um so I wrote a little component that grabbed them all off of the HTML
document and then just dumped them in here and it was nice to be able to see it it's kind of interesting like some of them when you use Cal on a number the value is computed but when you use Cal for like sometimes when you use calcul with a percentage it's not all the way computed I don't know what the like where is the line where the browser will give you the computed value of actually what it's implementing and and where does it just give you the the actual calc uh sometimes sometimes you get one and sometimes you get another I wonder if at property the U CSS typing uh like Houdini aspect of CSS came into play I wonder if that changes things at all because that allows you to Define a variable as a type I wonder if that affects how it's calculated we need better Dev tools for CSS variables because there's because it's a mess yeah it's a mess and like chromes are slightly better like if you hover over a
variable in Chrome they will often tell you the computed value whereas Firefox will often just show you what it points to like if we have primary pointing to yellow and yellow points to Yellow three um that's a lot of work to figure out what actually is it though and I would love love some better Dev tools that would follow these um values a little bit further and and show you where they were defined and what the pointing to and how they're calculated yeah imagine you hover over one and it would show you like a like a tree or something this connects to this connects to this I don't know come on like it it's funny like you see that the dev tools went all out on flexbox and grid Dev tools totally but CSS variables are kind of me not a whole lot of data anyways we're just complaining here let's keep talking about uh building stuff uh real data or fake data is is a really good question I like to go with
Real data or fake data?
real data as much as possible yes if you have it available right and that's nice because you can you can use the actual data that's coming in but sometimes like I even know polypane has a has a feature for this is sometimes you don't think about German last names or or other things like that so it can be useful to have some data that is outside of what you think what happens when you have a really short title what happens when you have EXT extremely long last name that cannot break in between all those little edge cases are are helpful to hit as well I also find with uh GitHub co-pilot or any of these AI things they are very good at generating a bunch of random data and that will often make your deving experience when you don't have the back end hooked up just yet much better because you don't have to like oh like I always use Wes Scott and all of our dogs
names as examples and like I'm sick of that you know like I want some other examples but I can't possibly think of other people's names yeah I start to go to kids and family members yeah I you know but if you have a data schema that's a good point if you even have your data schema or you have an general idea of your data schema or you can just even write like a like a really quick rough data schema copy and paste that send it into an AI tool and say hey give me a hundred of these things um if you have that if you have that structure for it to Output it's pretty reliable at getting you something like that if not you can um do some work to get you some fake data really quickly there's also tools like Faker or some of these things that that get you data fast but you know you don't need to install a dependency to get some fake data especially if it's just temporary but I 100% agree if you have the ability to have real data get that real data or at least if it's temporary or short data get that in there making up fake data entirely only works if that
fake data has variety a number one thing that you see with inexperienced designers is they'll give you a mockup and they'll have like nine cards or something and all nine cards will have the exact same title that are the same length right they don't go onto two lines none of them go on three lines or whatever they have no plan if you have if you have two lines of text their entire design goes out the window they they they just don't have that experience right so being able to set yourself up for Success there will make sure that when you actually do use real data that you don't end up having an Oopsy Daisy now all the sudden I have to deal with line height and it looks bad what do I do yeah I when I was doing the uh open graph cards I was doing a little bit of design to the sizing and what I did is I just had a browser open with 15 of them U because like you need as many possible podcast titles some of the
podcast titles are like 400 characters and some of them are eight characters so being able to account for all of those and also sometimes designers will just like make up things like uh they they be like it's a six minute read and it's like well we don't have the infrastructure to to do that like where are you getting this data so don't design things around or or maybe do maybe force those lazy backend devs to actually give you that data but sometimes people are just start throwing in uh throwing in like for example on some of of our stuff I wanted to list the number of words that were spoken in every single episode um and we could do that because it would have to be done at a database level but if if it wasn't if those words were not queriable by the database and you had to like select them all and then Loop over and count them then that would be a big pain in the ass and probably slow the site
down more than it's it's it's worth yeah and that's funny because some designers might look at that and say it's no big deal you have the words why don't you just count them and you're like well let me tell you because the way to do that efficiently would be involve having to write a database process that then we got to also you're indexing things that you didn't index before exactly so let's talk about that data so now that we're talking about fake data or real data let's talk about database um and your data now the big question is do you need a Content management system or not hey a Content management system essentially is there in place so that non-technical folks can add an update content without having to get into markdown don't ask your non-technical folks to make a GitHub account and publish markdown changes then they got to learn what a PR is no that's not going to work that's never going to work so if you have nontechnical folks you need to update your content you most likely either one will need a CMS or two you will need to be comfortable writing that backend
Do you need a CMS or not?
piece and that backend piece has a lot of moving components to it now these types of things are made a lot easier if you're using a system like d Jango or rails these types of things that can scaffold out these Pages for you yeah but those are like kind of one step in between a fully custom and a CMS right so if you need a CMS that's full featured hey that puts you in a very specific territory all right now I need a CMS I got to start thinking what types of things do I need out of my CMS and which CMS do I need or likewise if I feel com comtable making this all custom myself which by all accounts I've done it many times it works fine if you if you want to do it that way what type of database do you need and yeah honestly uh the database conversation is interesting people get really really passionate about which databases they choose and which databases they like to work in do you even need a database a database is great if you want to save
data and retrieve data update data have that data be available later if you just have straight up static content on a website you might not need a database at all let me tell you I will do things to avoid using a database because having a database instantly adds a massive amount of complexity to your app so you have to consider that as well do I really need this database should be a question that you ask yourself I find myself whenever I'm just playing around with features like when I was doing the early work for the AI and transcript stuff M I was simply just saving Json files to dis um and then I I wrote a little function that just said like get or set or you could you could even if I were to go one step further I would probably reach for SQL light SQ light um because that is a database that simply just sits as a text file in your folder there's no like you
don't have to run processes there's no SQ light server um it simply just sits and a lot of the adap that you might end up using um Prisma SQ eyes uh what's the other one everyone's talking about drizzle does drizzle use SQ light no no uh let's see here yeah drizzle does SQ light so I might even reach for that because although you might not use sqlite or sq8 uh you might be able to make use of a om like drizzle or Prisma or squiz um and then you could switch to it without having to rewrite any queries but hly ain't nothing wrong with sticking stuff into a text file yeah on your on your computer yeah I know people often want to go high-tech for their Solutions right because it feels like hey that's how I'm supposed to do it but really do you remember the the static file CMS was a big thing for a little
bit statamic was one of those bolt was another one do you remember the static file CMS was that was a trend in cms's for a little bit yeah and that well basically those would just write to file right like C all similar to that it you it's more than that but like you can edit it via this nice UI and then it will save to like wherever your adapter says like GitHub would be a good example thinking of this in the same regard West I'm gonna ask you to go to this statamic website which is a static file CMS that we used to use and let me just look at this design athetic it is very syntax in a positive way yeah this is uh Jack McDade he does a bunch of cool stuff but yeah big fan of this design style yeah yeah is oh I just clicked on the deer I clicked the deer on the statamic website it just says I promise if that tickle I would not tell you I would not
tell you speaking of cms's we haven't talked about cms's on the show in a while um mostly because there are so many out there we did a Roundup about a year year and a half ago um but and I I keep getting emails from literally every single person that works on a a CMS uh strappy Tina payload uh sanity prismic lots of Open Source ones lots of paid ones uh if you The Listener want more CMS content or if you want like a rundown or if you want us to have like four people from these different cmss on to talk about us let us know cuz I don't know if people are just exhausted by all the cms's choices out there or if they're hungry for more yeah the the hard part about CMS is is just like well there's all these options or there's just good old WordPress that has everything you could possibly want
Choosing a backend language or framework
exactly actually well maybe that's a a bit of a next one is choosing a backend language or a framework does your backend language and framework also dictate how you will do your front-end in some cases the answer to that is is yes like WordPress is a good example if you are choosing WordPress as a CMS um of course you can do headless WordPress but if you're choosing WordPress you probably want a lot of the plugins and the whole ecosystem that sort of goes along with WordPress right and if that's the case then you sort of have a lot of these decisions already made for you right like how do you make components well you you have PHP files uh that are on there like what database are you using well you're using MySQL are you using an omm yeah you're probably using WP query uh to pull that that sort of stuff out what backend language are you using PHP for sure that's the only language that that runs in I would go as far as saying if you are backend
experienced you should probably pick your backend first and if your front end experienced yeah you should probably pick your front end first and then let that di that let that Choice dictate where you want to go right I I'm like react react guy I want to I want to use react for this no doubt okay well then your best options are probably remix Astro or nextjs right so from there that kind of dictates what you're using and likewise if I'm a you know if if I'm primarily a a PHP Dev well then that is going to dictate uh okay well shoot well I guess I'm going to be using Wordpress and I can do so headlessly with JavaScript or I can do so with WordPress templating system or I can do so with LEL and go straight up LEL and in my mind I think that is like a good way to optimize working on this stuff is to pick the thing that you are most confident and comfortable in and work from there whether that is a back end or
a front end likewise I I use I like spelt so I pick spelt kit right would I would I picked something else if I wanted to work in spelt probably not right it just makes sense to use the thing that's the easiest to use in that regard um four options I like I mentioned if you want to work in JavaScript there's a lot of different options for backends you have uh nextjs remix Astros felt kit n I'm sure there's many more there solid state those types of things PHP WordPress LEL Ruby rails seems like honestly the best option if you're like if if you want to work in Ruby and you don't want to build your website in rails you're probably an experienced rubier right um yeah Python and uh there's flask and Jango are like the two big ones there either way most of the kind of tooling or framework system or backend systems have kind of like happy paths for the way that you build a site with those paths I I would
say like if you're listening to this and you're like really not sure about any of this type of stuff I would probably say your go-to right now was be pick one of the big meta Frameworks out there in react World there's nextjs or remix um in spelt land there's spelt kit in viewland there is n and then you could also look into something like Astro which is kind of you can use a bunch of the different ones I'm pretty bullish on Astro right now folks if you want if you want to go someplace that has a lot of Simplicity and you can pick your own front end framework hey Astro is where it's at it's pretty sick take a look at it but basically these you'll hear this word thrown around a lot is a meta framework and essenti what that means is you're you're taking your rendering Library react or spelt or view um but then you you probably also need like a server right so they'll give you the ability to create server lless functions that will handle things like API
requests and connecting to databases and returning data a lot of those nice things sending emails things like that um and then you probably also want like a router right and then uh maybe you want like a like an image resizing process so those don't generally come with meta Frameworks but there's there's one built in to every like there's an adapter for all of these different Frameworks out there so that's probably our go-to especially if you're a big fan of JavaScript typescript is take one of those meta Frameworks and and run with it and then figure out what CMS do I want to tack onto this how do I want to write my CSS and how how do I want to design this type of thing word yeah yeah once you've really kind of nailed on that you could just pick your tools and start start going with it um I think the next thing would be like you would actually have some things down to to to code right you you've worked on your site you have it working to some degree you understand
Testing
what you're using for bits and pieces of it you you have at least something on the page and maybe you want to start testing it some people are like crazy about testing where they want to do test driven design they want to test each individual function at any given point they want to test every single unit of your site and that's called unit testing right you have any individual function that function is getting tested right and for unit testing each of these languages probably have their own happy path for testing any kind of situation you're going to find yourself in you'll find people talking about what is the specific way of testing now my humble opinion is that unless you're you're working on Big Time stuff you probably don't don't need a lot of unit tests unless you're working on a big big time app because that can really get in the weeds again you're having to get into really language specific tooling for testing and maybe you're very
comfortable with that stuff and that's fine but if you're not the easiest way if you want to test anything is to use end to-end testing libraries like Cyprus or playwright these two things are basically they don't matter it doesn't matter if you're writing your app in JavaScript D Jango Ruby on Rails PHP whatever these things literally open up your website in a headless browser and then run JavaScript on that page to implement clicks and then tests to make sure that things are where they should be meaning that they don't care how you built your app and that to me is extremely valuable one time I rewrote level up tutorials from reactjs to spelt and did not change a single endtoend test I knew that when my endtoend test passed that I was good but I didn't have to change my tests could you imagine I changed the language entirely so that's the one reason I don't love really
really tightly scoped testing libraries within the web space now it makes sense in other spaces where you're not going to ever do that and granted most people won't ever change large aspects of your site but having something that uses it the same way a user does inside of a browser is extremely handy yeah that makes a lot of sense if you think about like your user clicking a button playing a podcast um with those types of things you want to make sure that when somebody clicks on a show they go to that page when somebody clicks on a play button that the audio loads and when they push a a show note timestamp it skips to that value right and if those if if we were to literally change the entire Tech stack the end user probably doesn't doesn't care no that we change any of the Tex stack but they that's why like you said testing for the actual features and that it actually works in the browser when it's all put together um makes a lot of sense there's actually
one one thing somebody asked on Twitter the day is how would you test that and I I I thought this was really interesting the syntax website I implemented uh media source which was when you play a podcast on the syntax website and then you lock your phone what shows up on your lock screen jeez is is defined I didn't even know that this was an API um but it shows up and you can Define the album art the name of the podcast um what happens when somebody presses the skip 10 seconds buttons and back 10 seconds so you you control over quite a bit of that and uh I was somebody was asking like how do you test that right like once you implement it and you can unit test it really easily right you can you can click on a play button and then you check for the metadata that has been set on the window so I think it's like Navigator Medias
sources. metadata you can check if the object is what you're expecting right that that's a unit test but uh the integration test how do you test the lock do that in end to end too well I'm sorry you couldn't test specifically if the lock screen had the information on it but you could check that metadata because you have access to Javas to the Dom yeah you could do that in anten test but you couldn't I guess when things go outside of I guess same thing with like a webcam you know like when things go outside of the browser into the the actual system that gets a little trickier so you manually test it there yeah how do you test it you play a show you lock your screen you look at it with your eyeballs you ask your friend with an Android to try it too yes exactly um let's talk about uh hosting the thing um now the question is where do you host it how do you host it uh do you want like
Where do you host your website?
hosting itself has sort of ballooned to these Services they're called passes platform as a service um and it it involves so much more than the actual server right it contains continuous integration so you make a git commit you push the git commit up um it's going to run a build make sure the thing builds it might run your tests make sure all your tests pass um it might run some GitHub actions to fire off a bunch of different things that need to happen um so that is part of your deployment um it will also handle scaling so you get a ton of traffic you don't do you have to handle the load balancer yourself or um will your your service to it so on a lot of my hosting platforms I'll just set a limit to how high this thing can scale and if I sudden get a whole bunch of traffic it'll just scale up to multiple instances um CDN that's that's a big one
is if you've got images or HTML pages on there that you want to cash around the world Does it include a CDN or do you have to configure that yourself so um it's kind of interesting blog post the other day from Lee who is um developer relations at versel and like versal gets a lot of flak for nextjs not doing all the versell things on other hosting platforms right um and he's kind of like yeah like you can host it and and it we support all of that but like versell is a lot more than just hosting right like it's a CDN it's a load balancer it's a cash invalidator uh it's a scaler it scales up and a lot of that is infrastructure um so I thought that was kind of an interesting take at that whole argument that you hear over and over again yeah
and and honestly like one thing you gotta ask yourself with the entirety of this episode I'm talking about uh tipto tail here do you do you need all this stuff because because you just list oh you got a CDN and a load balancer and server like no you don't need all this stuff if you want to write a website in 2023 and Beyond you just just need HTML and CSS straight up it one thing I think gets lost in this conversation about websites being too complex nowadays or they being too much stuff to do yeah you don't have to do all that stuff people put building a website like Netflix or Facebook in the exact same bucket as scott.com or you know whatever my at to to.ski my website right those are not
even remotely similar to these same type of projects could I write my website personal website with HTML and CSS straight up yes it will work fine could I drag it to a shared hosting plan on FTP and have it work the same way I did in in 2005 yes you can do that as well there's nothing stopping you from doing that if you have requirements to make these things work faster work more globally work in more interactive or crazy ways then you get into situations where you need more of this stuff so I can just I I hear people all the time complaining it's too complex you got too much stuff whatever yes but also you don't need all that stuff sometimes you do sometimes you don't there's there's a whole spectrum of different types of
projects we're working on here so if you're the type of person who's listening to all of this and thinking gosh I really don't feel like I need all this stuff hey perhaps you don't yeah I one thing I love about netlify as a host is they have this netlify.com SL drop and you literally drag and drop your HML CSS in JavaScript and boom out the other end you get a URL for it which is like the most incredibly simple thing ever right like that's that's even easier than having to pay for a FTP host and then SSH into it and figure out how to drag and drop your files up to it so big fan that's probably the easiest way to get something online or like one of these glitch code sandbox something like that code pen where you can just write the code in the editor and get it going yeah easy peasy right yes so that is how you build a website or an app it's kind
of interesting to see what people's approaches to this type of thing are and all the different choices that you need hopefully you enjoyed that let us know what you do tweet us at syntax FM sick all right let's move into some sick pics you got a sick pick for me today oh yeah I got a sick pick and uh this thing is kind of a literal pick because it's not like an ice pick but it's going to pick stuff for you I don't know I don't know if that even works at all uh because what it is it's a chip clip it's a chip clip I guess it doesn't really pick things but hey um chip Clips you know them you love them you got to have them one thing that Courtney and I are always struggling to do is to find a chip clip when we need a dang chip clip so yeah I bought a 20 pack of metal chip clips for it was like 15 bucks when I got them looks like it's 16 bucks now these heavy duty chip Clips these things are
Sick Picks
basically you know they're they're clamps they're little metal clamps they work really well they they're just you you get 20 of them so you got you got one when you need one either way doesn't doesn't matter which one you get just mask get a bunch of Chip Clips toss them in a tupperw container in a drawer or something that way when you got it you're not just wrinkling up that bag and hoping that the air doesn't get in oh these look nice yeah we have the like Ikea ones that you have to like lock not a fan of those oh yeah and also plastic chip Clips they don't last straight up you might think they going cheap they they break over time every CH plastic chip clip I've ever had is broken over time uh I am going to sick pick a toilet seat so hear me out for a second this better be some toilet seat West yeah this is going to be the uh intersection of good deals and improve life Improvement here hey please don't tell
me you got this at a garage sale uh close enough um so uh our house our house that we moved into doesn't have soft closed toilet seats and I our old house did so often I'll just hit the toilet seat to close it and slam you know middle of the night shake the whole house super loud wake up the dogs soft closed toilet seat is the best um and I've been wanting to do it for a long time change all the toilets in our house over but like our our toilets are like this weird color that is is hard to find right and I thought okay so finally after one day of slamming it I was like you know what I'm going to figure out what color of this toilet actually is I did the research and I found it and then like I went to look for one and they're they're like 80 bucks for a toilet SE I was like there's no chance yeah I'm going to do it until I discovered the
used toilet seat no to hear me out so toilet seats come in hundreds of different colors so Amazon is full of toilet seats that have been returned because they're not the same color and who in the right mine would ever buy a used toilet seat off of Amazon not me because not to me because I knew that people are buying them on Amazon it's not the right color I'm going to return it so I rolled the dice and said I'm buying a used toilet seat on Amazon for 18 Bucks versus 80 ordered three of them they all showed up brand new still in the package still sealed all the people do is they cut it open they pull it out and they go oh that's not the right color put it back in the Box send it back to Amazon it ends up as a used toilet seat on Amazon so I go
into the warehouse section on Amazon find the toilet seat boom got got the nicest soft clo uh toilet seats for 18 bucks uh so hot tip obviously there's a slight chance you might get a used toilet seat in the mail which is maybe wear a pair of gloves but like come on that's a good deal I'm gonna be real with you every everything that you've said makes perfectly fine sense it makes I get it but the the emotional part of me says hell no I am not buying a uh a used toilet seat regardless off the internet yeah valid valid but uh for my friends who like a good deal let me I'll put you on to that so yeah let me know if you if you do that anyways that's it for today thanks everybody for tuning in we will catch you
Quote it with credit and a link. Quoting Syntax