New answers tagged

3

Should I just dispense with the binding source and work with the DataTable object directly That at least will basically solve your whole problem. Use your UI labels for displaying things only, not for providing input values for further calculations. What would you do, for example, if you get a requirement to change the formatting of the cost label, to, ...


0

For non embedded system but something I was doing in C# was SCADA system. There were many events linked to what was happening in the warehouse when load was unloaded part of system generated event and other part was writing new state to the database. We of course had some GUI client but it was just to show state of the database which was reflecting state of ...


5

Embedded systems are almost always inherently event-driven, even if they are not programmed explicitly as such. These events come from things like hardware interrupts, button presses, period analog-to-digital readings, timer expirations, etc. Low-power embedded systems are even more likely to be event-driven; they spend most of their time sleeping (CPU ...


0

In embedded systems, events occur during interrupts. There are many sources of interrupts, from timers to I/O. Also, RTOS can have events too. One example is waiting for a message from another task.


9

Events are also heavily used in network programming (e.g. Nginx) to avoid expensive busy-wait loops and instead provide a clean interface to know exactly when a certain operation is available(I/O, urgent data etc). This is also a solution to the C10k problem. The basic idea is to provide the OS a set of sockets (i.e. network connections) to monitor for ...


28

Event-based programming is actually also used for highly performant server programming. At a typical server workload, much of the time processing a result actually comes from I/O. For example, pulling data off a (7200 RPM) hard disk drive can take up to 8.3 ms. For a modern GHz processor, that would equate to ~1 million clock cycles. If a CPU were ...


101

Nope. They're really handy for implementing Observers and making sure that classes are closed to modification. Let's say we have a method that registers new users. public void Register(user) { db.Save(user); } Then someone decides that an email should be sent. We could do this: public void Register(user) { db.Save(user); emailClient.Send(...


3

Event Messages Gregor Hohpe. Event Driven Architectures Gregor Hohpe. SEDA architecture, Welsh, Culler, Brewer. how do you handle in normal backend programming when something happens do this other thing? Finite State Machine is one common approach Given(State.A) When(Event.B) Then(State.C) .and(Consequences.D)


52

Nope. A classic example of events being used in non-GUI logic are database triggers. Triggers are code that gets executed when a given event happen (INSERT,DELETE, etc). Seems like an event to me. This is the Wikipedia definition of event: In computing, an event is an action or occurrence recognized by software that may be handled by the software. ...


2

If you quote the following sentence also, you have the answer: Events do not travel, they just occur. However, the term event is often used metonymically to denote the notification message itself, which may lead to some confusion. From the context it is clear that the two other quotes are talking about the event notification message rather than the ...


3

One way to achieve what you're asking with minimal code changes is to check in both the view and the model if data has actually changed when a notification comes in before performing an update/notify. Program-flow example: User sets text field to "Some text". GUI sends an update notification to the model with the new value. Model checks that the value has ...



Top 50 recent answers are included