In: Computer Science
a style sheet was not new with HTML and even today other languages use a similar approach. JavaFX uses an almost identical style definition as CSS for its style sheets. .NET's Windows Presentation Foundation (WPF) uses an XML like style definition in a language named XAMLAll these different technologies have one thing in common: they separate what is being displayed from how it is being displayed. Why? What is the benefit of doing so, if any? What are the drawbacks, if any? For those of you who may have taken a software architecture/engineering class, the style sheet follows a, currently, very popular architecture, do you know what it is?
120 WORDS MINIMUM
Please find the answer.
Modern times the architechture used is MVC architechture. This seperates the data from the view.
Imagine you happen to go at a restaurant and you order a pizza. Lets say there is only a single person, who takes your order and goes to the kitchen, makes the pizza for you, and also does the job of catering you.
There are many problems with this method. The person cannot specialize in anything. It looks awful and many other things. It makes a huge sense to have a waiter, have some cooks, and have a receptionist(for lack of words), who do their own jobs.
Processing data, in one sense, does not have any connection with how the data is being processed. There would be business rules, which have no connection with how data is being displayed. Example: Waiter has nothing to do with what item I need to serve, but he only has to deal with "Have i served what i got properly." Waiter needs to serve properly what is being given to him.
Similar is true with CSS. CSS simply deals with how the data is being shown to the user. It has nothing to do with what data is being shown. HTML is the bare bones and CSS is like the clothing, and detailed clothing to the person.
Thanks