Wednesday, September 16, 2009

Dr. StrangeFramework or how I learned to stop worrying and love the layers

Part 3 – decoupling
To keep the layers decoupled as much as possible, I decided not to have any PHP code directly populate data within the page ANYWHERE! No matter how easy it is, the complexity and maintainability is impacted when you do this – you end up with HTML/jQuery/PHP code all over the place in the same code file…some people use Smarty or like frameworks, but all they do is basically add another layer without reducing the coupling. SO, I decided to use json…I started with some static json data pages and used jQuery (THE BEST) to read the data, parse and populate the page, overall a very pleasant experience compared to what I thought it would be. The toughest part was properly formatting json, once done I was satisfied that for the most part the presentation layer to the application layer were decoupled…next step, json

No comments:

Post a Comment