Showing posts with label Anti Patterns. Show all posts
Showing posts with label Anti Patterns. Show all posts

Tuesday, 15 May 2007

Self Evaluation: Design pattern.....

Well it’s been an epic journey; it was whole new world to me. Exploring Design pattern and AntiPatterns were a best part of my educational life.

This blog is aimed to express my experience during this particular module.

I have learnt quite a number of things through out this module. I have outlined them into different titles and expanded it accordingly.

Design patterns

Throughout this module we have been introduced to design pattern. It was a new subject to me. I was familiar with java prior to design pattern. Upon the introduction to different design patterns my perception towards java programming has changed completely.

I have to mention about the GOF books and their ground breaking work on design pattern. The realization of the design pattern and its applicability on modern software development is indeed very much appreciated.

Apart from it, knowing about Adapter, strategy and decorator pattern were a blessing. Now I think twice before programming. I think about applying design pattern in programming rather then jumping on to code.

So it helped me a lot in terms of getting good program done with ease.

AntiPatterns

Fairly new term in the world of computing but without AntiPatterns the design is not completed. It is the natural counterpart of design pattern. AntiPatterns are getting popular because of its usability.

Blogging

To be honest I have very much liked blogging. Since the beginning of the classes I have been doing my blogging on regular basis. I have also liked the interactions between fellow class mates. Overall, I enjoyed the freedom of expressing my thoughts and opinions of learning design pattern.

Now in near future I would like to study design pattern further and explore the secret of all these patterns .

Tuesday, 3 April 2007

Anti Pattern

Anti pattern is a common term in design pattern. It rather like the both controversy and beauty of design pattern. Like any other things in the world there are positive and negative aspects of design pattern.

An antipattern is a frequently used, but largely ineffective solution to a problem. The term was originally used to refer to a pattern gone wrong.

From the programming and software development prospect anti pattern can be defined as

“Anti-patterns, also called pitfalls, are classes of commonly-reinvented bad solutions to problems” [1]

It is pretty handy concept in terms of avoiding risk and error intervene the solution. In a nutshell it can be used to for

Common practices to be avoided

Analogious programming practices:
Goto
Global variable


Anti pattern is rather closely tied up with managerial aspects of the organization. Initially, I had a look on the some of managerial issues closely related to anti pattern

Big ball of mud: A system with no recognisable structure

Blob: Too much functionality in a single design element

Gas factory: An unnecessarily complex design

Input kludge: Failing to specify and implement handling of possibly invalid input

Interface bloat: Making an interface so powerful that it is too hard to implement.

The basic formulae can for anti pattern can be defined as follows
Antipattern= (Problem +AntiPattern Solution+Refactory Method) in a contextAntipattern
Solution = Finding the root cause of that reoccuring problemRefactory
Method = Getting rid of this antipatterns
That’s it for today, I am still trying to explore more about Anti pattern and will be right back soon with more information in my next blog!! Until then have a good time. ;-)

Tuesday, 20 March 2007

Critical Evaluation of PAFSD Coursework

Task One: Designing with pattern

In task we have been asked to design an application which stores customer records and enable users to view the customer records in variety of ways.

According to course work we have been agreed the option to use all of the following patterns

Strategy
Decorator
Adaptor

In first instance I see it as limiting the student to design the applications in such away that using the pattern mentioned above becomes mandatory. It seems like we are only focusing on the patterns mentioned above which narrows down the scope of learning.

In the mean time, it is not possible to cover all the patterns so it is viable to be selective and use the patterns has been suggested.

According to the industry and the software developer the three patterns mentioned above are very useful and handy.

Task 2: Coding with Patterns

It’s a good opportunity for a student to probe him/herself especially those with an interest in programming. I am interested in programming specially java. It is always been my dream to explore the beauty of programming language such as java. In this work I have the opportunity to learn about pattern and their implication in programming application. My initial understanding about pattern is it might help a programmer to beautify and structure their program.

Before learning about design pattern I used to jump on to the code before thinking or analyzing about the given scenario which is of course not a good programming practice but design pattern given me a new thought of thinking and adopting patterns for solving problems. I am looking forward to use my learning in this case when I will be writing the codes

Task 3: Patterns and software development

