9 ms·
Elder.js – An Opinionated, SEO Focused, Svelte Framework
- linkdd 5y agoI don't understand what "opinionated" stands for in the context of a software/framework/technology.
- foolswisdom 5y agoIt means that the framework makes certain choices and trade-offs, and doesn't allow the developer using it a choice in those matters.
- postalrat 5y agoSo a game is just an opinionated game engine.
- phaer 5y agoA game engine is just an opinionated turing machine.
- GuB-42 5y agoAn example of an opinionated game engine would be idTech 5 (Rage engine). It is built around MegaTexture: a huge, non-repeating texture that maps the entire world, backed by a robust caching system. It allowed for highly complex scenes, great static lighting and short loading times but it lacked in detail and dynamic elements.
- hagg3n 5y ago> and doesn't allow the developer using it a choice in those matters. I never took "opinionated" software as "no configuration". For me it's always been "custom defaults". It might provide some configuration, it might not, but what makes it opinionated is the fact that the defaults are not generally applicable, but rather tailored for a specific use case.
- foolswisdom 5y agoHmm, you're probably right, that's a better definition of opinionated. That said, I think it'd be really difficult to work around Elder.js' opinions.
- NikolaNovak 5y agoGenerally, rather than trying to be a generic framework/tool/system allowing all approaches and preferences and practices, it is optimized for / selects a certain subset toward a (hopefully) stated goal and subset. It is "opinionated" in the sense that it has an "opinion" on what's the right way to accomplish a certain outcome, and thus it preselects/premakes some choices for you. The implicit tradeoff is that it may not be as good at general problems / all approaches, but may be better or easier or both for specific goals / approaches.
- rdhatt 5y ago"Opinionated" means the software has made very deliberate design tradeoffs and is very inflexible/resistant to changing that. This is done to optimize certain objectives like software scope or increasing productivity by enforcing certain methods. So in this case they cited "no client-side routing wiz-bang" -- that's one of their opinions and won't be introducing any support for that sort of thing. The classic example is Python's motto "There's Only One Way To Do It", which was in a response to Perl's "There's more than one way to do it." Another example is Ruby On Rails...it has a strong opinion on how the application should be structured -- must be MVC, most of your code should be in a model, convention over configuration, etc.
- Inviz 5y agoAll opinionated-ness seems to be very arbitary. It's a nice way to say "magical api"
- PinkPigeon 5y agoWas just going to say: I have only experienced one thing that branded itself opionionated, which was a CSS (reset) file. So many unexpected behaviours that were really hard to diagnose. I am now very wary of things calling themselves opinionated. Though, simultaneously, where does being 'opinionated' start? Like, we are all building on top of other things, where, inevitably, certain decisions have been made for us. You have to decide whether you can live with those decisions (people say Go, as a language, is quite opinionated), or whether you are going to fork the language and make your own, hehe
- dec0dedab0de 5y agoWhen I see opinionated I assume that the developer made a decision that they like, but they know some people won't like. They are saying up front that they aren't trying to satisfy everyone. They're doing it this way, so don't open up issues asking them to support doing it another way.
- Kinrany 5y agoOpinionatedness is a good thing when a problem has no consensus solution, yet a decision needs to be made. If the author correctly identifies the problem and is right about the hard part of the solution and manages to convince other people, the community will accept the unimportant parts as default and discard the important but wrong (by consensus, made possible by the opinionated solution) parts.
- PinkPigeon 5y ago> Opinionatedness is a good thing when a problem has no consensus solution, yet a decision needs to be made. This is an excellent and concise way to sum it up.
- 5y ago
- PinkPigeon 5y ago> A Highly Optimized Build Process: that will span as many CPU cores as you can throw at it to make building your site as fast as possible. For reference, Elder.js easily generates a data intensive 18,000 page site in 8 minutes using a budget 4 core VM. How does this compare to something like Hugo?
- nickreese 5y agoIt beats it. Here are the benchmarks one of our users ran: https://github.com/Elderjs/elderjs/discussions/166 https://github.com/Elderjs/elderjs/discussions/166
- PinkPigeon 5y agoThat's pretty impressive. Hugo appears to have a steady growth in overhead right up until the point where elde.js overtakes it when the number of pages hits 10,000.
- mtalantikite 5y agoI was wondering the same. How does this end up differing from SvelteKit using Vite?
- nickreese 5y ago(Elder.js Author) SvelteKit's offering is great. Much better than Sapper. For Vite the HMR on SvelteKit is better than Elder.js but SvelteKit doesn't offer Partial Hydration. The main difference is Elder.js is designed for static sites and offers tools to help make building large static sites easier. For instance, when it comes to building non-trivial static sites, there is a lot of data massaging that needs to happen and be in sync across the entire project. A good example is when reading from a headless CMS or generating a sitemap. With Elder.js, you can massage this data once and add it where you need to via a hook and it will be available on all pages. SvelteKit is less opinionated. It is apples and oranges. edit: a word.
- 5y ago
- nickreese 5y agoHey all, Elder.js author and maintainer. Elder's main "opinionated-ness" comes from the fact that we're going to put SEO decisions above all others. This includes doing things such as: * partial hydration * no client-side routing wiz-bang * 0kb JS if there are no hydrated components * and several other tradeoffs. It was also built as an SSG first and it is really good at building very large sites (faster than Hugo). [0] Happy to answer any questions. Here is an overview of the "whys" behind many of the uncommon decisions Elder.js made. [1] --- [0] https://github.com/Elderjs/elderjs/discussions/166 https://github.com/Elderjs/elderjs/discussions/166 [1] https://nicholasreese.com/lessons-from-building-a-static-site-generator/ https://nicholasreese.com/lessons-from-building-a-static-sit... Edit: format/add links
- sebmellen 5y agoWow, faster than Hugo. Holy s#%t! That’s insane! Looks awesome, can’t wait to try it out.
- nickreese 5y agoStoked to hear what you think. We're building ElderGuide.com (a nursing home directory) which has 18k complex pages in about 1 minute 22 seconds.
- sebmellen 5y agoAh, the marvels of modern computer processors when they’re not running 18 layers of bloat. Re: https://elderguide.com https://elderguide.com is that where the Elderjs name comes from?
- techdragon 5y agoI still find front end JavaScript development to be a chore, the least appealing part of any project idea, despite actually liking Working with HTML and CSS… it’s not even really JavaScript as a language. It’s the ecosystem I don’t like. I read about “opinionated frameworks” and for a backend framework that tends to be something like Django or Rails, frameworks built to give you everything top to bottom, with clear layering and extension points. However for front end frameworks opinionated seems to mean “has more indecipherable lisp/scheme function/macro style logic” that does what the original author designed it for wonderfully but is a royal pain to extend, modify or really build off in any way other than just forking it. I’d call this a “framework for sites where SEO is critical” not really an “opinionated framework” it’s more of a “single issue framework” to borrow a political term” The only “opinionated framework” I’ve ever used in the front end/JavaScript world that felt like a cohesive, truly opinionated framework in the backend Django/Rails kinda way is EmberJS. Which I highly recommend to people who hate the whole JavaScript ecosystem churn. About the only negative I can highlight was poor IDE tooling with older versions which the most recent releases have improved on their end, but is for the most part an issue of IDE developers like JetBrains not considering EmberJS as important as the Angular family and the React, Vue, and other JSX based system family. Which I can understand for the most part due to business realities, but also this is hardly a good reason not to try something when the tools have full auto-reload and progressive compilation to efficiently test things in the browser as you make changes in any text editor you like.
- Xevi 5y agoHow does this compare to something like SvelteKit with an adapter to generate a static site? I don't know much about Svelte, so maybe my question is weird.
- swyx 5y agonick (elderjs author) answered the elderjs vs sveltekit question up thread: https://news.ycombinator.com/item?id=27153319 https://news.ycombinator.com/item?id=27153319
- woodpanel 5y agoHi Nick, just saw your svelte summit presentation you gave and was pretty impressed with Edler.js! I have a simple site, basically 5 different templates. 2 of those templates will be used for content of ~500 pages each. So Elder was exactly what I was looking for. However: I want to re-hydrate my server-side rendered app/dynamic-parts including client-side routing. Elderguide (and in the YT talk) mentions that for more complex SPA-y stuff I shouldn't use it. I played around with Elder but finally settled on Routify, because it gives me re-hydrated client-site routing out of the box. SvelteKit I haven't looked into at all because they released it just when I was done with my app ;-) Would you mind elaborate how Elder's feature differ from SvelteKit? Thank you! PS.: Even if my use-case might isn't a fit, I think the use-case's where Elder would be my first choice are pretty clear.
- nickreese 5y agoTo be honest, I've only briefly played with SvelteKit as it still isn't finalized. Here are the main parts where Elder.js stands out pros: * Purpose built for large sites with SEO in mind. * Hooks and plugin ecosystem for common issues. Responsive images, sitemaps, critical path css, etc. * 0kb JS and partial hydration. * Blazing fast builds. * Async shortcodes make working with and future proofing static content a breeze. cons: * The complex Rollup implementation needed for partial hydration leads to less optimal dev experience. HMR isn't a possibility as it currently stands. Until `esbuild` is stable reloads won't be as fast as with Vite. * Unfamiliar way of handling routing / no dynamic routing. (PR to simplify this is basically done [0]) * No client side routing. * Less optimal for "apps" and logged in experiences until this PR is merged. [0] This should happen in the next week. --- [0] https://github.com/Elderjs/elderjs/pull/130 https://github.com/Elderjs/elderjs/pull/130
- abledon 5y agoSo the docs are embedded inside a website for elderly care? thats interesting....
- nickreese 5y agoHey, it's an SEO framework. :) Decided as an experiment that links should go to the SEO project that spawned the framework. So far the links from the JS ecosystem seem to be confusing Google's algos, but we'll give it more time to see how it plays out.
- abledon 5y agoyeah if anything, its a cool mental workout to suddenly realize you are inside the 'creation' that the framework has made.
- sergiotapia 5y agoDoes a production deploy require a backend server?
- nickreese 5y agoNope. It generates a fully static site with HTML, CSS, JS that you can deploy with any static host. (s3, netlify, cloudflare workers)
- apozem 5y agoThis is cool. I just shipped an app using Svelte [1] and I liked working with the framework. I would be interested to work with it more. My app replaces Safari's new tab page with a wallpaper and weather widget. Obviously performance is crucial for this - your wallpaper needs to appear immediately after you hit Cmd-T. Svelte was a nice way to get the benefits of a component-based framework while still shipping only a tiny JS bundle to customers. It has some rough edges, but it's cool to see the community fill out the gaps with tools like this. [1]: https://apps.apple.com/us/app/beautiful-new-tabs/id1567068235 https://apps.apple.com/us/app/beautiful-new-tabs/id156706823...
- devops000 5y agoDoes it support I18n by default or it needs a plugin? - Sitemap multilanguage - href alternative in head
- nickreese 5y agoThere is a community plugin for i18n: https://github.com/kiuKisas/elderjs-plugin-i18n https://github.com/kiuKisas/elderjs-plugin-i18n
- seumars 5y agoThis is very appealing considering the limitations of client side hydration svelte still has – though I wonder where this stands in relation to the upcoming release of SvelteKit.
- swyx 5y agoelder has important differences to sveltekit: nick has commented on it here https://news.ycombinator.com/item?id=27153319 https://news.ycombinator.com/item?id=27153319 between the two they honestly reflect all the most relevant site rendering strategies today.
- skybrian 5y agoThis guide is nicely written but uses jargon that people who haven’t been keeping up with client and server-side JavaScript frameworks won’t be familiar with, including “route,” “slug,” and “hydration,” not to mention “Svelte” and “SEO.” It seems fine for its intended audience, but if they wanted to help out beginners who somehow stumbled onto this page, adding some outgoing links to definitions where these terms are introduced might be useful.
- leephillips 5y agoI’ve written about eight Svelte applications and I have no idea what this article is about. I highly recommend Svelte, though.
- Griffinsauce 5y agoWordPress has slugs, SEO is a very broad concept, both don't have anything to do with JS specifically. "beginners" is a very broad term. You have to write for _somebody_ or your text engages no one.
- stevenhuang 5y agoAll these are common terms for static site generation, server side rendering, and web development in general. If even the front end framework Svelte is new to you, that's hint you'd likely learn more by checking out Svelte. It's not realistic to expect a project to spell out everything for a complete beginner.
- skybrian 5y agoSure, I’m not expecting anything. I made a suggestion for a minor improvement.
- fareesh 5y agoDo you support full pre-rendering? Let's say I have 100 blog posts - can each of them be pre-rendered into HTML and stored on a CDN? Thereafter if I change a sentence in one of them, can it only recreate the one HTML that was changed?
- nickreese 5y agoElder.js is designed to render the entire site at a time. 100 pages should take substantially less than 10s in most CI/CD pipelines. We refer to what you are looking for as incremental builds and it is honestly a pretty difficult problem as it requires tracking data dependencies. Here is an overview of the complexities. [0] [0] https://github.com/Elderjs/elderjs/issues/8 https://github.com/Elderjs/elderjs/issues/8
- apop880 5y agoBig fan of Svelte an and was super-exited to find a static site generator that uses Svelte templates. Actually just released a redesign of my personal site using Elder.js today and am looking forward to using it for more projects in the future. My site: https://apop.tech https://apop.tech GitHub repo: https://github.com/apop880/apop-tech https://github.com/apop880/apop-tech
- domano 5y agoSo you wrote a whole SSG SEO Svelte Framework for a guide for elderly people and released it as Elder.js? I love it :)
- nickreese 5y agoYep. That’s the story. :) Lots of Svelte users asked how I built the site so I figured it was worth open sourcing.
- alexobenauer 5y agoQuite the fan of Elder.js; I build my personal site using it (https://alexanderobenauer.com https://alexanderobenauer.com), where the entire site is built once, each time I push a change, then hosted on static hosting (Netlify). The flexibility on how routes map to various files and templates is wonderful. Some routes are simply markdown files (copied directly from my notes app) that are then rendered into the right template file.
- RileyJames 5y agoPrevious built static sites with Jekyll (ruby) and most recently moved to NextJS + strapi. This project looks like exactly what I was really after, 100% seo optimised / prioritised + all SSG. Will definitely give this a shot for the next project. Appreciate the effort!