Hot answers tagged

4

It shouldn't matter. finally blocks are special, but they are not special in a way that matters to your program. Finally blocks are special because, for example, the runtime will delay a thread abort exception until after control leaves a finally block. (And if you are now thinking "if I have an infinite loop inside a finally block doesn't that mean that ...


4

Matthias Verraes describes domain events as follows (highlight added): Domain Events are a special type of Event messages. A Domain Event is something that has happened in the past, that is of interest to the business. This last distinction means we separate all technical concerns from the domain. Usually, the distinction is very clear. In other ...


2

Definition An event handler is just a piece of code (function in the case of Javascript) that does something when a specific event occurs. An Example One example would be the mouseover event that occurs when the mouse (any pointing device really) moves over an element on the page. <ul id="test"> <li>item 1</li> <li>item 2</...


2

From my understanding of hooks this is true. The way I understand hooks it that you can execute some code at a predefined point during the execution flow. Afterwards the application continues as if nothing happened. This is very abstract so I would like to express this using an example: Lets say you can execute code when an before_authentication hook is ...


1

The Big Differences... While the pros & cons above are valid concerns, I don't care [too] much about them on a higher scale. Here are the pros & cons which determine whether I write in one paradigm or the other: Reference-Based Usually, this approach will lead you down paths you're not aware of. You will likely be coupling intensively -- and it ...


1

If the array you're asynchronously processing can be modified by other code, problems like this are bound to happen at some point. The simplest way to prevent this kind of race condition is to make a defensive copy. The "multiple acceptance" bug you describe makes it sound like this callback is mutating the actual objects in the array, rather than merely ...



Only top voted, non community-wiki answers of a minimum length are eligible