Sharing Top Content from the Angular-sphere.

How to Really Screw Up an Angular Project

  • But just as a way of generalizing, if your code doesn’t look like it started as an Angular CLI project, you are going to slow down any future developers you hire.
  • This means that you probably won’t be able to use the CLI to scaffold out your code and any future developer is going to have to learn your way of writing Angular instead of the industry standard way of writing Angular.
  • You should have a theme file, or an application level CSS file that defines the fonts, and colors that should be used throughout your application.
  • If you can make that change in one CSS file, that is going to be a lot easier than looking through all the CSS in all of your components to make sure you found every place the color needs to be changed.
  • I’ve seen one project where they were using a mix of both and they had at least one file that was using a string for the HTML but still had the HTML file next to the TS and CSS file.

We all know about best practices.  But what does it take to really mess up a project?  Well, for starters, you do EVERYTHING wrong.  You don’t just ignore one or two best practices, you ignore them all.  By evaluating the mess you can get yourself into by ignoring best practices, I think we can all learn better why these recommendations exist.

We all know about best practices.  But what does it take to really mess up a project?  Well, for starters, you do EVERYTHING wrong.  You don’t just ignore one or two best practices, you ignore them all.  By evaluating the mess you can get yourself into by ignoring best practices, I think we can all learn better why these recommendations exist.

I can grant a pass if you aren’t using the Angular CLI because you started your project before the CLI became viable.  But, by this point you should have already converted your project over to use the CLI or be making plans to move to the CLI.

Why is this a problem?

Because 99% of the developers you are going to find will expect that when you ask for an Angular developer, what you mean is that you are looking for someone who can write Angular code using the Angular CLI.  This brings with is a certain number of expectations about how your code is laid out.  Some of these are outlined below.  But just as a way of generalizing, if your code doesn’t look like it started as an Angular CLI project, you are going to slow down any future developers you hire.

Ignoring naming conventions may seem trivial, but naming conventions add clarity.  The reason we name component files as components is so we know they are…

How to Really Screw Up an Angular Project

Comments are closed, but trackbacks and pingbacks are open.