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

Extensible objects with dynamic properties

Hi,

I want to achieve a system that has a number of objects with what I
would call 'core' properties - that is properties defined at design
time which correspond (directly or otherwise) to a database schema. A
fairly traditional approach.

However, in addition I want the user to be able to define their own
properties, and to effectively 'extend' the object. As far as the
database goes this can be achieved with vertical tables or, say, SMO
etc.

My question is: is there a correct or accepted way to design the object
model to deal with this? Should the object have a hashtable which can
be indexed by the property name? How best can I deal with typing?
Should I infer from the database schema what the types of the
properties are?

Any thoughts or insight would be greatly appreciated - if any more
information or clarification is required please let me know.

Thanks in advance
N

May 24 '06 #1
2 2357
no***********@gmail.com wrote:
Hi,

I want to achieve a system that has a number of objects with what I
would call 'core' properties - that is properties defined at design
time which correspond (directly or otherwise) to a database schema. A
fairly traditional approach.

However, in addition I want the user to be able to define their own
properties, and to effectively 'extend' the object. As far as the
database goes this can be achieved with vertical tables or, say, SMO
etc.


Could you give some clarification? Do you want the dynamic properties to
be created by the end user at run-time, or to be extended by a developer
who is using your classes?

Here is an article from CodeProject about implementing a property bag in c#.

http://www.codeproject.com/csharp/propertybag.asp

Andrew Faust
May 24 '06 #2
Andrew,

Thanks for your reply - I want the properties to be extended at run
time by the user. A fairly obvious example of this would be, I guess,
a CRM type schema that has core properties - but allows a user to add
their own information about a customer with custom fields.

I hope that makes sense

thanks
N

May 25 '06 #3

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

Similar topics

3
by: Dante | last post by:
I was trying to improve PPK's JIR script by using XML. I have this code: function init() { var x = document.getElementsByTagName('replace'); var prefix = 'http://www.quirksmode.org/dom/pix/';...
6
by: Alfonso Morra | last post by:
I have written the following code, to test the concept of storing objects in a vector. I encounter two run time errors: 1). myClass gets destructed when pushed onto the vector 2). Prog throws a...
3
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements -...
2
by: Hazz | last post by:
If in an interview next week I was told to Design and Develop Extensible Web Application Frameworks using Microsoft .NET technologies. How do I break that question down? My first temptation...
3
by: Sam Kong | last post by:
Hi group, I want to have some advice about immutable objects. I made a constructor. function Point(x, y) { this.x = x; this.y = y; }
8
by: acheron05 | last post by:
Hi there, Hopefully I won't fit the stereotype of the typical student posting his assignment to be written for him, but I am quite stuck. If anyone could give me some help in how to create...
5
by: RSH | last post by:
I have two HashTables (_CompanyDeductions,_CompanyAccruals) that contain several objects each. I am trying to loop through and print the properties of the objects in the Hashtables: I am trying...
7
by: Jo | last post by:
Hi, How can i differentiate between static and dynamic allocated objects? For example: void SomeFunction1() { CObject *objectp = new CObject; CObject object;
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.