Server side development
Let's learn how to write server code for DWKit.
Where should we write server code for DWKit forms?
You can write server code for forms in the Code Actions sections in the Admin Panel. If you don't like writing code in the browser,
implement IServerActionsProvider
interface and connect the resulted class to DWKit. Code will be part of .NET solution in this case.
Writing server code for DWKit: where to begin?
We recommend the following order of actions.
- Read the server architecture section.
- Read the ORM section.
- Read introduction to server actions.
- Next, depending on the server action type you need, read one of the sections in which this type is described:
- Start coding!
You can also:
- Learn about application controllers. You might want to change them for more advance DWKit customization.
Do I need to C# well to write code for DWKit?
Actually, any C# skill level is okay, it is not rocket science. But we still recommend to go through two topics (briefly at least!):
- Dynamic programming. This is useful because DWKit ORM returns dynamic objects as data objects.
- Async programming. Actually, you can do without this knowledge, but it is much more efficient to make applications that deal with asynchronous data requests. DWKit supports both synchronous and asynchronous server actions.
How do I control application client side from the server in DWKit?
We did our best to make client management from the server as easy as possible. You can control the global state of the client application from server actions. You can also use SignalR. We recommend you read the following sections:
- Actions - you can easily change client state from this type of server actions. Server actions are usually initiated from the client.
- Triggers in Insert, Update and Delete operations - you can control client-side state of the application even when working with data.
- SignalR - management of the client-side of the application is initiated from the server.