반응형
반응형

djangorestframework 3.14.0

 

 

https://www.django-rest-framework.org/

 


*** 참고 : https://towardsdatascience.com/designing-and-deploying-a-machine-learning-python-application-part-2-99eb37787b2b

https://pypi.org/project/djangorestframework/

pip install djangorestframework

Requirements Python 3.6+ Django 4.1, 4.0, 3.2, 3.1, 3.0 We highly recommend and only officially support the latest patch release of each Python and Django series.

Installation Install using pip...

pip install djangorestframework
Add 'rest_framework' to your INSTALLED_APPS setting.

INSTALLED_APPS = [
    ...
    'rest_framework',
]

 

Designing and Deploying a Machine Learning Python Application (Part 2)

You don’t have to be Atlas to get your model into the cloud

towardsdatascience.com

 

 

 

 

 

반응형
반응형

https://wikidocs.net/book/2070

 

Python 계단밟기

## Python을 배워보자 > 문제를 풀다보면 문법은 자동으로 알게된다. > 문법을 배우는것이 프로그램을 배우는것이 아니라 어떻게 활용하는냐가 중요하다

wikidocs.net

 

반응형
반응형

Matplotlib Tutorial - 파이썬으로 데이터 시각화하기

 

https://wikidocs.net/book/5011

 

Matplotlib Tutorial - 파이썬으로 데이터 시각화하기

## 도서 소개 - 이 책은 파이썬의 대표적인 데이터 시각화 라이브러리인 Matplotlib의 사용법을 소개합니다. - 30여 개 이상의 다양한 주제에 대해 100개…

wikidocs.net

Matplotlib 데이터 시각화와 2D 그래프 플롯에 사용되는 파이썬 라이브러리입니다.

Matplotlib을 이용하면 아래 그림과 같이 다양한 유형의 그래프를 간편하게 그릴 수 있습니다.

 

 

Matplotlib의 간단한 사용법을 소개하고, 예제와 함께 다양한 그래프를 그려봅니다.

예제들은 Matplotlib 공식 홈페이지를 참고해서 만들었습니다.

순서는 아래와 같습니다.

 

Contents

00. Matplotlib 설치하기
01. Matplotlib 기본 사용
02. Matplotlib 숫자 입력하기
03. Matplotlib 축 레이블 설정하기
04. Matplotlib 범례 표시하기
05. Matplotlib 축 범위 지정하기
06. Matplotlib 선 종류 지정하기
07. Matplotlib 마커 지정하기
08. Matplotlib 색상 지정하기
09. Matplotlib 그래프 영역 채우기
10. Matplotlib 축 스케일 지정하기
11. Matplotlib 여러 곡선 그리기
12. Matplotlib 그리드 설정하기
13. Matplotlib 눈금 표시하기
14. Matplotlib 타이틀 설정하기
15. Matplotlib 수평선/수직선 표시하기
16. Matplotlib 막대 그래프 그리기
17. Matplotlib 수평 막대 그래프 그리기
18. Matplotlib 산점도 그리기
19. Matplotlib 3차원 산점도 그리기
20. Matplotlib 히스토그램 그리기
21. Matplotlib 에러바 그리기
22. Matplotlib 파이 차트 그리기
23. Matplotlib 히트맵 그리기
24. Matplotlib 여러 개의 그래프 그리기
25. Matplotlib 컬러맵 설정하기
26. Matplotlib 텍스트 삽입하기
27. Matplotlib 수학적 표현 사용하기
28. Matplotlib 그래프 스타일 설정하기
29. Matplotlib 이미지 저장하기
30. Matplotlib 객체 지향 인터페이스 1
31. Matplotlib 객체 지향 인터페이스 2
32. Matplotlib 축 위치 조절하기
33. Matplotlib 이중 Y축 표시하기
34. Matplotlib 두 종류의 그래프 그리기
35. Matplotlib 박스 플롯 그리기
36. Matplotlib 바이올린 플롯 그리기
37. Matplotlib 다양한 도형 삽입하기
38. Matplotlib 다양한 패턴 채우기

 

반응형
반응형

 

The Go programming language enters the top 10

 

TIOBE Index for February 2024

 

https://www.tiobe.com/tiobe-index/

 

TIOBE Index - TIOBE

Home » TIOBE Index TIOBE Index for February 2024 February Headline: The Go programming language enters the top 10 This month, Go entered the TIOBE index top 10 at position 8. This is the highest position Go has ever had. When it was launched by Google in

www.tiobe.com

 

반응형
반응형

