DCI – Data, Context and Interaction – Successor to MVC?

Trygve makes a presentation of DCI in https://vimeo.com/8235394 DCI has been created to solve a problem in object orientation: it’s too difficult to review OO code. The code for one use-case in OO is typicall spread out between lots of classes. To understand how the code works, you must also know the relationships between objects … Read more

Where to put model data and behaviour? [tl; dr; Use Services]

You should use services if you want something usable by multiple controllers. Here’s a simple contrived example: myApp.factory(‘ListService’, function() { var ListService = {}; var list = []; ListService.getItem = function(index) { return list[index]; } ListService.addItem = function(item) { list.push(item); } ListService.removeItem = function(item) { list.splice(list.indexOf(item), 1) } ListService.size = function() { return list.length; } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)