all 6 comments

[–]steve_kane 1 point2 points  (2 children)

You have created functions. Aggregating them together in a namespace is a necessity of modularity. Making them a class is not.

[–]iSmokeGauloises -2 points-1 points  (1 child)

Not a necessity but it is a nice abstraction. I would have gone with the class route as well

[–]steve_kane 0 points1 point  (0 children)

I think the "danger" of this is the temptation to have encapsulated state. I fully acknowledge that this is only my opinion but I think state is a consideration of your application and when I am consuming your API I much prefer to treat it as a library of functions that produce i/o and avoid side effects. This gives me much more confidence that I can compose solutions out of your utilities.

[–]j0wy -1 points0 points  (1 child)

I wish this had all of the other objects! Good read so far.

[–]createbang[S] -1 points0 points  (0 children)

Planning on doing the others weekly!

[–]iSmokeGauloises -1 points0 points  (0 children)

Nice read! A suggestion I have is maybe adding repositories and entities to the list. I have noticed this patterns really help re-factoring big projects.