DEV Community

pomyo
pomyo

Posted on

What's first? Frontend or Backend?

As a fresher straight out of college, I've never really grasp the differentiation between frontend and backend development. I've barely digested the grueling computer science courses of my degree let alone understand the many stacks that make up the entire development process. As such, my first job was synonymous to trial by fire. I had to do everything from setting up a database, figuring out how to run a server, deciding the best design patterns to use and cultivate my inner aesthetic self just enough to make a decent looking page with CSS.

Fast forward three years.

Now I have a relatively good grasp of the development world. Although far from being considered a good coder, the technical terms and buzzwords no longer strike me as hieroglyphics from an alien magazine. Researching issues are no longer seems like an olympic chore. But one thing still itches me whenever I start a new project. Frontend or backend first? While this may not be a question for those that have specific roles on the team, knowing which to start first helps me tremendously in organizing my code. From experience, I've noticed the pros and con of doing each first.

Front end first
Pros - Better organization of your design vision.
Use front end elements to gradually map out backend functionality.
Faster gratification from not having to redeploy.
Have something to show at the end of the day.
It's more fun.

Cons - Clients think you're done.
Nothing works (yet).

Back end first
Pros - Tedious part is done.
Requirements are quickly fulfilled.

Cons - Have very little to show to client besides code.
May not get a lot of feedback so may incur more refactoring later.

Top comments (2)

Collapse
 
iamschulz profile image
Daniel Schulz

In my experience, even the front end profits from Backend-First doctrine. That allows us to pre-define the data structures we need processed and displayed. That way we can keep the front end as simple and dumb as possible. Also, it encourages a "form follows function" design principle.

Of course, it also always depends on what you're working on. I don't think there's a definitive answer.

Collapse
 
rhymes profile image
rhymes • Edited

Frontend or backend first

I used to be backend first, frontend later. I changed my mind. The UI will end up influencing your app (backend included) because the UI is the app for most of its users.

In reality I think you'll do both at the same time.

Design the first feature, implement it fully, iterate. Both frontend and backend will evolve with the app.

My conviction about interface first comes from the book Getting Real by 37Signals/Basecamp and with experience. Most of the times app built with a non iterative approach will end up doing the wrong thing.

Use an "agile" approach if you can, decide what's the smallest thing of value you can deliver and implement it from top to bottom. Repeat.

Pros - Tedious part is done.

LOL