Build your next website in Swift
Ғылым және технология
Swift's result builders let us create domain-specific languages right inside our Swift code, and with a little thinking that means we can actually build whole websites in Swift - and even use similar syntax to SwiftUI!
Get Ignite here: github.com/twostraws/Ignite
Пікірлер: 118
My man did the thing I've been waiting for for years. Im getting emotional rn
First time I am interested in web development. Thanks Paul :)
Amazing! Simple and so clever! Thanks so much, Paul, learning every time!
This is great Paul! I've recently started working on my personal website and was looking into SSGs. Imagine my surprise when I came across this video
Bravo! Couple of weeks ago i was making html + css code work in swift project, and doesn't even think that it can be done that way. Awesome, as always.
Awesome video Paul! I will try it out for my new blog, thank you! (And great explanation of Result builders 👏🏻)
Paul Hudson you are a mad genius. Great ideas, great video.
Watching this video on my way to Japan, so well done !
Never thought I’d see this day. Awesome!
Very cool! Could this be used with Vapor to dynamically generate HTML pages entirely in Swift?
Aye what!? Never thought that this would ever be a thing... Im going to start as soon as I can...
Awesome work with your Ignite project. I also see that it is actually meant to build static website, any change that it could be use for generating server-side website in future ?
So if I want to make some changes in my html code (eg, text), do i have to compile the XCode app every time to see the changes? In html files, we don't need to compile our Node.js or any web app!
Amazing work. Lot of thanks.
Paul, You're The Best! I'am gonna try it!
Such a nice job bro! Job well done 😮🎉
This is awesome idea. I was thinking about this while learning 100 days swift project on embabed html in swift.
I usually don’t leave comment, but you get my attention. Well Done Man 👍🏻
This is cool. This is one step closer to freeing me from the JS ecosystem.
@RA-xx4mz
21 күн бұрын
Htmx gang wuz here
@langahoohlo6695
19 күн бұрын
Is it better to be an apple eco system compared to js
@stevepottz111
19 күн бұрын
@@langahoohlo6695 Facts
@Red00022
14 күн бұрын
@@langahoohlo6695believe it or not. It really is.
This is amazing I will defenitly switch from dart to swift
And is this adaptable to Vapor, or similar Swift based web frameworks for dynamic HTML?
That reminds me John Sundell's "Publish" which can be used to generate HTML Websites with Swift Code... Very similar but more intuitive. :) Thanks Paul.
"But what happens if I forget this closing ?" You mean, just like you forgot the closing ? Browsers apparently accept the fact that some tags don't have to be closed.
At the moment I needed a way to develop a static website for my brand, just curious how does ignite helps with SEO ?
Wow this is amazing 🙌🏾🔥🔥🔥
That's looks insane!
another one of those: "why didn't I think of this" ideas 🙈 😅 amazing work, man, forking now, have some additional ideas that might make sense
@goranbla
21 күн бұрын
and of course, coming up with an idea doesn't mean much until you create a repo 💪
Thank you!
this is so sick man
Minor thing: AFAIK the '/' in "self closing" tags are ignored nowadays. Just using is _slightly_ more correct than . The forward slash is in fact misleading since e.g. will just start a new div and not self close.
Could this be done in any programming language?
I never knew it was possible to build a website using swift. Is it done in Xcode? Does swiftUI work?
Hey You’re doing great job by creating lgnite, full filing purposes of swift as general purpose language keep it up. Can you please let me know how can we develop dynamic website using swift only? By using ignite with vapor or so.
Every day passed and I realized, I loved you more than yesterday. I want to be a coder like you. I am passionate like you but not that much skilled. Pray for me ❤. By the way, thanks for this amazing Library. 💌
@tejaspatelia8179
19 күн бұрын
Praying won't work. Practice will!
@__Imran__
19 күн бұрын
@@tejaspatelia8179 trying brother
Can you publish to GitHub pages?
Amazing Video. Can you create video how to publish the site?
Is this meant to run on a server alongside a server framework (e.g., Express, etc) or is this meant for emitting static html via a build script?
@Bks715
22 күн бұрын
Looks like it’s for static html only
@twostraws
21 күн бұрын
Ignite is designed for static site generation, at least for now, but the result builder approach introduced in the rest of the video can be used anywhere you want.
@Bks715
21 күн бұрын
@@twostraws it’s a super cool idea
I just don’t understand how/where to host the SwiftUI platform. I don’t think that my hosting service provides this.
great job
More power to Swift
Incredible….
this is amazing
Awesome!🎉
Impressive.
Sincere question: who has this problem now days? I haven’t worried about editing proper html in what seems like decades. Every good editor now has good linting.
Blazor?
It’s really nice but will it solves all the html related problems at the beginning?
@UTJK.
22 күн бұрын
I guess Bootstrap will solve them indirectly for you.
@datping7377
19 күн бұрын
But I don’t understand why it would be beneficial to build a website using swift… is it just because we can and it’s cool or does it fixes problems other ways can’t?
@UTJK.
19 күн бұрын
@@datping7377 the idea, I guess, is to read the webdev documentation just once, implement the swift code that prints the html and then forget the web syntax forever, living in the swift bubble only. An added benefit would be to always generate the same well crafted code (but honestly... this could be equally achieved by preparing the code snippets in the editor...). In the Python world I've seen many implementations like this, but through big projects aimed at easily building complex frontends for specific purposes (data science usually) and it seemed to me a very reasonable idea. Here I have some doubts about the purpose behind the effort.
What a great news 😎
awesome
👍🏻
dont already have react and nextjs?
@infantfrontender6131
22 күн бұрын
This solution is for those who want to use only Swift in the web. If you know JS, then you have a lot of frameworks for different needs
Build yout next Crysis in Php!
Backend next so i can do full stack iOS with swift only haha
@arjundureja
21 күн бұрын
You can already do this with Vapor
@huynhlong350
21 күн бұрын
@@arjundureja wow didnt know that, thanks brother
I would love it if we could develop an Android app using Swift...
you lost me at html language lol
I’m just waiting for Swift Next.JS. I’m gonna be on that like a fat kid in a candy store…
Actually this already exist in kotlin
JavaScript and Swift seem pretty similar, so it’d be natural to expand Swift’s capabilities into the web realm
@tylerfrydenlund
21 күн бұрын
Im sorry what. Javascript and Swift couldnt be more different. One is a strongly, statically typed language, designed for a specific use case of building beautiful UI in a close ecosystem. And the other is a dumpster fire that the internet runs on. The only similarity between the two, is that they are programming languages
@gcelite36
21 күн бұрын
@@tylerfrydenlund do you know what the word “seem” means?
@arjundureja
21 күн бұрын
@@tylerfrydenlund Swift is not designed specifically for building UI. It's general purpose like JavaScript, Python, Java, etc. You might be confusing Swift with the SwiftUI framework
Yes! Yess!! Yessss!!!! Eat it Rust. Eat it Go. Eat it C. Eat it Ada. Eat it Nim. Eat it C trash trash. Eat it OCAML. Eat it Zig. Eat it Crystal. Eat it Elixir. Eat it Erlang. Eat it Clojure. Eat it Scala. Eat it C#. Eat it Objective-C. Odin, V-y’all are cool.
@pookiepats
21 күн бұрын
This is actually a list of my favorite languages
2:26 The Swift way of doing it looks awkward to me.
for somehow, it looks like react.
😵💫
Damn, it had to be bootstrap….
The implementation seems very clever, but I'm not sure if it's really viable in a big project. Probably it's best to invest your time in learning HTML properly... or hiring an expert.
@bobweiram6321
22 күн бұрын
It's hilarious because the trend now is statically generated websites instead of dynamic ones. Everything is generated once and served up and only regenerated when the content changes.
@phat80
22 күн бұрын
Expert in HTML? 🧐 What are you talking about? 😅 Everybody knows HTML if you’re connected somehow with the software development. HTML is just a subset of XML which is widely used almost in every stack.
@bobweiram6321
21 күн бұрын
@@phat80 XML is significantly simpler to work. It has stringent formatting rules which is validated against standards, but they're only a few of them. Every XML parser interprets XML in the exact same way. It's also just pure data without any presentation. XML can be mastered in less than a weekend. HTML formatting rules, on the other hand, are loosely interpreted and left to each browser and platform to interpret and render. The same HTML can differ drastically in presentation depending on the thousands of permutations based on a complex matrix of platforms, screen formats and browsers. If that's not complex enough, there's also CSS which adds another level of complex layout and rendering rules. Its grammar and structure is entirely different. To become an HTML expert requires a rigorous understanding of HTML and CSS and their idiosyncrasies, so much so that it's as complex, if not more, than any major programming language.
@phat80
21 күн бұрын
@@bobweiram6321 So you can learn html/css in a week. There’s nothing simpler than that in the development world. And you can take another week to learn basic Javascript to understand what’s going on.
@denisblack9897
21 күн бұрын
@@phat80i avoided html/cs/js altogether during my 8 years of iOS development. I can’t stand these symbols they are ugly and hurt my soul😅
As a web developer moving to iOS and I say, Bootstrap is outdated and cumbersome! I would go with Tailwind, but all these tools are really cool!
Bad idea. HTML is simple enough to learn
It reminds me of a Java JSP 🙂
ultimately it will end up becoming html then why bother with this so much layers
@twostraws
21 күн бұрын
This is literally answered in the video, and more than once 🤷♂️
@herosova
21 күн бұрын
@@twostraws i never thought you would reply
@ioscaleb
21 күн бұрын
Code will ultimately become machine code anyway, why bother with a high level language?
And then stick it in a webview of your mobile app 😂
It feels to me that it brings more new stuff to learn without guarantee of scalability for a big project. I’m not learning something new for the sake of wasting time. I would just stick to typescript and react for now. It needs more work
Just another try of replace classic html that will fail soon
I don't think it's going to be successful.
Let’s get rid of build steps people. Just learn HTML
As a human that abhorres HTML, I have to say, this is truly an abomination. You must repent for such sacrilegious actions.