Can someone explain how this works exactly? Are they basically offering a way to prebuild apps to static assets and host them on CDNs? How do server-side only things will happen then?
Can someone explain how this works exactly? Are they basically offering a way to prebuild apps to static assets and host them on CDNs? How do server-side only things will happen then?
I've set up a landing page recently and it was flawless on Netlify. You provide a Git repo, connect it to their CI then give some build commands and they will handle the rest.
They still host it on regular servers obviously, but you don't have to do anything to manage it. They have a DNS server which is also pretty neat.
How do you get dynamic? Well, they support a build process so static sites or assets can be built at their end, if that's how you roll. But if you want fully dynamic sites, well, no, you can use their AWS Lambda-powered functions service to help build this out, but you won't be deploying something like a PHP or Rails app to Netlify :-) This limitation opens up a lot of other opportunities to simplify deployment, however.
By calling a service from JavaScript. What you're probably getting at is, how do I dynamically generate web pages?
That's different. As a web developer you're probably used to generating the presentation tier on the server at least some of the time. You query a database and spit out some HTML. The so-called "static" approach here means:
1. Generate more stuff up front with build tools that you previously would do at request time. For example, why write server code to generate and cache a blog on every request when you can just build it whenever you write a new blog post?
2. In many cases this greatly narrows down the dynamic stuff that might need to happen. See if you can use JavaScript to fill in the rest. Instead of inserting that ad banner with server code, write a JavaScript function to fetch it from a service (like Lambda) and update the DOM.
3. You can be as dynamic as you want to be by expanding on what you do with JavaScript and services. This is sometimes called writing a single page app. It's maybe more complicated but on the plus side, it's how you write mobile apps and you may be able to share the same backend.
https://en.wikipedia.org/wiki/Application_delivery_network
You can keep a static site with something like Hugo in a git repo and have Netlify automatically build it and make it available on changes. You can also just toss an HTML and CSS file in (like I do on https://unstuckdev.com/) and their robots put it up.
You can do more with it, and that's what costs money, but it takes a small but tedious hurdle out of putting some HTML on the web.
If you're a ruby guy, you can do Jekyll and Middleman for example.
So my toolchain (using middleman) for my company website is:
1. Make change locally
2. Push to Bitbucket
3. Netlify notices the change to the master branch
4. Netlify pulls it to it's container, builds it
5. Newly built files are put in a CDN and HTTPS...all for free
One of my favorite services right now.
EDIT: To give more context this is what I did before:
1. Did the build using middleman to create static assets
2. Uploaded those static assets via FTP to AWS S3
Yes. Pretty much. They're a more dev friendly CloudFront. Supports deploying from a git repo out-of-the-box, where there's a separate service for this with CloudFront. More expensive than CloudFront, though.
> How do server-side only things will happen then?
This isn't the main problem they're solving. They expect that you'll have an API somewhere to talk to. But they do have a "functions" feature, which is based on AWS Lambda, so you could use that for things that would otherwise fall under server-side. They also have a simple "forms" feature for basic data collection.
Then they have myriad other value added features, one of which is cloud functions. You can use that for your server side requirements, or you can use your own server.
It’s not what they do that’s special, it’s how easy/magical they make the process (as well as the very generous free tier).
Setting up a few scripts and S3/Cloudfront to do this on your own takes a bit of work. With Netlify you just press the button it seems.