Runtime vs Compilation time

Not much code changes these days. But I have a good excuse. It is my holiday and tomorrow I’ll be heading towards Austria and Italy. But this doesn’t mean that I haven’t been thinking about ExtAppBuilder.

In my previous post I was thinking about some way to convert the C# code to JavaScript code. I figured out that the skeleton functions must remain and return null or 0. But my opinion has changed, because there is a difference between compilationtime and runtime.

When I write code to add a Panel only if the current user is in a certain role then this must be checked at runtime and not at compilation. To accomplish this the skeleton code still must return null or 0 but also must write a line of JavaScript code at the time they are called, runtime.

So what to do at compilation time. On compilation we must check the written code for functions which should be in a handler. We must create the handlers with two partial classes (just like your aspx.cs and aspx.designer.cs) and put the necessary code in it. This will ease the job of the developer because they don’t have to worry about writing handlers. This will be handled by ExtAppBuilder in a generic way

This might seem a bit cryptic and I write this down mostly as a reminder for myself. But in my next post, when I am back from holiday and when I understand the way of writing code blocks with WP (duh), I will explain my theory with code examples.

  1. No comments yet.

  1. No trackbacks yet.