The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Simplified Modeling Language

Hi,

I've never liked using pictures to describe software, because if you're going to be accurate (below the 10,000 meter level), the diagrams start looking like circuit diagrams. I didn't want to be a hardware engineer, and I'm verbal anyway, so I've designed this very simple modeling language, a kind of structured English, to convey object modeling concepts using words (what!).

Anyway, here it is. Comments cheerfully accepted.

Steve

;
; Revision 1.0, 02-JAN-2004
;
;  I got tired of the complexity of the various object modeling languages. When actually used,
;  they either produce trivia, or the effort expended is about 99% of the effort necessary to
;  just code the stupid thing. My idea is to create an Object Modeling pseudo-code that can
;  serve as comments in code, and as design documentation for someone taking over someone else's
;  code. The idea is that from this, you could create true UML, or XML, or Java, or PL/SQL, or
;  whatever.
;
;  I was mostly inspired by SmallTalk, the premier OO development environment around (Java is
;  just a poor imitation (:=)).
;
;  This is a specification of the language as a TextPad syntax file. This is not meant to be
;  compilable by a machine, but read by a person.
;
;  NB: this is a work in progress. I currently have only developed really the data part
;  of the object modeling language. This language is free to all, I would just appreciate
;  credit (or any feedback, for that matter!)
;

C=1

