Tuesday, November 25, 2008

Order Management System

Our company Mohit ltd. has 2 products namely Neem soap and Neem oil. We have a sales force of around 200 people that collect order from 1050 stores distributed all over West Bengal. The central depot for both the above mentioned products is in Sumali. We need a system where in:

- The salesperson can use a PDA an log on to the web with a unique ID and password and inform the central depot about the requirement of that particular product.

- After getting an intimidation the system should check the inventory level of the product required.

- If there is sufficient inventory to satisfy the demand, an order should be accepted and the same should be deducted from the existing stock level. This way we know the actual stock of that product lying with us.

- In case, there is insufficient stock to fill the demand,the salesperson should be informed and the order should not taken.

Monday, November 17, 2008

Oops i didnt did it............

I was talking to a friend of mine who has just completed his graduation in chemistry and explaining to him about OOP. We were seating at McDonalds.
Me: I am hoping that with enough exposure to OOP I should be able to explain it to you.

Nikhil: Just hang on for a sec. Let me order for a burger.
Me: OOP is to understanding the right way to look at and organize your code in your project and it will help you to understand what object oriented programming is. For example, in the real world when you go into a kitchen you can see an oven and a stove. Both of these things or objects are nouns. A stove can heat and an oven can cook. These behaviours or functions are verbs. They do something. A stove can have a characteristic like a cooking temperature. This characteristic or property is an adjective.
Nikhil: Is it some kind of household work or what?
Me: In the programming world, these “things” that can have methods or properties are called “objects”. You get to name them when you write code. You can also create your own object with your functions and your properties added to it. Object oriented programming is the term given to this approach of organizing or as they say, “encapsulating” your functions and properties and data into a “object” variable. Doing this makes it reusable, generic and helps organize your code among many other benefits.
Nikhil: Can you explain it with an example?
Let’s say for example, you decided to apply object oriented principles to it you wrap up all your stove code into a stove object and all your refrigerator code into a refrigerator object. Then in their place you would create new instances or clones if you will of the stove and refrigerator object as you need it. What you are doing is making abstract, blank, customizable “object” variables with the functions and properties you want built in. Then you can use this object in other programs. You do not have to write a stove object again.
Nikhil: How is it applicable in real life scenario?
In practical application, you would create a oven “class” which is a way to define and organize all the methods and properties for use in your oven “object”. You define it in an external file and copy all your oven functions and oven data properties into it. When you want to use it you import it at the top of the file and then create a “my Oven” variable and then “instantiate” or make an empty clone of it using “new Oven ()”. IE, var my Oven = new Oven ();
Where you had a cook function you now have a cook method. A method is a function that is part of an object. For example, myOven.cook () would be a method of the Oven object.
When you find yourself repeating the same code and functions over and over again you will recognize this is an area where you can apply OOP and break down and organize your code into reusable pieces.
Nikhil: That’s it. Is it this simple? Though trying it in practical can address my concern better.
Me: Not today brother. It’s time to have a pie out with some burger.

Tuesday, September 23, 2008

One Nite with System Architecture.....

