Skip to content
Proyek

Tentang

Framework front-end yang unik dan efisien untuk PHP

Pengembangan web dan aplikasi

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
0
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Stand With Ukraine

Viewi

Viewi

Unique and efficient front-end framework for PHP

Examples

<div>
    <Thumbnail blog="$blog" />
    <a href="{$blog->url}">
        <h3>{$blog->title}</h3>
        <p>{$blog->description}</p>
    </a>
    <LikeButton liked="{$blog->favorite}" (click)="like" />
</div>
class Blog extends BaseComponent
{
    public BlogModel $blog;

    public function like()
    {
        $this->blog->favorite = !$this->blog->favorite;
    }
}

Blog

Discover more at https://viewi.net.

Documentation

https://viewi.net/docs

Discussions (Forum)

PHP functions in the browser: every PHP function a component can call, and how closely its browser version matches PHP.

Editor support

VS Code extension: Viewi Components (source). Highlighting and autocomplete in templates, Go to Definition for components, props and global methods.

In production

Urlicer is branded short links, QR codes, team workspaces and click analytics. It runs its entire frontend on Viewi: server-rendered PHP components hydrated in the browser, with no JavaScript framework. Built and maintained by Viewi's author.

Testing

Run tests

Unit tests, including the PHP↔JS parity suite (needs node on the PATH):

composer test

All tests:

php vendor/bin/codecept run

Unit tests:

php vendor/bin/codecept run Unit

Specific test:

php vendor/bin/codecept run Unit JsTranspilerTest

After adding or changing a JS port in src/Viewi/PhpJsFunctions, add its cases to tests/Support/Data/parity/ and regenerate FUNCTIONS.md:

composer functions-doc

Create test

php vendor/bin/codecept generate:test Unit JsTranspiler

Support

Viewi is built in our free time. If you like it, here is how you can help:

  • Give us a star⭐.
  • Follow us on X.
  • Contribute by sending pull requests.
  • Any other ideas or proposals? Please mail me [email protected].
  • Feel welcome to share this project with your friends.

License

Copyright (c) 2020-present Ivan Voitovych

Please see MIT for license text

Jelajahi proyek terkait

Memuat…