Inheritance is a common feature in OOP languages to specialise classes/types and allows polymorphism. It is easy to reuse the common functionality between classes by moving it to the parent class and use by the child classes. Without being mindful of software design principles, it can lead to increased coupling and responsibilities, making existing code hard to change. We’ll take you through a situation in C# MVC’s controllers and show how it improves the design by refactoring. The class diagram shown illustrates a fictitious online photo stock website.
This is a violation of interface segregation principle (ISP) which states that no client should be forced to depend on methods it does not use. In this case, BaseController has multiple methods and through inheritance, all of the child controllers have access to them but only use some of them and does not need some of them. When there’s a change in BaseController’s GetCredit, the child controllers which use it might be affected and should be checked and tested.
Fast forward 3 years of uni and 1.5 year of work life without exercise and here I am, sitting in front of the computer most of the time for work and leisure, belly getting bigger and had to buy new jeans and occasionally falling sick. I thought, it’s fine, still acceptable. Deep down I knew I don’t wanna buy new jeans again.
Malicious attacks and breaches can cause loss of data, customers, reputation and income, thus the need for security. Open Web Application Security Project (OWASP) is a non-profit organisation which identifies security concerns and potential solutions.
I adopted Girl Girl the cocker spaniel when she was 6 from a factory at Tuas. I’m her 3rd (and final) owner, the 2nd owner, an uncle in his 50s didn’t know much English and thus named her Girl Girl, which I didn’t feel a need to change since she responds to it. Uncle could not bring Girl Girl home cos his existing dog could not get along with her, he could only keep her at the factory, where he returned on Sat and Sun to bathe her, feed her and play with her. Uncle was retrenched and had no choice but to ask around for new adopters. Continue reading
Kind of employees
We’ve tried to broadly identify some of these employee groups. Of course, no one fits perfectly into any one of these zones, but which one sounds the most like you? Continue reading
There are many software developers that have used ASP.NET Web Forms development framework for building solutions. In late 2014, we conducted a feasibility study for ASP.NET MVC5 framework by applying it in multiple small projects.
What is React.js? Many programmers have been pretty curious about this thing that we have been talking about. I’ll try to explain that exactly here. Continue reading