martes, 22 de diciembre de 2009

Programming Blindspots

"A programmer who hasn't been exposed to all four of the imperative, functional, objective, and logical programming styles has one or more conceptual blindspots. It's like knowing how to boil but not fry."
-Tom Christiansen

I know more or less what MVC is about, but I have some "blindspots" when I try to organize some of my code. One example is: Where should I put twenty SQL queries that are needed for filling twenty combo boxes? In some solutions there is a master table which has many foreign keys, and you should choose data from other tables in order to fill this table.

Another example: How should I use data stored on a user session: to pass them as parameters (objects), or use them as global access (static)? Because there are many "unconnected" sections of a program which may need an access to a session, like when there are many parts of a view which can only be seen for admin users.

From my point of view, there are still some topics where Structured and OOP programming can't be agreed. Sometimes an Idea can suffer disadvantages from both of them. The quote I used here prompted me two more programming styles, but I think that list will grow with time.

No hay comentarios:

Publicar un comentario