Travelling always makes me happy initially and tired later. Well, this is the initial part of my journey so I was enjoying. I was travelling from Kolkata to New Delhi via Rajdhani Express and the night was nearing. I was in no mood to sleep and was searching for a soul or medium whom I can make my victim. I had no books so thought let me make my laptop my victim. I was looking at all the pictures of the time spent in praxis. It has been too good. I am already missing my campus, my room, my academic block and all my friends. Suddenly the train stopped and the station was Mughalsarai.I realised that i have another victim and this time it was a beautiful girl sitting just opposite to me. Well guys this was interesting. Sorry my friends at praxis I will catch you later. I am busy for now. I still kept my laptop on so that I don’t give wrong signal initially. It is another point that I was no more interested in it.
She was just sitting and more interested in the window. Well time past and I thought it was too late to say hello now. I know all of you must be thinking what a Hindi movie going on, but what can I do my life move on in Hindi movie style. Suddenly her phone rang, my first reaction was which network is it .My cell had no network. Her looks completely changed and it reminded me of our time in Praxis. Every news in Praxis makes us look like this. She was like mumbling System Architecture. Wow, I realised this is something that I know. Thank you Dr.Mukherjee .Finally her call ended with Hello-hello-Hello...Don’t worry usual way of ending call in India, network problem .She took out few books and started looking at them as if searching for something.
Finally my turn came. Conversation began:-
Me: Hi. You look worried any problem. Can I help?
She: My name is Radhika. I am representing my college tomorrow in an All India event. I came to know from my friend that my topic of discussion is System Architecture.
Me: Okay. My name is Mohit.I. I am pursuing MBA from Praxis business school (branding Praxis) in Kolkata. So tell me what the problem is.
Radhika: Problem is very small .I just don’t know what system Architecture is...
Wow I thought. Praxis rocks. Dr.Mukherjee rocks.
Me: I believe I can help you on that. Our course contents dealt with it.
Radhika: Oh that’s great. I am all ears to you .Please go ahead.
I was thinking finally a girl is all ears to me.
Me: see system architecture is simply a representation, a visual representation which is a collection of platforms together with applications...
Radhika: That’s great. How simple it was...
I realised her verbal communication was not in sync with her non verbal communication. I need to be simpler.
Me: Ok ok..Do you know what is hardware and what is software?
Her looks answered it. This girls first they want us to be simpler and then they want us not to treat them as dumb. How to do that...I can’t figure that out.
Radhika: Ya I do.
Me: You know about operating system like Microsoft Vista, XP, linux etc...
Radhika: Yes.
Me: A platform is nothing but a combination of hardware and an operating system.
Radhika: Ya that’s easy. I remember application is a piece of software that runs a particular function-Tally, MS Word. Now I remember.
Me: Good. Now a collection of platform is needed to exchange data among various users and this you see mostly in large organizations.
Radhika: Ya now it’s getting a bit clear.
Me: So now let’s look upon different types of architecture. There are basically 4 types of architectures- Single tier, two tier, three tier and multi tier.
Radhika: Stop Stop..We are in AC two tier, is it to do something with that.
How dumb I can be was my next thought. I hope New Delhi is near.
Me: No it’s nothing to do with that. Stop running your imagination and listen. Single tier is the simplest architecture as you can make out from the name. When both the application and data are on same machine then it is single tier architecture. Like what you find in homes.
Radhika: Ok.But what about places where there are multiple computers and all are connected.
Me: Exactly. That is why we have a two tier system which is also called Client server application. Here application is present on each platform but data is there at a common place so that every platform can access the data using the application. Sharing of data becomes easy.
Radhika: Ya now I can relate. Our college client machine crashed but data was not lost. That’s excellent. This guys who design this architecture have some brains...Too good
Me: Ya they have some brains. (I hoped Delhi is near).Now coming to three tier architecture, in this to further ease the processes in very large organizations the three tier consists of presentation, applications, data. Presentation tier displays information related to services such as browsing, it communicates with other tiers in the network to give the desired output.
Radhika: And what about the other two?
Me: Application tier controls applications functionality by processing the inputs in detail. In data tier, it consists of database servers where information is stored and retrieved.
Radhika: Good now I can make out things. I have heard this name Praxis business school. Today i realise that they teach well there.
I was thinking wish cp sir and govind sir were here. How proud they would have been.
Me: Now comes multi tier. Here we add one more component and that component is web server.
Radhika: This must be for internet connectivity and also for client connection.
Me: Exactly. Too good .That’s all about systems architecture.
Radhika: Can I have your cell number. I would like to be in contact with you.
I was thinking my stars are bright.
Me: Ya you give me a miss call from your cell. My number is 9830072020.
It ringed and i saw the name it was written Gunjan Praxis.
I was thinking how can she be Gunjan.Then I saw around it was early morning and my cell was ringing and i have been sleeping all along. I picked the call and this was the conversation:
Gunjan: Hi Mohit.Sorry to disturb you early morning. I need some help.
Me: Even I need help. But first tell me what you need help in.
Gunjan: I need to understand system Architecture that Dr. Mukherjee taught us.
Oh fish why all this happen to me...............
Me: Can u wait for it till tonight.......
Gunjan: Ya sure.
Me: Ok. I will post it on my blog and you can check it out there.Is it fine...
Gunjan: ya absolutely.....Thanks buddy..bbyee...take care..
Me: bbyeee...
Then is saw around .The victim was me and the assaulter was chetan bhagat. His book ONE NIGHT AT A CALL CENTER was lying nearby......
And here I am writing this blog as i promised Gunjan...ONE NITE WITH SYSTEM ARCHITECTURE....