Just look at the LESS example on the front page. The compiled output is simpler than the source you're writing. I find having some code duplication to be an acceptable trade-off for turning a basic declarative configuration language into a chimera DSL that must be incorporated into the build process.
The more a configuration language strays away from being declarative, the less desirable this becomes.
There are a lot of advantages to them that need consideration too granted.
[0] http://prog21.dadgum.com/200.html [1] http://prog21.dadgum.com/p21.css
I disagree with your second point, however. Single page applications are good for pages with a high amount of short, repeated interactivity where concurrency and frequent status updates are prioritized. However, there are plenty of applications that I use where I prefer to have a workflow built on discrete states (pages). They typically perform better in terms of rendering time and latency, both in terms of request and user action. (Just compare reddit's mobile beta to their previous mobile site. I still type in /.compact because I can't stand the new SPA.)
That's what I understand by webapp. Web sites (such as reddit) should stay server based.
I feel like this is a joke or amusingly unintentional.
But when I say webapp I don't mean blogs or regular mostly static websites. I mean Web applications.
That and it often has more to load than your traditional html/css page, which means a less pleasant experience on slower connections (mobile).
Putting bits of AJAX into a web app doesn't make it SPA. Lets say you have a CRUD web application that is tax forms which end up being 5-10 "pages" printed. Then as a SPA you would have to load all the code to generate the 5-10 pages of forms, validation, logic, etc. onto a Single Page. This single page would be where everything is done, the URL would not change and the end user would have a seamless experience.
If the goal is interactivity and seamless operation to the end user, attempting to mimic a desktop app, there are multiple paths to achieving that goal. Limiting the design to a single page seems sort of contrived and a "do it because I can" type of approach, absent of user requirements - in my opinion.
There's HTML5 history API, lazy loading... Seriously, you describe SPAs in very simplistic terms that are just not true. Do you have any experience building them?
Google Maps is technically an "Ajax powered web app", but it's technically an SPA too as you never encounter a full page refresh.
What's wrong is making a blanket statement that "every web app" should be one. Also you're trying to draw a fine distinction between web apps and websites, which could be another discussion altogether, probably with no big agreement on where to place the line.
Of course there's documenting right? Except you document and do this fantastic job training but when it's all set and done, technology has moved on when the project wraps and there's already something better that can't coexist with the method you used.
Preprocessors also have disadvantages, not just training. Every time you abstract something, then abstract it again you are risking that what comes out could be problematic and harder to fix.
think about this. in the end, the browser is displaying based on the final CSS. You inspect the final css. If you're trying to fix something, you have to discover it, then work backwards to it's source. Inspect tools show you what's there and what you have to edit. But it takes yet another set of steps and complexity to work backwards to your css before it was processed.
make sense? So tech moves on and new complexity and longer problem solving procedures are introduced. Yay. No wonder there's an attraction to being boring.
To rework a quote from bruce lee for this. The guy who practices one kick a thousand times is much more formidable than the guy who practices a thousand different kicks one time.
CSS preprocessors are unique, with LESS and Sass, you can write straight CSS and use its wonderful concatenation through imports, or just its nesting or perhaps simple variables for colors. There's so much benefit that I can't imagine not using them.
> Will it be harder to onboard developers?
No. LESS is similar enough and we've automated the build process, so it will not be harder. People that can write CSS can learn LESS easily.
> Will debugging code be more difficult?
No. Again, the similarities are already well established, and most debugging will happen within the browser. The tooling already exists to make this easy.
To me, harder doesn't mean you won't have to learn something new, but it's actually more difficult. And that entirely depends on how you have things setup and what tooling you have. This does mean that if I invite LESC and want to use that instead of LESS, it will be harder to use precisely because the tooling isn't present.
— TFA
Read literally, the paragraph says “If there are any downsides, do not use preprocessors.” A more balanced approach of weighing upsides and downsides is not supported by the original text.
If the author wanted to say something different, he can and should have done so. I encourage him to change his call to action from “say no to preprocessors” to “be conscious of decisions.” It’s much more defensible and realistic!
>>> When given the choice to add a preprocessor (e.g. LESS, SASS, CoffeeScript etc) to the technology stack, the BFED realises there is a deeper impact beyond just "writing less code". Will it be harder to onboard developers? Will debugging code be more difficult? If the answer to any of these questions is yes then the BFED will say no to preprocessors.
Really? You will ignore the many many advantages of pre-processors because it will be harder to train new people? Come on...
>>> Furthermore, the BFED realises that Single Page Applications cause severe problems and that by avoiding them and leaning on the server appropriately provides a better experience and reach.
That's a bit one sided. There's a time and place for SPAs, you can't just dismiss it entirely. Every web app today should be an SPA.
Edit: I should clarify that by webapp I don't mean website. There seems to be some confusion.