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?
Frans has an issue with the "Invasion" of the Microsoft bloggers here. Maybe I am just naive but I don't see it being a big enough problem to have to leave (no flame intended Frans). I have been using MS development tools since VB 1.0 was in beta and I don't think I have ever seen MS out there with us developers like they have been lately.
Look at the amount of content in all directions, the sample apps, architecture guidelines, application blocks, etc. I have never seen the early previews of technology we are seeing today, and now the blogs are just cranking it up to an unprecedented level. Maybe some of you have been on the inside track and are used to it, but for alot of us this is new.
From my viewpoint I see their presence in these blogs as an opportunity. If we think think that they are just pushing propaganda, then tell them right here on the blogs. Respond to their posts and tell them what you think. Tell them what you would like to see, what you like and don't like in their products. I have to believe they are interested, otherwise shame on them.
Let's at least give this a chance and see how it goes. Right now the only downside I see is the increased amount of posts I have to read, but I can live with that. I understand the concerns but what if this turns out to be the best .Net community out there? I hope people like Frans will continue to hang their hat here. Am I all wet?