 |
 |
|
|
| |
| |
| |
|
|
| Articles about Singleton |
| | E' ufficiale: John Singleton per l'A-Team | | 2007-12-16 04:49:55 | |
La news circola a livello di rumor da qualche giorno, ma ora è a un passo dall'ufficializzazione: il film dedicato alla serie tv A-Team si farà e a dirigerlo sarà John Singleton. Il regista di Boyz n the Hood, Four Brothers e 2 Fast 2 Furious ha anche annunciato che si dedicherà esclusivamente a questo progetto per i prossimi tempi, accantonando gli altri in cantiere.
Ora rimane un unico grande interrogativo: il casting a chi affiderà il compito di interpretare gli storici protagonisti del telefilm Anni Ottanta? E soprattutto: chi troveranno col physique du role di Mr. T? Domande cui solo il tempo saprà dare risposta...... | | By: Binario Loco | | |
| | Refactor singleton out of your code | | 2007-08-01 22:37:32 | | There are a lot of posts about that the Singleton design pattern [GoF] is not pattern but anti-pattern (eg. SINGLETON - the anti-pattern!). Some posts also proposes an alternatives for Singleton design pattern or solutions for already existing Singleton design pattern problem (eg. Patterns I Hate #1: Singleton). But I didn't found any post which describes solution for big project with bunch of singleton class usage without big effort of rewriting many places by hand.Because I was in situation that I should refactor a big project containing bunch of Singletons, I was thinking about some automatic way how to remove them. I found a solution using several refactorings. After bellow described sequence of steps you can replace Singleton design pattern by Registry design pattern [P of EAA] which solves all crucial problems of a Singleton, like testing possibility, singleton subclassing, ....Lets have simple singleton class which we want to refactor to access it's instance not as a singleton... | | By: Daily Development | | |
|
|
|
| Singleton pattern implementation in 4 steps | | 2007-05-30 15:41:00 | | The article describes very simple, fast and efficient way how to create class implementing Singleton design pattern. Everything is done in 4 steps using standard features of Eclipse IDE (refactoring and source code manipulation). But it is of course applicable for every IDE providing similar refactoring functionality.Steps:Create new empty 'SingletonClass' class - use New > Class action from popup menu over package or Ctrl+N shortcut. In the dialog just ensure that the source folder and project are specified and define the name of new class. Press Enter or click OK.From the body of the class invoke Source > Generate Constructors from Superclass... action, of course using Alt+Shift+S, C shortcut. In the following diaglog just press Enter or click OK. (This step can be done together with prvious step checking 'Constructors from superclass' option in the 'New Java Class' dialog).From the constructor signature definition (constructor name) invoke Refactor > Introduce Factory... actio... | | By: Daily Development | | |
|
|
| |
 |
|
| |
| |
|
 |