background preloader

RESTful Web services: The basics

RESTful Web services: The basics
The basics REST defines a set of architectural principles by which you can design Web services that focus on a system's resources, including how resource states are addressed and transferred over HTTP by a wide range of clients written in different languages. If measured by the number of Web services that use it, REST has emerged in the last few years alone as a predominant Web service design model. REST didn't attract this much attention when it was first introduced in 2000 by Roy Fielding at the University of California, Irvine, in his academic dissertation, "Architectural Styles and the Design of Network-based Software Architectures," which analyzes a set of software architecture principles that use the Web as a platform for distributed computing (see Resources for a link to this dissertation). This article suggests that in its purest form today, when it's attracting this much attention, a concrete implementation of a REST Web service follows four basic design principles: Back to top

Simple example - Node.js, Restify, MongoDb and Mongoose - Backbone.js Tutorials Before I start, the Backbone.js parts of this tutorial will be using techniques described in "Organizing your application using Modules to construct a simple guestbook. Getting started To easily understand this tutorial you should jump straight into the example code base. Example Codebase Example Demo This tutorial will assist you in saving data(Backbone.js Models) to MongoDb and retrieving a list(Backbone.js Collections) of them back. The technologies This stack is great for rapid prototyping and highly intuitive. Node.js "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Restify "Restify is a node.js module built specifically to enable you to build correct REST web services. MongoDb "MongoDB (from "humongous") is a scalable, high-performance, open source NoSQL database." Mongoose "Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment." Building the server Restify configuration Mongoose Schema

Axis2 - Apache Axis2™ is a Web Services / SOAP / WSDL engine, the successor to the widely used Apache Axis SOAP stack. There are two implementations of the Apache Axis2 Web services engine - Apache Axis2/Java and Apache Axis2/C While you will find all the information on Apache Axis2/Java here, you can visit the Apache Axis2/C Web site for Axis2/C implementation information. Apache Axis2, Axis2, Apache, the Apache feather logo, and the Apache Axis2 project logo are trademarks of The Apache Software Foundation. Why Apache Axis2: A new architecture for Axis2 was introduced during the August 2004 Summit in Colombo, Sri Lanka. Apache Axis2 not only supports SOAP 1.1 and SOAP 1.2, but it also has integrated support for the widely popular REST style of Web services. Apache Axis2 is more efficient, more modular and more XML-oriented than the older version. Apache Axis2 is built on Apache AXIOM, a new high performant, pull-based XML object model. We hope you enjoy using Axis2. Let us know what you think!

Stateful vs. Stateless Web Services Es ist schon ein paar Tage her, als ich Zeuge einer kleinen Debatte unter Entwicklern wurde. Es ging um die Entwicklung eines Web Services, welches eine große Menge an Daten beliefern sollte. Während des Brainstormings über Spezifikationen und Parameter wurde auch darüber diskutiert, ob der Web Service stateful - also mit einer Session - oder stateless konzipiert werden soll. Völlig parteilos - ich kenne beide Entwickler :-) - möchte ich diese zwei Design-Konzepte ein wenig aus meiner eigenen Betrachtungsweise durchleuchten. Zunächst sollte man sich meiner Meinung nach der Natur des Web Services im Klaren sein. Einen entfernten Aufruf - den berüchtigten "Remote Call" durchzuführen ist mit der Web Services-Technologie mittlerweile kinderleicht. Doch zurück zum Thema: Grundsätzlich wurden Web Services für den automatisierten (also maschinellen) Informationsaustausch geschaffen. So. Ergo: Web Services sind erst mal von Haus aus "stateless".

web services - Understanding REST: Verbs, error codes, and authentication Web service A Web service is a method of communications between two electronic devices over a network. It is a software function provided at a network address over the web with the service always on as in the concept of utility computing. The W3C defines a Web service as: a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). The W3C also states: We can identify two major classes of Web services:REST-compliant Web services, in which the primary purpose of the service is to manipulate XML representations of Web resources using a uniform set of stateless operations; andArbitrary Web services, in which the service may expose an arbitrary set of operations.[2] Explanation[edit] Many organizations use multiple software systems for management. Rules for communication between different systems need to be defined, such as: Web API[edit] Automated design methods[edit] Criticisms[edit]

Programming Stateful JAX-WS Web Services Using HTTP Session This chapter describes how you can develop JAX-WS Web Services that interact with an Oracle database. Overview of Stateful Web Services Normally, a JAX-WS Web Service is stateless: that is, none of the local variables and object values that you set in the Web Service object are saved from one invocation to the next. Even sequential requests from a single client are treated each as independent, stateless method invocations. There are Web Service use cases where a client may want to save data on the service during one invocation and then use that data during a subsequent invocation. For example, a shopping cart object may be added to by repeated calls to the addToCart web method and then fetched by the getCart web method. Enabling stateful support in a JAX-WS Web Service requires a minimal amount of coding on both the client and server. Accessing HTTP Session on the Server On the server, every Web Service invocation is tied to an HttpSession object. The steps required on the server:

