Web Dev

Frontend vs Backend Development

I am sure you might have got into discussion of frontend vs backend development or some engineers want to do only one type of development.

I am passionate engineer for more than decade and have got opportunity to see full spectrum.  I have done development on extreme end of both the side.

In this post i will share something on front-end engineering that is hidden and things that is not discussed openly.

Lets start ..

Back-end 

In this part of the work every one understands that it is a world of data structure , algorithm and writing bare metal code, handling scale etc.

Front-end

In this part of world most of us think is only about building engaging and secure User Interface, but i will say it is just one part of it.

As a frontend developer you are exposed to so many engineering challenges. Lets discuss about it.

Getting started

For any backend related task you can write the quick code or that code can come from Stackoverflow and go and run from IDE.

Frontend getting code is just small part but after that you need some webserver/container to host the code and then know the browser/client that you want to use and then finally code runs.

This is just small example and you can get idea of extra number of steps required to see your code running.

Synchronous vs Asynchronous
 

On backend system you have option to choose if code is Sync vs Async but on frontend most of the operations has to be asynchronous otherwise end user experience is very bad.

On frontend you are exposed to this on day one but on backend it will take months or year before you get to state where start thinking about sync vs async .

I am sure if you have done any concurrent programming then you know how hard it is to coordinate async tasks.

Distributed Computing

 Now distributed computing has become so common that now it is hard to think of system that is not making distributed calls.

As a backend developer you are guarded or gets late exposure to distributed computing but on frontend every call to get data is remote call, so you have to aware about failures that can happen when remote call is made and slowness it adds.

Proper error handling becomes optional in backend system but on frotnend it is not the option because user will noticed it and complain about it.

Frontend is the last gate so it has to handle all the errors that are thrown or  suppressed by backend systems, so end user experience is smooth.

You experienced distributed computing very early once you are on frontend side.

Network

We read many text book that “network is not reliable” and as a backend engineer you don’t get directly exposed to this because library and framework handles it for you but on frontend you get first hand experience to deal with and come up with strategy

All the backend application gets benefit of fast network ( “100 GBs network”) because it runs in data center but for frontend application is data center is end user device which will be browser/handheld device.

Many time network is dial up( i.e KBs) and application has to work on slow network.

Compute and In-memory

This one is interesting because when backend program is slow first option is increase compute or memory because elastic infra allows to do that that but on end user side no elasticity, so first option is no option for front-end friends.

Approach taken to optimize frontend is very creative and innovative as compared to backend. This also put design pressure on front application.

Algorithm 

Backend systems has more options on algorithm that can be used to solve program for example Disk based algorithm are very common for many data intensive backend application but on frontend side this option is not available or in very limited way and you have to very creative in how do you use it.

I think many chapters of algo book is Not Applicable for frontend.

Patterns

On frontend side industry is inventing new patterns every day but backend side does not move at that pace for eg functional composition , incremental rendering , state management using immutable DS , event driven systems, chunking of requests , late arrival of information due to slow network etc

Artifact/Packaging

Backend system are never seen from lens on how big jar/exe/dll is but this is first challenge to be solved on front-end side because package must be small so that it can be downloaded quickly by clients.

Network play role in this remember 100GBs vs Kbs ?

Requirements

This can be little controversial but in many case frontend are built with fuzzy or no requirement and later requirement is added. Requirement is must for backend! 

Testing

This is the hardest part for frontend. I will leave this for now because it needs multi series blog just for this topic.

Conclusion

I know it might look like i am just trying to sell frontend development is more complex but my point is you become better engineer when you move to frontend.

If you are not doing any frontend then find way to do that or learn about these hard problem from frontend engineers and incase they say
 “i don’t think about these challenges” then educate & help them.

If you like the post then you can  follow me  on twitter .

Published on .WEb Code Geeks with permission by Ashkrit Sharma, partner at our WCG program. See the original article here: frontend vs backend development

 

Opinions expressed by .NET Code Geeks contributors are their own.

Ashkrit Sharma

Pragmatic software developer who loves practice that makes software development fun and likes to develop high performance & low latency system.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button