Skip to main content

Home/ Coders/ Group items tagged pattern

Rss Feed Group items tagged

Tarik Guney

Singleton pattern - Wikipedia, the free encyclopedia - 0 views

  • the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object.
  •  
    In software engineering, the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects (say, five). Some consider it an anti-pattern, judging that it is overused, introduces unnecessary limitations in situations where a sole instance of a class is not actually required, and introduces global state into an application.
Fabien Cadet

Design Patterns: 15 Years After the Revolution, by Danny Kalev @ InformIT [2009-10-30] - 1 views

  • by defining a description template that included among the rest: Known uses. Sample code (as opposed to a typical algorithm which were often described in plain English and perhaps a few sketchy lines of pseudo-code). Collaboration (A description of how classes and objects used in the pattern interact with each other). Consequences (results and side-effects). Related patterns.
  • Would a 2009 catalog of the 23 classic design patterns look much different? According to the authors of Design Patterns: Elements of Reusable Code, the answer is no.
  • The authors would reclassify certain patterns and omit a few of the original patterns but the design and implementation would remain pretty much the same: "We have found that the object-oriented design principles and most of the patterns haven't changed since then" says Erich Gamma. You can't escape the feeling that patterns are frozen in time
  • ...2 more annotations...
  • In the meantime, in the C++ world the tide has turned towards a completely different paradigm known as generic programming (and to some extent, functional programming). Instead of plain classes and a complex inheritance chain, C++ these days uses templates, meta-programming and static type checking. The C++ Standard Library is the most prominent showpiece of the generic and functional programming idioms.
  • Over-engineering is another source of criticism. Programmers who become acquainted with patterns are often tempted to solve every problem using a pattern, even when a much simpler solution would probably be a better choice.
Fabien Cadet

Design pattern in simple examples @ go4expert.com - 0 views

  •  
    Describes all of the GoF patterns (Creational / Structural / Behavioral) using 2 UML diagrams: One presenting the pattern, one for an example. There's not a lot of verbal description though.
htmlslicemate.com

Design Patterns in WordPress: We're Just Getting Started - 0 views

  •  
    The thing about design patterns is that there is a wide variety of them and it would be near impossible to do justice to each of the patterns in a series here on the blog. Nonetheless, hopefully taking a look at these three have helped kickstart your interest in using design patterns in your work.
Richard Boss

Iterator Patterns To Traverse Container & Access Element | LINQ - 0 views

  •  
    An important article for dot net developers. What are Iterator Patterns? To know, read this article and see an example of Ienumerable, Ienumerator and foreach.
Fabien Cadet

Use your singletons wisely - 0 views

  • I know where you live anti-pattern
  • Liskov Substitution Principle
  • the easier it is to test a class, the more likely a developer will test it.
  • ...3 more annotations...
  • Don't worry: the code will always tell you what to do. Just listen.
  • The key points here are that a class is only a singleton if all applications treat it exactly the same and if its clients can use the class without an application context.
  • "[c]ode wants to be simple."
  •  
    "singletons are unnecessarily difficult to test and may make strong assumptions about the applications that will use them [...] I know where you live anti-pattern [...] Liskov Substitution Principle". "To decide whether a class is truly a singleton: * Will every application use this class exactly the same way? (exactly is the key word) * Will every application ever need only one instance of this class? (ever and one are the key words) * Should the clients of this class be unaware of the application they are part of?"
Fabien Cadet

Deployment pipeline anti-patterns | Continuous Delivery - 6 views

  •  
    "So when he found a bug and it was fixed by a developer, he had to wait ages before he could deploy the build with the fix into his testing environment to check it. This problem results from a combination of two anti-patterns that are common when creating a deployment pipeline: * insufficient parallelization, * and over-constraining your pipeline workflow.
Fabien Cadet

GUI Architectures, by Martin Fowler, 2006 - 8 views

  •  
    Extensive description & history of GUI design patterns, of which MVC & MVP.
David Rietz

Partitioning and Layering a Software Application (Examples in C#) - 0 views

  •  
    This course focuses on techniques such as interface-based design, proper use of inheritance, inversion of control, factories, single responsibility, facades, and other patterns and techniques that help develop software layers.
Matteo Spreafico

Classical Inheritance in JavaScript - 0 views

  • function ZParenizor2(value) { var that = new Parenizor(value); that.toString = function () { if (this.getValue()) { return this.uber('toString'); } return "-0-" }; return that; }
    • Matteo Spreafico
       
      This constructors lies, wondeful!
  • Again, we augment Function. We make an instance of the parent class and use it as the new prototype. We also correct the constructor field, and we add the uber method to the prototype as well.
  • This adds a public method to the Function.prototype, so all functions get it by Class Augmentation. It takes a name and a function, and adds them to a function's prototype object.
  • ...3 more annotations...
  • To make the examples above work, I wrote four sugar methods. First, the method method, which adds an instance method to a class. Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; };
  • JavaScript can be used like a classical language, but it also has a level of expressiveness which is quite unique. We have looked at Classical Inheritance, Swiss Inheritance, Parasitic Inheritance, Class Augmentation, and Object Augmentation. This large set of code reuse patterns comes from a language which is considered smaller and simpler than Java.
  • I have been writing JavaScript for 8 years now, and I have never once found need to use an uber function. The super idea is fairly important in the classical pattern, but it appears to be unnecessary in the prototypal and functional patterns. I now see my early attempts to support the classical model in JavaScript as a mistake.
Fabien Cadet

12 Standard Screen Patterns, by Theresa neil, 2010-01-17 - 18 views

  •  
    If you want a quality seo service please click here. Many people said about seo. But do not understand about seo itself. I will help you. Please contact me on yahoo messenger .. aming_e@ymail.com or www.killdo.de.gg
Fabien Cadet

2013-12: Les dark patterns en design d'interface - 24 jours de web, par Christelle Mozzati - 0 views

  •  
    "Christelle Mozzati"
Hostforlife Hosting

Best Regular Expressions to Validate Email Address - 1 views

  •  
    Here we are going to design a regular expression pattern to validate email address which will check to make sure an e-mail address is a valid address, and in proper format means containing an username, at sign (@), and valid hostname.
Saqib Imran

Facebook Comments upgrade with Voting and More features | App Developer - 0 views

  •  
    "Facebook is once again about to change its commenting patterns with more exciting and sophisticated options. Some vital options are threaded comments, voting and a couple of others."
Paris Polyzos

Refact your C# Code: NCQRS - 0 views

  •  
    NCQRS is a framework implementation of CQRS pattern to separate data modifications operations from data query operations!
1 - 20 of 60 Next › Last »
Showing 20 items per page