What is the concept behind R.java?

Biggest advantage is in Localization and Providing alternate resources for different screen sizes. e.g you can have a String resource R.string.myname this could be a defined in english in /values-en/strings.xml and in spanish in /values-es/strings.xml System will take care or picking up the right file depending on the locale you just need to use @string/myname … Read more

List, IList, IEnumerable, IQueryable, ICollection, which is most flexible return type?

Collections are not generally very useful for DAL returns, because a collection does not implicitly guarantee order. It’s just a bucket of items. An IList, on the other hand, does implicitly guarantee order. So we’re down to IEnumerable or IList. The next question would be: is the List object “live”? i.e., is it connected to … Read more

Should I use a single or multiple database setup for a multi-client application? [closed]

I usually add ClientID to all tables and go with one database. But since the database is usually hard to scale I will also make it possible to run on different database instances for some or all clients. That way you can have a bunch of small clients in one database and the big ones … Read more

How to detect target architecture using CMake?

So I devised a rather creative solution to my problem… it appears that CMake has no functionality to detect the target architecture whatsoever. Now, we know we can easily do this in C because symbols like __i386__, __x86_64__, etc., will be defined depending on your environment. Fortunately CMake has a try_run function which will compile … Read more

What’s the difference between design patterns and architectural patterns? [closed]

It requires a detailed explanation but I will try to sketch the differences to best of my knowledge. Patterns are distilled commonality that you find in programs. It allows us to deconstruct a large complex structure and build using simple parts. It provides a general solution for a class of problems. A large complex software … Read more

tech