アプリ関連ニュース

Laravel 8.80でRoute Group Controllerを定義する

Laravelチームは、バージョン8.80をリリースしました。このバージョンでは、ルートグループコントローラーの定義、Bladeコンパイラーによる文字列のレンダリング、PHPRedisのシリアライズと圧縮設定のサポート、v8.xブランチの最新の変更点などを確認することができます。

ルートグループコントローラーを定義する

これは、ルートグループにコントローラを定義する機能で、グループが同じコントローラを使用する場合、ルートが使用するコントローラを繰り返す必要がないと言う意味です。

例: 

ブレードで文字列をレンダリング

Blade::render()は 、Blade コンパイラを使用して、Blade テンプレートの文字列をレンダリング文字列に変換します。

phpredis Serialization と Compression コンフィグサポート

このオプションは、Redis – Laravelのドキュメントに記載されるようになりました。

これは、PHPRedis のシリアライズや圧縮のオプションを設定する機能で、 サービスプロバイダを上書きしたりカスタムドライバを定義したりする必要がありません。

シリアライズオプションは以下の通りです。

  • NONE
  • PHP
  • JSON
  • IGBINARY
  • MSGPACK

そして、以下のコンプレッサーのオプションです。

  • NONE
  • LZF
  • ZSTD
  • LZ4

8.xのリリースノート

新機能やアップデート、8.79.0と8.80.0の差分はGitHubで確認できます。また、以下のリリースノートはチェンジログから直接引用しています。

ということで今回は以上になります。

最後までご高覧頂きまして有難うございました。

By Ami



[aws] pemキーを使用してPuTTYでssh接続ができない場合の対処方法

aws等でインスタンスに指定したキーペアのプライベートキー(.pem)を使用して
PuTTYでssh接続できない場合の対処方法をシェアします。

続きを読む

Top JavaScript Frameworks

There are numerous JS frameworks. It’s not possible for anyone to tell considering the way that each JS framework is great for one pack of challenges and not the best one for another.

JavaScript was at first used exceptionally for the client-side. However, nowadays JavaScript is also used as a server-side programming language.

1. React

React is one of the finest front-end open-source JavaScript frameworks that allow developers to create rich user interfaces. Created by a team of Facebook developers, React introduced functional, declarative, and component-based styles.  React is a complex framework for new developers to learn, use, and understand, but it has an extensive community. 

Pros:

  • Plenty of reusable components to build business logic
  • Ease of integration with front-end and back-end
  • Unidirectional data flow with flux controls
  • SEO-friendly JavaScript framework
  • Huge support community
  • Capacity to test and debug rapidly

Cons:

  • Only covers the UI layer of the app
  • Have to deal with complex state management 
  • Constant upgrades make it difficult for developers to keep up with the changes
  • New developers may find JSX to be a barrier

2. Angular

Angular is one of the top-rated JavaScript UI frameworks that developers utilize to build classy single-page web applications. The framework leverages HTML syntax on dynamic web pages.

Pros:

  • Component-based architecture
  • High-class server performance
  • Two-way data binding 
  • A rich collection of third-party integrations
  • A massive community of developers

Cons:

  • Need to learn JavaScript and Typescript
  • Struggles with SEO due to poor accessibility
  • Migration from one version to another is difficult
  • Debugging the scope can be difficult

3. Vue JS

Vue.js is one of the most versatile front-end JavaScript frameworks. It’s also known as a progressive framework due to its capability to facilitate the design of high-end single-page web applications through dual integration mode. The framework follows the MVMM (Model-View-View-Model) architecture pattern. Besides that, Vue.js is simple, unrestricted, and an easy-to-adopt framework.   

Pros:

  • Quick and easy configuration due to MVVM architecture
  • Easy to learn, use, and understand even for beginners
  • Lightweight framework with a small build size
  • Seamless integration with third-party apps

Cons:

  • Lack of high-end and effective plugins
  • Older versions of iOS and Safari browsers can cause problems
  • Difficulty with two-way binding

4. Svelte

Svelte JS is an open-source, web component-based front-end development framework.It is possible to create components using Svelte JS using the languages you’re content using (JavaScript, HTML, or CSS).

Pros:

  • Component-based model pattern
  • Easy to use, learn, and understand
  • One of the most small-sized builds 
  • Supports both client and server-side rendering

Cons:

  • Not much IDE support available in the market
  • Doesn’t have the backing of tech giants like Vue, Angular, and React
  • Absence of third-party components
  • Difficult to scale up the application

5. Express JS

Express JS is an open-source and minimalistic back-end JavaScript framework based on Node.js that developers use to build complex APIs and web applications. One of the major advantages of this Express JS framework is fast server-side programming. 

Pros:

  • Active community support
  • Rich set of documentation
  • Powerful routing mechanism
  • Seamless connectivity with all databases
  • Accelerates web app development process

Cons:

  • Security and code quality can be an issue
  • Middleware creates issues for many clients
  • Error messages have no description
  • Hard to find an optimal way to write code for server-side

Tsuki



レイトレーシングがより手軽になりそうです

NVIDIAのGeforceシリーズ向けWindowsソフトの
Geforce Experienceに搭載されているポストエフェクト機能のFree Styleに
レイトレーシングを行うフィルターが追加されたようです。

続きを読む

4 mistakes that should be careful in NodeJS

Today, I would like to share about four common mistakes that should be careful when develop with NodeJS. Let’s take a look.

Blocking the Event Loop

Since Node JS comes with a single-threaded environment, no two parts of a Node JS application can run parallelly.

So, If the event loop is blocked, it causes blocking everything.

The solution is to use open-source modules like StrongOps.

StrongOps can identify and fix any delays in the event loop and prevent from blocking the event loop.

Trying to Execute Multiple Callbacks

Callbacks is used to allow asynchronous elements to communicate with each other.

However, executing the same callbacks or multiple callbacks all at once can cause interface freeze.

Therefore, it’s important to ensure you’re not continuously pressing for callbacks multiple times.

There are two ways to avoid that.

First, you can wrap the callback so you’ll be notified each time a callback is executed twice.

The second solution is to add a return before the callback to prevent invoking the same callback more than once.

Callback Hell

Callback Hell means  multiple nested callbacks that make nesting callbacks difficult and impossible to read & debug the written code.

There are many ways to keep the code easy-to-read and debug such as using promises.

A promise is basically a value returned to confirm the processing done by an asynchronous function. In simple terms, promises can be nested to make complex code look clear and easier to maintain.

Another way is to use the async module that provides a straight forward, powerful functions to work with asynchronous JavaScript.

Using Console.log for Debugging

Console.log in the NodeJS is to print almost anything to the console. When Console.log is used to debug, it restarts the server and slows down the performance of the application.

We can’t use console.log every time. So instead of console.log, we can use the Debug Library.

This is all for now.

Hope you enjoy that.

By Asahi



アプリ関連ニュース

お問い合わせはこちら

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

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

お問い合わせフォーム