What exactly is the essence of web frameworks introducing new syntax? Does it mean language can't be augmented without turning the syntax upside down? All js frameworks are guilty (think svelte is the exception). Php, eloquent accessors, laravel facades etc.

Then, in addition to learning their available methods, classes, folder structure and possibilities, etc, you have to grapple with silly syntaxes. Sad

  • 0
    I agree. I personally like Vue though, because you get to pick your syntax, and their SFC syntax is basically just HTML with a modified structure, so much so that you can even skip translation altogether and let it walk the DOM to find vue-specific attributes and {{ variables }}
  • 0
    @sploders101 You can do that with any of them. You can run JSX in the browser. You just let React walk your DOM and find marked scripts and transpile them.

    You introduce new syntax when you involve a parser, even an XML parser in the programming model of your framework. Whether that syntax is transformed before or during execution is just a question of optimization.
  • 0
    Frameworks also
    - provide helpful tools like router, request handler and so on. otherwise you would have to rewrite them again for every project or Import from various libraries and ensure they work together by yourself
    - help you structure your project (at least of they are opionated enough)
    - provide consistent update paths
    - fix compatibility issues between browsers and platform, so you don't have to research and collect polyfills by yourself
    - help encapsulate and resolve moduls
    - provide dafault solutions for recurring problems, like ui conponents
Add Comment