I remember one time I was working with a mobile project and it was already deployed to the client. It work out well from planning, development, testing to deployment but after a while the client was clamoring that the app is getting slower and slower when it was continuously being used up to the point where it will just crash suddenly. Well it is a given fact maybe not all but I’m guilty of it that we really love our code, so in that sense I was pointing the blame on maybe the device or something unusual that the client was doing with the Application. To make the long story short I’ve learned that Profilers are programmer’s best friend.
I remember the time when my Team Lead asked me to implement an Event type solution for the problem that we have encountered in our previous projects. It was my first time to implement such technique and I was kinda daunted of the said task. In today’s session I’m going to discuss, in the most simplest manner, about raising and consuming events with and without parameters.
What are Events? Events are way for a Class to provide notifications for its clients. Do you remember when we use a button in a Windows form? When we double click the button it will navigate to Button Click which is an event. It is heavily used in GUI related matters but is still very useful for objects to signal if there were any state changes.