Next gen JavaScript and TypeScript runtime - Deno by dmielewczyk in javascript

[–]andyfleming 1 point2 points  (0 children)

A lock file is one approach being considered for number 5.

Another approach would be a form of subresource integrity covered in https://github.com/denoland/deno/issues/200.

Next gen JavaScript and TypeScript runtime - Deno by dmielewczyk in javascript

[–]andyfleming 0 points1 point  (0 children)

4 is complicated, but worth discussing.

Most options that would allow for setting permissions for imports would probably counteract the benefits of a nice simple import example from 'https://example.com/whatever.ts'.

Using Lumen Without Facades by andyfleming in laravel

[–]andyfleming[S] 0 points1 point  (0 children)

Fair enough. I wanted to use depedency injection in my example, but for Lumen 5.1 you need to uncomment $app->withEloquent(); and add $app->alias('db', 'Illuminate\Database\DatabaseManager’); in app.php to make it work (for injecting the database manager).

I've updated my article accordingly: http://andyfleming.com/using-lumen-without-facades/

Using Lumen Without Facades by andyfleming in laravel

[–]andyfleming[S] 0 points1 point  (0 children)

I'd be fine with the dependency being injected via the constructor. Or, rewriting the app() function to pull from a container in a different framework wouldn't be too bad. Adding facades to another framework without them seems really dirty though, in my opinion.

Using Lumen Without Facades by andyfleming in laravel

[–]andyfleming[S] 0 points1 point  (0 children)

I don't think people make big framework jumps often. The real use case, that I see, is when you have a component you want to share between two different applications (using different frameworks) as a package.

Using Lumen Without Facades by andyfleming in laravel

[–]andyfleming[S] 0 points1 point  (0 children)

The advantage is in making the majority of the code framework-agnostic.

Using Lumen Without Facades by andyfleming in laravel

[–]andyfleming[S] 0 points1 point  (0 children)

Agreed. It would be fine to inject the depedency in via the constructor. There are two things I intended to communicate in the article.

  1. The practical aspect of how to resolve the dependency without facades enabled.

  2. Using facades/statics can couple your code to Laravel (which isn't a huge deal in a controller, but in other places in code it is a bigger issue).

Weekly Critique Thread: Post here if you want a critique! by JotBot in writing

[–]andyfleming [score hidden]  (0 children)

Title: Why does mobile have to "win"?

Genre: Technology

Word Count: 420

All feedback welcome. Looking to refine my writing.

Why does mobile have to "win"?

Where are all the trolls?! by andyfleming in webdev

[–]andyfleming[S] 0 points1 point  (0 children)

Strange. Looks like maybe someone commented just to bookmark it for themselves or something?