473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Application Structure Suggestions

Okay guys, I have some theory for ya. I am building a program for my
company to manage our products. We are in the foodservice industry and
sell equipment. The models will be stored in my database with there
accompanying electrical / plumbing data etc... Users will add the
models to the project they are working on to specify them for the
project and my program will generate numerous reports. What are
suggestions based on client/server app vs just clients accessing
database directly. I never wrote a client/server app before and am not
sure if that would benefit me or not.

Any suggestions would be appreciated!

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
7 1032
programs that use a db are always a bit client server (sometimes the server
bit is on the same pc but i don't think you are talking about that), so i
dont really c your problem. If you could explain w you are thinking of a bit
more it would be helpfull.

eric

"Ivan Weiss" <iv*****@optonline.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Okay guys, I have some theory for ya. I am building a program for my
company to manage our products. We are in the foodservice industry and
sell equipment. The models will be stored in my database with there
accompanying electrical / plumbing data etc... Users will add the
models to the project they are working on to specify them for the
project and my program will generate numerous reports. What are
suggestions based on client/server app vs just clients accessing
database directly. I never wrote a client/server app before and am not
sure if that would benefit me or not.

Any suggestions would be appreciated!

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2
To explain further my current plan is to have less than 10 client
machines connecting to one large database stored on the server (just a
file server no server application). I am going to split up the database
into many tables (since it will be quite large) to help performance.
Each project will have its own table within the database and than there
will be tables for Customers, the project names, Manufacturers,
Products, etc...

What I was wondering is if I am better off writing a server app that
does all of the database manipulation and a client app that requests the
information from the server or asks the server app to add data to the
database.

In other words, instead of my client apps connecting the the database
directly, my server app would to ensure that all changes are made and
not overwritten and to tell all clients to update their data if a
database change was made.

Does that better explain it?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3
"Ivan Weiss" <iv*****@optonline.net> wrote...
What I was wondering is if I am better off writing a server app that
does all of the database manipulation and a client app that requests the
information from the server or asks the server app to add data to the
database.


Hi Ivan... actually your earlier question was clear enough :-) I believe
you will find that a C/S solution will take you considerably longer to
write. It will take longer to design, to write and to debug. There are
some advantages but if your app has 10 users on a local network it is hard
to say if you would realize those advantages.

As you know in a non-C/S solution all the data is fed to the client app for
processing in that machine. It sounds "horrible" when we speak of millions
of records but in practice it isn't bad at all. Systems run this way all
over the world and have done so reliably for decades.

It should be possible to isolate the data retrieval methods such that
eventually (should the need occur) you could change to a C/S format with
less effort. Avoid arbitrarily mixing your data access and UI code for
instance.

Hope this helps,
Tom

Nov 20 '05 #4
Basically, what I am worried about is one user opening a project for
editing and another user opening that same project. For now I made a
field in my database to keep track of the status of a project
(open/closed) and my goal is to only allow one user to open a project
for editing at this time (I would allow others to print out reports).
The chances of two users opening the project at the exact same time is
so small that I don't see that being a problem. Is that an effective
architecture or do you have any other suggestions. This is the first
full featured program I ever wrote and really do not know how to go
about starting to create the architecture and designing it.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5
"Ivan Weiss" <iv*****@optonline.net> wrote...
Basically, what I am worried about is one user opening a project for
editing and another user opening that same project. For now I made a
field in my database to keep track of the status of a project
(open/closed) and my goal is to only allow one user to open a project
for editing at this time (I would allow others to print out reports).
You are basically adding a "checkout/checkin" feature. This can be done
with a field in the project table (as you describe) but it can also be done
with a separate table where the project and the user who has it checked out
are maintained. The "ideal" solution depends upon many other criteria
including perhaps how long it will be checked out, if a user can check out
multiple projects and stuff like that.
The chances of two users opening the project at the exact same time is
so small that I don't see that being a problem. Is that an effective
architecture or do you have any other suggestions.
It honestly doesn't matter if the odds are small or large. If it can happen
and it is important that it doesn't happen then appropriate logic must be
added a) to prevent it or b) to detect that it happened and then to handle
it. Don't roll dice with business apps.
This is the first
full featured program I ever wrote and really do not know how to go
about starting to create the architecture and designing it.


