Hey, guys~
Sorry I didn't show up last night, after I finish my coding for competition ICAN, because the XinLang web site just got struck.
So, you know, I have been working on this program for last three days, which is the server part of our groups' whole production.
Well, since we mention my work on the server part, I would like to share some very useful tips with all of you.
The very first thing you should know is that how to deploy a kind of web service is always one of the problems prior to others. A point in case is that, once, I tried to finish assignment on a small program using Axis web service tech. Axis is actually very hard to operate for it imposes strict constrains on the version of apache tomcat, mysql and eclipse, driving me mad for almost entire two days. And after asking professor Kong, we finally made it by using more advanced Axis2 web service tech. And this time, without the help from others and the similar operation from Axis2 or other previous resembled programs, I spend about two days finishing my work on my own, using the knowledge of Ajax-WS, and of course, this is a quite tough march for greenhand on this field like me.
In this part, our group tried to make seven cars move in a map, each in their own direction and using the shortest path. The server part is responsible for recording the map information, receiving coordinate of each car, finding a shortest path for each path, and returning a next-step operation to the client part. All of these parts require me to use database and some algorithm, like dijkstra. And I want also want to point some other points that are worth discussing, besides deploying.
1、I recommend you guys refer this web page. It did state all the key points very precisely.
http://blog.youkuaiyun.com/hemingwang0902/article/details/6146647
And I want to highligh that never forget to import Ajax library, because unless you do it, will the tomcat successfully deploy your web service.
2、When we use the database, never forget to use '' to contain our number, like "select * from table where number = '1'", or else it may throw an exception.
3、This is very important!!! When we want to support some services, there is a high possibility that we may need to support some function and some data structure. Pay attention to use "public" to describe the services or functions that we hope to open to others, while labels others whith "private". And what's more, use less static variable, better none of it, for it may cause some unnecessary problems. Professor Kong once mentioned in the class that using xml may help better solve such problems, and I will figure it out next time when I finish my TOEFL test.
Well, after I eventually finish my work, which seems pretty much like a vacation for me, because, you know, coding is always charming and fascinating, I guess I can turn back to my TOEFL review. Hope this article can help you guys, having better ideas when facing similar probelms and also whish myself good luck in TOEFL exam.
Good Night~~~O(∩_∩)O哈!
Sorry I didn't show up last night, after I finish my coding for competition ICAN, because the XinLang web site just got struck.
So, you know, I have been working on this program for last three days, which is the server part of our groups' whole production.
Well, since we mention my work on the server part, I would like to share some very useful tips with all of you.
The very first thing you should know is that how to deploy a kind of web service is always one of the problems prior to others. A point in case is that, once, I tried to finish assignment on a small program using Axis web service tech. Axis is actually very hard to operate for it imposes strict constrains on the version of apache tomcat, mysql and eclipse, driving me mad for almost entire two days. And after asking professor Kong, we finally made it by using more advanced Axis2 web service tech. And this time, without the help from others and the similar operation from Axis2 or other previous resembled programs, I spend about two days finishing my work on my own, using the knowledge of Ajax-WS, and of course, this is a quite tough march for greenhand on this field like me.
In this part, our group tried to make seven cars move in a map, each in their own direction and using the shortest path. The server part is responsible for recording the map information, receiving coordinate of each car, finding a shortest path for each path, and returning a next-step operation to the client part. All of these parts require me to use database and some algorithm, like dijkstra. And I want also want to point some other points that are worth discussing, besides deploying.
1、I recommend you guys refer this web page. It did state all the key points very precisely.
http://blog.youkuaiyun.com/hemingwang0902/article/details/6146647
And I want to highligh that never forget to import Ajax library, because unless you do it, will the tomcat successfully deploy your web service.
2、When we use the database, never forget to use '' to contain our number, like "select * from table where number = '1'", or else it may throw an exception.
3、This is very important!!! When we want to support some services, there is a high possibility that we may need to support some function and some data structure. Pay attention to use "public" to describe the services or functions that we hope to open to others, while labels others whith "private". And what's more, use less static variable, better none of it, for it may cause some unnecessary problems. Professor Kong once mentioned in the class that using xml may help better solve such problems, and I will figure it out next time when I finish my TOEFL test.
Well, after I eventually finish my work, which seems pretty much like a vacation for me, because, you know, coding is always charming and fascinating, I guess I can turn back to my TOEFL review. Hope this article can help you guys, having better ideas when facing similar probelms and also whish myself good luck in TOEFL exam.
Good Night~~~O(∩_∩)O哈!