473,396 Members | 2,030 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.

Some advices to build classes, plz

Hi to all,

Im trying to understand how to separate the different layers inside an application (appearance layer, data layer, bussiness layer)...

i have a database of products very simple with a table that its "Products" and another that its "ProductsType"

I created a class with the same properties as fields i have in the Products Table
at the same time in this class i have as methods as StoredProcedures about products i have in the DataBase (for example:MethodAddProduct, MethodDeleteProduct,MethodGetProductById(int ID)), etc....

and another class with the same properties as fields i've in the ProductsType Table (food, drinks, etc...)

This are my questions:

Its this a good way to work with it?...
What its the best way for bind the classes that will contain the information (for instance of a product), and the appearance(interface) layer?

--
Thanks
Regards.
Josema
Nov 16 '05 #1
1 920
It does mean if you need to change the structure of the database, you have to rewrite your program. It might be better to get the names of fields and tables etc from the database at runtime and have a single set function which takes the name of the field and the data to put in it as string parameters

setfield(string table_name,string field_name, string value)
Nov 16 '05 #2

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

Similar topics

1
by: GrelEns | last post by:
hello, having almost 1,000 tar.gz files in different directories (could not change that) and these archives contain over 1,000,000 text files. I would like to build a tool to access as quickly...
2
by: Joh | last post by:
Hello, (sorry long) i think i have missed something in the code below, i would like to design some kind of detector with python, but i feel totally in a no way now and need some advices to...
1
by: Todd | last post by:
How do I prevent some of my classes in my class library from being seen externally? I have one class that I want everyone to see and use. But that class itself, internally uses several other...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
8
by: Will Pittenger | last post by:
I have a Windows program C# .NET solution where when I update its XML documentation, some tags are not recognized and turned into the corresponding HTML. Those tags include <c>, <code>, <para>,...
5
by: Doug Kent | last post by:
Sorry if this isn't really the proper group to which to post this topic, but ..NET is my development community, and I'm sure a lot of you might have something to say about this. :-) Scenario: ...
4
by: Chris F Clark | last post by:
Please excuse the length of this post, I am unfortunately long-winded, and don't know how to make my postings more brief. I have a C++ class library (and application generator, called Yacc++(r)...
2
by: Nick | last post by:
So, this link: http://msdn2.microsoft.com/en-us/library/54dwfbb7.aspx says, "The build order is inferred from the top-down order of the codeSubDirectories collection. The App_Code directory is...
14
by: Leah | last post by:
I am a student and are required to build a website that provide services (client-server). I need advice in choosing approach or to be exact the methodology that appropriate for such development....
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?
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.