- Details
- Written by: Stanko Milosev
- Category: node.js
- Hits: 5139
From Node.js v0.10.31 Manual & Documentation I copied example, like:
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(8124);
console.log('Server running at http://127.0.0.1:8124/');
If you save example like "example.js" and after starting server in command prompt with:
node example.js
in your browser go to the address:
http://localhost:8124/
and you should see "Hello World"
- Details
- Written by: Stanko Milosev
- Category: Software Development Philosophy
- Hits: 8235
I created new section and category, software development philosophy, I get an idea to name it like this from wikipedia's article, List of software development philosophies
Since in that list there is no refinement, I would like to mention it.
According to wikipedia, program refinement is the verifiable transformation of an abstract (high-level) formal specification into a concrete (low-level) executable program.
So, what that exactly mean?
In Delphi it look something like this:
procedure SortFile (filename:string);
begin
// Read file into memory
// Sort the lines
// Write file out of memory
end;
Later you develop your code.
I started to use this approach few months ago, and it is very usefull, when I start coding like this, usually my code look much better.
I took the code, and idea of writing all this from here.
- Details
- Written by: Stanko Milosev
- Category: REST
- Hits: 6994
Here is what I read from the RemObjects news group:
Note that REST isn't a standard, nor does it define any metadata format. The only thing REST specifies is that you use GET to retrieve data, POST to save it, PUT to insert it and DELETE to delete it. Besides that there's nothing that is specified at all.
---
Due to the lack of metadata or standardization for REST, this is a very complex subject.
--
Carlo Kok
We've been looking at a REST interface. As Carlo mentioned there is little in the way of standards and everyone seems ti implement their own. One of the simplest we've seen basically has the format
http://mysite.com/rest?method=MethodName&apikey=KeyValue&ArgName1=xyz&ArgName2=123
we've decided that the simplest way to implement this is through a standrad webbroker app which then links to a RO server.
The rest handling method, looks at the method name and calls this on the server, bit of a manual job at the moment but we are looking on at least creating an app to creat the code if you see what I mean.
The apikey is there to ensure that only valid users access the app.
--
Russell Weetch