programming

 

Sketchy musical factory

The Abstract Factory pattern illustration, UML...
Image via Wikipedia

Today we will take a look at the abstract factory design pattern. This design pattern continues the series of creational patterns.

In previous article we have talked about factory pattern. We have learned that factory pattern deals with creation of other objects. Now we will extend that knowledge with the abstract factory pattern which provides a way to group together or rather encapsulate a group of individual factories that create objects with common theme.

Normally we would code a client software to create a concrete implementation of the abstract factory and then use generic interfaces to create concrete objects that are tuned to specific theme but, the client does not know about which concrete object will it get from each of the internal factories since it uses generic interfaces of the factory product in question. Details of the implementation of concrete objects are hidden by the internal factories.

READ MORE

 

Eclipse Galileo and SVN support

Like many Java developers I had to take a look at Eclipse Galileo. My interest lie in how fast I can migrate from Eclipse Europa to new Galileo version.

Installation was as simple as in previous version. Extract an archive file to a directory. Simple eh ? Let’s see what will be broken. Upon first start Galileo tries to move my default workspace. Well I choose my old workspace and by some magic it was opened without problems. Or did it? Recompilation and reformatting took about a minute or two1. After that everything worked smoothly. Almost everything.  Project team collaboration vanished.

“GULP”, was my first reaction. CVS support is included, but who really uses CVS nowadays? So I found out that setting up SVN in Eclipse Galileo was not as simple as I thought it to be.

  1. Help->Install New Software
  2. Choose to work with Galileo – http://download.eclipse.org/releases/galileo
  3. Unfold Collaboration
  4. Choose Subversive SVN Team Provider (Incubation)
  5. I employ you to restart Eclipse and don’t use any plugin at this point since they will not work and you will get a message which is similar to this: 0x0040010b: Obtain Project Name’ operation finished with error: Selected SVN connector library is not available or cannot be loaded …’. Instead you rather install a connector library.
  6. Help->Install New Software
  7. Add a site
  8. I used: http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ , but you can probably use any other that has SVNKit or JavaHL connector
  9. Unfold Subversive SVN Connectors
  10. Select Subversive SVN Connectors, SVNKit (1.3.0), JavaHL (1.6.0) and it’s native libraries.
  11. Restart Eclipse
  12. Configure SVN Connector by specifying the connector in Window->Preferences->Team->SVN->SVN Connector.

And there you have it. Eclipse Galileo with SVN support in all its splendor.

Reblog this post [with Zemanta]
  1. it is a huge project tree I am working with []
 

Fungi Factory without abstraction

Next creational pattern that we will have a closer look at – is Factory pattern. There are at least two different Factory patterns, Factory method and Abstract Factory. In this installment we will be looking at the Factory method pattern.

READ MORE

 

Eclipse Code Assist / Code Completion / Content Assist hang-up

Do you use Eclipse ? Do you use Code Assist? You don’t ? You should :)

You will write your code much faster, and since you will be using CTRL + SPACE combination you will be heard in the office1

I use Eclipse daily and I must say that I am pleased with it. Until the content assist functionality hangs up. Then I am not as pleased as I could have been if it worked. I have to kill the Eclipse process and restart Eclipse or wait a minute or ten for the hang-up to end.

Now until today I couldn’t find the problem for that. As it happened some time ago I installed some plugins for Mylyn which in the process not knowingly changed some of the default setting in my Eclipse preferences. I don’t use Mylyn for task management. Changing the preferences to default values solved my problem.

So if Eclipse starts to hang up during usage of content assist check the:

Preferences->Java->Editor->Content Assist->Advanced section of Eclipse properties.

Enable Other Java Properties and Type Properties. If you are using templates in your code2 then enable Template Properties.

This should solve the problem with content assist hang-ups.

If they persist Documents as You Go has some interesting insight in Logitech Quickcam V10 application issues.

Reblog this post [with Zemanta]
  1. implying that you DO work ;) []
  2. like sysout []
 

Singing a singular design with Singleton

Now from my perspective there are a lot of programmers that finish school, get a degree, get a good job and then are presented with a problem. For example program designers design applications that include one of most simple design patterns.

Now I am not the best programmer in the world and also not the worst. Maybe I was lucky to be born in the era in which pattern design sprouted and started to grow. Also I know that most of you dear readers don’t need to reread this simple stuff, but if you are unsure of something … go ahead and take a peek. We will not tell ;)

This should be a first of design pattern series. So come back and check out the one of which you are unsure of. READ MORE

Support Us