[comp.sys.mac.apps] 4th-Dimension

aries@rhi.hi.is (Reynir Hugason) (05/07/90)

I posted a question, a while ago, to comp.sys.mac.apps on 4th-Dimension. I
asked about what people thought of the product, what the liked, disliked, etc...
and received a few answers. A friend of mine, who is about to start working on
some database or other, for the Statistical Burau of Iceland (sounds ghastly)
asked me about how I liked 4th-Dimension (I have been using it for 2+ years in
one of the projects I'm supervising here). So I posted this question to the net
because I wanted to hear other peoples opinons, before I made a statement
myself.

Below you will find my, rather longish, statement on 4th-Dimension. After my
statement you will find the mail I received from c.s.m.a readers.

Post Scriptum: There was a suggestion that a new forum should be opened to
discuss the programming aspects of 4th-Dimension. Great idea! Now, how do we
do that?

--------------------------------------------------------------------------------
-----------

                              4th-Dimension, version II
                             ===========================

    There is no denying that 4th-Dimension is a powerfull fourth generation
programming environment, with a lot of nitty-gritty features and functions.
However, there are a lot of draw-backs, which unfortunatly do not recommend
the product at all. But there's always a bright side and I'll discuss that one
later, the drawbacks come first.

    Drawbacks
    
    1. Size:        It would be an understatement to say that 4th-Dimension is
big, it is
                    huge to say the least, and as I understand, making it
smaller and more
                    compact is not very highly written on ACI's "things-to-do"
list.

                    For example, in our database a relativly small amount of
records, say
                    12000 or so, eat up 8MBs (count'em) on our hard disk. ACI
has declared
                    that machines running on 20MB hard disks are _not_ usable
for "decent"
                    databases.

                    I thought this to be strange, so I looked into it using
common reverse
                    engeneering tactics (yeah, I know it's illegal but in a
country were
                    the most software piracy happens at the Department of
Justice, who's
                    gonna notice :-)).

                    The results were:

                    To begin with, there is an amazing lot of unused stuff from
version
                    one inside 4th-Dimension. Hey, guys take a look at your ".r"
files,
                    _before_ your "rez" them ;-)

                    The file format is pretty lousy. It's an endless mumbo-jumbo
of tables.
                    I don't want ACI up my *ss so this is just a rough draft, I
did, however,
                    write a program to extract records from 4D databases just to
check if I
                    had got the format right.

                    ---

                    One database sector is 512 bytes long.

                    1. Header containing number files, indexes, etc... also:
                        - pointer to index table.
                        - pointer to record entry table

                    2. The database sector allocation array is an array of 4096
longs, each
                        entry pointing to an allocation bitmap.

                    3. The allocation bitmap is a bitarray (PACKED ARRAY[4096]
OF BOOLEAN),
                        each bit or boolean represents one sector.

                    4. The index table is an array of 4096 longs, each long
pointing to
                        an other array of 4096 longs, where each long points to
an index
                        record.

                    5. The record entry table is an array of 4096 longs, each
long pointing to
                        an other array of 4096 longs, where each long point to a
record
                        entry.

                    ---

                    Judging from the file format of both the 4D application file
(not shown),
                    and the 4D database file, 4th-Dimension looks pretty lousy.

                    Just to give you an idea of the waste of space, try compress
a 4D
                    database file with StuffIt. You'll probably receive
something like a
                    90 - 98% compression!

    2. Security:    Security is _always_ an important issue when it comes to
databases,
                    you really don't want intruders messing around with your
business records,
                    do you?

                    Now, as always there're two sides of every coin, in this
case we have -
                    what I call - system security which is protection of program
code and
                    database security which is the DBMSs ability? to handle
conditions
                    like deadly embraces, etc...

       System:      4th-Dimension is _very_ weak in this area. Now, I'm not the
greatest
                    hacker in the world, but the password scheme of 4D is
ridiculus.
                    Not only can you switch the master password with one of the
user passwords
                    _easily_. You can also extract _everything_ from the
database, procedures,
                    layouts, data, _everything_, without _ever_ worrying about
what the hell
                    the master password is or even if there is one. And if you
want to play
                    it really cool you can easily unscramble the password, and
use it !!!

                    Well, alright not every computer user is a dedicated hacker,
but come'on
                    guys!

       Database:    4th-Dimension is also weak when it comes to database
integrity.
                    There have been situations here when I've had a lot of stuff
on my HD
                    and have been doing complex updates and calculations on the
database.
                    The disk fills and 4th-Dimension goes into a loop,
explaining very
                    kindly and candidly that the disk is full. So? Someone might
ask, why
                    don't you simply create a flood-file on a the nearest file
server.
                    The problem is that you can't. Period. If the disk fills,
the disk fills.
                    You'll have to reboot the computer and you can imagine what
that does
                    to your database integrity, not only is the database
partially updated,
                    but could also be in ruins. Obviously, this is can be very
uncomfortable
                    and annoying.

                    There's also the problem of deadly embrace. If there is a
dead-lock
                    the system dies; not that you'll really notice, since it is
so bloody
                    slow anyway in a multi-user environment. But knowing it will
is
                    irritating.

    3. The language: The programming language used in 4th-Dimension is a sort of
mutation
                    of the popular application language Pascal. It happily
violates a lot
                    of basic programming principles and personally I don't think
it's
                    suitable for writing more than say:

                        Message("Hello world")

                    Admititly that is a cruel judgement, but they should have
retained the
                    structure of Pascal. It would be a hell-of-a-lot-better if
they had :-)

                    When they originally designed the language they,
misterously, didn't
                    want operator predecance, so 4th-Dimension doesn't do math
the way
                    we're use to. Because they didn't do so in the first place,
they can't,
                    unfortunatly, do so now. Existing applications would cease
to run.

                    It has an endless list of commands and they've added a lot
of commands
                    since version one, primarily because their interpreter was
so slow. Hey
                    guys, now what is that supposed to solve?

    4. Application
       design:      This has, misguidly, been considered one of 4th-Dimensions
major fortes.
                    In reality it isn't. Perhaps for small to medium sized
applications,
                    but when it comes to the big ones you'll simply lose the
whole overview
                    of the system. You can't catagories procedures or layouts.
You can't
                    search automatically for a reference to a procedure or a
variable, when
                    you want to change them through out the system. You can't
even ensure
                    that the procedure that you write will run, even though it
compiles the
                    language has a lot of ambiguties that can be solved at
compile time
                    but, misteriously, aren't.

General comment:

I may sound like a someone who's never happy with anything. Well, that's not
true, I just
believe that bugs and design flaws wont be fixed unless you point them out!

However, all of the flaws pointed out above can be mended and should be mended.
The
problem with the overview could easily be fixed without disturbing existing
applications.
They could simply add a feature to allow you to catagories procedures and
layouts. If they
would it would help a great deal (believe me) when you're working on biggies.

