Coding and UI standards for Forte

Hi all,

Would like to ask if Forte has any coding and UI standards documentation

?

--

Steven Wong

Distributed Objects Sdn. Bhd.

22, Jalan USJ 9/5T,

47620 UEP Subang Jaya,

Selangor Darul Ehsan, Malaysia.

Tel: (603) 5310 777 ext. 309

(603) 5310 222 ext. 309

Email : steven@csc-do.com.my

[371 byte] By [] at [2007-11-25 5:01:51]
# 1

Just a minor note: Names in Oracle should be 30 instead of 35.

> --Original Message--

> From: Daniel Nguyen [SMTP:dnguyen@club-internet.fr]

> Sent: Sunday, January 25, 1998 10:31 AM

> To:Steven Wong

> Cc:kamranamin@yahoo.com; doug@forte.com

> Subject:Re: Coding and UI standards for Forte

>

> Hi,

>

> There are no standards published by Forte in the documentation,

> but if you look at their own names, you can see some of them.

>

> Here are some standards I use in my projects :

>

> - Classes :

>

> Define suffixes for each typology of class :

>- Mgr for manager

>- Desc for description (for business class or Domain)

>- SqlDesc for Database description

>- Plc for policy (PlcMgr for policy manager for instance)

>- Shr for sharing (ShrMgr for sharing manager)

>- Exc for exception (you won't be in conflict with Forte

>who uses Exception)

>- Int for interface treatment

>- Ifc for interface

>- Srv for service

>- Win for Windows

>-...

>

> Define prefixes and suffixes for attributes :

>- 'a' before any instance so also for an attribute

>- 's' as a suffix of any collection (as array for example)

>- nothing special for virtual attributes

>- St for state

>- Flag for flag

>- ...

>

> Define standard prefixes for methods :

>- Get

>- Put

>- "_" before any method used in a virtual attribute (to be

>verified if you use IIOP)

>- Agt for specifics methods for system agents

>- ...

>

> Define suffixes for specific widgets in the windows :

>- Btn for PushButton

>- Pnl for Panel

>- Grd for Grid

>- Tab for Tabfolder

>- nothing special for datafields, listfield or droplist

>- Mnu for submenu

>- Cmd for command

>- ...

>

> - Service Objects :

>

> Define prefixes :

>- So for Service object

>

> - Constants :

>

> All in upper case and with 2 or 3 parts seperated by "_" :

>- part 1 : subject

>- part 2 : group

>- part 3 : item

>

> - Composition of name :

>

> From left to right :

> For instance SoClientPlcMgr means Service Object using class

> ClientPlcMgr which means Client Policy Manager.

>

> In your Tool code, you can consider that your parameters are only

> instances as others or prefer to prefix them by 'p'. For internal

> usage of variables you can prefix them by Tmp.

>

> I consider that I don't need to see in the name if the attribute or

> the method should be private or public : so nothing special for that.

> In that case, if an attribute or a method becomes public (because of

> an

> overwrite in a subclass for instance), I don't have to change my code.

>

> Then define a business dictionary with long and short name for

> each concept your application use : for example client could be clt.

> Elementary types can become Domain Class (Desc) as Amount for

> instance.

> All these classes can be together in a dictionary project (1 per

> business).

>

> Because of databases be carefull on the length of your names

> (less than 35 caracters for Oracle for instance).

>

> Hope this will help you.

>

> Daniel Nguyen.

> FreeLance Forte Consultant.

>

>

> Steven Wong wrote:

> >

> > Hi all,

> >

> > Would like to ask if Forte has any coding and UI standards

> documentation

> > ?

> >

> > --

> > Steven Wong

> >

> > Distributed Objects Sdn. Bhd.

> > 22, Jalan USJ 9/5T,

> > 47620 UEP Subang Jaya,

> > Selangor Darul Ehsan, Malaysia.

> >

> > Tel: (603) 5310 777 ext. 309

> > (603) 5310 222 ext. 309

> >

> > Email : steven@csc-do.com.my

at 2007-6-29 9:21:57 > top of Java-index,Application & Integration Servers,Integration Servers...
# 2

Hi

While I don't know if Forte has any recommended standardsm I can tell

you that you definitely want to establish, follow and [unfortunately]

enforce some!

I am a consultant to a company with 2 major projects underway in

Forte, involving 14 developers. They've had a few developers move

between projects and several classes that have been found to be useful

between projects. I think that the following of naming standards and the

use of common superclasses has helped greatly in the reassignment of

developers. The naming standards established were fairly simple, they

are summarized on one sheet that each person [could] hang up in their

cubicle and consist mostly of prefixing class, attr or method names.

i.e. All service object classes start w/'S', the SOs themselves are

the class name suffixed w/'SO'. Constants are 'z' (so that they fall at

the end of a component list). Agents are the class name of the managed

object prefixed by 'A'. Widget attrs are prefixed by 'U'. Non widget

attrs prefixed by 'f' so that they are distinguished from local (method)

vars in tool code.

Window classes start w/'W'... you get the idea.

Also method invocations are always coded as Method(), to distinguish

them from possible attr references.

We've not enforced coding standards to the level of dictating "Here's

how you indent..." but trust that no one will do anything too ugly. As

long as a person's style is consistent, that's proven to be sufficient.

W/Regards to common superclasses, one example is an XGenericException

class that subclasses GenericException and adds some useful methods to

pass in reason codes via a 'RaiseMe()' method, and work with our generic

error handlers to provide logging info. All exceptions subclass this and

must provide the required info so that we have no 'mystery' exceptions

in our applications.

Whew...

Anyway... the end result has, IMHO, paid off tremendously. It's the

first time in 15 years that I've ever actually bothered to implement and

follow such conventions and will definitely be spending the time to do

so on all future projects, be it myself or a group of people doing the

coding.

Raymond

Steven Wong wrote:

>

> Hi all,

>

> Would like to ask if Forte has any coding and UI standards documentation

> ?

>

> --

> Steven Wong

>

> Distributed Objects Sdn. Bhd.

> 22, Jalan USJ 9/5T,

> 47620 UEP Subang Jaya,

> Selangor Darul Ehsan, Malaysia.

>

> Tel: (603) 5310 777 ext. 309

> (603) 5310 222 ext. 309

>

> Email : steven@csc-do.com.my

--

Hurry Star Force!

Planet Earth has just 164 days left!!!

at 2007-6-29 9:21:57 > top of Java-index,Application & Integration Servers,Integration Servers...