i have a problem. two problems, actually. maybe you can help me.
problem two: i search the web a lot and often get the wrong results because what im looking for is very specific. sometimes what i want isnt on the web. its in newsgroups, online documentation, forums, or just not on the net anywhere. what id really like to do is search through someone elses brain, or at least the part theyd let me access. id even pay a small fee to do it. 【程序编程相关:Does Your Project Ne】
problem one: i need to remember lots of small bits of arcane technical knowledge. i keep a text file and wish it was easier to search, copy, store, transport, etc. 【推荐阅读:Java Annotation Faci】
this article is the first in a two-part series. we will explore designing a simple but robust web service protocol called brainfeed, considering alternatives and balancing pros and cons. throughout the process, we will stay focused on making the protocol simple and reuse existing (preferably open) technologies wherever possible. the second article will build on top of the protocol to create an advanced thick client for searching right from the desktop. 【扩展信息:Scratch】
solution: solve both problems at once. create a remotely searchable and cacheable database. to be nice to use, and widely deployed, it must be efficient and super-easy to implement: the searchable equivalent of rss.
ive used lots of bad web service protocols. soap and even xml-rpc are often overkill. they are complicated to implement and obscure the real problem you are trying to solve. the most successful web service ive seen (apart from web pages themselves) is rss. why? because its simple. it does only one thing, and it does it well. it was built on top of a stack of other open and widely deployed technologies. for intranets and extranets, the other web service specifications are quite useful, because one end (you) has some sort of a formal relationship with the other end (your customers, partners, or other departments). they can afford the costs of being highly structured. for widely deployed web services that go over the internet, where you have either an informal or at least low-overhead relationship with the other end, we need something simpler: an rss-level web service. we will use rss as the inspiration for brainfeed.
following in rss footsteps, our web service will have to do the following:
define its purpose. model the data clearly. download the data. search the data. update the data. finally, render the data.all while:
reusing existing technology wherever possible. being adaptable to many platforms and languages. being simple and adequately documented for others to implement.if we had tried this 10 years ago, it probably wouldnt have worked. we would have had to invent too much from scratch. today, however, we are blessed to have open specs with free implementations all over the place. it doesnt matter what language you program in, you can probably find an xml parser and an html renderer of some sort. xhtml is a clean, semantic document language and css2 can support almost any style we want. and the best part is someone else has already written almost all of the pieces. in the java universe, we are especially blessed to have xml parsers and http access built right into the platform. we just have to put it together! welcome to the lego school of software design.
define the purpose... 下一页