4th-Dimension is very good at doing mailing lists and stuff like that, but it's
really to
expensive for things like that. And when it reaches its price group then it's to
cumbersome
and unflexible :-(.

To summaries: 4th-Dimension has a lot of flaws, if they were to be mended it
would not only
be a good product - it would be a great one. However, as of now it's only a
product.

+++
Mimir R (aries@rhi.hi.is) --- Aries, Inc. 

DISCLAIMER: Who? Me ???
--------------------------------------------------------------------------------
-----------

>I'm posting this question for friend of mine and I hope I'm posting it
>to the right net group, if I'm not show a bit of compassion and don't
>flame me.

>---

>I was wondering what people think about 4th-Dimension: likes, dislikes, etc..
>Personally I think it's a bit too big, but what do you think?

>---

>Please reply by email, since this isn't probably of general interest.

--------------------------------------------------------------------------------
-----------

4th Dimension is, for the most part, excellent. One area where it is
a particularly bad performer, however, is multi-user applications.
If you want to do a multi-user application in 4D then Ethernet is
a must and a high performance server is recommended. Even then,
performance will be vastly inferior to a single-user configuration.

//Paul

--------------------------------------------------------------------------------
-----------

Personally, I love it.  I wrote databases with it for two years, and
would have a difficult time imagining another piece of software as my
first choice for a database application.  Recent reviews indicate that
FoxBASE+/Mac, Double Helix, and Omnis 5 can all accomplish the same
basic set of things.  A race of sorts that (I think) MacWorld Magazine
held had 4D coming up as the application that could produce the best
database system in the time alloted.  The software has a solid Mac
feel, as can the applications you write with it.  I recommend the tech
notes; they have a lot of good tips, ideas, and examples.  I also
recommend taking the 4D course offered by ACIUS if you're serious
about it.  In addition, read through all the descriptions of the
commands; even though you'll only know and use a small subset of them
at first, they'll be lurking in the back of your mind, and you may
think of one when you need to do something ("Don't I remember seeing
something that can do that in here somewhere?").

I can't recommend this highly enough, personally; I've also worked
with FoxBASE on the Mac, and found 4D much easier from a programmer's
point of view.

-- 
R David Francis   francis@cis.ohio-state.edu

--------------------------------------------------------------------------------
-----------

I do not like it! (And I have used it quite a bit)
It is badly documented, unstructured and complicated to 
change.

There must be a much better product that should be possible, based
on some ideas of 4D but with a more structured language and 
environment.

--
Torbjorn Kronander            tobbe@isy.liu.se
Dept. of EE	Linkoping University    Sweden
ph +46 13 28 22 07

--------------------------------------------------------------------------------
-----------

  I was just hired at my university to do some database work using
  4th-Dimension. You're right it's too big. It gives the user so
  much power that one is left dazed wonderding just how to get a
  problem solved. In fact we're starting a 4th dimension user group
  to help us get through the agony.

  I don't like 4th Dimension, at least not yet. But it's my job,
  I'm not supposed to like it right? 8)

Bye,
Greg Rabanes <cs411s38@uhccux.uhcc.hawaii.edu>

--------------------------------------------------------------------------------
-----------

I have recently begun work with 4th Dimension.  Your opinion
will probably depend on what you need a database to do.  The
project I'm working on involves large databases with all
kinds of information to be accessed on each client and his/her
location.  

I have found the program to be very versatile, and relatively
easy to learn, esp. if you have a programming background.
It helps to know some Pascal basics (assigments, etc), how
pointers, arrays, etc. work, and the design aspects of Hypercard.

>From a user standpoint (i.e., using a database developed by 
someone else in 4D), it is very hypercard-like.  It is easy
to create reports and labels, even for the individual user
(it comes with a report and label generator built in).  

Something else that should be considered is its processing time.
If you are using an upper-level Mac (i.e., SE/30 or higher), you
should have no problem with this.  In developing, problems with
speed and memory often occur on SE with 1M of memory.  However,
it is my understanding that 4D now has a compiler for its
run-time programs that reduces memory and disk usage, while
speeding up the process.  

Lastly, unlike most DBs, 4D can be run with only 3 files, the 
first is the application itself; the second, the structural
design; the third, the data.  This makes it easy to move from
one machine to the next, etc.

Please note that these are basic opinions.  I am NOT a 4D expert.
I have had only a few months experience with it.  Please let
me know if you have any questions I might can answer.
  
Michael.

********************************************************************************
Michael E. Quattlebaum               Internet: dragon@hubcap.clemson.edu
Clemson University                   Bitnet: dragon@clemson.bitnet
Apple Student Rep

Disclaimer:  I do not speak for Apple, Clemson University, or any other
             organization I claim to have affiliation with...
********************************************************************************

----------------------------------------------------------------------------

I am currently using 4th Dimension V2.0. I can not think of any dbase 
application that could not be inplemented with it.  The version 2.0 is
a lot better. Files relations are easily implemented.  Data entry and
reports generation is as simple as using Mac Paint.  Data Filters 
(for formated data input) is really a good feature. You can do labels,
quick reports, and data operations just using the mouse.  

For making custom applications 4th Dimension language is really powerful
but, I have to say that it is not easy to learn. You can attach scripts
to buttons, fields, variables, Data entry Forms, Report Forms, and also
you can make global functions and procedures.

4th Dimension is also not intended to be used in a Plus or an SE, 
because it is painfully slow on those ( but never slower that Dbase Mac ).
It comes with a very good set of manuals and good technical suport.

If you are concern about the application size then buy a bigger Hard Disk.
It takes less that 2 megs (That is if you don't store the samples in 
the HD).

Richard Dib         
AT&T Bell Labs

----------------------------------------------------------------------------

I am using 4D exclusively for a current project. I don't like it but it is
all we have for now. I am very interested in opening a forum to discuss
"programming" issues about 4D.

- Craig Flowers

----------------------------------------------------------------------------

aries@rhi.hi.is (Reynir Hugason) (05/07/90)

I was wondering if I should post a 4D utility program, I wrote, to
the net. It has two functions: to scramble the a 4D program (procedures
names, etc...) and to allow you to search automatically for variables,
procedure references, command references, ad lib. It would probably be
posted as public domain, since shareware payment across the atlantic
seems to posess a problem to US users ;-)

I wont post it unless there is a general interest, because I will have
to put in a bit of extra work in order to be able to post it.

Post Scriptum: I was wondering if someone could post me the ICN# resource
of the 4D Mover from ACI. I don't wont the program itself, I have written
one already, but I want to see their ICN#. Why? Well, I wrote a program
called 4D Mover for 4th-Dimension version one and mailed it to them. I know
they received it, but I havn't heared from them since. What I was wondering
about is: do they I have the same ICN# I originally put on my program?

+++
Mimir R (aries@rhi.hi.is) - Aries, Inc.