OR Technologies - side tracked
I'd like to get opinions on a way to build screens and generate dynamic sql. About 3 years ago my current client hired me to help his team build web apps based on their PowerBuilder GUI app. The team had no web or VB/ASP experience at all. The resulting concept was more of a prototype, I had no idea it would be carried forward. We were experimenting with ways to generate pages. My initial idea was to create objects to represent, say a customer, and have the business rules for customers contain the logic for the CRUD operations.
The senior developer wanted no part of this, he liked the way PowerBuilder bound right to the database. Since they were paying the bills I worked with him and came up with something like this that gets called using vbscript in the asp pages.
The arguments are IsPrimary, SchemaName, TableName, ColumnName, DataType, IsRequired, DefaultValue, IsVisible and ControlType
Manager.Add IsPrimaryKey, MySchema, Customers, ID, String, Required, ““. 1000, NotVisible, HtmlNone
Manager.Add IsNotPrimaryKey, MySchema, Customers, CompanyName, Integer, NotRequired, “Name“, ““, Visible, HtmlTextBox
Html = Manager.GetHtml()
This builds the dynamic sql, renders the inputs, does client side validation and calls a CRUD manager. We did not build a tool to generate the code so it gets typed in for what the page requires. The reasoning is that creating business objects needed by the app would require too much maintenance. One requirement is that the page developer has to know the database inside and out. The database is structured using a very tight discipline that matches the way the screens work.
So the database is brought forward to the pages and there are very few business objects required to pull this off. Grids and some of the other tyoes of controls they use are built in a similar way and fit into their way of thinking. I am no longer working on that project (I am still with the client doing custom work for one of their clients) but their developer has built some really nice stuff using this concept.
Personally, I prefer the service, process, abstraction way of doing things and that is how I have been doing the custom work for their clients. One reason I was able to do what I wanted on the custom work is because my client did not want his clients to lay any claim on the code that they use for their core apps.
What does everyone think?