Pricing Blog

SSR ability for Web Components

  • paspom-1367401062356484169

    Pascal

    3 months ago

    This is a crucial consideration for me
    If I had Web Components for every layout component (having them rich-content-dynamic) like hero, feature section etc.
    This would be absolutely insane
    but do they allow reliable serverside rendering, or even component-internal api requests?
    My guess is no, but I want to have this confirmed...
    This would be relevant especially for SEO, and performance reasons.
  • paspom-1367401537067941889

    Pascal

    3 months ago

    (Speaking of Nordcraft Web Components inside of Nordcraft, much like the new Nordcraft Documentation is built)
  • max.kayr-1367402343544520757

    Max

    3 months ago

    As far as I know, they render client-side
  • paspom-1367403177431011398

    Pascal

    3 months ago

    Do you think having 100-200 components being conditionally visible in my "richtext-main" is indifferent to the client side?
  • paspom-1367403496671936513

    Pascal

    3 months ago

    well, 30 would be enough but, who knows, just playing with thoughts...
  • max.kayr-1367405320850112602

    Max

    3 months ago

    I am not sure what you mean... Are you building something like the markdown renderer in the docs? If so, 200 are a lot... 30 should not be a problem. We've been there
  • paspom-1367406175330504785

    Pascal

    3 months ago

    yes, exactly! But with an entire suite of layout-components, in essence a component library with fully dynamic abilities.
    Ok, then I'll climb that ladder up and see where sun gets hot
  • thx!
  • lucasg-1367499480131309669

    Lucas G

    3 months ago

    I don’t think I’d want to use something with such a large payload though
  • Since all of that would still have to be loaded
  • paspom-1367514684848078899

    Pascal

    3 months ago

    Haha it is an ever confusing topic.😆 I thought it would not be loaded, only on demand, as long as the request was server-side.
    And in the glorious intersection observer package @Jacob Kofoed stated, it would impact the loading of components.
    Jacob, can you assess how Nordcraft would behave in this scenario – having hundreds of components in one master-component, set to conditionally visible for dynamic content, like the nordcraft docs markdown?
  • max.kayr-1367516184110432377

    Max

    3 months ago

    This will load the js, but it is not rendered in HTML. But you still have to load all info that the renderer needs to eventually render it
  • paspom-1367558797316460675

    Pascal

    3 months ago

    Damn, what a mess, isnt this something worth to work on – this would make so much sense, I'd pay any price for that
  • paspom-1367559185788702821

    Pascal

    3 months ago

    (I'm aware I hang on this topic through numerous threads already, please excuse me for that)
  • lucasg-1367559562474815518

    Lucas G

    3 months ago

    This isn't generally a 'best practice' I'd say in terms of building apps
  • Though I recognize it's a bit different with nordcraft
  • In some ways
  • paspom-1367560017020063795

    Pascal

    3 months ago

    Yes but what else shall I do though?
    I see Nordcraft rather as an infrastructure, than a app builder, like a file host repository
    Maybe I want to build my own shopify in Nordcraft (I don't) – I cant just ship any layout component ever built for every client
  • paspom-1367560357874372802

    Pascal

    3 months ago

    And I see tremendous potential – not only for my, rather childish, aims but having the possibility to rely on a middleman that handles the delivery of my stuff and letting it me store it – kind of
  • paspom-1367560773181640825

    Pascal

    3 months ago

    Andreas suggested using web components, earlier, but this is not feasable, not having a good performance and seo stuff
  • lucasg-1367560857592135792

    Lucas G

    3 months ago

    Looking at it like a file repo may conflict in some ways. It is a framework but yeah
  • You can still accomplish it though, you may just have to reframe how you go about building it
  • lucasg-1367561211281014865

    Lucas G

    3 months ago

    For example when I built my form builder I basically stored a config JSON which is used to populate and create the form components
  • For something like web page/layout builder a similar approach may work
  • Instead of necessarily hard-coding a bunch of components
  • paspom-1367561515133042780

    Pascal

    3 months ago

    Do you have an undisclosed version of it for me to look into?
  • Tod-1367561516953370706

    Tod

    3 months ago

    Great job @Pascal! Your contribution to the Nordcraft Community just made you advance to Community Level 16! 🌲
  • lucasg-1367561592929128479

    Lucas G

    3 months ago

    I do not
  • paspom-1367561603293253813

    Pascal

    3 months ago

    un-undisclosed lol
  • open, simply
  • ok
  • paspom-1367562881901789237

    Pascal

    3 months ago

    can you give me a hint?
    copy the component in the "files[]" scope?
    then what? store in a cdn json column?
    how to "inject" it into the element tree?
    still SSR compatible?
  • lucasg-1367563166367617135

    Lucas G

    3 months ago

    files[] scope?
  • paspom-1367563235166781612

    Pascal

    3 months ago

    yeah like "copying" an entire component
  • lucasg-1367563239508021431

    Lucas G

    3 months ago

    I don't know what you're building so I'm not sure what hint I could give
  • paspom-1367563461688823908

    Pascal

    3 months ago

    I want to load a component from an api payload, for now (maybe theres a bigger plan behind that hehe)
  • lucasg-1367563899804848178

    Lucas G

    3 months ago

    For what purpose?
  • like what type of component
  • paspom-1367563958323646485

    Pascal

    3 months ago

    UI component, lets say a hero
  • but yeah, it should interact with contexts and so on (I hope, I'm not wishing too much)
  • lucasg-1367564358707839008

    Lucas G

    3 months ago

    Generally speaking, you'd set all of that when building the actual page. When would you want to entirely 'dynamically' want to build a page
  • paspom-1367564710886772777

    Pascal

    3 months ago

    You mean the context, that I can expect it to behave like normal?
  • lucasg-1367565473901711420

    Lucas G

    3 months ago

    No I'm not explaining myself correctly
  • I'm trying to think of what use cases would require loading components from API payloads
  • Usually it's stuff like forms or checkouts, dynamic things like taht
  • When it comes to UI/layouts, that stuff is usually 'hard-coded'
  • paspom-1367566351773864050

    Pascal

    3 months ago

    thousand things, buddy! my mind is exploding over this issue
    When you build an entire company in Nordcraft you would for example also want to build the website in it, but Nordcraft must become "invisible", quasi "whitelabled", when us, the developers build the "Webflow" for that company in Nordcraft in that companies' company interface
  • for example
  • paspom-1367566669085413407

    Pascal

    3 months ago

    When you think that Nordcraft is the Infrastructure, other apps are built in, you maybe see the grand vista that I see
  • lucasg-1367567212096917545

    Lucas G

    3 months ago

    If I was building a webflow in nordcraft, I'd generate the final files and render those
  • The app wouldn't publish a bundle of components
  • That would be a nightmare to maintain and build out
  • Not to mention the performance implications you're noting
  • paspom-1367567579576799376

    Pascal

    3 months ago

    well, lets say a shopify-kind of thing, where pre-built layouts are the main thing
  • lucasg-1367567587713482903

    Lucas G

    3 months ago

    I'd build out the editor, probably in a similar manner that I started with my form builder
  • But what my builder would output would be final files
  • The customer's app wouldn't load anything unnecessary
  • Basically exactly what nordcraft does
  • paspom-1367568088807243858

    Pascal

    3 months ago

    but what does nordcraft, what it does not do in my stated case?
  • lucasg-1367568421373345995

    Lucas G

    3 months ago

    There are two parts to this type of app. The editor itself and the 'output' app
  • I'm referring to the output
  • The editor would have different ways to go about building it
  • paspom-1367570321422684193

    Pascal

    3 months ago

    Idk, man, after all this magnificent stuff they built I can hardly believe that this is rocketscience,
    though it might be "hard to maintain" or "not best practices" it would open up a whole new world of possibilities for those maniacs like mine, obsessed over "keeping out" the clients / non-dev-members, out of nordcraft
  • or a thousand other crazy ideas I could not wait to build, having assured this was possible...
  • paspom-1367570752743669820

    Pascal

    3 months ago

    (well, overstating a bit but I have great amounts of usecases indeed)
  • lucasg-1367571243129245860

    Lucas G

    3 months ago

    I didn't say you couldn't build it lol
  • I'm just saying I would try not to have a bunch of hard-coded components
  • paspom-1367572985636065372

    Pascal

    3 months ago

    you drive me nuts, man!
    But it is true that it is not possible
  • lucasg-1367573215706218659

    Lucas G

    3 months ago

    lol sorry, I'm on a bunch of different convos right now
  • No, it is definitely possible
  • Nordcraft is literally proof
  • paspom-1367573754774814760

    Pascal

    3 months ago

    boy, the nuts are driven
    so I can place 999 components in one node tree with conditional visibility and it is on ssr api calls only rendering one, bandwith not hurt also?
  • lucasg-1367573918180704348

    Lucas G

    3 months ago

    We're going in circles
  • paspom-1367574944908574730

    Pascal

    3 months ago

    you just created a new one, i made my peace this was not possible
    but nevermind, thank you for all these thoughts, I will try to make the best out of it in planning my upcoming stuff! 🙏👌
  • lucasg-1367576122140917880

    Lucas G

    3 months ago

    We can maybe chat in DMs 😂
  • Essentially the gist of what we were saying was that having a lot of components loaded isn't the only way to go about building that type of app out