Which Architecture patterns are used on Android? [closed]

I tried using both the model–view–controller (MVC) and model–view–presenter architectural patterns for doing android development. My findings are model–view–controller works fine, but there are a couple of “issues”. It all comes down to how you perceive the Android Activity class. Is it a controller, or is it a view? The actual Activity class doesn’t extend … Read more

Relational Database Design Patterns? [closed]

There’s a book in Martin Fowler’s Signature Series called Refactoring Databases. That provides a list of techniques for refactoring databases. I can’t say I’ve heard a list of database patterns so much. I would also highly recommend David C. Hay’s Data Model Patterns and the follow up A Metadata Map which builds on the first … Read more

What should my Objective-C singleton look like? [closed]

Another option is to use the +(void)initialize method. From the documentation: The runtime sends initialize to each class in a program exactly one time just before the class, or any class that inherits from it, is sent its first message from within the program. (Thus the method may never be invoked if the class is … Read more

What are the downsides to using Dependency Injection? [closed]

A couple of points: DI increases complexity, usually by increasing the number of classes since responsibilities are separated more, which is not always beneficial Your code will be (somewhat) coupled to the dependency injection framework you use (or more generally how you decide to implement the DI pattern) DI containers or approaches that perform type … Read more

What’s the difference between the Dependency Injection and Service Locator patterns?

The difference may seem slight, but even with the ServiceLocator, the class is still responsible for creating its dependencies. It just uses the service locator to do it. With DI, the class is given its dependencies. It neither knows, nor cares where they come from. One important result of this is that the DI example … Read more

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