ENGLISH

Kickstart Modern Android Development with Jetpack and Kotlin: Enhance your applications by integrating Jetpack and applying modern app architectural concepts

Book information

Publisher
Packt Publishing
Year
2022
ISBN
1801811075, 9781801811071
Language
english
Format
PDF
Filesize
9 MB (9221498 bytes)
Edition
1
Pages
472\472
Time added
2022-05-26 07:59:34

Description

Explore modern Android development in Kotlin 1.6.10 with this condensed hands-on guide to building reliable apps using libraries such as Compose, ViewModel, Hilt, Retrofit, Flow, and more Key FeaturesExplore Jetpack libraries and other modern technologies for Android developmentImprove the architectural design of your Android appsEnhance the quality of your Android projects' code bases and applications using the latest librariesBook Description With Jetpack libraries, you can build and design high-quality, robust Android apps that have an improved architecture and work consistently across different versions and devices. This book will help you understand how Jetpack allows developers to follow best practices and architectural patterns when building Android apps while also eliminating boilerplate code. Developers working with Android and Kotlin will be able to put their knowledge to work with this condensed practical guide to building apps with the most popular Jetpack libraries, including Jetpack Compose, ViewModel, Hilt, Room, Paging, Lifecycle, and Navigation. You'll get to grips with relevant libraries and architectural patterns, including popular libraries in the Android ecosystem such as Retrofit, Coroutines, and Flow while building modern applications with real-world data. By the end of this Android app development book, you'll have learned how to leverage Jetpack libraries and your knowledge of architectural concepts for building, designing, and testing robust Android applications for various use cases. What you will learnIntegrate popular Jetpack libraries such as Compose, ViewModel, Hilt, and Navigation into real Android apps with KotlinApply modern app architecture concepts such as MVVM, dependency injection, and clean architectureExplore Android libraries such as Retrofit, Coroutines, and FlowIntegrate Compose with the rest of the Jetpack libraries or other popular Android librariesWork with other Jetpack libraries such as Paging and Room while integrating a real REST API that supports paginationTest Compose UI and the application logic through unit testsWho this book is for This book is for junior and intermediate-level Android developers looking to level up their Android development skills to develop high-quality apps using Jetpack libraries and other cutting-edge technologies. Beginners with knowledge of Android development fundamentals will also find this book useful. Familiarity with Kotlin is assumed. Table of ContentsCreating Modern UIs with Jetpack ComposeHandling UI state with Jetpack ViewModel Displaying Real Data from a REST API with RetrofitHandling Async Operations with CoroutinesAdding Navigation in Compose with Jetpack NavigationAdding Offline Capabilities with Jetpack RoomIntroducing Presentation Patterns in AndroidGetting Started with Clean Architecture in AndroidImplementing Dependency Injection with Jetpack Hilt Test your app with UI and Unit testsCreating Infinite Lists with Jetpack Paging and Kotlin FlowExploring the Jetpack Lifecycle Components Cover Title Page Dedicated Contributors Table of Contents Preface Copyright and Credits Part 1: Exploring the Core Jetpack Suite and Other Libraries Chapter 1: Creating a Modern UI with Jetpack Compose Technical requirements Understanding the core concepts of Compose Describing UIs with composable functions The paradigm shift in creating UIs on Android Favoring composition over inheritance Unidirectional flow of data Recomposition Exploring the building blocks of Compose UIs Setting content and previewing composables Exploring core composables Customizing composables with modifiers Layouts in Compose Building a Compose-based screen Creating your first Compose project Building a restaurant element layout Displaying a list of restaurants with Compose Exploring lists with Compose Adding scrolling to the Column composable Introducing lazy composables Using LazyColumn to display restaurants Summary Further reading Chapter 2: Handling UI State with Jetpack ViewModel Technical requirements Understanding the Jetpack ViewModel What is a ViewModel? Why do you need ViewModels? Introducing Android Jetpack ViewModel Implementing your first ViewModel Defining and handling state with Compose Understanding state and events Adding state to our Restaurants app Hoisting state in Compose Recovering from system-initiated process death Summary Further reading Exploring ViewModel with runtime-provided arguments Exploring ViewModel for Kotlin Multiplatform projects Understanding how to minimize the number of recompositions Chapter 3: Displaying Data from REST APIs with Retrofit Technical requirements Understanding how apps communicate with remote servers Creating and populating your database with Firebase Exploring Retrofit as an HTTP networking client for Android Using Retrofit Adding Retrofit to the Restaurants application Mapping JSON to model classes Executing GET requests to the Firebase REST API Improving the way our app handles network requests Summary Further reading Chapter 4: Handling Async Operations with Coroutines Technical requirements Introducing Kotlin coroutines What is a coroutine? The features and advantages of coroutines How do coroutines work? Exploring the basic elements of coroutines Creating suspending functions Launching coroutines Using coroutines for async work Implementing coroutines instead of callbacks Improving the way our app works with coroutines Summary Further reading Chapter 5: Adding Navigation in Compose With Jetpack Navigation Technical requirements Introducing the Jetpack Navigation component Creating a new Compose-based screen Defining the HTTP request for the contents of a restaurant Getting the contents of a specific restaurant Building the restaurant details screen Implementing navigation with Jetpack Navigation Adding support for deep links Summary Part 2: A Guide to Clean Application Architecture with Jetpack Libraries Chapter 6: Adding Offline Capabilities with Jetpack Room Technical requirements Introducing Jetpack Room Exploring the caching mechanism on Android Introducing Jetpack Room as a solution for local caching Enabling offline usage by implementing Room Applying partial updates to the Room database Making local data the single source of truth for app content Refactoring the Restaurants app to have a single source of truth for data Removing the logic of persisting state in the case of process recreation Summary Chapter 7: Introducing Presentation Patterns in Android Technical requirements Introducing MVC, MVP, and MVVM as presentation patterns MVC MVP MVVM Refactoring our Restaurants app to fit a presentation pattern Adding more functionality inside our Restaurants app Refactoring our Restaurants app to MVVM Improving state encapsulation in ViewModel Summary Chapter 8: Getting Started with Clean Architecture in Android Technical requirements Defining the Domain layer with Use Cases Separating the Domain model from Data models Creating a package structure Decoupling the Compose-based UI layer from ViewModel Summary Further reading Chapter 9: Implementing Dependency Injection with Jetpack Hilt Technical requirements What is DI? Why is DI needed? Write less boilerplate code Write testable classes Implementing DI with Hilt Understanding the basics of Dagger Hilt Setting up Hilt Using Hilt for DI Summary Further reading Chapter 10: Test Your App with UI and Unit Tests Technical requirements Exploring the fundamentals of testing Understanding the benefits of testing Exploring types of tests Learning the basics of testing your Compose UI Covering the basics of unit-testing your core logic Testing the functionality of a ViewModel class Testing the functionality of a UseCase class Summary Further reading Part 3: Diving into Other Jetpack Libraries Chapter 11: Creating Infinite Lists with Jetpack Paging and Kotlin Flow Technical requirements Why do we need pagination? Importing and exploring the Repositories App Using Kotlin Flow to handle streams of data Exploring pagination with Jetpack Paging Implementing pagination with Jetpack Paging Implementing loading and error states plus retry functionality Summary Further reading Chapter 12: Exploring the Jetpack Lifecycle Components Technical requirements Introducing the Jetpack Lifecycle components ViewModel LiveData Adding a countdown component in the Repositories app Creating your own lifecycle-aware component Making our countdown component aware of the lifecycle of composables Summary Further reading Index Other Books You May Enjoy

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF