Skip to content

doruz/FluentBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluent Builder

The Builder Design Pattern is a creational design pattern that separates the construction of complex objects from their representation, allowing step-by-step creation of objects with flexibility and clarity.

Examples of the fluent builder design pattern for creating urls:

C#

// https://www.travel.eu/countries/romania?lang=en&type=nature

UrlBuilder
    .Https("www.travel.eu")
    .Path("countries", "romania")
    .Query("lang", "en")
    .Query("type", "nature")
    .ToString();

JavaScript & TypeScript

// https://www.travel.eu/countries/romania?lang=en&type=nature

UrlBuilder
    .https("www.travel.eu")
    .path(["countries", "romania"])
    .query('lang', 'en')
    .query('type', 'nature')
    .toString();

About

Example of the fluent builder design pattern.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published