IT 리더들은 업무를 성공적으로 수행하기 위해 기술 능력 이상의 것이 필요하다는 사실을 안다. 여기에는 일반적인 비즈니스 통찰력, 업계 지식, 회계 능력뿐만 아니라 마케팅, 운영, 사이버 보안 및 기타 기능 영역에 대한 전문 지식도 포함된다. 이를 갖추는 것이 최근 몇 년간 베테랑 CIO, 경영 고문, 경영 컨설턴트들이 전하는 조언이었다.

그러나 이러한 조언은 CIO가 IT 부서를 성공적으로 관리하기 위해 필요한 것, 다시 말해 운영의 효율성을 높이고 주요 성과 요구 사항을 충족하는 데 필요한 사항만을 다룬다. 진정으로 두각을 나타내려면 다른 최고 경영진과 마찬가지로 리더십을 발휘할 줄 알아야 한다.

베테랑 CIO와 경영진 리더십 전문가가 오늘날 뛰어난 IT 리더가 되기 위해 필요한 필수적 특성을 소개했다.

1. 뛰어난 IT 리더가 제공하는 것
비전을 제시하는 리더십이 관리, 즉 업무 달성과 동의어는 아니지만 진정한 IT 리더는 실제로 “IT 비즈니스에 능숙한 사람”이라고 IT 관리 및 리더십 연구소의 전무이사이자 정보 관리 협회(SIM) 리더십 연구소 소속인 에릭 블룸은 말했다.

뛰어난 IT 리더는 IT 예산, 프로젝트, 인력 요구 사항 등을 관리하는 데 탁월한 역량을 발휘할 수 있다. 이들은 IT 포트폴리오 내의 각종 기술에 대해 깊지는 않아도 어느 정도 이해하며, IT 가 사이버 보안 및 조직의 다른 기능 영역과 어떻게 상호 연관되는지 파악한다.

블룸은 탁월한 업무 성과가 뛰어난 IT 리더의 기반이 되는 이유에 대해 설명했다. 그에 따르면 첫째는 IT 직원들이 기술 능력을 존중하기 때문이고, 둘째는 관리자와 경영진이 직원들의 기술적 성장을 도울 수 있기 때문이다. 셋째는 IT 관리자와 경영진이 이러한 지식을 통해 팀의 역량과 한계를 이해하고 지식을 바탕으로 직원들이 현업에서 탁월한 성과를 내도록 지원하는 동시에 수행 불가능한 업무를 맡지 않도록 보호할 수 있기 때문이다. 

블룸은 “IT 리더는 기술과 팀의 역량을 바탕으로 무엇을 할 수 있는지 알고 있다. 이를 통해 팀을 성공으로 이끌 수 있다”라며 이것이 진정한 리더십의 특징이라고 설명했다.

2. 탁월한 의사 소통 능력
수년 동안 CIO는 탁월한 커뮤니케이션 기술이 필요하다는 말을 들어왔다. 블룸과 다른 이들은 그 어느 때보다 오늘날 커뮤니케이션 기술의 필요성이 커졌다고 말하며 이유를 설명했다.

우선 대다수는 아니더라도 많은 CIO가 지리적으로 분산되고 원격으로 근무하는 인력을 이끈다. 이들 역시 원격으로 분산돼 근무하는 경영진의 일원이다.

게다가 CIO는 이제 IT 팀부터 비즈니스 프로젝트 담당자, 최고 경영진, CEO, 이사회 구성원, 때로는 외부 고객 및 파트너까지 더 넓은 범위의 이해관계자를 참여시켜야 한다. 그리고 각 그룹이 모두 이해하고 수용할 수 있는 방식으로 기술 로드맵과 비전을 브리핑해야 한다.

블룸은 “IT를 위한 최적의 비전을 마련할 수 있더라도 동기 부여를 원하는 대상에게 이를 명확히 전달하지 못하면 비전은 귀에 들어가지 않을 것”이라며 CIO가 훨씬 더 의도적이고 세심한 상호 작용 방법을 수립해야 한다고 말했다.

한편 인포테크 리서치 그룹은 IT 리더를 위한 뛰어난 커뮤니케이션 기술의 중요성을 수치화해 발표했다. 연구 결과에 따르면 커뮤니케이션이 10% 증가할 때마다 IT에 대한 이해관계자의 만족도가 8.6% 증가했다.

3. 다른 사람에게 영향력 행사
리더십 자문 회사 러셀 레이놀즈 어소시에이츠의 CIO 실무 리더인 에릭 시구르드손은 뛰어난 IT 리더가 커뮤니케이션 기술을 사용해 정보를 교환하고 영향력을 행사하는 방법을 알고 있다고 말했다.