[Syntax]
Namespace1 = 6
IgnoreCase = No
InitKeyWordChars = A-Za-z
KeyWordChars = A-Za-z0-9$%._
BracketChars = [](){}
OperatorChars = -+*/<>!^|=:
PreprocStart =
SyntaxStart =
SyntaxEnd =
CommentStart = /*
CommentEnd = /*
CommentStartAlt = \*
CommentEndAlt = \*
SingleComment = --
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
StringStart = '
StringEnd = '
StringAlt =
StringEsc =
CharStart = '
CharEnd = '
CharEsc = '

;
; CONTROL FLOW
;
; I found that data modeling needs control flow, just like pseudo-code. I have not yet found
; the need for any kind of looping functionality, but, it can always be added.
;
[Keywords 1]
BEGIN
END
IF
THEN
ELSE
ELSIF

;
; Simplified Modeling Language Object Oriented Keywords
;
; CLASS        -- The type of object. The kind of cookie cutter.
; ATTRIBUTES    -- The data portion of the object. Instance attributes are akin to columns in a relational table, while class attributes are more like input parameters to the class definition.
; FUNCTIONS    -- The code portion of the object. Also divided into instance and class attributes.
; INSTANCE    -- The portion of the object that is akin to a row in a relational table.
; FIXED_LIST    -- Akin to XML entities. A constant list.
; SUBCLASS      -- A kind of a class. Single inheritance only.
; REFERENCES    -- Points to.
; FUNCTION      -- A piece of code.
; RETURNS      -- What the function returns.
; NULL        -- Squat. If specified with returns, it means the function is a standard procedure. It's just simpler that way.
;
[Keywords 2]
CLASS
ATTRIBUTES
FUNCTIONS
INSTANCE
FIXED_LIST
SUBCLASS
REFERENCES
FUNCTION
RETURNS
NULL

; Predefined Types
[Keywords 3]
REAL
INTEGER
CHAR
TEXT
BOOLEAN
ARRAY
OF
DATETIME
Stephen Hirsch Send private email
Sunday, December 26, 2004
 
 
You don't like lisp, XML, or ASN1?
son of parnas
Sunday, December 26, 2004
 
 
have you got an example of its usage ?
michaels
Monday, December 27, 2004
 
 
> "son of parnas"

XML and ASN aren't modelling languages ..., and lisp, as far as I recall, is a programming language :)
michaels
Monday, December 27, 2004
 
 
They aren't modeling in the sense of high fashion, but i think as long as you can come up with a descriptive grammer then any of them can be a modeling langauge. You could describe your modeling langauge in lisp, xml, or asn1. Making a new one may not be necessary. Microsoft is comming up with a new modeling language too. They didn't like the UML mapping.
son of parnas
Monday, December 27, 2004
 
 
You didn't really specify much; Neither syntax not semantics. Just parts-of-speech and partial semantics that may have.

English is fine as a concept modelling language. But unless the language has formal or semi-formal semantics, english is all it is.

Personally, I think you should either use plain English, or a language with well defined semantics, even if the code at the end is not runnable. Python is ideal for that purpose.

But that's just me.

And, yes, I have strong dislike for UML and its friends myself.
Ori Berger Send private email
Monday, December 27, 2004
 
 
English is a pretty flixible tool indeed. However, UML
is really good if you want to demonstrate how
pretty you design is whenever you have no clue what the heck your project is about. With English, the absudrity
of your proposals would be much more evident.
Unfortunately, UML is not good for anything else.

strange: in "joel on software" group there's a recent
topic discussing the issue: is extreme programming
a scam? If you need an example of scam, it's UML.
ambitious nobody
Monday, December 27, 2004
 
 
XML isn't a language; it's a language language (metalanguage), which I guess makes it a language. You ever notice in XML training books, they always say "Once you've got your DTD/Schema, then...", followed by lots of < and > characters? Nobody ever seems to want to admit that designing the DTD/Schema is the hard part, that the data/object model is the heart of your app, if you do that wrong, nothing will ever work right...the SML is an attempt to remedy that.

It is purposely not compilable. I guess one of the commentators really crystalized it for me. It's kind of a writing style guide, a Strunk and White for software development, some tools to focus your thoughts and line up the indentations.

Don't know Python. Am intrigued.

Here's a rather lengthy example. I was trying to model the  LaTeX document model:

BEGIN FIXED_LIST length_dimension
--
    cm, --centimeter
    mm, --millimeter
    in, --inch (2.54cm)
    pt, --point (1/72.27in)
    bp, --big point (1/72in)
    pc, --pica (1/12pt)
    dd, --didôt point (1157/1238pt)
    cc, --cicero (1/12dd)
    em, --size of the width of the capital M in the current font.
    ex  --size of the width of the capital X in the current font.
--
END FIXED_LIST length_dimension
--
BEGIN FIXED_LIST enumerate_style
--
    arabic, --digits
    roman,  --lower case roman numerals
    Roman,  --upper case roman numerals
    alph,  --lower case roman alphabet
    Alph    --upper case roman alphabet
--
END FIXED_LIST enumerate_style
--
BEGIN FIXED_LIST box_natural_dimension
--
    width,      --natural width of the box.
    height,    --distance from baseline to the top of the box.
    depth,      --distance from the baseline to the bottom of the box.
    totalheight --heigth + depth
--
END FIXED_LIST box_natural_dimension
--
CLASS fixed_length
--
    BEGIN INSTANCE ATTRIBUTES
        length                          REAL
        dimension                      length_dimension
    END INSTANCE ATTRIBUTES
--
END CLASS fixed_length
--
CLASS box_relative_dimension
--
    BEGIN INSTANCE ATTRIBUTES
        multiplier                      REAL
        parameter                      box_natural_dimension
    END INSTANCE ATTRIBUTES
--
END CLASS box_relative_dimension
--
CLASS latex_string
--
    BEGIN INSTANCE ATTRIBUTES
        string                          ARRAY OF latex_environment
    END
--
END CLASS latex_string
--
CLASS decimal_point
--
    BEGIN INSTANCE ATTRIBUTES
        input_char                      latex_character
        output_char                    latex_character
        left_number_of_digits          INTEGER
        right_number_of_digits          INTEGER
    END INSTANCE ATTRIBUTES
--
END CLASS decimal_point
--
CLASS column_format
--
    BEGIN INSTANCE ATTRIBUTES
        justification                  l,r,c,p,m,b
        IF justification IN (p,m,b) THEN
            width                      fixed_length
        END IF
        left_border                    latex_string
        right_border                    latex_string
        D                              decimal_point
    END INSTANCE ATTRIBUTES
--
END CLASS column_format
--
CLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        previous                            REFERENCES latex_environment
        next                                REFERENCES latex_environment
    END INSTANCE ATTRIBUTES
--
END
--
CLASS latex_character SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        base_char                          CHAR
        accent                              CHAR
        font_size                          tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge
        font_family                        rmfamily,ttfamily,sffamily
        font_shape                          upshape,itshape,slshape,scshape
        bold                                BOOLEAN
        vertical_position                  normal,subscript,superscript
        foreground_color                    TEXT
        background_color                    TEXT
    END INSTANCE ATTRIBUTES    
--
END
--
CLASS horizontal_environment SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        string                              latex_string
        position                            center,flushleft,flushright
    END
--
END CLASS horizontal_environment
--
CLASS quote SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        string                              latex_string
    END
--
END CLASS quote
--
CLASS quotation SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        string                          latex_string
    END
--
END CLASS quotation
--
CLASS verse SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        string                          latex_string
    END
--
END CLASS verse
--
CLASS item
--
    BEGIN INSTANCE ATTRIBUTES
        string                          latex_string
        up                              REFERENCES item
        down                            REFERENCES item
    END INSTANCE ATTRIBUTES
--
END CLASS item
--
CLASS table_item SUBCLASS item
--
    BEGIN INSTANCE ATTRIBUTES
        left                            item
        right                          item
    END INSTANCE ATTRIBUTES
--
END CLASS table_item
--
CLASS description_item SUBCLASS item
--
    BEGIN INSTANCE ATTRIBUTES
        description                    latex_string
    END INSTANCE ATTRIBUTES
--
END CLASS description_item
--
CLASS bibitem SUBCLASS item
--
    BEGIN INSTANCE ATTRIBUTES
        label                          latex_string
        key                            TEXT
    END
--
END CLASS bibitem
--
CLASS list SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        items                          ARRAY OF list_item
        standard_label                  latex_string
        level                          INTEGER
        topsep                          fixed_length
        partopsep                      fixed_length
        parsep                          fixed_length
        itemsep                        fixed_length
        leftmargini                    fixed_length
        leftmarginii                    fixed_length
        leftmarginiii                  fixed_length
        leftmarginiv                    fixed_length
        leftmarginv                    fixed_length
        leftmarginvi                    fixed_length
        rightmargin                    fixed_length
        listparindent                  fixed_length
        labelwidth                      fixed_length
        labelsep                        fixed_length
        itemindent                      fixed_length
    END
--
END CLASS list
--
CLASS itemize SUBCLASS list
--
    BEGIN INSTANCE ATTRIBUTES
        labelitemi                      latex_string
        labelitemii                    latex_string
        labelitemiii                    latex_string
        labelitemiv                    latex_string
    END INSTANCE ATTRIBUTES
--
END CLASS itemize
--
CLASS description SUBCLASS list
--
    BEGIN INSTANCE ATTRIBUTES
        items                          ARRAY OF description_items
    END INSTANCE ATTRIBUTES
--
END CLASS description
--
CLASS enumerate SUBCLASS list
--
    BEGIN INSTANCE ATTRIBUTES
        labelenumi                      latex_string
        labelenumii                    latex_string
        labelenumiii                    latex_string
        labelenumiv                    latex_string
    END INSTANCE ATTRIBUTES
--
END CLASS enumerate
--
CLASS box SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        width                          fixed_length
    END INSTANCE ATTRIBUTES
--
END CLASS box
--
CLASS lr_box SUBCLASS box
--
    BEGIN INSTANCE ATTRIBUTES
        contents                        latex_string
        frame                          BOOLEAN
        height                          fixed_length
        position                        l,r,s
        lift                            fixed_length
        IF frame THEN
            fboxrule                    fixed_length
            fboxsep                    fixed_length
        END IF
    END INSTANCE ATTRIBUTES
--
END CLASS lr_box
--
CLASS parbox SUBCLASS box
--
    BEGIN INSTANCE ATTRIBUTES
        contents                        latex_string
        position                        t,b
        inner_position                  t,b,c,s
        lift                            fixed_length
    END INSTANCE ATTRIBUTES
--
END CLASS parbox
--
CLASS rule_box SUBCLASS box
--
    BEGIN INSTANCE ATTRIBUTES
        contents                        latex_string
        height                          fixed_length
        lift                            fixed_length
    END INSTANCE ATTRIBUTES
--
END CLASS lr_box
--
CLASS footnote SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        footnote_text                  latex_string
        numbering_style                arabic,roman,Roman,alph,Alph,fnsymbol
        footnotesep                    fixed_length
        footnoterule                    fixed_length
    END INSTANCE ATTRIBUTES
--
END CLASS footnote
--
CLASS marginpar SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        margin_text                    latex_string
        side                            l,r
        marginparwidth                  fixed_length
        marginparsep                    fixed_length
        marginparpush                  fixed_length
    END INSTANCE ATTRIBUTES
--
END CLASS marginpar
--
CLASS comments
--
    BEGIN INSTANCE ATTRIBUTES
        author                          TEXT
        date                            DATETIME
        comment                        TEXT
    END INSTANCE ATTRIBUTES
--
END CLASS comments
--
CLASS href SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        url                            TEXT
        display_text                    latex_environment
    END INSTANCE ATTRIBUTES
--
END CLASS href
--
CLASS table SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        vertical_positioning            t,b
        arrayrulewidth                  fixed_length
        doublerulesep                  fixed_length
        arraystretch                    fixed_length
        colsep                          fixed_length
        braces                          BOOLEAN
        items                          ARRAY OF table_items
        floating                        BOOLEAN
        IF floating THEN
            head_text                  latex_string
            foot_text                  latex_string
        END IF
    END INSTANCE ATTRIBUTES
--
END CLASS table
--
CLASS verbatim SUBCLASS latex_environment
--
    BEGIN INSTANCE ATTRIBUTES
        show_blanks                    BOOLEAN
        delimiter                      CHAR
        string                          TEXT
    END INSTANCE ATTRIBUTES
--
END CLASS verbatim
--
CLASS tablular SUBCLASS table
--
    BEGIN INSTANCE ATTRIBUTES
        width                          fixed_length
        tabular_type                    star,x
    END INSTANCE ATTRIBUTES
--
END CLASS tabular
--
CLASS longtable SUBCLASS table
--
    BEGIN INSTANCE ATTRIBUTES
        LTleft                          fixed_length
        LTright                        fixed_length
        LTpre                          fixed_length
        LTpost                          fixed_length
        LTcapwidth                      fixed_length
        caption                        latex_string
        firsthead                      latex_string
        head                            latex_string
        lastfoot                        latex_string
        foot                            latex_string
    END INSTANCE ATTRIBUTES
--
END CLASS longtable
/*

Chapter 3

/*
--
CLASS author
--
    BEGIN INSTANCE ATTRIBUTES
        name                            latex_string
        thanks                          latex_string
    END
--
END
--
CLASS document_title
--
    CLASS ATTRIBUTES
        formatted                          BOOLEAN --whether the instantiation of document's title is formatted by author(s) or just free LaTeX.
    END CLASS ATTRIBUTES
--
    BEGIN INSTANCE ATTRIBUTES
--
        IF formatted THEN
--
            title                          latex_string
            authors                        ARRAY OF author
--
        ELSE
--
            titlepage                      latex_string
--
        END IF
--
    END INSTANCE ATTRIBUTES
--
END CLASS title
--
CLASS subparagraph
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS subparagraph
--
CLASS paragraph
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        subparagraphs                          ARRAY OF subparagraph
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS paragraph
--
CLASS subsubsection
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        paragraphs                              ARRAY OF paragraph
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS subsubsection
--
CLASS subsection
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        subsubsections                          ARRAY OF subsubsection
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS subsection
--
CLASS section
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        subsections                            ARRAY OF subsection
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS section
--
CLASS chapter
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        sections                                ARRAY OF section
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS chapter
--
CLASS part
--
    BEGIN INSTANCE ATTRIBUTES
        short_title                            latex_string
        title                                  latex_string
        include_in_toc                          BOOLEAN
        contents                                latex_string
        chapters                                ARRAY OF chapter
        label                                  TEXT --reference tag
    END INSTANCE ATTRIBUTES
--
END CLASS part
--
CLASS document
--
    BEGIN INSTANCE ATTRIBUTES
        basic_font_size                fixed_length {{10,pt},{11,pt},{12,pt}}
        paper_size                      letterpaper,legalpaper,executivepaper,a4paper,a5paper,b5paper
        orientation                    portrait,landscape
        double_column                  onecolumn,twocolumn
        IF double_column = two_column THEN
            print_sides_differently    oneside,twoside
            titlepage                  notitlepage,titlepage
            columnsep                  fixed_length
            columnseprule              fixed_length
        END IF
        leqno                          BOOLEAN --Equation numbers in displayed formulas will appear on the left instead of the normal right side.
        fleqn                          BOOLEAN --Displayed formulas will be set flush left instead of centered.
        IF fleqn THEN
            mathindent                  fixed_length
        END IF
        openbib                        BOOLEAN --The format of bibliographies may be changed so that segments are set on new lines. By default, the text for each entry is run together.
        draft                          BOOLEAN --If the LaTeX line-breaking mechanism does not function properly and text must stick out into the right margin, then this is marked with a thick black bar, to make it noticeable. (NB: since final is just the opposite of draft, there is no need for a separate final attribute).
        pagestyle                      plain,empty,headings,myheadings
        IF pagestyle IN (headings,myheadings) THEN
            markright                  latex_string
            IF double_column = two_column THEN
                markleft                latex_string
            END IF
        END IF
        pagenumbering                  enumerate_style
        page_counter_start              INTEGER --Pages may be numbered starting with a value different from 1.
        parskip                        REAL --The distance between paragraphs, expressed in units of ex so that it will automatically change with character font size.
        parindent                      fixed_length --The amount of indentation for the first paragraph.
        baselinestretch                REAL --This is a number that multiplies the distance between lines where characters sit.
        oddsidemargin                  fixed_length
        evensidemargin                  fixed_length
        topmargin                      fixed_length
        headheight                      fixed_length
        headsep                        fixed_length
        topskip                        fixed_length
        textheight                      fixed_length
        textwidth                      fixed_length
        footskip                        fixed_length
        secnumdepth                    INTEGER --Set the level of section numbering in the document itself. Can be 0-5 for articles, -1-5 for books.
        tocdepth                        INTEGER --Set the level of section numbering in the table of contents. Can be 0-5 for articles, -1-5 for books.
        parskip                        fixed_length
        parindent                      fixed_length
        labelitemi                      latex_string
        labelitemii                    latex_string
        labelitemiii                    latex_string
        labelitemiv                    latex_string
        labelenumi                      latex_string
        labelenumi_style                enumerate_style
        labelenumii                    latex_string
        labelenumii_style              enumerate_style
        labelenumiii                    latex_string
        labelenumiii_style              enumerate_style
        labelenumiv                    latex_string
        labelenumiv_style              enumerate_style
        arrayrulewidth                  fixed_length
        doublerulesep                  fixed_length
        arraystretch                    fixed_length
        colsep                          fixed_length
    END INSTANCE ATTRIBUTES
--
END CLASS document
--
CLASS book SUBCLASS document
--
    CLASS ATTRIBUTES
--
        divided_into_parts                  BOOLEAN --whether the book is divided into parts.
--
    END CLASS ATTRIBUTES
--
    BEGIN INSTANCE ATTRIBUTES
        IF double_column = two_column THEN
            chapters_start_on              openright,openany
        END IF
    END INSTANCE ATTRIBUTES
--
END CLASS book
--
CLASS article SUBCLASS document
--
    BEGIN INSTANCE ATTRIBUTES
        abstract                            latex_string
    END INSTANCE ATTRIBUTES
--
END CLASS article


looks better in TextPad with syntax highlighting!
Stephen Hirsch Send private email
Monday, December 27, 2004
 
 
How is that Modeling?

If you use psuedo code aren't you getting "psuedo code" then you can just make a "psuedo compiler" and be done with it.  Maybe I'm in the wrong school here, but the ideal of modeling is not to use "code" to describe code, it is to outline and define abstractions which then need to be coded.

You model a system because you need to get an overview of entire outcome, you want to demostrate (both to yourself and the client) that you have a clear picture of the goal and that your picture is providing adequate coverage, the good model becomes a blueprint for the software but it doesn't get translated directly into software.

Architects (real ones) make blueprints for buildings which have to be interpreted by builders and then constructed, they don't make a blueprint which is then somehow transformed into a three story house (sure someone will build a robot to do this)..  I'm not into modeling for the purpose of "generating" code from the model (although if you really want this I'd recommend a snazzy XML schema with grade A XSLT), the benefit from modeling is to ensure the adequacy of your design/solution, it's a model, not the finished product and it's purpose is not to be "turned into" the finished product but instead to provide a guideline for what the finished product is..

Am I just in left field here, I realize people want ways to cut costs, but ultimately some work has to be done, if you are a programmer your job is to write code, you model to assist you in writing code, not to make your job obsolete.  Never use a modeling language/technique that your client can not understand because in the end the purpose of your model is to help the client understand your perception of what the finished product should be (and to help you).
Jay Lauffer Send private email
Friday, December 31, 2004
 
 
I don't like the blueprint analogy because we're not building buildings. I don't model to communicate anything to the user because s/he won't be able to understand what's going on. Let's face it, end users don't know what they want until they actually see it. That's what's wrong with the whole PMI/waterfall/blueprint methodology, which is another topic for another day.

I use modeling to communicate with fellow developers. This is an attempt to create a modeling system for the left-brained among us (:=)
Stephen Hirsch Send private email
Saturday, January 01, 2005
 
 
Stephen, your example reminds me of the C++ macros my handmade code generation tool spits out reading UML diagrams. We do a system that interprets class models at runtime, allowing the users to add/modify/delete classes at runtime also, and these macros are used to configure our build in core classes. And honestly, the idea to talk about our class models (which represent the customers business logic) in the terms of these macros rather then of UML diagram, sounds rather funny to me.

Nevertheless, UML diagrams aren't always approbiate, espacially when it comes down to the nitty gritty (talking about value ranges, for example). I agree.

But: All this stuff is better nailed down in a spec. It doesn't matter if you prefer the entertaining Joel style or CRC cards (your code reminds me of them) or whatever, but it should be there in a really human readable format. Without BEGINs or ENDs or whats'o'ever. This is for machines, not humans (and your collegues are humans, I suppose ;-) ).

At last, I want to propose using XML, too. You will always be able to generate the files you cited from the XML using a primitve XSL transformation, but you may also generate code fragments from it, or a HTML documentation, or DDL SQL statements. All using XSLT. That's how we do it, actually. And you won't need a DTD unless you want to validate your XML against it. Which isn't required, if just a few skilled people edit it. I use XML for data storing quite a lot, but hardly ever write DTDs.
Gerd Riesselmann
Monday, January 03, 2005
 
 
Again, this is to communicate with developers. I generally don't believe in specs, because once written down, they solidify, leading to code that correctly does the wrong thing (i.e., code that nobody uses, or uses grudgingly). I much prefer to sit down with the end user to attempt to understand her problem, then come up with some screens using real data to get feedback.

Gerd, you are right. I am trying to extend the pseudo-code I used to develop 8051 assembly language to DDL/OO concepts. XML is very hard to read, and I'm not trying to develop a compiler of any kind.

Maybe it just won't work.
Stephen Hirsch Send private email
Monday, January 03, 2005
 
 
Examine ORM, Object Role Modelling.  Although its typically used in its diagrammatic form there is a structured language that also describes the model which is called FORML.

We write structured sentences in FORML which is essentially English.

For instance:

Each Building is open between the hours of 9:15am and 4:30pm
Each Building is open on weekdays (M-F)
Each Building has some Room. It is possible that some Building has more than one Room and that more than one Building has some Room.

And so on.  By describing the facts you model the reality (along with all the fudging and abstractions that are going to be needed).
Simon Lucy Send private email
Tuesday, January 04, 2005
 
 
I don't get it, why do you want to use a model to communicate to other "developers", just use code.  Models are useful for explaining to people who don't understand the software domain specifics, in the time you spend writing a verbose flow controlled syntax to describe a program you could just use a known language like C++:

class AClassForSomething
{
public:
    enum AcceptableValues { Value0, Value1, Value2 };
   
    AcceptableValues GetAValue();
    void SetAValue(AcceptableValues av);

    //simple comment to explain the following method
    AnotherClassForSomething Transform(input1, input2);
protected:
    AcceptableValues m_av;
};

you don't even need to provide implementation, just simple outline.. now you can have your left brained programmers fill in the details.

Perhaps I just have some limit with regard to this issue, but what I see is that you are programming, your modeling syntax is a program outline, so you've invented your own programming language, what you are proposing it sounds like to me is that you would then have human compiler/interpreters which read your language and generate machine code.

Say what you will, many consumers can not identify what they want unless you give them something visual (blame the user interface paradigm), however not all of them, there are people out there who understand what their need is and want it addressed, I think that the idea of modeling attempts to include those people into it's set of consumers (good modeling accomplishes this).
Jay Lauffer Send private email
Saturday, January 08, 2005
 
 
It was more for communicating data structures. For example, I'm used to relational structures, I really hate the DTD and XML Schema syntax, so I wanted to create a neutral way of communicating that. The thought was to extend pseudo-code.

You're right, the best way to communicate with other developers is with code. My last project, I wrote in SQL, my friend translated the logic to Informatica. It worked well.
Stephen Hirsch Send private email
Monday, January 10, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz