DEV Community

Discussion on: What to write first? Front then back end or vice versa..?

Collapse
 
tracygjg profile image
Tracy Gilmore • Edited

Viktoria,
This is a good questions but there is another answer - inside-out. I have found it very important to define the interface between front and back as early as possible.. This enables both sides of the stack to commence development in parallel with a high degree of confidence (even if it evolves, in a controlled manner, later.) If there is a single developer (as suggested by your article) features can be developers incrementally front and back.

Collapse
 
viktoriabors profile image
Viktoria Bors-Pajuste

I love this approach. I can imagine this approach is a basic concept inside a team at a company. Yes my article is mostly in the a view of a single developer. But I am curious how it actually works as a team.

Collapse
 
tracygjg profile image
Tracy Gilmore

Viktoria,
When working in a team having a common understanding (not assumptions) of how components (front and back) need to communicate and work together is vital. I would like to stress the interface definition is 'controlled' not fixed. As implementation progresses (especially in an agile project) the interface is bound to evolve. "Control" means the interface changes through the mutual agreement of both sides and not independently - that way lies chaos.

Collapse
 
koire profile image
Koire

I didn't scroll down enough, you call it inside out I call it API first.

Getting the interface between front and back established can save you so much later.

Collapse
 
tracygjg profile image
Tracy Gilmore

Koire, API-first works for me but that suggests (in my mind) some initial implementation. My thinking was to capture the interface definition (between front and back = API) as a specification. Words are easier to change (discuss and evolve) than code and tests. But as I stated earlier, you are not wrong, API-first will still enable front- and back-end development to commence independently, and enable the delivery of one feature at a time end-to-end.