• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Contactor: design issue

 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can I have hard coded design instead of generalized one? I checked some previous projects (flyby night) .java files and found that the code provided is coded such a way that, it is almost independent of the DB schema.
But I was planning to make an use of DB schema and define some class which resembles the schema (so as to have each record as object etc)
For example
class DBobject {
private String name;
private String location;
etc
}
Can I have such kind of design which is totally dependent on the underlying DB schema. Any change in schema will cause change to the dbserver.
(but even in flybynight assignement, the change is schema will cause change to the GUI design at least. So I assume that whenever schema changes, the changes in the application are assumed)
Please let me know if this causes any automatic failure or something..
Thanks.
[ July 30, 2003: Message edited by: Jmannu gundawar ]
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its possible as long as u implement the interface provided
 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Billy.
That was very brief But I assume it means that I can (I am allowed) do it. Let me know if you meant otherwise.
Thanks,
Manoj
 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I get just one more confirmation??
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manoj
The instructions do not tell you that the Data class must work for any possible data file, so it should be permissible to hard code the type of database you are working towards.
But it is fairly easy to code so that you can get the schema from the data file itself, and this will make your code more reusable in the future.
So I think it would be better to try and get the schema from the database.
Regards, Andrew
 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Andrew,
Sorry I didnt check this for quite a long time. I was out of Ranch
I did modify my code to read the schema and now facing hell lot of problems. Will write about them soon
thanks,
Manoj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic