Hello World is the starting point for a programmer and the next
concepts which are close to good practices and advanced topics are about hello
world Next Gen. Next gen definitely more about AI and need not be AI only. In
this series of articles main aim is to looking at patterns of development whether
it is client server or api development or micro services or any other programming
paradigm.
Main inspiration for me when I go though the articles which explains
how technology is transitioning and moving forward, lot of concepts remain
unchanged. The way to implement will change simple example could be partial
refresh of web components or way to fetch data from API.
AI can change every thing from retrieving data and
interpreting data to auto complete
programming tasks. It is just extending beyond just auto completing to decision
making after good amount of training AI programs.
For Demo and explaining purpose I have prepared git hub repo
with main repo as Talash a simple portal which can integrate multiple small
apps . In this other basic components are TalshBFF which can aggregate different
services before client can show on UI. So first step away from our basic client
service programming are the following patterns
GraphQL based TalashBFF; which simplifies data fetching from API with
other benefits like agnostic schema based development . I am sure most of the
products now moving from just API layer connected to API manager to this
pattern as it can simplify API later lot. Lot of patterns and anti patterns details
are available in net and which can help to pick up right design pattern for
BFF. Still Graph ql being leading technology for this extension of design to
the API design.
For some one looking for starting
their graphql skills I would recommend GraphQL
on Azure: Part 1 - Getting Started . It is possible brink BFF with graphql and
it is easy to select suitable programme either it is serverless architecture or
Rest based services or other. Pretty simple programs to start this BFF later
and can be extended further. In TalashBFF , Aggregation of api from other micro
services done using a sample from here where Quiz trivia answers fetching form
Rest service.
Talash API and microservices :
All apps in the portal are independent microsites. So it is easy to separate API
components and most of them are consumed from Graph QL. Looking at why micro
services work is more popular when it comes to adopting latest design pattern
is it will help to design configure and deploy every service independently . In this case as we mentioned Talash is bunch
of apps based on social media and each app consume data from different API
which are developed as independent Web API and deployed on Azure.
Looking at best practices for
the micro services development I would always recommend couple of applications given
by Microsoft as good models to follow. EshopContainer (https://github.com/dotnet/eShop) is the app which has very good samples to
developer each service as micro service using azure resources. It has best
coding practices examples to best design patterns in consuming data and
delivering data though API.
Clean architecture: This
is another important design pattern which can basically explain all the extension
of the client server program required moving from hello world apps. From the
days of multithreading and adopting
repository patterns , this clean architecture concepts explain all ways design need to be evolved. It explains
all layers design in application design with best practices like
how to design data access layer, How to design api layer and how to consume
data in client app.
In Talash portal while retrieving
Video data it also fetch meta data from youtube. On fly it can fetch 100 video
meta data and quickly filter based on application requirement. Here is simple
pattern user want to use advanced programming concepts form async programming
to multi tasking and aggregation data. As all of we know all 100 request cannot
be sequential requests and will be parallel
.Achieving parallel computation and
aggregating is quite interesting journey in learning . This particular batch
processing can be as simple as creating 10 tasks at a time and aggregating data
and consuming it in client asynchronously to using spark cluster to process
data and get more real time and responsive design. This difference in the two
design patterns will be by itself could a book of design patterns.
High Availability design
patterns is another big extension for modern programming practices and it
could be as simple as achieving 100 % availability of services using load
balancer to delivering services to
1Million users which involves designing cluster for service and coming up with
failover mechanism to blue green deployments to reduce down time to zero.
Hello world series mainly giving sample pseudo code to learn
above patterns with samples and reference to resources in internet . Next set
of articles will explain adopting the Graphql or designing BFF in details and
adopting best recommended practices most of the new design patterns being used .
some of the programming practices like processing data using Hadoop or spark or
designing high availability of components are more advanced programming
concepts then just extending simple client server application.
Demo site talash.azurewebsites.net is one playground for implementing
few of new coding practices. Hot jar, Analytics products or just logging mechanisms
keep changing day by day. Analytics now a days involves client interaction
videos not just capturing the production data to understand user interaction. As
this demo site is more about apps involving display of images/video data , It
also has integration of the Dyte which is platform which can enable live video
based meetings and this one is SAAS based service . It also integrate services like conceitful to store content , Cloudanary to make delivery
of image/video resource from edge network. To learn programs beyond hello world
now a days involves adopting not just adopting design patterns it also need
integration of few SAAS based services which can enhance and improve
development time.
I will start with next articles explaining each of above
patterns and integrations in details. Hope it can help to move quickly from
basic programming to advanced programming skills.
No comments:
Post a Comment