Impressions about VueJs & ReactJS. What people think…

Impressions about #VueJs & ReactJS. What people think... - BootstrapBay  #Coding

  • You already know about Flux/Redux, so here’s what Vue has to offer: – – Last, what continually has me impressed and coming back for more with Vue.js is its outstanding community, the professionalism of Evan and his contributors, its ease of use, and its no-brainer alignment with the Web Components…
  • A few things about Vue got me hooked over React, namely: – – “ I used Angular 1 for a little over a year then switched to React.
  • I’ve taken a look at Vue a couple of times but never really built anything with it, that being said I’ve heard nothing but great things about it and from the looks of it, it is pretty easy to pick up.
  • So I would argue that instead of looking for the easiest/ most powerful/ most popular framework out there it might be more useful to learn something useful to you long-term as a developer (although React also has the most popular thing covered).
  • I actually really wanted to do React, but Vue was just so much more approachable that I couldn’t justify spending the extra time learning React.

VueJS vs. ReactJS – what people think about libraries, frameworks & more. How will you decide which ones are worth spending time over?
Continue reading “Impressions about VueJs & ReactJS. What people think…”

Game Development with React and PHP: How Compatible Are They? — SitePoint

  • pre: – use Aerys\Router; – use App\Action\HomeAction; – – return (Router $router) = { – $router-route( – “GET”, “/”, new HomeAction – ); – }; – – And, from routes/api.
  • pre: – use Aerys\Router; – use (Router $router) = { – $router-route( – “GET”, “/api”, new HomeAction – ); – }; – – Though simple routes, these helped me to test the code in config.pre.
  • From App\Action; – – use Aerys\Request; – use Aerys\Response; – – class HomeAction – { – public function __invoke(Request $request, – Response $response) – { – $response-end(“hello world”); – } – } – – One final touch was to add shortcut scripts, to launch dev and prod versions of the…
  • From composer.json: – “scripts”: { – “dev”: “vendor/bin/aerys -d -c loader.php”, – “prod”: “vendor/bin/aerys -c loader.php” – }, – “config”: { – “process-timeout”: 0 – }, – – With all of this done, I could spin up a new server, and visit http://127.0.0.1:8080 just by typing: – composer dev -…
  • js”); – – $response-end(” – div class=’app’/div – script src='{$path}’/script – “); – } – – I realized I could keep creating functions that returned promises, and use them in this way to keep my code asynchronous.

Chris bootstraps a basic Stardew-Valley-like game in this game development with PHP post, using an async server, preprocessors, and ReactJS!
Continue reading “Game Development with React and PHP: How Compatible Are They? — SitePoint”

Game Development with React and PHP: How Compatible Are They? — SitePoint

  • pre: – use Aerys\Router; – use App\Action\HomeAction; – – return (Router $router) = { – $router-route( – “GET”, “/”, new HomeAction – ); – }; – – And, from routes/api.
  • pre: – use Aerys\Router; – use (Router $router) = { – $router-route( – “GET”, “/api”, new HomeAction – ); – }; – – Though simple routes, these helped me to test the code in config.pre.
  • From App\Action; – – use Aerys\Request; – use Aerys\Response; – – class HomeAction – { – public function __invoke(Request $request, – Response $response) – { – $response-end(“hello world”); – } – } – – One final touch was to add shortcut scripts, to launch dev and prod versions of the…
  • From composer.json: – “scripts”: { – “dev”: “vendor/bin/aerys -d -c loader.php”, – “prod”: “vendor/bin/aerys -c loader.php” – }, – “config”: { – “process-timeout”: 0 – }, – – With all of this done, I could spin up a new server, and visit http://127.0.0.1:8080 just by typing: – composer dev -…
  • js”); – – $response-end(” – div class=’app’/div – script src='{$path}’/script – “); – } – – I realized I could keep creating functions that returned promises, and use them in this way to keep my code asynchronous.

Chris bootstraps a basic Stardew-Valley-like game in this game development with PHP post, using an async server, preprocessors, and ReactJS!
Continue reading “Game Development with React and PHP: How Compatible Are They? — SitePoint”

Game Development with React and PHP: How Compatible Are They? — SitePoint

  • pre:
    use Aerys\Router;
    use App\Action\HomeAction;

    return (Router $router) = {
    $router-route(
    “GET”, “/”, new HomeAction
    );
    };

    And, from routes/api.

  • pre:
    use Aerys\Router;
    use (Router $router) = {
    $router-route(
    “GET”, “/api”, new HomeAction
    );
    };

    Though simple routes, these helped me to test the code in config.pre.

  • From App\Action;

    use Aerys\Request;
    use Aerys\Response;

    class HomeAction
    {
    public function __invoke(Request $request,
    Response $response)
    {
    $response-end(“hello world”);
    }
    }

    One final touch was to add shortcut scripts, to launch dev and prod versions of the Aerys server.

  • From composer.json:
    “scripts”: {
    “dev”: “vendor/bin/aerys -d -c loader.php”,
    “prod”: “vendor/bin/aerys -c loader.php”
    },
    “config”: {
    “process-timeout”: 0
    },

    With all of this done, I could spin up a new server, and visit http://127.0.0.1:8080 just by typing:
    composer dev

    Setting Up the Front End
    “Ok, now that I’ve got the PHP side of things relatively stable; how am I going to build the ReactJS files?

  • js”);

    $response-end(”
    div class=’app’/div
    script src='{$path}’/script
    “);
    }

    I realized I could keep creating functions that returned promises, and use them in this way to keep my code asynchronous.

