Now that RuleLink is in a workable state, my next target is a framework for generating application code from the business logic classes. Say that you have implemented a method
NewAccount(string email, string password, bool joinMailingList)Exposing this method to the framework, you should get a basic generated user form for entering these values. When the form is submitted, the method is invoked. The form could be generated for ASP.NET, MonoRail, or anything for that matter -- as long as the developer can step into the generated code and understand what is actually going on.
This basic form would be sufficient for prototyping an application, but in order to get on to a bona fide solution, we need validation, page flow, layout, styling, etc. These would be implemented using techniques that do not corrupt the clarity of the business logic and do not require coding additional layers that need to be tested and maintained. Validation, for example, might be expressed as:
NewAccount([Constrain(AccountRegistry.AddressExists)] string email, string password, bool joinMailingList)To change or extend the basic application generation, you would use metadata, configuration, or use-specific components to plug into the generation framework. When actual business logic needs to be applied, you refer back to the business classes (as when we used AccountRegistry.AddressExists above).
No comments:
Post a Comment