Front-End Separation Of Concerns

From studying object-oriented programming in university, it was drilled  into us how different classes separate concerns, and how different  layers of an application should serve different purposes e.g. you can’t  have database access procedures in a class that deals with the front end  page.

But, lo and behold. Something else has been advised from the secret  organisation that designs international best practices that everyone  should conform to without questioning it.

When developing a web user interface, the html should determine the  structure, the stylesheet should determine how the page looks, and  javascript should determine the behaviour. These should be separated.

This means that there shouldn’t be any styling beyond the basic  structure in the html. There shouldn’t be any click actions in the html.

Truly revolutionary. Changed my life.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s