Questions tagged [hooks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
2answers
168 views

What is the best way to run untrusted hooks/plugins?

I'm building a data processing system where users can submit hooks to execute on incoming data. The hooks are untrusted and should execute in a sandbox with access only to a limited API that I expose ...
2
votes
1answer
170 views

Is using Microsoft Hooks an ethical process for getting non sensitive Information

So we have an application that I am not ready to describe in full before we take it to the market, but I will give the details necessary. We currently have an application that takes a snapshot of an ...
2
votes
1answer
242 views

Is it possible to run a git hook that is executed when adding a file? [closed]

I'm planning to set up a client side git hook to force a commit to fail if any file in the commit contains the text "donotcommit". Is it possible to hook the execution of "git add", such that I can ...
1
vote
2answers
94 views

In a web application, are Hooks and Event Subscriptions the same thing?

When I look at at some PHP applications, they typically have hooks. Drupal and Wordpress are examples. When I look at an application from the .NET world like Orchard or Umbraco, one subscribes to ...
4
votes
3answers
320 views

Patterns to allow for versatile data-flow hooks in Javascript

I have an application where I'd like to add ways for external modules/components to hook during the processes and data-flow and perform actions/modify data. For the first requirement—performing ...
10
votes
3answers
353 views

When are hooks the right design choice?

I've worked on a large Rails app where the use of ActiveRecord callbacks was rampant and harrowing. Saving a record often had unexpected side-effects and it was a challenge to reason about the system. ...
5
votes
1answer
756 views

Driving Linux input events from serial device

I'd like to build a RaspberryPi-based device that can communicate with my Linux laptop over USB (don't think it matters, but I'll be using a custom made USB dongle that has an FTDI chip on it, and my ...
2
votes
1answer
124 views

What's a good strategy to go about registering 2-step hotkeys?

User32.dll exposes a RegisterHotKey function, to register, well, hotkeys: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ...
0
votes
2answers
1k views

Are hooks really subsumed by Slim Framework middleware?

I've been using the Slim Framework (v2) for a little while now to develop my user management system. They recently released Slim 3, and according to the upgrade guide, Slim v3 no longer has the ...
2
votes
1answer
72 views

Development approach for GUI application sharing on X

I'm curious about developing a simple system for GUI application sharing between users on a single computer, which uses Xorg (or perhaps any modern form of X11 display). I'd like user Alice to be able ...
43
votes
9answers
21k views

Is it a good practice to run unit tests in version control hooks?

From the technical point of view it is possible to add some pre/post push hooks which will run unit tests before allowing some specific commit to be merged to remote default branch. My question is - ...
24
votes
4answers
2k views

What should plugins use: hooks, events or something else?

Consider an app that allows plugins to react to its program flow. I know 2 ways to achieve this: hooks and events 1. Hooks Use calls to empty functions inside the main program flow. These functions ...