New answers tagged

0

Generally more projects == good. But only because the standard 'bad' approach is a single massive project with everything in. Separation enables the compiler to enforce dependency boundaries and forces you to think. So in your example, by putting each resource in its own project you stop those projects depending on each other. Isolating their sections of ...


1

There is no particular reason. The libraries just grew like that, naturally. Libraries such as Bootstrap were promising that there will be no custom styling any longer. Instead of spending hours writing CSS code (and days adjusting the CSS you wrote for Internet Explorer), you would simply include the library in your project, and add semantic classes where ...


1

I think you are right to point out that some CSS classes like .inline-block { display: inline; } are generally pointless. There are three reasons why such classes might still be used: Cargo-culting of “best practices”. You're generally supposed to use classes in place of inline styles, so some people even use CSS classes where they do not bring any benefit. ...


0

Heuristic: think about how you would do it with a web site. That alone will tell you a lot about how it would be done as an API. In the future I might also consider PUT /api/libraries/:libraryID, but that would change the entire books array, and replace it, as opposed to just adding or deleting a specific book(s). In REST, this it the right basic idea. ...


0

there are limitations on using HTML within PHP. Most of the time you would have your HTML outside. You would create a page just as you would if you were not using PHP, then add the PHP into the areas of the document where you need it. You can have several chunks of PHP within a document. Working With PHP Inside HTML has some examples : https://...


Top 50 recent answers are included