Giter Site home page Giter Site logo

nim-palladian's Introduction

โ€•โ€• Palladian is a contemporary interpretation of Greek and Roman architecture, a simple and compact expression of complex classical design.

Palladian is a Nim front-end framework based on and wrapped around Preact.

Official Document Page
And it's source code is here

Why Preact?

In creating a front-end framework made by Nim, we needed something that did not require a NodeJS environment and did not require transpiling using Babel or other software. Preact can use all of its features with a CDN call, and has a very compact library size of 3KB.

VS React

React's JSX allows you to write HTML declaratively, but it is a unique DSL that differs from the original HTML in that it uses elements such as className as camelCase. The HTM used by Preact is a composable library that runs by itself with no other dependencies, and allows you to use a declarative UI and virtual DOM in a notation more similar to plain HTML. React's events are composited in React's own syntax. React's events are React's own composited events, but Preact's events are browser-native JavaScript events, so you can use Nim's std/dom as is.

VS SolidJS

SolidJS does not use a virtual DOM and runs faster than Preact, but the objects embedded in its JSX must be called as functions, which prevents re-rendering and provides higher performance. However, the convenience of calling it from Nim makes debugging time-consuming and costly due to its different behavior from the mental model. To sense variable changes beyond components, React requires 3rd party libraries such as Redux and Recoil, while SolidJS has a simpler implementation through a feature called Signal, and Preact also has Signal's functionality. In addition, Preact author Jason Miller has prepared SoidJS's own control flow, For and Show, for use in Preact.

https://gist.github.com/developit/af2a4488de152a84bff83e035bb8afc1

VS Karax

Most modern front-end development is not done by server-side engineers on their own, but rather by designers using HTML created by Figma or TereportHQ, to which front-end engineers implement processing. Karax creates HTML with its own Nim functions, which would be very costly and impractical for collaboration and portability with designers and tools. Also, while its unique virtual DOM implementation is eye-catching, it has not kept pace with research into more efficient virtual DOM implementations and reactive UI without virtual DOM in the front-end world, and has not maintained a high quality level compared to other frameworks in the front-end world.

Getting start

https://itsumura-h.github.io/nim-palladian/getting-start

Installing palladian

nimble install -y palladian

You can use palladian_cli command after installed.

Creating project

palladian_cli new {project_name}

Start the development server

cd {project_name}
palladian_cli dev

You can access dev server in http://localhost:3000

Production build

palladian_cli build

dist directory is generated.

nim-palladian's People

Contributors

itsumura-h avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.