Thursday, 10 December 2015

How to create a Software application

There has been lot of discussion on how a Software application should be developd.

What should be the Architecture?
What can be the best framework?
What should be the design?
What design principles can be applied?
How to cater to always changing requirements?
How to for-see a requirement?
Which database to use?



And most important, what is the starting point?

and the list goes on....


This article explains the way forward of creating a software application. This blog uses Java as the language of programming the application.

Lets take an example of a application, and than evolve it.

Lets say a customer approaches a Freelancer and explains below requirements.

Requirements


I own a wholesale business of selling packed spices. I take raw materials from wholesale dealers. The raw materials are whole Red Chilies, Turmeric and other spices. I process them and manufacture powdered spices like Chili powder, Barbecue powder, Chicken hot powder etc.



I pack the spices in various sizes 100 gm 200 gm 500 gm and so on. 

I need a software application that would enable me to manage these items. I should be able to know how much stock do I have.
The application should also provide history like, which customer has ordered which item, and how many. Since some customers take these packets on credit, the system should also show if the payment is pending.

I should be able to manage customer details like contact info, address etc.

 It should also have a section where my company details are present. Like address, contact info, products we manufacture etc.

I should be able to access this application from Computer as well as from mobile. It should be fast as Facebook and Twitter. 

It should be very user friendly and attractive


Understanding the requirement


OK. Too much information. We need to separate essentials/actual requirement from all the above requirements. It is not that all of it is not important, but to create the architecture you don't need all of them.

Requirements like - I should be able to access this application from Computer as well as from mobile can we considered later.

Really!! Isn't that important. Actually.. NOT. This requirement is about the interface used to access the application. The application can be designed in such a way that any interface can talk to it. It could be a Web application, Mobile App, Desktop application. The interface should be a plugin to the application because it is just the delivery mechanism. So we will consider about an interface later. SO no need to decide on Which MVC framework to be used.

Cosmetic Requirements like  - It should be very user friendly and attractive. is a given in all modern application. Nobody wants a boring application. But again this is about the interface.

It should be fast as Facebook and Twitter.  - Hold-on to that one. This is actually a non functional requirement. Which is important, but can be skipped from the initial architecture design. Remember we don't want to over-engineer our application.

The simple think about starting a application design is to make it simple. When a building architect is designing a blueprint of Library he does not considers the fatal requirements like Flood or Earthquake. But that doesn't mean we should not consider it at all.

Also we should not conclude about any Technological aspects as yet. Like which programming language to use, Which web framework to use? What should be the authentication mechanism?

The Architect uses the blueprint to decide what is the design of the Library, What should be the size of the room, Where would the entrance be? How big will it be? Location of windows? etc.
He does not conclude, while designing, the bricks used will be from which company? or which company's paint is to be applied.

Yes that is important, but not now.


OK. So now what we are left with, is this:

1. The user needs to add customer and products that he manufactures in different sizes.
2. He needs to know how much stock he has.
3. Payment details of an order.

The Architecture of a application should scream it use cases. Just like the architecture of a library speaks use cases.

Use Cases


So Use Cases are actually the building blocks and core of a Application Architecture. The decisions like Which technology to use? Which framework to use? Which database to use? can be decided at a later stage and should not be coupled to the Architecture.

Lets consider the first use case


Create Item
Data:
  • Item Id
  • Item name
  • Packaging size
  • Price per size
Primary Course:
  1. User creates a Item with above Data
  2. System validates all data
  3. System create the Item
Exception:
  1. System delivers error message to User

Lets create a Data Model for this.

1 comment:

  1. No doubt this is an excellent post I got a lot of knowledge after reading good luck. Theme of blog is excellent there is almost everything to read, Brilliant post. sạc laptop đà nẵng

    ReplyDelete

Share the post