> Terry Paterson wrote:
> > Hi There,
> >
> > I'm working on creating the middle-tier of a three tier system - the
> > system is an inventory control system, and is supposed to replace an
> > existing char based, xBase system.
<snip>
Hi Guys,
Thanks for all the replies - very helpful, a few more questions if I
may
Jacob :
>"And make sure you leave SQL out of the middle tier
"
Can you give me a bit more explanation of this ?
I thought this was exactly the place I would put the SQL ?
i.e. my front/end client tier would talk only in terms of objects to
the middle tier (via RMI),
and my middle tier would then talk to the database via SQL ?
Thomas :
>"Your messaged failed to specify how data is being communicated
between the tiers.
>Are you serializing objects, using CORBA, text, or brewed your own
XML.
>How does the communication between the tiers reflect or influence the
design your proposing? "
I'm pretty new to this stuff and at the moment I've just been using
RMI, and the built-in serialization mechanisms
(I know I can manually override these - but at the moment I'm just
trying to figure out how to go about designing my class's),
I also know I could use CORBA - but since this app is going to be all
Java - it seems simpler to use RMI.
Steve :
> (You could design you "part" object to be more lightweight, consider useing lazy evaluation)
sorry - the term "lazy evaluation" is new to me ? I presume this means
something like only loading the various properties as and when they
are needed ?
and for a bit more overview about what I'm doing :
The application will be all Java, probably a Java Application as the
front-end rather than an applet / JSP / etc..
The database structures I will be accessing in the SQL server are
already well defined,
each part is treated individually (these are recycled
car/van/automobile parts)
- each one is unique - different condition, different mileage, donor
vehicle, etc, etc .., no widgets involved !
all of the parts are held in one table,
there can be between 10,000 and 500,000 parts depending on the site.
only dealing with fairly major/large/valuable items -- Engines,
Transmissions, Doors, body panels, alternators, ECUs,
- no brackets, trim, spacers, washers, nuts + bolts, etc...
and I don't imagine I'll need seperate subclass's for Engine,
Transmission, Drivers Door, etc -- or even by grouping i.e. Body
Parts, Mechanical Parts, etc .. they really don't behave differently
depending on there properties.
however - what I was really asking was :
I could create an all singing - all dancing PART class which has all
of the properties and methods which would be required throughout the
system,
but I did wonder if this might be a little bit of overkill ?
- especially when performing any sort of batch operation
(generating a report, updating a group of parts at once - like the
updating the price of all the engines)
however - after all of your replies I've been thinking about it a
little more and don't see it as such a big problem,
I guess I was still thinking about our existing xBase product in terms
of reports, etc - and thinking that my front tier/client
would have to deal with individual part records and actually generate
the report
- but of course there's no reason for the database + middle tier not
to generate the report
and then feed back some sort of custom report object to the front
tier/client.
oh -- and thanks for the e-mail Sean -- hopefully the above gives you
a better idea of what I'm working on !
T