What is Scaffolding and how do I use it? - Part 1

You need scaffolding!

So you read something somewhere that said you should be using scaffolding and want to know how? Let me tell you a story.

ColdFusion has been developed to make creating applications easier right?

[More]

Fusebox Scaffolding Progress Report

I had some time this weekend to do more on the scaffolding project. I know its been slow but I seem to have too many things to do and often when there is time there may be none of the inclination which is needed for good code.

Anyway for an update I decided that Reactor was a problem with no solution in many ways. There is really no way to do some of the things I wanted to in Reactor, so I decided to take another route and generate all the DB access code myself. I've spent a few days over the last three weeks creating templates for all the usual DAO, Gateway, object, service and so on.

[More]

Fusebox Scaffolding on SVN

OK, So I know you think I spent the summer enjoying myself and forgot all about Fusebox Scaffolding!

Actually spent a lot of it in my Girlfriends Bathroom where I fitted a new Bathroom Suite with help from a plumber. On top of that the expected flow of work did not slow down.

One customer who have been using CF5 for many years finally decided to upgrade to CF7 a week after CF8 was released. So we have been installing a bunch of CF7 instances and also getting out first CF8 customer going.

Enough of the excuses....

This week I finally got around to working out how to make the Scaffolding work with multiple sets of templates and moved the existing reactor templates to a subdirectory of the templates directory so that there can be any number of templates for different purposes or frameworks.

[More]

Domain-Specific Modeling

There is a good article on Domain-Specific Modeling in the Microsoft Architecture Journal. I am interested to know if anyone is using this kind of technology with ColdFusion.

Is there a similar open source tool available for drawing Domain-Specific Models?

Fusebox Scaffolding - The XML Specification

Introduction

This document is a proposed specification for a Fusebox plug-in which will allow a basic maintenance application to be created for a database table. The application will provide facilities to list records from the table, to display individual records, to add, edit and delete records.

The scaffolder is intended to be the first of a number of applications that will provide a facility to generate code automatically, based on a high-level domain specific language.

[More]

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.

Washington here I come!

Packed my bags this morning for my trip to the Frameworks conference. I am looking forward as I said to two days of the conference but what about the weekend?

I am staying two extra days because its cheaper! Its really awkward to leave Washington after the conference on Friday and get a flight back to the UK, I would actually miss a couple of interesting sessions, so that means leaving on Saturday. But missing a Saturday night away adds well over 200 pounds to the cost of the flight and the weekend rates in the hotel are half what the weekday costs so I will stay until Sunday. That gives me all day Saturday and half of Sunday in Washington.

I have to say I don't know what sight-seeing I can do in Washington as I think I've seen most things that I want to see now. Mary McDonald and I covered the museums pretty well on the last but one visit and I went back to the Native American and Aerospace museums last time.

Has anyone got any suggestions?

I am actually just hoping for some quiet time when I can think about the Fusebox Scaffolding code generator and maybe do some serious coding, I don't get as much time to do that stuff as I would like and having tried a few things for my Fusebox Scaffolding and found them a bit awkward, I want to rewrite. I met Peter Bell a couple of weeks ago in London for a drink and he has given me some new (and better) ideas which I want to quiz him further on and hopefully I will be ready to code and also update the fusebox wiki documentation and blog a bit about the conference. My Blog has just been added to MXNA so its worth blogging now.

I guess it will depend on my mood a bit, we will see.

Interesting Drinks Evening

Last night I went to Point 101 with Andy Allen who is sitting in on my Fast Track to ColdFusion Class to see how it is done. He is hoping to get authorised to teach FTCF in the North of England and Scotland. Andy was telling me how much work is involved with organising a conference.

There were a few others along for the evening and I spent some time talking to Mark Drew about his dislike of cfscript and the problems of giving up smoking, and to Peter Bell about code generation and some of the ideas I have for ColdFusion Scaffolding. I will blog later at length when my ideas are better formed. It was good to meet Peter for the first time and we have made aplan to meet up again at the Frameworks conference in Washington next month.

There were a few others there including Nic Richardson and Kev McCabe. A very pleasant evening.

Fusebox Scaffolding Model Decision

I am thinking about Fusebox scaffolding and want to decide the best way forward for the model.

There appears to be three choices for building the model: Reactor, Transfer or using my own code (based on the current home grown generator that I use).

The pluses and minuses for each are:

Reactor

Pluses:
1/ It's a comprehensive solution that will do everything required to generate the required model with a simple exception which can be handled by use of a reactor plugin.

2/ Seems to be widely accepted in the CF community.

3/ Customisable and extendable once generated.

Minuses:
1/ Licence terms are currently unsuitable for some users.

2/ Does not help in creation of the view fuses, view circuit or the controller circuit.

Transfer

Pluses:
1/ Licence is better.

2/ Customisable and extendable once generated.

Minuses:
1/ Does not run on CF6.1 and I have some customers who still use CF6.1

2/ Does not create Gateways (at least that is what I gather from the documentation.)

3/ Does not help much with validation.

4/ Does not help in creation of the view fuses, view circuit or the controller circuit.

My Own Code

Pluses:
1/ Its adequate for the job.

2/ Fusebox Team can control the licence.

3/ Will run on CF6.1 and CF7.

4/ Could be extended to do all the new things required without reference to any other team.

Minuses:
1/ Maintenance will be needed.

2/ Not a very comprehensive solution.

3/ Does not currently handle child relationships or iteration over child objects.

4/ No integration at present with ColdSpring or Flex.

What does the rest of the world want from a scaffolding tool?

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.