Are there any books that cover achitecturing applications?

Hello there,

i have a lot to read and to learn, but are there some books, that are focussing on how i “should” plan the architecture of my software? Are there any best practices?

I hope my question is clear :slight_smile:
Greetings

2 Likes

:wave:

There are lots of them. What particular side of “software architecture” would you like to read about?

1 Like

Ehm, i think i want to read lots of them too, then :smiley:
Mainly “typical” server-client applications, with client gui or webfrontend.

1 Like

Mainly “typical” server-client applications, with client gui or webfrontend.

For that you might be well served just by the freely available resources:

https://javascript.info/ to learn the basics of js (for building interactive web frontends)
Overview — Phoenix v1.7.10 to learn the basics of phoenix (web server)
https://elixir-lang.org/getting-started/introduction.html to learn the basics of elixir (to better understand phoenix)

1 Like

But this describes mainly the syntax and how to perform specific tasks.
I want to know how to plan my software from beginning to end, for longevity, renewability and best pratices for the architecture itself.

In HTML there is the header, then body, then footer etc. Strict that. Simple. (I know, bad example)

Are there any best pratices like this for other applications, like client-server software?
Clearer what i want to know? English is not my main language, sadly…

3 Likes

It looks like you are (rightfully then) asking about architecture, which is merely affected by your choice of programming language. Your architecture should certainly not be depending on phoenix or ecto or whatever framework. Those are implementation details, they should not dictate how you build stuff.

If this sounds like what you’re after, I would suggest reading more about an architecture called with many names: Ports and Adapters / Clean Architecture / Onion Architecture.

There are others but this is certainly one you should check :wink:

3 Likes

Yes, that’s what i am talking about, thank you! :slight_smile:
Some friend got me the cook “Clean Code” as a present, but i don’t think this suits this task well, am i right?

Thank you for your suggestions! I will look into them :slight_smile:

1 Like

It’s not a book, but this is an excellent article on how to structure software in OTP: https://ferd.ca/the-zen-of-erlang.html

Speaking of onion architecture, Scott Wlaschin has a lot of content on the web about DDD from a functional point of view, although he uses F# https://fsharpforfunandprofit.com/ddd/ You’ll also find lots of videos of his talks, and a book: https://pragprog.com/book/swdddf/domain-modeling-made-functional

Note that all of it won’t be applicable to Elixir (static typing, etc.).

4 Likes

This might be a little more general than you are looking for, but i am thoroughly enjoying A Philosophy of Software Design

1 Like

Ah, I see. Sorry, I got confused by your first response. I’d think clean code is a good starting point (albeit a bit lengthy) no matter what field your are writing software for.

I personally try writing code in such a way that I can throw away / completely rewrite any part of it without much trouble. That’s my approach for modularity and maintainability. I’d suggest you watch some of Chad Fowler’s youtube talks if you have some time to spare.

And, as always, try to not overthink it and don’t get fixated on any particular pattern / approach. After all, all software is doomed to die eventually, so there’s no need to fret over it – just make it do its job and move on …

That’s probably not particularly helpful, though. Sorry. Although Erlang (and Elixir, by extension) do fit the above ideas nicely, I think.

1 Like

On that point, I heartily recommend Greg Young’s talk on The Art of Destroying Software:

https://vimeo.com/108441214

4 Likes

… on that note, might as well visit this topic:

2 Likes

I’m middle way reading “Just enough software architecture” and I’ve found it very approachable, although it does not prescribe any specific architectures, it provides a model to access the need for upfront architecture design according to the project risks.

The other one is the “Clean Architecture”, which motivates very well the importance of architecture, and why you should defer some decisions until you have more insight into the problem at hand.

1 Like

I just gave a talk along similar lines at ElixirConf: https://www.youtube.com/watch?v=Ue--hvFzr0o.

It covers many things like creating a public (code-level) API and several internal APIs, in an effort to keep your application structured and easy to change down the road. It also covers how to test complex applications, and how to isolate Ecto to the areas of the app that it’s good at.

Hopefully this helps. :slight_smile:

3 Likes

I haven’t read it yet, but this should give you some insight in how to architecture an Elixir app:

And this is not a book, but a really popular course by PragDave which you may find interesting:

Clean Code is a good book but what you’re looking for is certainly “Clean Architecture” by the same author.

1 Like

I think some of the author’s blog articles are worth highlighting, like:

3 Likes