물론 영향력 행사는 모든 분야의 리더에게 오랫동안 요구돼 온 역량이다. 하지만 시구르드손은 기업의 성공에 있어 기술의 기여도가 급격이 증가했기 때문에 IT 경영진에게 영향력이 더 중요한 역량이 됐다고 설명했다.

예를 들어 그는 점점 더 많은 CIO가 직접 CEO에게 보고하며 다른 최고 경영진과 동등한 위치에서 일하고 있다면서, “문제를 해결하기 위해 상사에게 갈 수는 없기 때문에 동료들에게 영향력을 행사할 수 있어야 한다. 수평적으로 문제를 해결해야 한다”라고 말했다.

마찬가지로 오늘날 CIO는 IT 외부의 결과물, 즉 디지털 및 기술 지원 비즈니스 이니셔티브에 대해 더 많은 책임을 맡고 있으며, 이러한 여정에 다른 경영진과 팀을 참여시킬 것을 요구받고 있다.

시구르드손은 “따라서 CIO가 성공하려면 가르치는 것뿐만 아니라 의미 있는 주제에 대해 다른 고위 리더들과 소통하고 동료들과 함께 도전적인 절충안을 모색할 수 있어야 한다”라고 덧붙였다.

4. 강한 자기 주장
SIM 리더십 인스티튜트의 전무 이사 짐 나이트는 뛰어난 IT 리더의 또 다른 특징으로 자기 주장을 꼽았다.

그는 “오늘날 여전히 많은 IT 담당자가 비즈니스에 종속돼 있다고 생각한다. 그러나 이해되지 않는 비즈니스 요구 사항이라면 밀어붙일 수 있어야 한다. 이는 비즈니스 통찰력, 비즈니스에 대한 이해, 업계에 대한 이해와 함께 프로젝트의 비즈니스 가치를 이해할 수 있는 역량과도 밀접한 관련이 있다”라고 말했다.

나이트는 자기 주장이 비협조적이거나 독단적이거나 공격적인 태도를 취하는 것이 아니며, IT 부서가 ‘아니오’ 부서로 여겨지던 시절로 돌아가는 것도 아니라고 말했다. 그는 “옳은 일에 자신을 투입하고 이를 전문적인 방식으로 수행하는 것이며, 문제에 대해 대화하자고 말하는 것이다. 그러기 위해서는 자신감, 즉 IT 기술과 비즈니스 기술에 대한 자신감이 필요하다”라고 언급했다.

나이트에 따르면 단호한 CIO는 예를 들어 비현실적인 프로젝트 기한이나 실행 불가능한 전략에 대한 요구를 자신 있게 밀어붙일 수 있으며, 커뮤니케이션과 영향력 있는 기술을 사용해 다른 사람들을 자신의 관점으로 전환시킬 수 있다. 

또한 그는 “이러한 CIO라면 지식을 활용해 요점을 전달하고 무엇이 효과가 없는지 설명하며, 다른 사람들에게 할 수 있는 경로와 추가 예산이나 시간 등 어떤 지원이 필요한지 보여주는 것을 두려워하지 않는다”라고 덧붙였다.

5. 다른 이들에 대한 믿음
또한 뛰어난 IT 리더는 다른 사람의 능력을 인정한다.

오랜 IT 임원이자 피닉스대학교의 CIO인 제이미 스미스는 이를 “사람을 긍정적으로 대하는 것”이라고 불렀다. 그는 “팀과 팀의 능력을 믿고 최고의 성과를 내도록 돕는 것”이라며 이를 위해 관리자와 경영진이 “전설의 체스 선수인 바비 피셔처럼 모든 체스 말을 옮길 것이 아니라 업무를 수행하는 팀이 문제를 잘 해결할 수 있다는 점을 이해해야 한다”라고 지적했다.

또한 스미스는 “IT 업무의 복잡성은 점점 더 커지고 있기 때문에 IT 관리자와 경영진이 더는 명령하고 통제하기 어렵다. 이를 인식하는 것이 누가 가장 성공할 수 있는 지에 대한 차별화 요소가 될 것”이라고 설명했다. 

그는 대학에서 CIO로 재직하던 초기, 데이터센터에서 클라우드로 마이그레이션하는 작업을 진행하다 시스템이 중단됐던 경험을 언급했다. 그는 “아직 비교적 익숙하지 않은 팀과 함께 있었는데, 그들은 계속해서 ‘20분만 더 달라’라고 말했다. 이때 ‘알겠다’라고 답해야만 했다. 그들을 믿는다는 것을 보여줬고, 덕분에 그들이 나를 신뢰하고 지지할 수 있었다”라고 말했다.

6. 사실이 부족할 때에도 내릴 수 있는 의사 결정
기술은 무서운 속도로 발전하고 있으며, IT는 물론 조직 전체가 이에 발맞춰 빠르게 움직일 수 있어야 한다.

