This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm building a module for my application which will convert an Excel file to a certain format and the other way too. Now I've started learning patterns, but as you may know there are many and I have a deadline on this. What I need is for someone to tell me "take a look at X pattern", thats all.
Poor is the man whose pleasures depend on the permission of another.
You need a good OO design here. That will do well.
Further, I would like to make it clear that patterns are not a must. If you think, at any point of time, that any specific pattern would fit in, go ahead. We wouldn't be able to tell you which pattern suits the best here, right at this moment without knowing what exactly you are doing and your requirements in a bit detail.
However, would like to remind you few principles of a good OO design.
- Favor composition over inheritance. (Doesn't mean inheritance is useless)
- Program to interface
- Separation of concern
- Single responsibility principle
- Separate out what is likely to change
Patterns are meant to be some common/generally accepted way of solving certain tasks which would me much harder to develop/maintain otherwise. So if you tell the kind of features/functionality required to achieve your task then we will able to tell which patterns would be suited best for you.
I was thinking of patterns since my project coordinator has put me to read all this books about patterns and always advices me to think in terms of patterns.
Regarding the project, I have to design a module which receives an Excel file and using this I must code the excel file content to another format. I need another format because its a web application which handles excel files with that specific format.
For example, lets say in cell A2 I have the value 5 then the coded format should be something like this:
That is the simplest example possible, as cells can have formulas and so on.
I hope you understand what I mean and if not, feel free to put some more questions.
Thanks for the replies.
and just to be pedantic, there is no such thing as a 'java pattern'. A design pattern is something that is not specific to any language, but can be implemented by all (or at least many). you may be doing your implementation of the pattern in java, but it is not a java pattern.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors