Skip to main content

Posts

Showing posts with the label Interface

Xamarin Forms Core components Part 1 Dependency Service

Intro Xamarin Forms is a collection of controls that can be used and rendered on multiple platforms, and in order of them to function as they are suppose to, they do need a set of core components that defines the way these controls, in how they are created, how they are rendered to how they are used, of course every platform is different and sometimes a platform specific extra configuration is required, specially that there are so many differences between the different platforms in matter of design, user experience and operating system behavior. So one of the core components of  Xamarin  Forms is the Dependency Service, and by the name suggest it does act as the dependency resolver for all forms controls, if you are not familiar with IOC " I nversion O f C ontrol" and Dependency Injection please refer to the link for a quick intro i wrote a while ago on IOC  IOC Part 1 - Inversion of control Principle .  And as of such the Dependency Service is the c...

Dynamic Anonymous my experience through out assemblies doing unit tests and more RuntimeBinderException Headache

While at work on a project I was facing a matter that caused me a lot of headache, which is passing dynamics throughout assemblies, after doing a lot of research and investigation like Should I use dynamics if no then why and how can I compensate it’s flexibility and stuff like that  just to get a profound to wither to use it or not , And I found that it is preferred not to use dynamic whenever possible and that because The overhead it causes on the runtime, in other words the time to identify properties types is not done on compile, it is done on runtime thus the overhead. Nevertheless the fact that literally we do not know if it is working alright, unless we are at runtime if it is not working for instance we got a property name wrong  then boom exception for sure BUT a very convenient guy would say where are your tests that should cover that from happening “just for your info not all of us right tests and not all of us right proper tests”, I would say that is...