스미스는 “오늘날의 리더가 되려면 확실한 정보 없이도 빠르고 복잡한 의사결정을 내리는 역량을 갖춰야 하며, 불확실한 환경에서 정보 없이 높은 수준의 판단을 할 수 있어야 한다”라고 말했다.

그는 이 부분을 설명하기 위해 생성형 AI 같은 신흥 기술을 둘러싼 상황을 예로 들었다. 기술이 시장에 출시될 때 제한된 정보로 좋은 전략을 수립한 CIO는 조직을 미래로 이끄는 데 성공한 반면, “결정을 내리기 전에 많은 세부 정보가 필요했던 사람들은 따라잡는 데 어려움을 겪고 있다”라고 스미스는 설명했다.

하지만 그는 좋은 결정을 빨리 내리는 것이 전부는 아니며 조치를 위해 적절한 안전망을 구축하는 것도 중요하다고 언급했다.

이를테면 스미스는 애자일 개발 원칙과 반복적인 전달을 통해 빠르게 결정하고 잠재적인 실패의 영향 범위를 최소화하는 CIO가 뛰어난 리더라고 말했다. 이러한 접근 방식을 통해 올인하지 않고도 학습하고 테스트할 수 있기 때문이다. 그는 “실험을 해보고 잘 안되면 다시 돌아올 수 있다”라며 이러한 전략이 사람들에게 IT 리더의 결정을 따를 수 있는 확신을 준다고 말했다.

7. 팀에 집중
연사, 컨설턴트, 저술가이자 베브케이앤코(BevKaye&Co)의 설립자인 베브 케이는 리더가 모든 시간을 자신에게만 집중하는 것이 아니라고 말했다.

케이는 리더가 자신이 이끄는 사람들을 알아가는 데에도 상당한 에너지를 소비한다고 설명했다. 이들은 무엇이 팀원 개개인에게 동기를 부여하고 무엇이 가장 중요한지 알고 있다. 또한 이들은 자신의 강점과 전략적 비전을 실현하는 데 가장 잘 기여하는 방법을 알고 있다.

케이에 따르면 리더는 기술 및 비즈니스 문제를 해결할 때와 마찬가지로 팀과의 관계 구축에도 호기심을 가져야 한다. 이러한 리더는 팀원들에게 추가 정보 및 자세한 내용을 요청하기 마련이다. 상사로서 이들은 팀원들의 생각을 더 잘 이해하기 위해 질문을 던지고, 이를 통해 팀원들을 더 잘 지원할 수 있다. 또한 바디 랭귀지나 회의실 분위기 등의 신호를 포착하고 사람들이 실제로 어떻게 느끼는지 파악하며, 잠시 회의를 멈춰 문제의 원인이 무엇인지 깨닫도록 도울 수 있다. 

케이는 “이 모든 것이 호기심과 관련이 있다. 이는 자신의 팀에 대한 호기심에서 비롯된다”라고 덧붙이면서, 오늘날 최고의 리더들이 자신의 학습 여정을 공유하고 성장을 돕거나 지켜본다고 말했다.

8. 호기심이 많으며 학습한 내용에 빠르게 적응
시구르드손은 뛰어난 IT 리더가 높은 IQ와 EQ(감성 지수)를 갖고 있을 뿐만 아니라 학습에 대한 열정도 있다고 말했다. 즉 그들에겐 높은 학습 지수(LQ)가 있다.

그는 성장 추구와 그에 따른 학습에 상응하는 변화 의지를 통해 IT 부서든 다른 부서든 관리자와 리더가 자신과 팀이 나아가야 할 목표와 목표를 달성하는 방법을 결정할 수 있다고 언급했다.

시구르드손은 “뒤처지지 않기 위해서는 EQ와 IQ 외에 평생 학습에 대한 노력이 중요하다”라며, IT 임원은 자신의 LQ와 커뮤니케이션 기술 및 영향력을 결합해 다른 사람들이 자신의 학습 과정을 따르도록 해야 한다고 말했다.

9. 변화에 긍정적인 관점
많은 IT 임원이 변화 관리 계획을 수립하고 실행할 수 있지만, 진정한 리더는 실제로 변화를 기회로 여기고 다른 사람들도 긍정적으로 볼 수 있도록 돕는다.

스미스는 “변화가 빠를수록 기회도 늘어난다. 최선의 노력에도 불구하고 항상 일이 잘 풀리는 것은 아니지만 그러한 장애물도 배우고 성장하는 기회가 될 수 있다는 사실을 믿어야 한다”라고 말했다.

그는 대부분의 리더십 특성과 마찬가지로 변화에 대한 이러한 관점이 자연스럽게 주어지는 것이 아니라 의도된 연습과 경험을 통해 얻어지는 것임을 인정했다. 하지만 그는 변화를 관리할 뿐만 아니라 변화를 포용하고 다른 사람들도 이를 따르도록 하는 역량을 키워야 진정한 리더십을 발휘할 수 있다고 말했다. 

반응형
반응형

https://devjorgecastro.medium.com/modern-android-development-in-2024-b70f194938bd

 

Hello everyone 👋🏻, we are kicking off a new year, and I don’t want to miss this chance to share with you an article titled Modern Android Developmentin its 2024 version. 🚀

If you missed my previous article, you can take a look at Modern Android Development in 2023 and review the changes for this year

Disclaimer

📝 This article reflects my personal opinions and professional insights, considering diverse viewpoints within the Android developer community. Additionally, I regularly review the guidelines presented by Google for Android.

🚨 It is crucial to emphasize that while I may not explicitly mention certain compelling tools, patterns, and architectures, this omission does not negate their potential as valuable alternatives for developing Android applications.

Use Kotlin everywhere ❤️

Kotlin is a programming language developed by JetBrains. Recommended by Google who officially announced it in May 2017 (see publication here). It is a modern programming language that has compatibility with Java and can run on the JVM, which has made its adoption in the development of Android applications very fast.

Whether you are new to Android or not, you should consider Kotlin as your first choice, don’t swim against the tide 🏊🏻 😎, Google announced this approach at Google I/O 2019. With Kotlin, you will be able to use all the features of a modern language, including the power of Coroutines and the use of modern libraries developed for the Android ecosystem.

Official kotlin documentation here

Kotlin is a multipurpose language that we can use not only for developing Android applications, although much of its popularity has been due to the latter, as we can see in the following graph.

KotlinConf ‘23

Kotlin 2.0 is here

Another important thing to highlight is the release of Kotlin 2.0, which is just around the corner. As of the article’s date, it’s in its version 2.0.0-beta3

The new K2 compiler is also another addition in Kotlin 2.0, which will bring significant performance improvements, accelerate the development of new language features, unify all platforms supported by Kotlin, and provide a better architecture for multiplatform projects.

Check out the recap of KotlinConf ’23 where you can find more information.

Compose 🚀

Jetpack Compose is Android’s recommended modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.

 Jetpack Compose documentacion

Jetpack Compose is part of the Android Jetpack library and uses the Kotlin programming language to easily create a native user interface. Also, it integrates with other Android Jetpack libraries, such as LiveData and ViewModel, to make it easier to build reactive and maintainable Android applications.

Some key features of Jetpack Compose include:

  1. Declarative UI.
  2. Customizable widgets.
  3. Easy integration with existing code (old view system).
  4. Live preview.
  5. Improved performance.

Resources:

Android Jetpack ⚙️

Jetpack is a suite of libraries to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices so that developers can focus on the code they care about.

_ Android Jetpack documentation

Some of its most common tools are:

Material You / Material Design 🥰

Material You, a new customization feature introduced in Android 12 and implemented within Material Design 3, empowers users to tailor the visual appearance of their operating system to align with their personal preferences. This innovative addition complements Material Design, an adaptable system of guidelines, components, and tools crafted to uphold the highest standards of user interface design. Supported by open-source code, Material Design fosters seamless collaboration between designers and developers, enabling teams to efficiently create stunning products.

Currently, the last version for Material Design is 3, you can see more here. Furthermore, you can take advantage of Material Theme Builder as assistance in defining your application’s theme.

 

Splash screens API

The SplashScreen API in Android is essential to ensure that applications display correctly on Android 12 and later versions. Not updating can impact the application launch experience. It is crucial to quickly adopt this API for a consistent user experience on the latest versions of the operating system.

 

Clean Architecture

The concept of Clean Architecture was introduced by Robert C. Martin. It is based on the separation of responsibilities through the division of software into layers.

Characteristics

  1. Independent of Frameworks.
  2. Testable.
  3. Independent of UI.
  4. Independent of Database.
  5. Independent of any external agency.

The Dependency Rule

The dependency rule is described very well by the author in his piece, The Clean Code Blog

The overriding rule that makes this architecture work is The Dependency Rule. This rule says that source code dependencies can only point inwards. Nothing in an inner circle can know anything at all about something in an outer circle. In particular, the name of something declared in an outer circle must not be mentioned by the code in the an inner circle. That includes, functions, classes. variables, or any other named software entity.

 The Clean Code Blog

Clean Architecture in Android

  • Presentation: Activities, Composables, Fragments, View Models and others view components.
  • Domain: Use Cases, Entities, Repositories, others domain components.
  • Data: Repository implementations, Mappers, DTO’s, etc.

Architecture Patterns for Presentation Layer

An architecture pattern is a higher-level strategy that aims to help design a software architecture and is characterized by being a solution within a reusable framework for common architectural problems. Architectural patterns are similar to design patterns, but they are larger in scale and address more global issues such as the overall structure of the system, the relationships between components, and the way that data is managed.

Within the Presentation layer, we have some architecture patterns, of which I would like to highlight the following:

  • MVVM
  • MVI

I do not want to go into explaining each one because on the internet you find too much information about this. 😅

In addition, you can also see the guide to app architecture

Image by developer.android.com
 

Dependency Injection

Dependency injection is a software design pattern that allows a client to obtain its dependencies from an external source rather than creating them itself. It is a technique for achieving Inversion of Control (IoC) between objects and their dependencies.

Modularization

Modularization is a software design technique that allows you to divide an application into independent modules, each with its own functionality and responsibility.

Image by developer.android.com

Benefits of modularization

Reusability: By having independent modules, they can be reused in different parts of the application or even in other applications.

Strict visibility control: Modules enable you to easily control what you expose to other parts of your codebase.

Customizable delivery: Play Feature Delivery uses the advanced capabilities of app bundles, allowing you to deliver certain features of your app conditionally or on demand.

Scalability: By having independent modules, functionalities can be added or removed without affecting other parts of the application.

Ease of maintenance: By dividing the application into independent modules, each with its own functionality and responsibility, it is easier to understand and maintain the code.

Ease of testing: By having independent modules, they can be tested in isolation, which makes it easy to detect and fix errors.

Architecture improvement: Modularizing helps to improve the architecture of the application, allowing a better organization and structure of the code.

Improve collaboration: By having independent modules, developers can work on different parts of the application simultaneously and without interference.

Build Time: Some Gradle functionalities such as incremental build, build cache or parallel build, can leverage modularity to improve build performance.

See more in the official documentation.

Network

Serialization

In this section I would like to mention two important tools in my opinion: Moshi widely used in conjunction with Retrofit and Kotlin Serialization, the Kotlin team’s bet at JetBrains.

Moshi and Kotlin Serialization are two serialization/deserialization libraries for Kotlin and Java that allow you to convert objects to JSON or another serialization format and vice versa. Both provide a user-friendly interface optimized for use in mobile and desktop applications. Moshi primarily focuses on JSON serialization, while Kotlin Serialization has support for various serialization formats, including JSON.

Image Loading

To load an image from the internet, there are several third-party libraries available to help you handle the process. Image loading libraries do a lot of the heavy lifting for you; they handle both caching (so you don’t download the image multiple times) and networking logic to download the image and display it on screen.

_ Official Android Documentation

Reactivity / Thread Management

When it comes to reactive programming and asynchronous processes, Kotlin Coroutines stand out with their Suspension Functions and Flow. However, it is crucial to acknowledge the value of RxJava in Android application development. Despite the growing adoption of Coroutines and Flow, RxJava remains a robust and popular choice in multiple projects.

For new projects always choose Kotlin Coroutines❤️. Explore some Kotlin Coroutines Concepts

 

Local Store

An important point when building mobile applications is having the ability to persist data locally, such as some session data or cache data, among others. It is important to choose the right storage option based on the needs of your application. We could store unstructured data like key-value or structured data like a database. Keep in mind that this point does not mention all the types of local storage that we have available (such as file storage), only the tools that allow us to save data.

Suggestions:

 

Testing 🕵🏼

Testing in software development is essential to ensure product quality. It detects errors, validates requirements, and ensures customer satisfaction. Below are some of the most commonly used tools for this purpose:

Testing section of the Tools documentation

Screenshot testing 📸

Screenshot testing in Android involves automatically capturing screenshots of various UI elements in an application and comparing them against baseline images to detect any unintended visual changes. It helps ensure consistent UI appearance across different versions and configurations of the app, catching visual regressions early in the development process.

 

R8 optimizations

R8 is the default compiler that converts your project’s Java bytecode into the DEX format that runs on the Android platform. It is a tool that helps us to obfuscate and reduce the code of our application by shortening the names of the classes and their properties, eliminating unused code and resources within the project. To see more, check the Android documentation about Shrink, obfuscate, and optimize your app. Additionally, you can also disable certain tasks or customize R8’s behavior through ProGuard rules files.

Image by androidtopics.dipien.com
  • Code shrinking
  • Resource shrinking
  • Obfuscation
  • Optimization

Third-party tools

  • DexGuard

Play Feature Delivery

Google Play’s app serving model, called Dynamic Delivery, uses Android App Bundles to generate and serve optimized APKs for each user’s device configuration, so users download only the code and resources they need to run your app.

 Android Documentation

Adaptive layouts

Image by android-developers.googleblog.com

With the growth in the use of mobile devices with different form factors, we need to have tools that allow us to work with our Android applications adapted to different types of screens. That is why Android provides us with Window Size Classes, which, in a simple way, are three large groups of screen formats that mark critical points for us to develop our designs. With this we avoid the complexity of thinking about many screen designs to reduce our possibilities to 3 groups which are: Compat, Medium and Expanded.

Windows Size Classes

Image by developer.android.com
Image by developer.android.com

Support different screen sizes

Another important resource that we have are the Canonical Layouts, which are predefined screen designs that can be used for most scenarios in our Android applications and also show us a guide on how to adapt them to large screens.

Other related resources

Form-Factor Training

Localization 🌎

Localization involves adapting a product to meet the needs of diverse audiences in different regions. This includes translating text, adjusting formats, and considering cultural aspects. Its advantages include access to global markets, enhanced user experience, increased customer satisfaction, competitiveness in the global market, and compliance with local regulations.

Note: BCP 47 is a standard used by Android for internationalization

References

Performance 🔋⚙️

Image by android-developers.googleblog.com

While we develop applications for Android, we must ensure that the user experience is better, not only at the beginning of the application but also throughout its execution. For this reason, it is important to have tools that allow us to carry out a preventive analysis and constant monitoring of cases that may affect the performance of the application, so here is a list of tools that will help you with this purpose:

In-App Updates

When your users keep your app up to date on their devices, they can try new features, as well as benefit from performance improvements and bug fixes. Although some users enable background updates when their device is connected to an unmetered connection, other users might need to be reminded to install updates. In-app updates is a Google Play Core libraries feature that prompts active users to update your app.

The in-app updates feature is supported on devices running Android 5.0 (API level 21) or higher. Additionally, in-app updates are only supported for Android mobile devices, Android tablets, and Chrome OS devices.

 In-App Updates documentation

Image by developer.android.com

In-App Reviews

The Google Play In-App Review API lets you prompt users to submit Play Store ratings and reviews without the inconvenience of leaving your app or game.

Generally, the in-app review flow can be triggered at any time throughout the user journey of your app. During the flow, the user has the ability to rate your app using the 1 to 5 star system and to add an optional comment. Once submitted, the review is sent to the Play Store and eventually displayed.

To protect user privacy and avoid API misuse, there are strict guidelines that your app should follow about when to request in-app reviews and the design of the review prompt.

 In-App Reviews documentation

Observability 👀

Image taken from Elastic Blog

In an increasingly competitive app ecosystem, achieving a good user experience begins with ensuring that the app is bug-free. One of the best ways to ensure that the app is bug-free is to immediately detect issues as they arise and know how to start addressing them. Use Android Vitals to identify the areas of your app that have the most crashes and issues with responsiveness. Then, utilize custom crash reports in Firebase Crashlytics to get more details about the root causes in order to troubleshoot the issues effectively.

Tools

Accessibility

Image by fscl01.fonpit.de

Accessibility is an important feature in the design and construction of software that provides the ability for people with accessibility needs to use the application, in addition to improving their user experience. Some disabilities that this concept aims to improve are: people with vision problems, color blindness, hearing problems, dexterity problems, and cognitive disabilities, among others.

Considerations:

  • Increase text visibility (Color contrast, Resizable Text)
  • Use large, simple controls
  • Describe each UI element

Check Accessibility — Android doc.

Security 🔐

Image by android.com

Security is one, if not the most important aspect, that we must take into account when developing applications that protect the integrity of the device, the security of the data, and the trust of the user, which is why I list below a series of tips that will help you with this purpose.

  • Sign in your user with Credential Manager: Credential Manager is a Jetpack API that supports multiple sign-in methods, such as username and password, passkeys, and federated sign-in solutions (such as Sign-in with Google) in a single API, thus simplifying the integration for developers.
  • Encrypt sensitive data and files: Use EncryptedSharedPreferences and EncryptedFile.
  • Apply signature-based permissions: Use signature-based permissions when sharing data between apps you have control over.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myapp">
    <permission android:name="my_custom_permission_name"
                android:protectionLevel="signature" />
  • Do not put keys, tokens, or sensitive data required for your application’s configuration directly inside files or classes that are inside the project repository. Use local.properties instead.
  • Implement SSL Pinning: Use SSL Pinning to further secure communications between your application and remote servers. This helps prevent man-in-the-middle attacks and ensures that communication only occurs with trusted servers possessing a specific SSL certificate.

res/xml/network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config>
        <domain includeSubdomains="true">example.com</domain>
        <pin-set expiration="2018-01-01">
            <pin digest="SHA-256">ReplaceWithYourPin</pin>
            <!-- backup pin -->
            <pin digest="SHA-256">ReplaceWithYourPin</pin>
        </pin-set>
    </domain-config>
</network-security-config>
  • Implementa Runtime Application Self Protection (RASP): It is a security technique that protects applications at runtime against attacks and vulnerabilities. RASP works by monitoring the application’s behavior and detecting suspicious activities that could indicate an attack. some of the advantages that RASP provides us:

    - Code Obfuscation.
    - Root Detection.
    - Tampering/App Hook Detection.
    - Prevention of reverse engineering attacks.
    - Anti-Debugging Techniques.
    - Virtual Environment Detection.
    - Runtime Analysis of App Behavior.

Look at this article for more information: Runtime Application Self Protection techniques(RASP) in Android Apps. Also some Security guidelines by Android

Version Catalogs

Gradle provides a standard way to centrally manage project dependencies called the version catalog; it was experimentally introduced in version 7.0 and officially released in version 7.4.

Advantage:

  • For each catalog, Gradle generates type-safe accessors so that you can easily add dependencies with autocompletion in the IDE.
  • Each catalog is visible to all projects of a build. It is a central place to declare a version of a dependency and to make sure that a change to that version applies to every subproject.
  • Catalogs can declare dependency bundles, which are “groups of dependencies” that are commonly used together.
  • Catalogs can separate the group and name of a dependency from its actual version and use version references instead, making it possible to share a version declaration between multiple dependencies.

see more

Secrets Gradle Plugin

Google strongly recommends that you not check an API key into your version control system. Instead, you should store it in a local secrets.properties file, which is located in the root directory of your project but excluded from version control, and then use the Secrets Gradle Plugin for Android to read the API key.

Logger

A logger is a software tool used to register information about the execution of a program; important events, errors debug messages and other information that may be useful in diagnosing problems or understanding how a program is working. Loggers can be configured to write messages to different locations, such as a log file, to the console, to a database, or by sending the messages to a logging server.

Linter / Static Code Analyzer

Image taken from https://miro.medium.com/

Linter is a programming tool that is used to analyze the program source code to find potential problems or bugs in the code. These issues can be syntactic, inappropriate code style, lack of documentation, security issues, and so on, and they can have an impact on the quality and maintainability of the code.

Google Play Instant

Google Play Instant enables native apps and games to launch on devices running Android 5.0 (API level 21) or higher without being installed. You can build these types of experiences, called instant apps and instant games, using Android Studio. By allowing users to run an instant app or instant game, known as providing an instant experience, you improve your app or game’s discovery, which helps drive more active users or installations.

 Overview of Google Play Instant

 

New Design Hub

The Android team provides a new design hub to help create beautiful, modern Android apps, a centralized place to understand design for Android across multiple form factors.

d.android.com/design/ui

 

AI

Gemini and PalM 2, two state-of-the-art artificial intelligence (AI) models developed by Google, are poised to transform the landscape of Android application development. These models offer a range of benefits that will drive efficiency, user experience, and innovation in applications.

AI Coding Assistant Tools

Studio Bot

Studio Bot is your coding companion for Android development. It’s a conversational experience in Android Studio that helps you be more productive by answering Android development queries. It’s powered by artificial intelligence and can understand natural language, so you can ask development questions in plain English. Studio Bot can help Android developers generate code, find relevant resources, learn best practices, and save time.

 Studio Bot

Github Copilot

GitHub Copilot is an AI pair programmer. You can use GitHub Copilot to get suggestions for whole lines or entire functions right inside your editor.

Amazon CodeWhisperer

It is an Amazon service that generates code recommendations based on the context of your current code. It helps you write more efficient and secure code, and discover new APIs and tools.

 

Kotlin Multiplatform 🖥 📱⌚️ 🥰 🚀

Finally, and equally significant, the standout revelation of the year is Kotlin Multiplatform 🎉. It emerges as a formidable contender in the realm of cross-platform application development. While our primary focus may lie in Android app development, Kotlin Multiplatform offers us the flexibility to craft a fully native Android application leveraging the KMP framework. This strategic move not only future-proofs our projects but also equips us with the necessary infrastructure for a seamless transition to a multiplatform environment, should we choose to pursue it. 🚀

If you’re keen on delving deeper into Kotlin Multiplatform, I’d like to share a couple of articles I wrote a few months ago. In these pieces, I explore the current state of this technology and its implications for modern software development

반응형

+ Recent posts