Home | Services | Side Projects | Posts (archive) | Miles Davenport | Career
good devops | bad devops
i'm so glad I chose this career | the Konkan railway “Engineer message” | Knowledge | avoid | RSS
I'm not a fan of things which don't work, information which is not kept up-to-date.
How to check your recurring payments in Paypal
Log into your Paypal account.
Click on the settings icon at the top of the screen:
Click Pre-approved payments:
Your pre-approved payments will be listed.
Use Filter Status by to view “just” active or inactive:
Object, Class, Instance
Object Real world objects shares 2 main characteristics, state and behavior. Human have state (name, age) and behavior (running, sleeping). Car have state (current speed, current gear) and state (applying brake, changing gear). Software objects are conceptually similar to real-world objects: they too consist of state and related behavior. An object stores its state in fields and exposes its behavior through methods.
Class Class is a “template” / “blueprint” that is used to create objects. Basically, a class will consists of field, static field, method, static method and constructor. Field is used to hold the state of the class (eg: name of Student object). Method is used to represent the behavior of the class (eg: how a Student object going to stand-up). Constructor is used to create a new Instance of the Class.
Instance An instance is a unique copy of a Class that representing an Object. When a new instance of a class is created, the JVM will allocate a room of memory for that class instance.
SOAP versus REST
Two different protocols
REST (Representation state transfer)
Resource identification through URI: A RESTful web service exposes a set of resources that identify the targets of the interaction. Resources are identified by URIs, which provide a global addressing space for resource and service discovery.
Uniform interface: Resources are manipulated using a fixed set of four create, read, update, delete operations: PUT, GET, POST, and DELETE. PUT creates a new resource, which can be then deleted by using DELETE. GET retrieves the current state of a resource in some representation. POST transfers a new state onto a resource. See Responding to HTTP Methods and Requests for more information.
Self-descriptive messages: Resources are decoupled from their representation so that their content can be accessed in a variety of formats, such as HTML, XML, plain text, PDF, JPEG, JSON, and others. Metadata about the resource is available and used, for example, to control caching, detect transmission errors, negotiate the appropriate representation format, and perform authentication or access control.
Stateless interactions through hyperlinks: Every interaction with a resource is stateless; that is, request messages are self-contained. Stateful interactions are based on the concept of explicit state transfer. Several techniques exist to exchange state, such as URI rewriting, cookies, and hidden form fields. State can be embedded in response messages to point to valid future states of the interaction.
Messages re-presented by XML, CSV, or JSon.
Closer to web HTTP funtionality.
SOAP (Simple Object Access Protocol)
XML messaging - raft of messaging standards (for example security and transactions). Web Services Description Language (WSDL) - definition of how web service works. Built in error handling - standardised codes.
Not limited to HTTP (SMTP imeplmentation).
XML pay-load only.
Language, platform, and transport independent.
Significant existing WS standards.
Choice depends on scope of application.
TDD - Test Driven Development
Write tests first
Write ENOUGH code for the test to pass
THINK through test cases BEFORE implementation
TEST small chunks of functionality / business logic
WRITE Test -> Watch it FAIL -> Implement -> Watch it PASS -> Refactor -> Run ALL tests -> REPEAT
Testing -> Test dependent object in isolation -> define mocks in unit test
Mocking allows functionality to be stubbed, before_ actual_ implementation exists.