Code Monkey home page Code Monkey logo

Comments (11)

poncianodiego avatar poncianodiego commented on July 30, 2024 5

@zanozik you are being disrespectufl and kind of annoying. You can criticize but being respectful.

from laravel-best-practices.

alexeymezenin avatar alexeymezenin commented on July 30, 2024 3

@zanozik

This "best practices" guide is bad on many levels

This repo represents my experience which is based on ~200 Laravel projects I worked on, books I've read, thousands of answers on StackOverflow, and other Laravel communities. So, I know something. But I don't know everything, so if you feel you know better, just create a new discussion about a specific issue and see if people will like what you're saying. Just saying "this repo is bad" and "this statement is wrong" is nothing.

Also, you're saying this guide is bad. It sounds like you've found a better source, can you share it with us?

from laravel-best-practices.

zanozik avatar zanozik commented on July 30, 2024 3

200 projects and you didn't notice that Laravel framework is using Interface suffix? Sounds legit.

from laravel-best-practices.

alexeymezenin avatar alexeymezenin commented on July 30, 2024 2

@thomasmoors when I've added the naming conventions, I've done a lot of research and I've figured out that most Laravel packages and the framework itself didn't use the SomeInterface convention at the time. You probably right about this since PSR naming convention says this

Interfaces MUST be suffixed by Interface: e.g. Psr\Foo\BarInterface

You could open a new poll on this.

from laravel-best-practices.

alexeymezenin avatar alexeymezenin commented on July 30, 2024 2

@thomasmoors You could open a new issue and ask people to upvote/downvote with reactions (thumb up or thumb down).

from laravel-best-practices.

zanozik avatar zanozik commented on July 30, 2024 1

@thomasmoors , I was mislead by your description. I totally agree with you.
This "best practices" guide is bad on many levels and this is just only one example. How about The best way is to use specialized PHP to JS package to transfer the data. statement?
I guess the guide author knows better than Laravel devs...
Anyway, moving on :)

from laravel-best-practices.

zanozik avatar zanozik commented on July 30, 2024

What are you taking about? Only Traits are adjective. Interface may have "Interface" suffix

from laravel-best-practices.

thomasmoors avatar thomasmoors commented on July 30, 2024

What are you taking about? Only Traits are adjective. Interface may have "Interface" suffix

That is litterely an example that this guide puts under "Bad". So I disagree that your statement is true.

image

from laravel-best-practices.

alexeymezenin avatar alexeymezenin commented on July 30, 2024

200 projects and you didn't notice that Laravel framework is using Interface suffix? Sounds legit.

Check the default User model class which is used by most Laravel apps, what do you see there?

Check vendor/laravel/framework/src/Illuminate/Contracts directory for dozens of Laravel interfaces.

As I said, I like the idea of using SomeInterface convention just because that's PSR friendly, but I'm not sure if the Laravel community likes that, so we need a poll.

Also, you chose to ignore my question about a better source. You call the source bad, so there must be a better source, right?

from laravel-best-practices.

thomasmoors avatar thomasmoors commented on July 30, 2024

@thomasmoors when I've added the naming conventions, I've done a lot of research and I've figured out that most Laravel packages and the framework itself didn't use the SomeInterface convention at the time. You probably right about this since PSR naming convention says this

Interfaces MUST be suffixed by Interface: e.g. Psr\Foo\BarInterface

You could open a new poll on this.

How exactly can I open a poll?

from laravel-best-practices.

gkakosouris avatar gkakosouris commented on July 30, 2024

Another convention that can be observed thoughout the framework is naming interfaces using adjectives and traits using verbs (?).

For example:

Illuminate\Contracts\Auth\Authenticatable
Illuminate\Auth\CreatesUserProviders

I think this solves the naming conflict quite gracefully.

from laravel-best-practices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.