3 ms·
"Central to the design of HTML and the Web is the notion of democratic access to information and the ability for non-specialists to create it." I imagine the l
by lwhi 16y ago
"Central to the design of HTML and the Web is the notion of democratic access to information and the ability for non-specialists to create it."
I imagine the large majority of the hackernews readership can be defined as a 'web specialist' of one kind or another, so if this were true most of us would be out of a job :P
My point is - there's no good reason why front-end development should be any less complicated than back-end development. Just because people expect it to be easy, isn't a good enough reason ..
- danenania 16y agoEven the most complex layouts are conceptually much simpler than any non-trivial business logic. You can test this by trying to explain both aspects of a project you're working on to a non-technical friend and see which he or she is better able to grasp. It's important to distinguish whether a task is made complex because it actually is conceptually complex or because bad syntax and language rules make it complex. In the case of CSS, it tends to be the latter. Adobe Flex makes application layout dead simple. All you need are horizontal and vertical flows, consistent alignment, and border constraints. CSS would become about 5x more intuitive and productive for web app development if it just added these basic features and allowed us to escape its cryptic realm of floats, blocks, and display:inlines.
- lwhi 16y agoThere's nothing cryptic about floats, block elements and inline elements. But you need to make an effort to learn about them! People assume that CSS should be easy / that they won't need to learn extra skills - and are then annoyed because it doesn't work in the way they assume it should. Imo, it's a pretty ridiculous situation - how can a person judge something they don't understand?
- danenania 16y agoThat's the point--it shouldn't take much effort. It's a simple problem made difficult by poor syntax and metaphors. I do understand CSS. I've created plenty of fairly complex layouts with it. That's what allows me to judge it as inferior to other layout models I've used. Why shouldn't it work the way people assume? I see very little benefit for this trade-off, except perhaps for the salaries of CSS gurus.
- lwhi 16y agoI don't understand how an incorrect assumption can be used as a criticism? Just because you assume something, isn't going to make it true. The problems you might want to solve may be simple - but problems that others might want to solve might be more complex. It's not perfect, but CSS actually works reasonably well in a variety of situations. My main concerns were based around browser inconsistencies, but things are much better in 2011 (compared to 2005). There's a strong meme that reinforces the idea that 'CSS is rubbish' - but I think it's actually counter-intuitive to spread it. Basically, all we end up with are a lot of grumbling people who believe it's not worth learning - and don't.
- danenania 16y agoIt isn't about assumptions being correct or incorrect. I'm saying that if possible, a language should adhere to the concepts and vocabulary that people bring to the table instead of inventing its own, unless there are major benefits to be had in doing so. I see no benefits to the layout model of CSS over that of Flex (quite the contrary), and the vocabulary used in Flex means I understand how the system works immediately without having to look anything up because I know what horizontal, vertical, gaps, and constraints are already from my everyday non-technical experience, whereas I have no idea what an 'inline-block' is, and even when I look it up at w3schools, I get "The element will generate a block box, laid out as an inline box", which is gibberish without further research. Clearly learning CSS is non-negotiable for being a successful web developer. I'm not contesting that fact, I'm lamenting it.
- lwhi 16y agoBeing able to specify that an element is placed within a document flow (inline) is useful. Conversely being able to specify that a (block)-level element has its own position (relative or absolute) is also useful. Sometimes it's useful for an element to be placed 'inline', but also share some of the properties that a block-level element has (like width and height) - so 'inline-block' has its place too. I think part of the problem is, there are no every-day terms that can be used to illustrate a lot of the concepts that CSS makes use of. If simple terms were chosen, the ability to do a lot of things would be crippled. Only simple things would be possible - and this wouldn't suit everyone. But I do agree that it would nice if everything made more sense from the get go.
- mkn 16y agoWe're talking about needless complication as opposed to essential complexity. We're talking about goddammit-I-just-want-x-next-to-y-no-matter-what-is-specified-ten-levels-up-the-dom-tree! The essential reason that front-end development "should" be easier than back-end development is that back-end development is fundamentally algorithmic in nature and requires languages powerful enough to solve any solvable problem in computer science, while front-end development--and we really mean layout here--solves the limited problem of placement, layering, and coloring, and only requires a commensurate level of syntactic power for its implementation. I guess my point is that the front-end, or at least the layout portion of the front-end that CSS purports to solve, is so obviously so much less complicated than the back-end that you shouldn't have to point that out in order to deflect the accusation that it's just a naive expectation. I realize it was probably tongue-in-cheek, but if anyone defends the complexity of CSS by equating it to a jobs program for web dorks, they've just ceded the point that CSS is improperly designed and needlessly complex.
- lwhi 16y agoMy point was - if creating websites is so easy, why would we need any web-developers? In the best-of-all worlds, it would be straightforward - but in the real world there are lots of things to consider. We need specialists. You might only use CSS for layout, but that doesn't mean layout defines the full-extent of its functionality. When creating client-side user-interfaces, CSS is usually used in conjunction with other technologies. Front-end development often makes use of JS, and last time I checked that was a fully fledged programming language ;) CSS can provide a developer with a lot of flexibility - and the fact that you don't understand it is perhaps the main problem. I think people assume they don't need to actually learn CSS - and get annoyed when they realise their brain wasn't preloaded with the required knowledge :)