Chris bootstraps a basic Stardew-Valley-like game in this game development with PHP post, using an async server, preprocessors, and ReactJS!
Continue reading “Game Development with React and PHP: How Compatible Are They? — SitePoint”

Impressions about VueJs & ReactJS. What people think…

Impressions about #VueJs & ReactJS. What people think... - BootstrapBay  #Coding

  • You already know about Flux/Redux, so here’s what Vue has to offer:

    Last, what continually has me impressed and coming back for more with Vue.js is its outstanding community, the professionalism of Evan and his contributors, its ease of use, and its no-brainer alignment with the Web Components standard.

  • A few things about Vue got me hooked over React, namely:

    “ I used Angular 1 for a little over a year then switched to React.

  • I’ve taken a look at Vue a couple of times but never really built anything with it, that being said I’ve heard nothing but great things about it and from the looks of it, it is pretty easy to pick up.
  • So I would argue that instead of looking for the easiest/ most powerful/ most popular framework out there it might be more useful to learn something useful to you long-term as a developer (although React also has the most popular thing covered).
  • I actually really wanted to do React, but Vue was just so much more approachable that I couldn’t justify spending the extra time learning React.

VueJS vs. ReactJS – what people think about libraries, frameworks & more. How will you decide which ones are worth spending time over?
Continue reading “Impressions about VueJs & ReactJS. What people think…”

Game Development with ReactJS and PHP: How Compatible Are They? — SitePoint

Game development with #ReactJS and #PHP: How compatible are they?  #JavaScript

  • I added my recent work with PHP preprocessors to make things cleaner, and made the first couple of endpoints:
    $host = new 8080);

    $host-use($router = = = process = process is from config.pre

    I decided to use Aerys for the HTTP and Web Socket portions of the application.

  • Finally I added pre/short-closures, both to handle the custom syntax in config.pre and the short closures I planned on using after…
    Then I set about creating routes files:
    use Aerys\Router;
    use App\Action\HomeAction;

    return (Router $router) = {
    $router-route(
    “GET”, “/”, new HomeAction
    );
    };

    This is from routes/web.

  • Finally, I created two (similar) actions:
    namespace App\Action;

    use Aerys\Request;
    use Aerys\Response;

    class HomeAction
    {
    public function __invoke(Request $request,
    Response $response)
    {
    $response-end(“hello world”);
    }
    }

    This is from final touch was to add shortcut scripts, to launch dev and prod versions of the Aerys server:
    “scripts”: {
    “dev”: “vendor/bin/aerys -d -c loader.php”,
    “prod”: “vendor/bin/aerys -c loader.php”
    },
    “config”: {
    “process-timeout”: 0
    },

    This is from composer.json

    With all of this done, I could spin up a new server, and visit http://127.0.0.1:8080 just by typing:
    composer dev

    Setting Up The Front-end
    “Ok, now that I’ve got the PHP side of things relatively stable; how am I going to build the ReactJS files?

  • I noticed Mix liked to create a manifest file, so I made a helper function to query it:
    use Amp\Coroutine;

    function mix($path) {
    $generator = () = {
    $manifest = yield $manifest = json_decode($manifest, true);

    if (isset($manifest[$path])) {
    return $manifest[$path];
    }

    throw new Exception(“{$path} not found”);
    };

    return new is from helpers.pre

    Aerys knew how to handle promises when they came in the form of $val = yield $promise, so I used Amp’s Promise implementation.

  • I found this relatively straightforward, with a new class:
    namespace App\Socket;

    use Aerys\Request;
    use Aerys\Response;
    use Aerys\Websocket;
    use Aerys\Websocket\Endpoint;
    use GameSocket implements Websocket
    {
    private $endpoint;
    private $connections = [];

    public function onStart(Endpoint $endpoint)
    {
    $this-endpoint = $endpoint;
    }

    public function onHandshake(Request $request,
    Response $response)
    {
    $origin = if ($origin !

Chris bootstraps a basic Stardew-Valley-like game in this game development with PHP post, using an async server, preprocessors, and ReactJS!
Continue reading “Game Development with ReactJS and PHP: How Compatible Are They? — SitePoint”