アプリ関連ニュース

[Laravel] Passportを使用したBearer token認証[2]

PHPのLaravelフレームワークのPassportを使用したBearer token認証の方法について紹介いたします。本記事は前回の「[Laravel] Passportを使用したBearer token認証[1]」の続きとなります。今回はPassportのインストール方法からLaravel標準の認証機能をPassportに変更するところまでを説明します。

続きを読む

Laravel Livewire

I am talking about the brief introduction about laravel livewire today.

Its aim is to provide a modern and dynamic web experience without having to waste time with reactive web frameworks or Javascript at all.
And for the most part: it can. Livewire really works, and in the next few years we will almost definitely see some big, serious projects on it.

When you activate the livewire, you will

– Write a PHP class, which will act as the backend part of a frontend component. Public fields will be visible to Livewire.

– Write an interface component in the Laravel (Blade) template language. This component refers to the fields in the backend component that you wrote earlier.

– Write methods in your backend component class that change the state of public fields.

– Create an instance of the component in another view or another component.

– When you visit the page, Livewire will render the initial state of the component as HTML and inject it into the page you see. Livewire will have already attached auto-generated JavaScript events to the page, which call the methods you wrote in step 3 above.

– When you take action, the Javascript events that Livewire generates will make an AJAX request to the Livewire endpoint on the backend. This will call the method you wrote, changing the public properties you defined.

-Your backend component’s render method is then called, which produces a snippet of HTML. This HTML snippet is the response to the AJAX request.

– Finally, the client-side Livewire component hot-patches this HTML on the page.

Further more you can look up the livewire lifecycle hooks more details here.

https://laravel-livewire.com/docs/2.x/lifecycle-hooks

Livewire has lots of interesting features but it still have some drawbacks as follow.

– Livewire violates the separation of concerns

– Livewire violates the single-responsibility principle

– Livewire complicates the development workflow

– Too Many AJAX Requests

– Livewire is difficult to test

And Finally maintainability would be harder as the application grows.



Facebook「Oculus Quest 2」を発表

2020年9月16日に開催されたFacebook Connect 7で、新型VRヘッドセット「Oculus Quest 2」が発表されました。これは現行製品の「Oculus Quest」の後継となるPC不要のスタンドアロン一体型VRヘッドセットです。

続きを読む

今週発売予定の新世代GPUについて

今週はRTX3080の発売が予定されていますね。
これがどのようなものか少し調べてみました。

続きを読む

InnoDB vs MyISAM

I talked about what is the MySQL storage engine last week. Today I will talk about the main difference between InnoDB and MyISAM.

The main difference between MyISAM and InnoDB are :

MyISAM does not support transactions by tables while InnoDB supports.

There are no possibility of row-level locking, relational integrity in MyISAM but with InnoDB this is possible. MyISAM has table-level locking.

InnoDB does not support FULLTEXT index while MyISAM supports.

Performance speed of MyISAM table is much higher as compared with tables in InnoDB.

InnoDB is better option while you are dealing with larger database because it supports transactions, volume while MyISAM is suitable for small project.

As InnoDB supports row-level locking which means inserting and updating is much faster as compared with MyISAM.

InnoDB supports ACID (Atomicity, Consistency, Isolation and Durability) property while MyISAM does not support.

In InnoDB table,AUTO_INCREMENT field is a part of index.

Once table in InnoDB is deleted then it can not re-establish.

InnoDB does not save data as table level so while implementation of select count(*) from table will again scan the whole table to calculate the number of rows while MyISAM save data as table level so you can easily read out the saved row number.

MyISAM does not support FOREIGN-KEY referential-integrity constraints while InnoDB supports.

By Yuuma



アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム