Build it better with these 10 tips for app development

GOOGLE CLOUD NEXT, SAN FRANCISCO – Building apps isn't easy. Wouldn't it be nice to skip the trial and error and have someone just...tell you the best way to do it based on their own experience? That's exactly the kind of knowledge what Google Cloud's Developer Relations Manager Aja Hammerly and Two Sigma Investments Managing Director Aji Joseph set out to do at Cloud Next this week. 

During a session aptly titled "Ten best practices for modern app development" Hammerly and Joseph did just that.

Here are their recommendations in no particular order. They are meant to be non-prescriptive because both Hammerly and Joseph acknowledged every company's situation is different.

It's a bit technical, so hold on tight. Right, down to brass tacks:

1) Go stateless with your app - According to Joseph, modern apps should be designed using a stateless model. This, he said, not only allows them to scale more easily, but also makes them more resilient. It also makes it easier to test and debug the app if the components are only loosely coupled. Developers can also iterate faster since changes can be made to one component without impacting the other.

2) Build with scale in mind - Growth is obviously the goal for almost any app, meaning you want one which can handle spikes and traffic increases without negative impacts to performance or reliability. That's why it's important to build with scale in mind from the start. Planning for scale can also help prevent over-provisioning, which can be costly, Joseph said. 

He added there are two different types of scale: horizontal and vertical. The former refers to adding more instances for your application, while the latter refers to adding more resources such as CPU or memory. The choice between these depends on the application architecture.

Key factors to consider when building for scale include whether to use autoscaling, load balancing and caching strategies, and performance testing.

3) Smaller is better, at least when it comes to containers - It may be a bit counterintuitive, but Hammerly said when it come to containers, smaller is the way to go. That's because she noted smaller containers usually be built, start up and be transported across the network faster than their larger counterparts. 


Keep up with the all the news from Google Cloud Next 2023 with our dedicated news hub here.


The first step in optimizing for a smaller container size is picking an appropriate base image. Once you have a small base, you can add back in only those dependencies which you need in production, she said.

4) Leverage infrastructure-as-code (IAC) - What on EARTH does this mean? According to Joseph it refers to using a declarative programming language to define what infrastructure is needed for an app. That includes network services, storage and databases.

There are several popular tools which can help developers do this, including Google's Terraform, Ansible, Chef and Puppet. As part of the process, developers will also need to choose a source control mechanism for version tracking, establish a continuous integration and continuous delivery (CI/CD) pipeline, and set up monitoring to identify issues.

But why use IAC? Joseph said it can help with efficiency, scalability, security and consistency. 

app supply chain security

5) Take supply chain security seriously - This is almost self-explanatory. Hammerly noted that developers should know the supply chain is vulnerable "every step of the way," with dependencies particularly vulnerable. Google offers a number of tools that can help, including Artifact Analysis, which allows developers to scan for vulnerabilities, and Binary Authorization, which lets them set requirements that all deployments must meet before they are released.

6) Implement cloud-native pipelines - These are intended to support CI/CD. Hammerly took a page from Nike with this one, pleading with developers to just do it regardless of what tool they use. 

7) Lean on managed services where it counts - Joseph said managed services can be a boon for enterprises looking to free up engineering resources to focus on solving business problems and innovation. These agreements often come with perks such as service level agreements, a high availability and customer support. They can also be cost efficient if a pay-as-you-go model is used. 

That said, enterprises should carefully consider whether managed services would create undesirable vendor lock-in that could limit scalability, customizations or increase costs.

8) Don't skimp on observability - "Doing this right really helps your teams be more efficient and iterate faster," Hammerly said. Good observability can particularly come in hand when issues arise.

So, what goes into observability? Think logging, metrics, alerting and tracing systems. 

9) Think of cost management as an ongoing exercise - Joseph flagged this tip as "the most important" of the bunch. That's because the cloud offers flexibility, scalability and massive resource availability. Capacity just isn't limited in the way it is for on-premises deployments, so keeping tabs on costs is "crucial," he said.

Some best practices include assigning resource allocation tags for different projects and departments so it's clear who is incurring what costs, setting budgets and setting up cost alerts. Auto-scaling can also help developers and enterprises ensure they're only using the resources they need.

10) Adopt cloud-based development tools - It sounds straightforward, but Hammerly said it took her some time to get on board with cloud-based development. But once she got it, she realized "it's way faster" than trying to manually build the machines needed to develop apps. It also allows developers to easily abandon broken environment or work in multiple environments simultaneously.

In addition to these benefits, cloud-based development also offers productivity gains and cost savings. 

What do you think? Are there any top tips you'd add to this list? Let us know by writing a letter to the editor!


Want to learn how to maximize your cloud investment? Check out our Cloud Executive Summit in beautiful Sonoma, Calif., from Dec. 6-7.