Out of all the tasks, I have liked this particular task as like most of the computing student I am interested in web and graphic designs. What more is interesting I am a freelance website designer (www.immysnet.co.uk) so I can definitely learn pattern in website from this task and apply in my practical life.
I had a look on the website pattern mentioned in course work and realized that it is really important to have a pattern for personal website as it helps all the designer / user to follow guidelines and keep their website up to date. I am sure it would be beneficial to have a adopt design patterns for website as the market demand for web based business are on high.

Task 4: Critiquing Patterns

To me this part of the course work is the trickiest one. I see “Anti pattern” as a controversial topic in design pattern but in the mean time I find beauty where there is controversy! Life is not all rosy so as the design pattern.

If I were to do this task I would definitely enjoy the challenge but at the I would like say what my friends says about anti-pattern

“If you are on target there are plenty of marks can be scored and on the other hand if you are off the track and get carried away it might proved to be a disaster.”

Task 5: Patterns Blog

Well, blogging is a new concept in learning now. To be honest I am enjoying blogging. It gives me the freedom of expressing myself and communicates; rationalize my opinions with rest of fellow mates via their blogs. New innovation of web 2.0 blog becoming popular and always been thinking of blogging but this course has given the option of doing so.

I think it’s a great inclusion and reflection of innovative idea to the course work.

Tuesday, 13 March 2007

Frequently Asked Questions (FAQ's) About Software Pattern


Hi folks, back once again. Today I have been looking at the gentle introduction to pattern. First of all I would like define pattern as in general term but once its have been defined we can focus on what it means in software designing and development.

To be honest I was in a bit of shock to learn that pattern is actually originated from engineering industry. But so far I have my perception of pattern is it is pretty handy in terms of software design and development. Ok, let’s define the pattern in general.

1. What is pattern?

Patterns deal with reoccurring problems in a specific context. So we can define pattern as a solutions for reoccurring problems that are seen again and again in a specific environment. It gives us hints about the solutions that can be developed to solve arisen problem.

On of the main advantages of pattern is that it can be applied to resolve similar problems that occurs in the same context.


2. What is pattern in software engineering?

When patterns are applied in software environment it becomes software pattern. By saying that, it’s not all about applying the pattern. We must be careful about the context when applying pattern. Analogy has to be developed in the problematic context prior to applying pattern.

So we can define software pattern as solution to reoccurring solutions to software problems that occur in software designing or development environment over and over.

We are in era of object oriented programming. Being a computing student I had to work on programming projects and my realization is patterns are very helpful in terms of developing software applications. It interacts between objects, so to say, it’s known as communication patterns.

Software patterns deals with object communication strategies for object inheritance and containment.

3. What are the benefits of using patterns?


As I have mentioned earlier the importance of patters are inevitable in software engineering. Below is a list of benefits software patterns offers us

*It saves time
*Reusability of pattern
*Provides many solutions to a particular problem
*Expected result upon implementation

4. What is the implication of software patterns to the software development?

Software developer is one of the key figures in software development industry and the importance of patterns is pretty crucial success factor for any of the big software development projects. Software patterns help to avoid reinventing the wheels and allow describing programming approaches in terms in which programmes can easily understand. Software patterns is one of the key components of software development that describes how objects communicate without becoming entangled in each others data models and methods which leads to be a good objective of object oriented programming.

"Designing object-oriented software is hard and designing reusable object-oriented software is even harder." [1]

The other important aspect of patterns is it helps developer to organize objects and establish interactions between classes and objects. It is also helpful to write and modify program for further development.

5. What is anti patterns?

There is a bit of speculation about this topic but there are always postive and negative aspects of any good things. I think the concept of anti pattern is very useful in terms of constructing a good pattern for reoccurring problems. According to wikipedia

“Anti-patterns, also called pitfalls, are classes of commonly-reinvented bad solutions to problems. They are studied as a category so they can be avoided in the future, and so instances of them may be recognized when investigating non-working systems.” [2]


Anti pattern may be the result of:

· A manager, developer or architecture not knowing any better

· Not having sufficient knowledge of experience in solving a particular type of problem

· Having applied a perfectly good pattern in the wrong context.

Conclusion

In conclusion, it’s been entertaining knowing about software pattern in software engineering. I would like welcome any comments on this feature. Please feel free to post comments if you have any concern to share with regarding patterns.


References:


1. Design Patterns: Elements of Reusable Object-Oriented Software By Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides


2. http://en.wikipedia.org/wiki/Anti-pattern