Live data from Hacker News

Microsoft Fast Design

fast.design

131–140 of 216 posts

Re: Microsoft Fast Design

#131
post #74

Have >3 years of experience working with web components full time. 1) Their templating library has a learning curve. It's not quite like svelte, nor like JSX. If you have templates as strings that aren't typechecked, it makes it really hard to work on large code bases where the components are built by someone else and you're the consumer. I remember breaking powerbi.com due to missing > in an angular template that en…

Attributes are strings, but web components can have properties like any other object, and you can set properties on elements from JS and almost all template libraries.

Properties can be complex objects, do not trigger attributeChangedCallback, and don't need to be serialized.

What are you using to build your web components if you think they can only take strings?

Re: Microsoft Fast Design

#132

Earlier quoted context omitted.

The template strings are sort of typed, using tagged template literals. These even come with editor support using extensions previously built for lit-html and the like.

You get compile-time checks for embedded JavaScript expressions. But you don't get checks for html tags and attributes. With JSX the TypeScript compiler checks JavaScript expressions as well as mismatched tags and attributes, all without any add-ons.

With the lit-html TypeScript and VS Code plugins you _do_ get checks (and auto-completion) for HTML tags, attribute, and properties.

Yes, it requires a plugin, but JSX required the parser, compiler, and type-checker to explicitly add support for it. They both require an extension to core TypeScript.

Re: Microsoft Fast Design

#133
How I would do that in Sciter:

fast.css :

    fast-something {         // custom element
      aspect: FastSomething; // its function-controller
      display:block;
    }
script:

    function FastSomething() {
      // note JSX is built-in in Sciter
      this.content( Hello World );
    }
and markup:

    

    
        
    
Easy, no?

Re: Microsoft Fast Design

#134
post #85

Earlier quoted context omitted.

I appreciate the support I guess but at the same time I don't understand what you mean by there are an unspecified number of people on my side and that silence is golden - either that means I should be quiet and join the throngs of the self-superior invisible some-jority which I think is condescending to the fine folk here, or it means I personally should be silent and not express my honest confusion, frustration and…

What I meant was that are a lot of like minded developers here who cringe every time they have to hear how JS is going to teleport us from Earth to Mars. And since there are no bonus cookies that can won by proving that you can create a functional website simply by using some good old HTML with CSS and vanilla JS, a lot of us resort to being silent and enjoy the show! So, what do ya say? Would you React the same way?…

It's funny because in writing my previous reply to you I felt a momentary sense of inclusion into a special club, I did think something along the lines of "should I just enjoy the show" and then on reflection I realised that taking such a stance would be equivalent to having no voice at all, and it would also essentially evaporate my chances to learn anything new from the good folk here as it would set up a "me vs them" context, which I don't believe would lead to me learning anything new.

Don't get me wrong, I can see where you're coming from and feel the same way many times myself, but I am no stranger to conflict, and I spent a great deal of my life fawning to people or deferring my opinion for some "greater ideal" that other people tried to set for me, like you are doing now. You have set up so many logical fallacies, talking about "so many developers", "bonus cookies", and some weird need to "prove" ourselves, that I don't even know where to begin unwrapping whatever complex you have.

Get help. You will be happier.

I decided in this instance to say whatever is on the top of my mind no matter how stupid it makes me look, I don't seek camaraderie with anybody at face value just because you purportedly represent a group that I can join. "Like minded developers"? You would have to try harder to entice me to be a part of your group, if you even have a group. I really don't care to feel superior to anyone, results speak for themselves, so good luck I guess establishing a weird inner circle of ideals but I really want no part of it, nor do I need any endorsement from such a group.

Wow, that felt so fucking weird to type.

Re: Microsoft Fast Design

#135

How I would do that in Sciter: fast.css : fast-something { // custom element aspect: FastSomething; // its function-controller display:block; } script: function FastSomething() { // note JSX is built-in in Sciter this.content( Hello World ); } and markup: Easy, no?

I love Sciter and it is pretty amazing for what it does, but I still wouldn’t use it to share internal web component libraries within my own company, never mind some other 3rd party.

Sciter unfortunately uses it’s own dialect of JavaScript and CSS which might not be compliant with browser JavaScript engines.

I really wish Sciter would move to some other commonly used JS engine and get rid of TIScript, then I would be more confident with creating an internal library, at least I would be able to use web components in a cross compliant way between browsers and Sciter.

Re: Microsoft Fast Design

#136
post #67

Earlier quoted context omitted.

I honestly don't understand what this definition of "frameworks" means in this exact context and I've been building websites since 1994, survived the XHTML collapse, etc etc... What's the main advantage here? That we have a standardised way of writing HTML markup so that CSS / JS knows how to operate on it? I'm almost certainly coming across as "old man yells at cloud" (lol just realised a pun there) but what would y…

You can tell a framework by the "Hollywood Principle" (don't call me, I'll call you). A framework is the component host. It's responsible for defining the component model and calling the component lifecycle. Since frameworks define their own component model, components are typically incompatible between frameworks. You can't use an Angular component in React because React defines a different model. This leads to huge…

[deleted]

Re: Microsoft Fast Design

#137
post #83

Earlier quoted context omitted.

> The important word here is Web Components, which is like React or Vue components but using only standard HTML and JavaScript (no frameworks). I wouldn't say that - Web Components (by themselves) do not allow you to write your view as a function of application state, which is the main draw of at least React. But the initial use case of Web Components is to create a standard that allows developers to iterate on the w…

Ionic Stencil let’s you wrap webcomponents and turn them into React, Vue, or Angular components. MS should use that or do something of a similar nature. Otherwise there is a impedance mismatch between this and what most or used to.

Not quite, Ionic Stencil is library to helps build webcomponents. Since fast.design are webcomponents, they can be used in any with any framework, no wrapping required.

Re: Microsoft Fast Design

#138

How I would do that in Sciter: fast.css : fast-something { // custom element aspect: FastSomething; // its function-controller display:block; } script: function FastSomething() { // note JSX is built-in in Sciter this.content( Hello World ); } and markup: Easy, no?

I love Sciter and it is pretty amazing for what it does, but I still wouldn’t use it to share internal web component libraries within my own company, never mind some other 3rd party. Sciter unfortunately uses it’s own dialect of JavaScript and CSS which might not be compliant with browser JavaScript engines. I really wish Sciter would move to some other commonly used JS engine and get rid of TIScript, then I would be…

That's just an illustration of how it can be done otherwise. The only non-standard thing there is that CSS glue construct:

   selector { aspect: Func url(script.js); }
It tells that as soon as element matching that selector will appear in the DOM it will have Func() called (from script.js). No complex abstractions are required.

"to share internal web component libraries within my own company, never mind some other 3rd party"

My pardon, I didn't get the "to share" part, who share, what, and with whom?

Post reply on HN