http://www.udev.info
Mail/Login: Password : forgot my password!
[UPDATE MODE]
Back

Uniface frontend templating part 1 - beyond skeletons and paint tableau

Direct link http://www.udev.info/uniface/uniface-frontend-templating-part-1-beyond-skeletons-and-paint-tableau
Written by -GHAN- // Tags: template tableau uniface html plate component

Building clean and slick frontends are some of the main goals while doing web. Further frontends need to be fast and intuitive putting every user into the situation of just using it instead of to consider what might could happen, while something is clicked! Thats the obvious part for the interface gurus. But there is more to take care of.

For developers the highest desire should be to split code and interface. With that, a code can be used multiple times without a change. It doesn't carry the interface in every version and is therefore smaller. Both sides get happy in this WIN-WIN situation leaving a positive impression on your software.

Several approaches have been done to make this happen. But as we concentrate on Uniface, we will look a bit more specific on that.

Anatomy of the output

Former versions of Uniface started with hts files. Those are so called skeletons, loaded into the server page at runtime. Compuware made it possible to create the html file externally. And to make it a bit more flexy, you could make a header.hts, the main external_layout.hts and the trailer.hts. The idea was to change the header that could contain a custom logo and place further individual content in the trailer- a good idea back then.

Today we have higher requirements. We need a basic layout, some navigation and a content part. But not enough with that! The content part itself can be split up into several elements.
There is always a body part and perhaps multiple rows. Both elements can contain fields from an entity or other source.

These requirements have also reached Compuware and they made their next shot on that topic introducing the Uniface DSP component. The DspContainer within lets you implement your web page using multiple Uniface DSP components. You need to define one Uniface DSP that acts as the master component. It can have one or more fields that are defined as DspContainers. This equals one Uniface DSP for every element you will need or what to place!

Personally I prefer not to have one component per element in a Uniface DSP. This would cause me to maintain about 30 components just for what your could do with ONE Uniface USP!

Life can be easier. Let's say, we put a placeholder (e.g. !FIELDNAME!) for every element in a nice layoutet file. The placeholders would be called boilerplates or just plates. For each plate, an external file could be held ready.
Further we replace the plates in those files with the content of our fields and finally puzzle every element together to be just one html code.
Now we don't need to maintain 30 Uniface DSP components to get this running. The only thing to maintain is our Uniface USP with those external html files.

Does this sound weird to you? Well it isn't ... lets just start a little project called:

The ultimate Uniface badass USP!

I will try to give you a mouthfull of my world while we talk web and RIA. As some of you know, this is mainly, what I'm preaching year after year. But I do understand, that you first need to get such a "thing" into your hands to get this "Ahhhh .. now I got it!" effect.

So, after running all upcoming parts of this contribution you will get an precoded Uniface USP with all the contents of here. Guess you'll only need ot import and compile the thing to get it running. But the Component will first be released after finishing all parts, so you'll have digg with this to see, what happens :)

Archievements to be made with the upcoming contributions:

- separated code from layout
- an overview screen
- several forms for output
- just ONE Uniface COMPONENT!

Next week we will start of with the basics around our new USP. Well... buckle up then and catch me next week as we start our journey beyond skeletons and the paint tableau. This is definitly about to go renegade :)

Links:
- Uniface frontend templating part 2 - preparing the USP
- Uniface frontend templating part 3 - The Uniface Entity Lister

Comments

1029 view(s) / 2010-05-11 09:15:07 / LAST UPDATED: 2011-07-13 16:10:34