Skip to main content

Posts

Showing posts from July, 2013

Object orientation and Service orientation

Object orientation is all about modeling the real world information mainly through encapsulation, abstraction, polymorphism, containment, inheritance and so on. In simple words, an object contains the data structures and methods to change the content state. A typical OO run-time manages the life cycle of objects. You can create as many objects as required as long as the run-time does not over run its memory. Service orientation requires you to encapsulate a process. The operations of a services are interaction points with the particular process. Data structures are the arguments for these operations. Service run-time shall validate the correctness of the process. Service can have multiple invocation instances, not multiple instances of service itself. Example: TrainTicketBookingService involves a process. - Check the train timings //  interaction point - Check the seat availability // interaction point - Issue ticket // interaction point There could be many ticket cou

Service oriented architecture - 1

SOA, Yes, it expands to Service oriented architecture. What is it? Keep these things in mind during design and analysis. 1. Whenever you design a service, you are designing a service for a business task. 2. These services can be linked to achieve bigger business goals. Let us understand 'Service': In my view, a service is an expectation fulfillment for a service consumer, without service consumer actually worrying about how is it fulfilled. For example: A student opts of 'Data structures' lesson. The delivery of a lesson is a service for the student. The professor does his homework, examples and makes sure that student understands the lesson. Student and the professor are the different entities, yet there is a well defined service contract between them which enabled two entities exchange the expectation without student actually worrying about the service implementation aspects of the professor. So, to be called a service, it should be meaningful. It

Dangling references

I picked up my data structures book and started reading it. First thing that came to my mind is, If I were a teacher, how would I explain to students on pointer concepts. Believe me, it is still a challenging concept to comprehend. Pointer is a like a phone number to reach a person. Pointer points to address of the object that holds the data. Now, what is dangling reference. It is possible that there can be many pointer variables pointing to same address. For example, You, myself, someone else can have the same phone number of the person to reach. Question: What if the person dies? :) I still will have phone number, but cannot reach him or her. On top of that, what if that phone number gets assigned to some other person. In that case, I will reach the wrong person. The phone number I have is a dangling reference. Pointer pointing to the address, but address does not hold the desired object anymore ... Simple, isnt it?