Kotlin Programming by Example : Build Real-World Android and Web Applications the Kotlin Way.
Material type:
- text
- computer
- online resource
- 9781788479783
- 004.165
- QA76.59 .A345 2018
Cover -- Copyright and Credits -- Dedication -- Packt Upsell -- Contributors -- Table of Contents -- Preface -- Chapter 1: The Fundamentals -- Getting started with Kotlin -- JDK installation -- Installation on Windows -- Installation on macOS -- Installation on Linux -- Compiling Kotlin programs -- Working with the command-line compiler -- Installing the command-line compiler on macOS -- Homebrew -- MacPorts -- Installing the command-line compiler on Linux -- SDKMAN! -- Installing the command-line compiler on Windows -- Running your first Kotlin program -- Writing scripts with Kotlin -- Using the REPL -- Working with an IDE -- Installing IntelliJ IDEA -- Setting up a Kotlin project with IntelliJ -- The fundamentals of the Kotlin programming language -- Kotlin basics -- Variables -- Variable scope -- Local variables -- Operands and operators -- Types -- Int -- Float -- Double -- Boolean -- String -- Char -- Array -- Functions -- Declaring functions -- Invoking functions -- Return values -- The function naming convention -- Comments -- Single-line comments -- Multiline comments -- Doc comments -- Controlling program flow -- Conditional expressions -- The if expression -- The when expression -- The Elvis operator -- Loops -- The for loops -- The while loops -- The break and continue keywords -- The do…while loops -- Packages -- The import keyword -- Object-oriented programming concepts -- Introduction -- Working with classes -- Creating objects -- Companion objects -- Properties -- Advantages of Kotlin -- Developing Android applications with Kotlin -- Setting up Android Studio -- Building your first Android application -- Creating a user interface -- Running the application -- Fundamentals of the web -- What is the web? -- Hypertext Transfer Protocol -- Clients and servers -- HTTP requests and responses -- HTTP methods -- Summary.
Chapter 2: Building an Android Application - Tetris -- Android - an overview -- Application components -- Activities -- Intents -- Intent filters -- Fragments -- Services -- Loaders -- Content providers -- Understanding Tetris -- Creating the user interface -- Implementing the layouts -- ConstraintLayout -- Margins -- Chains -- Dimension constraints -- Defining dimension resources -- Views -- View groups -- Defining string resources -- Handling input events -- Event listeners -- Working with SharedPreferences -- Implementing the game activity layout -- The app manifest -- Structure of the app manifest file -- < -- action> -- -- < -- activity> -- -- < -- application> -- -- < -- category> -- -- < -- intent-filter> -- -- < -- manifest> -- -- Summary -- Chapter 3: Implementing Tetris Logic and Functionality -- Implementing the Tetris gameplay -- Modeling a tetromino -- Characteristics of a block -- Behaviors of a block -- Modeling block shape -- Private access modifier (private) -- Public access modifier (public) -- Protected access modifier (protected) -- Internal visibility modifier (internal) -- Creating the application model -- Creating TetrisView -- Implementing ViewHandler -- Implementing Dimension -- Implementing TetrisView -- Finishing up GameActivity -- Introduction to Model-View-Presenter (MVP) -- What is MVP? -- Model -- View -- Presenter -- Varying implementations of MVP -- Summary -- Chapter 4: Designing and Implementing the Messenger Backend with Spring Boot 2.0 -- Designing the messenger API -- Application programming interfaces -- REST -- Designing the messenger API system -- Incremental development -- Spring Boot -- What the messenger system does -- Use cases -- System behavior -- Identifying data -- Implementing the messenger backend -- PostgreSQL -- Installing PostgreSQL -- Windows installation.
macOS installation -- Linux installation -- Creating a new Spring Boot application -- Getting familiar with Spring Boot -- Maven -- Creating models -- Creating repositories -- Services and service implementations -- Restricting API access -- Spring Security -- JSON Web Tokens -- Configuring web security -- Accessing server resources via RESTful endpoints -- Deploying the messenger API to AWS -- Setting up PostgreSQL on AWS -- Deploying the messenger API to Amazon Elastic Beanstalk -- Summary -- Chapter 5: Building the Messenger Android App - Part I -- Developing the Messenger app -- Including project dependencies -- Developing the Login UI -- Creating the login view -- Creating the Messenger API service and data repositories -- Storing data locally with SharedPreferences -- Creating value objects -- Retrieving remote data -- Communicating with a remote server -- Communicating with servers using OkHttp -- Sending requests to a server with OkHttp -- Modeling request data -- Creating the Messenger API service -- Implementing data repositories -- Creating the login interactor -- Creating the login presenter -- Finishing the LoginView -- Developing the signup UI -- Creating the signup interactor -- Creating the signup presenter -- Creating the signup view -- Summary -- Chapter 6: Building the Messenger Android App - Part II -- Creating the Main UI -- Creating the MainView -- Creating the MainInteractor -- Creating the MainPresenter -- Wrapping up the MainView -- Creating the MainActivity menu -- Creating the Chat UI -- Creating the chat layout -- Preparing chat UI models -- Creating the ChatInteractor and ChatPresenter -- Creating the application's settings activity -- Android application testing -- Performing background operations -- AsyncTask -- IntentService -- Summary -- Chapter 7: Storing Information in a Database -- Working with internal storage.
Writing files to internal storage -- Reading files from internal storage -- A sample application using internal storage -- Saving cached files -- Working with external storage -- Getting external storage permission -- Asserting media availability -- Storing sharable files -- Caching files with external storage -- Network storage -- Working with a SQLite database -- Working with content providers -- Summary -- Chapter 8: Securing and Deploying an Android App -- Securing an Android application -- Data storage -- Using internal storage -- Using external storage -- Using content providers -- Networking security considerations -- IP networking -- Telephony networking -- Input validation -- Working with user credentials -- Code obfuscation -- Securing broadcast receivers -- Dynamically loading code -- Securing services -- Launching and publishing your Android application -- Understanding the Android developer program policies -- Preparing your Android developer account -- Localization planning -- Planning for simultaneous release -- Testing against the quality guidelines -- Building a release-ready application package (APK) -- Planning your application's Play Store listing -- Uploading your application package to the alpha or beta channel -- Device compatibility definition -- Pre-launch report assessment -- Pricing and application distribution setup -- Distribution option selection -- In-app products and subscriptions setup -- Determining your application's content rating -- Publishing your application -- Signing your application for release -- Releasing your Android app -- Summary -- Chapter 9: Creating the Place Reviewer Backend with Spring -- The MVC design pattern -- The model -- The view -- The controller -- Designing and implementing the Place Reviewer backend -- Use case identification -- Identifying data -- Setting up the database.
Implementing the backend -- Connecting the backend to Postgres -- Creating models -- Creating data repositories -- Place Reviewer business logic implementation -- Securing the Place Reviewer backend -- Serving web content with Spring MVC -- Managing Spring application logs with ELK -- Generating logs with Spring -- Installing Elasticsearch -- Installing Kibana -- Installing Logstash -- Configuring Kibana -- Summary -- Chapter 10: Implementing the Place Reviewer Frontend -- Creating views with Thymeleaf -- Implementing the user registration view -- Implementing the login view -- Setting up the Place Reviewer app with the Google Places API web service -- Getting an API key -- Including Google Places API in your web application -- Implementing the home view -- Implementing the review creation web page -- Spring application testing -- Adding necessary testing dependencies to the project -- Creating a configuration class -- Configuring a test class to use custom configuration -- Writing your first test -- Summary -- What next? -- Other Books You May Enjoy -- Index.
Kotlin greatly reduces source code verbosity; with the recently announced first class support from the Android team, a great opportunity has been created. The book will help you learn how to create apps with Kotlin from scratch and get them up-and-running.
Description based on publisher supplied metadata and other sources.
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2024. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
There are no comments on this title.