1:45 pm Peter Bell - Application Generation - Beyond Scaffolding
Peter spoke about: Language Oriented Programming which can allow you to create more reusable code. What is required to build a code generator. Software product lines can be used to deliver projects in certain cases. Look at way to generate a web application.
Scaffolding will automatically generate code to create forms, lists and view pages for an object. It is typically done by using the database to provide the metadata. Eg Reactor.
There are limits to what can be done that way. User has to add extra code later to make up for the limitation of the database metadata.
Language Oriented Programming is a new approach to programming which improves the metadata. Everyone is doing it:
OMG: Model Drive Architecture.
Microsoft: Sofware Factories.
JetBrains IntelliJ Meta Programming system.
CF Custom Tags or UDFs are ways to do some similar things. Modify the language to create a domain specific language. CFCs do this too.... The reason is to encapsulate complexity.
Layered software allows you to create a domain specific language to solve the problems. Good programmers often begin with a pseudo-code to describe the problem then replace the code with real calls to real routines.
Horizontal DSLs:
SQL,
Reg_Ex,
Objects,
Notifications,
ColdSpring XML,
Reactor XML.
Vertical DSLs:
Newetter,
Insurance Quotes
Three types of DSL:
Declarative,
Templating,
Scripting.
Declarative languages are ideal for reuse. Templating languages simplify for designers. Scripting languages are used to implement the solution.
What vs How
It really does not matter which language gets used.
ColdFusion, XML, Special, Diagrams.
There are three types of code generator:
Passive (not much use),
Active (easier),
Roundtrip (difficult).
Metadata can be stored in text files, XML or a database.
The code can be generated using a templating language. Eg XSLT or ColdFusion.
CFTemplate can be used.
Iterator is required: One DAO per object, one template per screen etc.
Orchestrator is required: described by Metadata.
You will never generate everything because it is quicker to handle separately, eg Safe code snippets or Inheritance.
Anatomy of a generator: Metadata, Templates, Iterator, Orchestrator, Extensions.
Need to be able to generate the code in minutes. Use a feature model and allow wizards to select features.
There is an object model and an interface model.
Content
@LiveDate: Optional: Datetime: 1/1/2000
@Status: Required: Status: approved
Use custom data types to describe the interface model.
Screens can be defined by:
@Type=List,
@Paging=Yes,
@RecordsPerPage=50.
Layer software product lines for higher levels of reuse.
CFGen and CFTemplate will be available at http://www.pbell.com in the next few weeks.



my notes. I don't know if they will make any sense to anyone else.