Programming Tips πŸ’‘
54.5K subscribers
65 photos
8 videos
30 files
338 links
Programming:
Tips πŸ’‘
Articles πŸ“•
Resources πŸ‘Ύ
Design Patterns πŸ’Ž
Software Principles βœ…

πŸ‡³πŸ‡± Contact & Ads: @MoienTajik
Download Telegram
Media is too big
VIEW IN TELEGRAM
Ψ’Ω…ΩˆΨ²Ψ΄ Ψ§Ω„Ϊ―Ωˆ طراحی Repository و Unit Of Work بءورΨͺ Generic Ψ―Ψ± #C

#DesignPatterns #OOP
@ProgrammingTip
Programming Tips πŸ’‘
Photo
Design Patterns - Explained Simply.pdf
1.2 MB
Design Patterns - Explained Simply πŸ’Ž
Author : Alexander Shvets πŸ–Š
γ€°γ€°γ€°γ€°γ€°γ€°
#Book #DesignPatterns
@ProgrammingTip
Programming Tips πŸ’‘
Photo
Head First Design Patterns.pdf
40.1 MB
Head First Design Patterns πŸ“•

Authors : Bert Bates, Kathy Sierra, Eric Freeman, Elisabeth Robson πŸ–Š

Publisher : O'Reilly πŸ’Ž

Level : Advanced πŸ”

γ€°γ€°γ€°γ€°γ€°γ€°
#Book #DesignPatterns
@ProgrammingTip
Architecting Services with Design Patterns πŸ’Ž

As the number of your services expands you're going to need to start thinking about how to organize them. πŸ—‚

Applying these two design patterns can help, provided you understand all their variations. βœ…

With the current set of tools that come with the Microsoft .NET Framework, it's easy to create a service. βš™οΈ

But it's also easy to create what both Nayaki Nayyar and Benjamin Moreland described as a "junk drawer of services." πŸ‘Ύ

If you're going to avoid that as the number of services in your organization increases, then you need to think about your architecture. πŸ€”

https://t.me/pgimg/95

[ Article ] : http://bit.do/asdp

γ€°γ€°γ€°γ€°γ€°γ€°
#CleanCode #DesignPatterns
@ProgrammingTip
A Pattern is a solution to a problem in a context. βœ…

We're going to step throught each of these parts, context, problem and solution ✨ :

The context is the situation in which the pattern applies. This should be a recurring situation. πŸ‘¨πŸ»β€πŸ”§

The problem refers to the goal you are trying acheive in this context, but it also refers to any constraints that occur in the context. πŸ†

The solution is what you're after : a general design that anyone can apply which resolves the goal and set of constraints. πŸ…

βž– Example
Problem: How do I get to work on time❓

Context: I've locked my keys in the car. πŸ—

Solution: Break the window, get in the car, start the engine and drive to work. πŸš—


"If you find yourself in a context with a problem that has a goal that is affected by a set of constraints, then you can apply a design that resolves the goal and constraints and leads to a solution."


γ€°γ€°γ€°γ€°γ€°γ€°
#DesignPatterns #Tips
@ProgrammingTip
If you don't need it now, don't do it now❗️

Design Patterns are powerful, and it's easy to see all kinds of ways they can be used in your current designs.⚑️

Developers naturally love to create beautiful architectures that are ready to take on change from any direction.πŸ’™

If you have a practical need to support change in a design today, go ahead and employ a pattern it handle that change. βœ…

However, if the reason is only hypothetical, don't add the pattern, it is only going to add complexity to your system, and you might never need it. ❌

γ€°γ€°γ€°γ€°γ€°γ€°
#DesignPatterns #Tips
@ProgrammingTip
Programming Tips πŸ’‘
Photo
Object Thinking.pdf
3.7 MB
Object Thinking πŸ“™

Author
: David West πŸ–‹

Level : Advanced πŸ’Ž

γ€°γ€°γ€°γ€°γ€°γ€°
#Book #DesignPatterns #OOP
@ProgrammingTip
Objects Should Be Immutable 🀫

In object-oriented programming, an object is immutable if its state can’t be modified after it is created. 🀞🏻

In Java/C#, a good example of an immutable object is String.βœ…
Once created, we can’t modify its state. We can request that it creates new strings, but its own state will never change. ❌

However, there are not so many immutable classes in JDK. Take, for example, class Date. It is possible to modify its state using setTime(). πŸ•’

This is an incomplete list of arguments in favor of immutability ⚑️:

β€’
Immutable objects are simpler to construct, test, and use
β€’
Truly immutable objects are always thread-safe
β€’
They help to avoid temporal coupling
β€’
Their usage is side-effect free (no defensive copies)
β€’ Identity mutability problem is avoided
β€’ They always have failure atomicity
β€’
They are much easier to cache
β€’ T
hey prevent NULL references, which are bad

Let’s discuss the most important arguments one by one. πŸŒ€


https://t.me/pgimg/178

[ Article ] : kutt.it/immtb

γ€°γ€°γ€°γ€°γ€°γ€°
#BestPractices #DesignPatterns
@ProgrammingTip
Design Patterns for Humans πŸ€·πŸ»β€β™‚οΈ

Design patterns are solutions to recurring problems; guidelines on how to tackle certain problems. βœ…

They are not classes, packages or libraries that you can plug into your application and wait for the magic to happen. ❌

These are, rather, guidelines on how to tackle certain problems in certain situations. ✨


[ C# Version ] : kutt.it/dp-cs
[ PHP Version ] : kutt.it/dp-php

〰️〰️〰️〰️〰️〰️
#DesignPatterns #Patterns
@ProgrammingTip