アプリ関連ニュース

Diagram as Code

Diagrams allow you to draw cloud system architectures in Python code. It was created to prototype a new system architecture design without the use of design tools. You can also describe or visualize your existing system architecture.

I once talked about Mermaid which is a JavaScript-based graphing and charting tool that takes Markdown-inspired text definitions and dynamically creates charts in your browser. You can read more below.

Similarly, Diagram allows us to draw system architect design using just code. Diagram currently supports all major providers including AWS, Azure, GCP, Kubernetes, Alibaba Cloud, Oracle Cloud and more.

Let’s take a quick example how this works.

from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram("Grouped Workers", show=False, direction="TB"):
    ELB("lb") >> [EC2("worker1"),
                  EC2("worker2"),
                  EC2("worker3"),
                  EC2("worker4"),
                  EC2("worker5")] >> RDS("events")

This will result as below.

grouped workers diagram
Credit : diagrams.mingrammer.com

You can see we can build amazing architecture design just by using some python code. Please check more detail at their Github and quick examples here.

Yuuma



Laravel Tips

今回も、laravelのTipsをいくつか紹介します。

①別のカラムの後にカラムを追加したい場合は、afterメソッドを使用することができます。

<?php
     Schema::table('users', function(Blueprint $table){
        $table->after('email', function($table){
            $table->integer('status');
            $table->string('address');
            $table->string('city');
            $table->string('state');
         });
     });

②与えられた値がfilledかblankかを判断したい場合は、 empty()is_null() などの代わりに、ヘルパー関数 filled() を使うことができます。

filled(0);
filled(true);
filled(false);

//return true


filled('');
filled(' ');
filled(null);
filled(collection());

//return false

ということで、今回はこれで終わります。

金曜担当 – Ami



Emmetの使用(2)

今回はHTMLマークアップを効率的に記述することができる
Emmet(エメット)を紹介したいと思います。
本記事は前回の「Emmetの使用(1)」の続きとなります。

続きを読む

Top 5 Node JS Frameworks

Today I would like to share about top 5 Node JS frameworks. Let’s take a look.

1. express.js

Express.js is the most popular Node.js backend framework. It is mainly used for building backend applications and REST APIs.

2. nest.js

Nest.js is a powerful framework for building a scalable backend applications. It supports TypeScript fully. The architecture is clear and there are good documentations.

3. fastify.js

Fastify.js is a web framework and provides one of the fastest developer experiences with good optimizations.

4. sails.js

Sails.js is a backend framework that uses model-view-controller methodology for developing Node JS applications and APIs. It is mostly used for designing and developing custom enterprise level.

5. socket.io

Socket.io is a JavaScript library that is used for real-time even-based communications. It is a good framework to use for real-time messaging or broadcasting applications.

This is all for now. Hope you enjoy that.

By Asahi



ブレードで@.jsディレクティブを使用してPHPからJavascriptの値に変換する。

今回は、laravelのTipsを紹介します。

@.js は、PHP の値を Javascript に変換できます。

また、laravelアプリケーションのとこかの場所でこれを行いたい場合は、facadeを直接呼び出すことも可能です。

use Illuminate\Support\Js;

$data = ['name' => 'mg mg'];

Js::from($data);
Js::from(collect($data));

//blade 直接
@js($data);

ということで、今回はこれで終わります。

金曜担当 – Ami



アプリ関連ニュース

お問い合わせはこちら

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

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

お問い合わせフォーム