I had been using Webcore for years, first on SmartThings and then on Hubitat after SmartThings got rid of Groovy. I had quite a collection of over 200 Webcore pistons, in about 8 categories. It is amazing what you can do with Webcore, but it was getting so hard to troubleshoot and follow the logic as I had many pistons calling other pistons and sending them parameters, it just got to be a mess to remember even how things were setup.
So I started coding everything in Webcore into custom apps and drivers. I have a coding background and I know Java, so this helped, but there is still a learning curve to learn how Hubitat works with the classes and methods used for apps and drivers. The developer pages really help a lot.
More or less, a category in Webcore became the app, and each piston become a method in the app. Global variables became either state variables or an attribute in a data driver. I had to learn to make schedules, and how to subscribe to events, but once you get the hang of it things it can go pretty quickly. What gets to be a pain is doing your own type casting, and time calculations are not the easiest to use compared to Webcore. Still, I just kept with it and used the internet to figure things out.
I use virtual drivers for data storage, and use methods in the drivers to work on the data if there is some logic needed. Then there is an app to go with the driver to run all the automations, so most of my automations are now an App/Driver combo.
Anyone else doing this? I really think it is the way to go for full control, and everything runs faster than when Webcore was running my automations.
Edit:
Here are a few examples: (not perfectly formatted for github, and there is some commented out code)
Note: I store all my scenes for a room in a single json string that gets parsed when a scene is executed for to get the device commands for a scene.
Front Scene Controller Executer
Front Sensor Data
Illuminance Data
Illuminance Calculations and Sync
Here is a very simple app to connect two switches to run my electric fireplace:
Broadlink Fireplace Connector