RESTful API Design: Teach a Dog to REST | Apigee UPDATED November 2011: Check out the second edition of the webinar - RESTful API Design. It's been 10 years since Roy Fielding first defined REST in his dissertation on Architectural Styles and the Design of Network-based Software Architectures. Since then, REST is often held as the standard for usable, well-designed, easy-to-integrate APIs. At the Cloudstock hackathon, I presented "Teach a Dog to REST," asking the question: where are all the elegant REST APIs we'd all hoped to see? While many claim REST has arrived, many APIs in the wild exhibit arbitrary, productivity-killing deviations from true REST. Slides + Audio: Architectural Styles and the Design of Network-based Software ArchitecturesSo, where are all the elegant REST APIs?

W3Schools Online Web Tutorials Stateful Web Services mit JAX-WS | techscouting through the java newstechscouting through the java news Ohne die Sinnhaftigkeit von zustandsbehafteten Web Services vorab diskutieren zu wollen sind hier 3 Möglichkeiten genannt solche mit Hilfe von JAX-WS bzw. dessen Referenzimplementierung umzusetzen. Variante 1: Direkter Zugriff auf die HTTP-Session über den WebServiceContext Bei einem Web Service, der auf HTTP und SOAP aufsetzt und in einem Servlet-Container läuft, war es natürlich schon immer möglich die HTPP-Session des Servlet-Containers als Zustandsspeicher zu verwenden. Zugriff auf besagte Session bekommt man über den WebServiceContext, welcher über die Annotation @Resource injected werden kann. Ein Beispiel zeigt das folgende Listing: Die Verwaltung der HTTP-Session auf der Serverseite übernimmt dann wie gewohnt der Servlet-Container. Mehr zu dieser Variante findet man in einem Blogartikel von Rama Pulavarthi. Variante 2: Per Annotation eine Instanz pro HTTP-Session Mehr dazu steht in einem Blogartikel von Kohsuke Kawaguchi. Variante 3: Protokollunabhängig über WS-Adressing Fazit

CSS Style Guides As we wrap up our recent poll on ordering CSS properties, it brings up the larger issue of CSS style guides. Ordering properties is just one choice you have to make that makes up a complete styling strategy. Naming is a part of it. Let's round up some existing ones. But first... I love pattern libraries. The List I'll list some excerpts from each that I like below. GitHub GitHub CSS Style Guide → As a rule of thumb, don't nest further than 3 levels deep. Unit-less line-height is preferred because it does not inherit a percentage value of its parent element, but instead is based on a multiplier of the font-size. Google Google HTML/CSS Style Guide → Use ID and class names that are as short as possible but as long as necessary. E.g. Do not concatenate words and abbreviations in selectors by any characters (including none at all) other than hyphens, in order to improve understanding and scannability. E.g. .demo-image not .demoimage or .demo_image Idiomatic CSS Nicolas Gallagher's Idiomatic CSS → More?

Machine vision Early Automatix (now part of Microscan) machine vision system Autovision II from 1983 being demonstrated at a trade show. Camera on tripod is pointing down at a light table to produce backlit image shown on screen, which is then subjected to blob extraction. Machine vision (MV) is the technology and methods used to provide imaging-based automatic inspection and analysis for such applications as automatic inspection, process control, and robot guidance in industry.[1][2] The scope of MV is broad.[2][3][4] MV is related to, though distinct from, computer vision.[2] Applications[edit] The primary uses for machine vision are automatic inspection and industrial robot guidance.[5] Common machine vision applications include quality assurance, sorting, material handling, robot guidance, and optical gauging.[4] Methods[edit] Imaging[edit] Image processing[edit] After an image is acquired, it is processed.[19] Machine vision image processing methods include[further explanation needed] Outputs[edit]

OpenLayers 3 Examples Advanced View Positioning example (center.html) This example demonstrates how a map's view can be adjusted so a geometry or coordinate is positioned at a specific pixel location. The map above has top, right, bottom, and left padding applied inside the viewport. The view's fitGeometry method is used to fit a geometry in the view with the same padding. The view's centerOn method is used to position a coordinate (Lausanne) at a specific pixel location (the center of the black box). tags: center, rotation, openstreetmap Drag-and-Drop image vector example (drag-and-drop-image-vector.html) Example of using the drag-and-drop interaction with a ol.source.ImageVector. tags: drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, vector, image Drag-and-Drop example (drag-and-drop.html) Example of using the drag-and-drop interaction. tags: drag-and-drop, gpx, geojson, igc, kml, topojson IGC example (igc.html) tags: complex-geometry, closest-feature, igc, opencyclemap Measure example (measure.html)

I Don’t Need No Stinking API: Web Scraping For Fun and Profit | Hartley Brody If you’ve ever needed to pull data from a third party website, chances are you started by checking to see if they had an official API. But did you know that there’s a source of structured data that virtually every website on the internet supports automatically, by default? That’s right, we’re talking about pulling our data straight out of HTML — otherwise known as web scraping. Here’s why web scraping is awesome: Any content that can be viewed on a webpage can be scraped. If a website provides a way for a visitor’s browser to download content and render that content in a structured way, then almost by definition, that content can be accessed programmatically. Over the past few years, I’ve scraped dozens of websites — from music blogs and fashion retailers to the USPTO and undocumented JSON endpoints I found by inspecting network traffic in my browser. Why You Should Scrape With APIs, you often have to register to get a key and then send along that key with every request.

Related: