從 Web Site 到 Web Application,從 Web Services 到 Mobile ServicesKuo-Chun Su
從 Web Site 到 Web Application,從 Web Services 到 Mobile Services - 談談使用與管理上的一些有趣小問題,包括前端如何使用 JavaScript 呼叫 Web Services,JSON 格式的小秘密,以及整合 OpenID/OAuth 等內容。
JavaScript is a client-side script language, but we can use it on server side programming now. However, it is still difficult to write server-side application for front-end developer.
Here we try to find a solution to write server-side script that developer only need to understand and have client-side experience.
- The document discusses the use of ref and reactive in Vue Composition API. Ref and reactive are methods used to define reactive data in Vue.
- Ref can be used on both objects and primitive values, while reactive only works on objects. When accessing a ref, the .value property must be used, while reactive data can be accessed directly.
- The document provides examples of ref and reactive implementation and compares their characteristics and proper usage. It also discusses a common development approach of extracting business logic into functions using ref and reactive.
This document discusses implementing lightweight concurrency in PHP. It introduces spatie/fork, an open source library for running PHP code concurrently. The library provides an easy to use solution for running code concurrently. It was created by Freek Van der Herten, who develops open source packages and has over 300 packages on Packagist with over 190 million downloads total.
This document discusses using the Stimulus JavaScript framework for frontend development. Stimulus is described as having modest ambitions and not seeking to take over the entire frontend like larger frameworks. It is designed to augment HTML with minimal behavior rather than handle rendering. Key aspects discussed include controllers, actions, targets, values, and the framework's lifecycle methods. The document suggests Stimulus lets developers easily write JavaScript and know where it should go.
This document discusses coding style, static code analysis, and PHP. It begins with an introduction to the speaker and outlines topics including what coding style is, PHP coding style standards like PSR-2 and PSR-12, and what static code analysis is. It then discusses specific static code analysis tools for PHP like PHPStan, Psalm, and Phan, covering how to install them, what kinds of checks they perform like syntax, type checks, and array shapes, and how to configure them.
This document provides an overview of a presentation on Laravel Octane given by Albert Chen. The presentation covered: the lifecycle of PHP and Laravel applications; an introduction to Laravel Octane and how it makes applications more friendly for long-lived processes; reminders for developing long-lived PHP applications; Laravel's service container and how containers work in Octane; how Octane supports concurrent tasks using Swoole; additional Octane features like tickers, caching, and process communication; blocking I/O in PHP and how coroutines work in Swoole; whether Octane supports coroutines; and a benchmark comparing Octane to PHP-FPM with Nginx. The document concludes with an
30. 會員登入
use InertiaInertia;
class LoginController extends Controller
{
public function loginView()
{
return Inertia::render('Auth/Login');
}
public function login(Request $request)
{
// Auth::attempt()...
}
public function logout(Request $request)
{
// Auth::logout()...
}
}