Priti Mehta wrote:Is this the correct way to put it in object...?
Priti Mehta wrote:
Is this the correct way to put it in object...?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:I am really sorry to say that I have found this style of coding in many examples before I had started coding so made this model class.
Priti Mehta wrote:Also 1 more thing I made the above class implements serializable but still I am not able to make its object in client which is altogether a different project. Do i need to keep this model class in both the server and client projects?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote: I am very much new to java, and i am developing webservice.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:But if we make different projects for client and servers then how do we use objects across?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:using URI
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:No idea about this...I am not able to figure out which is best method for communication between client and server and sending data across them.
I saw sockets, QueryParam, @produces and @consumes etc but now got confused on which one to use and how.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:Write the resultant set in xml or in json file.
Priti Mehta wrote:One question will this file whether xml or json file be accessible on client side?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:Can you send me the code for this if possible? this is help me a lot...
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:
I hope this is correct...
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:Inside JSon Class
[{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0},{"elevation":160,"uavband":1,"uavname":"Priti","secuplinkfreq":800000000,"priuplinkfreq":789000000,"uavtypeid":123,"detectiontime":1440474895,"azimuth":210,"downlinkfreq":560000000,"downlinkbw":156000,"secuplinkbw":0,"priuplinkbw":0}]
The problem coming is I am getting multiple same records in json array instead of only one.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:Now i really getting confused with what you are saying we need to use list or json object.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:for couple of years i have been in C, and C++ and never on java. This is my first module in java..
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Priti Mehta wrote:Java is too complex.
Priti Mehta wrote:I have used model class only which is UAVSearch then where json object will come in picture.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
--- Martin Fowler
Consider Paul's rocket mass heater. |