Well that can be tough. But I would suggest that you put off a C/S solution
for now if you have never written one. The key to not writing the app 5 or
6 times is to spend more time up front designing it. I wrote a book
http://www.leylan.com (see the Writing Applications - Introduction) for the
Clipper language. It is no longer in print and the code wouldn't translate
directly of course but the concepts are the same regardless of the language
you choose.

I stressed prototyping as a way to see if a) the solution would be effective
if it works as designed and b) the program is something you can actually
write. You can mock up several designs much faster than you can code even
one and finding out "this isn't going to work" three months into development
isn't good.

Hope this helps,
Tom


Nov 20 '05 #6
Tom,

Thank you for your input that does help. To answer your last point
first I am very confident that I can write this app because technically
it is a re-write of a recently created app that is very similar but
limited in features and VERY buggy. It was an unfinished project and I
am deciding to re-create it on my own time actually. Therefore, I do
have a reference as to structure and functionality and I can use the
"finished" product to make sure it is worth while.

The check-out/check-in feature is exactly it except that I am expecting
users to have proejcts checked out for quite a length of time, possibly
even an entire day because of the scale of these projects. Therefore, I
will provide "read-only" access which will only allow users to print
reports for the project if it is checked-out.

The only problem I have is what if two users simultaneously check-out a
project. But, that is only possible if it is done within a new
nanoseconds so I do not see that being a problem. But, you are right
and logic should handle it. Any suggestions because I do not know how
to go about doing that. When the user checked out the project I was
going to reload the data from the database, ensure it is still open for
check-out, and than update the database immediately. But, like I said
that does provide a small window for two users to do it at the exact
same time, however unlikely.

Does all of this sound like I am headed on the right path? I do expect
this app to take an extreme amount of time to write since I am doing it
on my own.

Thanks Tom!

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #7
"Ivan Weiss" <iv*****@optonline.net> wrote...
When the user checked out the project I was
going to reload the data from the database, ensure it is still open for
check-out, and than update the database immediately. But, like I said
that does provide a small window for two users to do it at the exact
same time, however unlikely.
That's "closer" to safe but you need "safe." It's a matter of locking the
resource before the update occurs. When one client has obtained a lock the
other clients will be unable to obtain a lock. Another way is to include
the condition in the update command. If you were going to update "lockflag"
for id = 1234 then you would update "lockflag" for id = 1234 and lockflag
not locked. Clearly that isn't SQL but you can translate it. If the
lockflag was changed you would find id = 1234 but you would not find
lockflag open so the update would fail.

If it gets more complicated you can set it up as transaction with rollback.
Does all of this sound like I am headed on the right path? I do expect
this app to take an extreme amount of time to write since I am doing it
on my own.


Sounds like a good app to write. You have a model to use which helps.
Still take the time to work out what "parts" you'll need so you can build
the parts. Then take the parts and build the app.

Good luck,
Tom
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial...
1
by: Sean W. Quinn | last post by:
Hey folks, I have a question regarding file handling, and the preservation of class structure. I have a class (and I will post snippets of code later in the post) with both primitive data...
2
by: hotadvice | last post by:
hello all Consider this: Suppose we have a an array of structure declared as following in file1.c structure foo{ ....... .......
5
by: VMI | last post by:
I have a BMP image (the form is also in PDF) that contains a scanned copy of a paper form that we need to fill out. Is it possible to use this image in my application so that the application can...
10
by: David Fort | last post by:
Hi, I'm upgrading a VB6 app to VB.net and I'm having a problem with a call to a function provided in a DLL. The function takes the address of a structure which it will fill in with values. I...
5
by: kito | last post by:
Hi, I've a question, regarding the multi-tier model of designing applications. I'm programming a web-application (Little web-shop) in VB.net for a project of the university and my question is the...
35
by: salad | last post by:
I have an application written in MS-Access. It is a complete application that manages the day-to-day operations of a business. The program is nearly ready to be used in other customer sites. ...
3
by: =?Utf-8?B?QkY=?= | last post by:
In Microsoft architecture diagrams, I always see 3 layers of application structure: web server, application server and database server. Web server is IIS. Database server is SQL server. What...
7
by: itsraghz | last post by:
Hi People, First of all, do we have a dedicated forum for WebSphere? As I dont find any, posting it in the one and only available forum "Java"! We do face a strange scenario in WAS 6.0 in AIX...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.