473,388 Members | 1,066 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,388 software developers and data experts.

data passing

iu2
Hi all,

I need your professional opinion about this. It is more a general
programming dilemma rather then a C++ one, but since the project I
write is in C++...

We handle big structs of data. We also write them to files for use by
other teams.
Here it goes - we use these files also as a means of passing the data
to other stages in our own program.
I wonder if it would be better to pass the data as it is, in structs,
not counting on files.
There is no memory problem.

What do you say?

thanks
iu2

Aug 27 '07 #1
3 1714
iu2 wrote:
I need your professional opinion about this. It is more a general
programming dilemma rather then a C++ one, but since the project I
write is in C++...

We handle big structs of data. We also write them to files for use by
other teams.
Here it goes - we use these files also as a means of passing the data
to other stages in our own program.
I wonder if it would be better to pass the data as it is, in structs,
not counting on files.
There is no memory problem.

What do you say?
I am honestly don't understand what the dilemma is about. You need the
files to interact with some other product[s], fine. But using files
to interact with pieces of your own [running] program? <shrug>

And, yes, 'comp.programming' is probably a better place for a discussion
like this.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 27 '07 #2
On 2007-08-27 18:31, iu2 wrote:
Hi all,

I need your professional opinion about this. It is more a general
programming dilemma rather then a C++ one, but since the project I
write is in C++...

We handle big structs of data. We also write them to files for use by
other teams.
Here it goes - we use these files also as a means of passing the data
to other stages in our own program.
I wonder if it would be better to pass the data as it is, in structs,
not counting on files.
There is no memory problem.
Saving data to a file and then reading it in again can never be as fast
as accessing the data directly from memory, nor as easy to do (i.e. more
potential for bugs).

--
Erik Wikström
Aug 27 '07 #3
iu2
On Aug 27, 7:24 pm, Erik Wikström <Erik-wikst...@telia.comwrote:
On 2007-08-27 18:31, iu2 wrote:
Hi all,
I need your professional opinion about this. It is more a general
programming dilemma rather then a C++ one, but since the project I
write is in C++...
We handle big structs of data. We also write them to files for use by
other teams.
Here it goes - we use these files also as a means of passing the data
to other stages in our own program.
I wonder if it would be better to pass the data as it is, in structs,
not counting on files.
There is no memory problem.

Saving data to a file and then reading it in again can never be as fast
as accessing the data directly from memory, nor as easy to do (i.e. more
potential for bugs).

--
Erik Wikström
It's a PC program, and the files are read once in a while, so there
are no actual speed limitations.
Using files makes it feel like we are allowed to loosen up interfaces
among modules - no same structs/header files, each module can take
what it needs from the file. This is the main pro, I think.
So what I try to figure out is whether there is a definite "right" way
for data passing (on a PC program with huge available memory). Pros
and cons, may be, from your (and other's) experience?

I feel that using files is not the "right" way for data passing, but I
also don't see why it is "wrong" way...

Aug 27 '07 #4

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

Similar topics

3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
10
by: Trevor | last post by:
Hey, I am trying to do this tutorial on the microsoft site : http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dndotnet/html/usingadonet.asp I can get everything to work up to...
3
by: Marc Castrechini | last post by:
First off this is a great reference for passing data between the Data Access and Business Layers:...
15
by: http://www.visual-basic-data-mining.net/forum | last post by:
Does anyone have any idea how to transferring data from TextBox1 in form1 to textBox2 in form2..... That means after i fill in any data in textBox1 and click Next button... It will bring me to...
7
by: Arpan | last post by:
The .NET Framework 2.0 documentation states that An Object variable always holds a pointer to the data, never the data itself. Now w.r.t. the following ASP.NET code snippet, can someone please...
6
by: Pat B | last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol using C#. I have implemented it using BeginReceive and EndReceive calls so as not to block when waiting for data from the...
13
by: Francois Appert | last post by:
This post was originally in the C# Corner site, but their server is down. I'd like to see if this group can answer. I program in C++ and am learning C#. The issue is: why should anybody...
4
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This...
1
by: =?Utf-8?B?SkI=?= | last post by:
Hello My pgm1 (User Interface Level) passes an empty ArrayList to pgm2 (Business Logic Level). pgm2 then calls pgm3 (Data Access Level) to populate the ArrayList. Question1: When pgm2 gets...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.