The document provides an overview of the traditional UI development approach and introduces the Model-View-ViewModel (MVVM) architectural pattern. It defines the key components of MVVM - the Model, View, and ViewModel - and describes how they interact through data binding, commands, and notifications. The summary highlights MVVM's separation of concerns, support for independent development and testing of components, and facilitation of UI redevelopment.
This document discusses Android AsyncTask, which allows performing long/background operations without threads. It has four main methods: doInBackground runs the long operation, onPostExecute displays results after completion, onPreExecute runs before doInBackground, and onProgressUpdate reports progress. An example AsyncTask downloads files, tracking progress in onProgressUpdate and displaying results in onPostExecute after doInBackground finishes downloading. AsyncTask requires specifying types for parameters, progress, and results.
MVVM or Model - View - ViewModel is a design pattern aimed for modularising your code and build it on a Test Driven Development environment. When Apple's traditional MVC design pattern makes our controllers bulky and our unit tests painful, different design patterns such as MVVM, VIPER, MVP, etc come to our rescue. MVVM comes quite handy as it provides a loosely coupled mechanism between all components segregating your view, business and data logic.
This document provides an overview of mobile development. It discusses key mobile platforms like iOS and Android. For iOS, it covers features of iOS 5, the Xcode development environment, and testing tools. For Android, it discusses the open source nature, features, architecture, Java-based development using Eclipse/Android SDK, and testing framework. It also compares high-level differences between developing for iOS vs Android like required tools and programming languages.
in these slides i have explained the difference between MVC, MVP and MVVM design patterns. slides includes definition, explanation and then implementation with code examples. it is a comparison oriented presentation.
Native automation tooling for mobile application testing.pptxMesut Günes
The document discusses native and non-native mobile automation tools. Native tools like Espresso and XCUITest work directly within a mobile app's codebase and development framework, allowing direct access to app objects. Non-native tools like Appium and Calabash interact with apps through a server, relying on instrumentation libraries. Native tools have benefits like better performance and object handling since they are part of the app, while non-native tools allow black-box testing but with slower server-based interactions. The document advocates using native tools and building cross-functional teams for more efficient test automation.
Albiorix Technology is sharing the top mobile app development frameworks that you can use for mobile app development. It will help you make the app development process easier for your next app development project.
For More Information: https://www.albiorixtech.com/blog/mobile-app-development-frameworks/
#MobileApp #AppDevelopment #WebAppDevelopment #MobileAppDevelopment #SoftwareDevelopment
Fragments allow modular sections of an activity's UI to be reused across activities and configurations. A fragment must be embedded in an activity and shares its lifecycle. Fragments can be added or removed dynamically at runtime and their transactions can be added to a back stack. Activities can combine multiple fragments to build a multi-pane UI on tablets and reuse fragments across activities on handsets. To create a fragment, subclass Fragment and move code from activities into fragment lifecycle methods.
The document describes the Model-View-Controller (MVC) software architectural pattern. MVC separates an application into three main components: the model, the view, and the controller. The model manages the application's data and business logic. The view displays the model's information. The controller interprets inputs from the user and updates the model and/or view accordingly. This separation of concerns makes the application modular, reusable, and maintainable.
This document discusses Microsoft's .NET framework and its confrontation with Sun Microsystems' Java platform. It provides an overview of key aspects of .NET such as the Common Language Runtime (CLR), Microsoft Intermediate Language (MSIL), and support for multiple programming languages. It also compares .NET's approach of targeting a virtual machine to traditional compiled languages that target specific operating systems and hardware configurations.
This document provides an overview of Spring and Spring Boot frameworks. It discusses the history of Java and Spring, how Spring provides inversion of control and dependency injection. It also covers Spring MVC for web applications, Spring Data for data access, and how Spring Boot aims to simplify configuration. The document concludes with discussing some next steps including looking at Spring Security, Spring Cloud, and using Spring with other JVM languages.
The document discusses Spring Boot, a framework for creating stand-alone, production-grade Spring based applications. It describes how Spring Boot allows creating projects quickly with features like embedded servers and auto-configuration. It then covers how to develop a basic Spring Boot web application including creating the project structure with Maven, adding controllers and properties files, and connecting to databases using Spring Data. Overall, the document provides an overview of Spring Boot and guidance on starting a Spring Boot web application project.
Object Oriented Design Principles
~ How to become a SOLID programmer ~
~ A guide to make a well-designed application with Laravel ~
"Proper Object Oriented Design makes a developer's life easy, whereas bad design makes it a disaster"
Fragments allow modular and reusable components in an Android application. They are portions of UI for an activity that have their own lifecycle and can be added or removed during runtime. The key aspects are:
- Fragments were introduced in Android 3.0 but can be used in older versions with the compatibility library.
- Their lifecycle is directly tied to the host activity - pausing/destroying the activity also pauses/destroys fragments.
- They are defined as subclasses of Fragment and implement lifecycle methods like onCreateView to define the UI.
- Fragments can be added to activities declaratively in XML layouts or programmatically using transactions.
SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. It is often used for local/client storage in applications. Key points:
- Created by D. Richard Hipp, it provides a lightweight disk-based database that doesn't require a separate server process and allows accessing the database using SQL queries.
- The entire database is stored in a single cross-platform file and can be as small as 0.5MB, making it suitable for embedded and mobile applications.
- It supports common data types like NULL, INTEGER, REAL, TEXT, and BLOB and is used in standalone apps, local
Acrhitecture deisign pattern_MVC_MVP_MVVMDong-Ho Lee
Look over MVC, MVP, MVVM pattern in android.
and introduce android data binding library.
You can follow this with simple project.
https://github.com/withleedh/patternChat
References
https://realm.io/kr/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/
This document provides an introduction to the MVVM design pattern. It describes MVVM as separating an application into three main parts: the Model, the View, and the ViewModel. The Model manages the data and business logic. The View displays the user interface. The ViewModel acts as an intermediary between the Model and View, providing the data and handling user input. Benefits of MVVM include loose coupling between components, testable code, and maintainable code. Some common MVVM frameworks are also listed.
Jetpack Compose is a Declarative UI toolkit written in 100% Kotlin. What is Declarative UI? Why should we use it? We will talk about data flow and the benefits of Declarative UI. Then we’ll show the way to setup Jetpack Compose, write some basic samples and let it works with the MVVM architecture.
Spring boot is a great and relatively a new project from Spring.io. The presentation discusses about basics of spring boot to advance topics. Sample demo apps are available here : https://github.com/bhagwat/spring-boot-samples
Jetpack Compose is Google's new declarative UI toolkit for Android that aims to simplify building user interfaces. It uses composable functions to build up UI elements in a declarative way. Composables can update reactively in response to changes in state data models. This allows building UIs as simple as printing lines of code. Compose principles include treating UI as functions, using composable building blocks, and implementing a top-down data flow from state models to views through composables. The speaker demonstrates a simple counter app built with Compose.
Fragments allow modularization of activities on larger screens like tablets. A fragment represents a behavior or UI portion and has its own lifecycle callbacks. Fragments can be placed in an activity layout via XML or added dynamically in code. Multiple fragments can be combined in a single activity to build a multi-pane UI. The activity lifecycle influences fragments, and fragments can be retained across configuration changes using setRetainInstance(true).
This document provides an overview of React including:
- React is a JavaScript library created by Facebook for building user interfaces
- It uses virtual DOM to efficiently re-render components on updates rather than entire page
- React supports ES6 features and uses classes, arrow functions, and other syntax
- Popular tools for React include Create React App for setting up projects and React Dev Tools for debugging
Introduction to Android development - PresentationAtul Panjwani
A powerpoint presentation on Introduction to android development
prepared for college seminar
[Report is also uploaded named "Introduction to Android development - Presentation Report"]
Source: developer.android.com
This document outlines an introduction to the Android window system presented by Chia-I Wu. It covers the basic building blocks of SurfaceManager, WindowManager, and ActivityManager. It discusses concepts under the hood like process view, zygote, and binder. It also provides guidance on development tools and code areas relevant to understanding the window system.
An introduction to Intents in Android. First, the presentation introduces the concept of Intents as messages between application components. Then, the difference between implicit and explicit intents is clearly stated, along with a description of the Intent resolution mechanism. The presentation concludes with a step-by-step tutorial on how to cast and intercept Intents from Activities.
MVC (Model-View-Controller) is a software architectural pattern that divides an application into three interconnected parts: the model, the view, and the controller. The model manages the application's data logic and rules. The view displays the data from the model. The controller links the model and view by obtaining input and converting it to commands for the model or preferred views for the user.
From Maps to Apps the Future of Drone TechnologyGodfrey Nolan
Look at the current state of the Drone market for mobile developers, some examples of what you legally can and cannot do and talk about the potential opportunities available in this new app market.
The document discusses various security issues related to mobile applications including weak server-side controls, insecure data storage, insufficient transport layer protection, unintended data leakage, poor authorization and authentication, broken cryptography, client-side injection, security decisions via untrusted input, improper session handling, and lack of binary protections. It provides examples of issues like hardcoded passwords, insecure data storage on devices, and cross-site scripting vulnerabilities. The document also outlines fixes like encryption, access control, SSL pinning, parameterized queries, and disabling JavaScript to address these issues.
The document describes the Model-View-Controller (MVC) software architectural pattern. MVC separates an application into three main components: the model, the view, and the controller. The model manages the application's data and business logic. The view displays the model's information. The controller interprets inputs from the user and updates the model and/or view accordingly. This separation of concerns makes the application modular, reusable, and maintainable.
This document discusses Microsoft's .NET framework and its confrontation with Sun Microsystems' Java platform. It provides an overview of key aspects of .NET such as the Common Language Runtime (CLR), Microsoft Intermediate Language (MSIL), and support for multiple programming languages. It also compares .NET's approach of targeting a virtual machine to traditional compiled languages that target specific operating systems and hardware configurations.
This document provides an overview of Spring and Spring Boot frameworks. It discusses the history of Java and Spring, how Spring provides inversion of control and dependency injection. It also covers Spring MVC for web applications, Spring Data for data access, and how Spring Boot aims to simplify configuration. The document concludes with discussing some next steps including looking at Spring Security, Spring Cloud, and using Spring with other JVM languages.
The document discusses Spring Boot, a framework for creating stand-alone, production-grade Spring based applications. It describes how Spring Boot allows creating projects quickly with features like embedded servers and auto-configuration. It then covers how to develop a basic Spring Boot web application including creating the project structure with Maven, adding controllers and properties files, and connecting to databases using Spring Data. Overall, the document provides an overview of Spring Boot and guidance on starting a Spring Boot web application project.
Object Oriented Design Principles
~ How to become a SOLID programmer ~
~ A guide to make a well-designed application with Laravel ~
"Proper Object Oriented Design makes a developer's life easy, whereas bad design makes it a disaster"
Fragments allow modular and reusable components in an Android application. They are portions of UI for an activity that have their own lifecycle and can be added or removed during runtime. The key aspects are:
- Fragments were introduced in Android 3.0 but can be used in older versions with the compatibility library.
- Their lifecycle is directly tied to the host activity - pausing/destroying the activity also pauses/destroys fragments.
- They are defined as subclasses of Fragment and implement lifecycle methods like onCreateView to define the UI.
- Fragments can be added to activities declaratively in XML layouts or programmatically using transactions.
SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. It is often used for local/client storage in applications. Key points:
- Created by D. Richard Hipp, it provides a lightweight disk-based database that doesn't require a separate server process and allows accessing the database using SQL queries.
- The entire database is stored in a single cross-platform file and can be as small as 0.5MB, making it suitable for embedded and mobile applications.
- It supports common data types like NULL, INTEGER, REAL, TEXT, and BLOB and is used in standalone apps, local
Acrhitecture deisign pattern_MVC_MVP_MVVMDong-Ho Lee
Look over MVC, MVP, MVVM pattern in android.
and introduce android data binding library.
You can follow this with simple project.
https://github.com/withleedh/patternChat
References
https://realm.io/kr/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/
This document provides an introduction to the MVVM design pattern. It describes MVVM as separating an application into three main parts: the Model, the View, and the ViewModel. The Model manages the data and business logic. The View displays the user interface. The ViewModel acts as an intermediary between the Model and View, providing the data and handling user input. Benefits of MVVM include loose coupling between components, testable code, and maintainable code. Some common MVVM frameworks are also listed.
Jetpack Compose is a Declarative UI toolkit written in 100% Kotlin. What is Declarative UI? Why should we use it? We will talk about data flow and the benefits of Declarative UI. Then we’ll show the way to setup Jetpack Compose, write some basic samples and let it works with the MVVM architecture.
Spring boot is a great and relatively a new project from Spring.io. The presentation discusses about basics of spring boot to advance topics. Sample demo apps are available here : https://github.com/bhagwat/spring-boot-samples
Jetpack Compose is Google's new declarative UI toolkit for Android that aims to simplify building user interfaces. It uses composable functions to build up UI elements in a declarative way. Composables can update reactively in response to changes in state data models. This allows building UIs as simple as printing lines of code. Compose principles include treating UI as functions, using composable building blocks, and implementing a top-down data flow from state models to views through composables. The speaker demonstrates a simple counter app built with Compose.
Fragments allow modularization of activities on larger screens like tablets. A fragment represents a behavior or UI portion and has its own lifecycle callbacks. Fragments can be placed in an activity layout via XML or added dynamically in code. Multiple fragments can be combined in a single activity to build a multi-pane UI. The activity lifecycle influences fragments, and fragments can be retained across configuration changes using setRetainInstance(true).
This document provides an overview of React including:
- React is a JavaScript library created by Facebook for building user interfaces
- It uses virtual DOM to efficiently re-render components on updates rather than entire page
- React supports ES6 features and uses classes, arrow functions, and other syntax
- Popular tools for React include Create React App for setting up projects and React Dev Tools for debugging
Introduction to Android development - PresentationAtul Panjwani
A powerpoint presentation on Introduction to android development
prepared for college seminar
[Report is also uploaded named "Introduction to Android development - Presentation Report"]
Source: developer.android.com
This document outlines an introduction to the Android window system presented by Chia-I Wu. It covers the basic building blocks of SurfaceManager, WindowManager, and ActivityManager. It discusses concepts under the hood like process view, zygote, and binder. It also provides guidance on development tools and code areas relevant to understanding the window system.
An introduction to Intents in Android. First, the presentation introduces the concept of Intents as messages between application components. Then, the difference between implicit and explicit intents is clearly stated, along with a description of the Intent resolution mechanism. The presentation concludes with a step-by-step tutorial on how to cast and intercept Intents from Activities.
MVC (Model-View-Controller) is a software architectural pattern that divides an application into three interconnected parts: the model, the view, and the controller. The model manages the application's data logic and rules. The view displays the data from the model. The controller links the model and view by obtaining input and converting it to commands for the model or preferred views for the user.
From Maps to Apps the Future of Drone TechnologyGodfrey Nolan
Look at the current state of the Drone market for mobile developers, some examples of what you legally can and cannot do and talk about the potential opportunities available in this new app market.
The document discusses various security issues related to mobile applications including weak server-side controls, insecure data storage, insufficient transport layer protection, unintended data leakage, poor authorization and authentication, broken cryptography, client-side injection, security decisions via untrusted input, improper session handling, and lack of binary protections. It provides examples of issues like hardcoded passwords, insecure data storage on devices, and cross-site scripting vulnerabilities. The document also outlines fixes like encryption, access control, SSL pinning, parameterized queries, and disabling JavaScript to address these issues.
This presentation is aimed at Android app developers looking to deal with the insecurity that surrounds Android apps these days and how to create a secure app.
Connecting Android apps to Android Auto, Ford Sync and other OEM SDKs. Presentation explores the different options available in the world of Driveables.
Design Patterns every Android developer should knowmuratcanbur
Murat Can BUR gave a presentation at droidcon Greece in Thessaloniki from 10-12 September 2015 about design patterns that every Android developer should know. He discussed what design patterns are and why they are important, covering static factory methods, singletons, viewholders, observers, and the model-view-presenter pattern. The presentation emphasized principles like separation of concerns and avoiding duplication.
This document discusses the Australian Supersite Network, which establishes long-term intensive monitoring sites across representative ecosystems. Each Supersite includes buildings, instrumentation, scientists, and a 10-400km transect. Core activities include flux measurements, plant/soil studies, and faunal monitoring. The network aims to understand ecosystem stocks, fluxes, biodiversity dynamics, and responses to changes. Infrastructure includes flux towers, weather stations, and field stations. Key questions focus on current ecosystem exchanges, biodiversity patterns, and responses to disturbances. The plan is to engage scientists, states, and wider communities in the Supersites.
The document discusses network security threats, both external and internal. It states that internal threats from employees are one of the most common problems, as staff can intentionally or unintentionally steal or modify important company data. It then promotes IP-guard as a solution to secure a company's computer network and protect against data loss. IP-guard is described as a centralized monitoring and management system that gives administrators control and visibility over employee devices and activities on the network.
Este documento presenta a Juan Carlos Sánchez Illán, profesor titular de periodismo en la Universidad Carlos III de Madrid. Se resumen sus principales líneas de investigación, que incluyen la prensa y política en la España de la Restauración, la construcción de la nación española, y el periodismo en la era de Internet. También se enumeran varios de sus libros y artículos publicados, así como estancias de investigación realizadas en centros como la Universidad de Harvard y la Universidad de París IV-Sorbona.
Streams Studio Support for IBM InfoSphere Streams V4.0lisanl
Rick Sawyer is a software developer on the Streams Studio development team.
IBM InfoSphere Streams Studio V4.0 has been updated to include support for the new Streams platform architecture. Rick's presentation will include an overview of the enhanced Streams Studio for the new Streams platform, along with a demo of these new capabilities.
View related presentations and recordings from the Streams V4.0 Developers Conference at:
https://developer.ibm.com/answers/questions/183353/ibm-infosphere-streams-40-developers-conference-on.html?smartspace=streamsdev
Adam Smith fue un economista y filósofo escocés del siglo XVIII que es considerado uno de los fundadores de la economía clásica. Basaba su ideario en el sentido común y creía que el fundamento de la acción moral se basa en sentimientos universales compartidos por la humanidad, no en normas o ideas nacionales. Introdujo el concepto de que los seres humanos se mueven principalmente por su interés individual en asuntos económicos, aunque reconocía que en otros ámbitos de la vida es posible y moralmente correcto ser generoso.
Java/Scala Lab: Игорь Вахромеев - Parallel your process with Spring BatchGeeksLab Odessa
Spring Batch позволяет, легким и понятным способом, распараллелить любой сложный процесс обработки данных. Во время доклада мы разберем пример из реального проекта и превратим однопоточный ботлнек в многопоточную молнию!
Estaciones de climatización, Herramientas y Accesorios #TerritorioHELLAHELLA Spain
"Por fin: Con Hella Nussbaum Solutions tengo todo lo que necesito para el mantenimiento y la reparación de cualquier vehículo, desde los más convencionales hasta los híbridos. ¡Y todo ello con un servicio perfecto!"
Descubre más en esta catálogo
The document repeatedly provides contact information for ordering from www.avonstore.wordpress.com, including an email address of [email protected] and a phone number of 0747.607.298. This information is listed over 40 times throughout the document.
La pandemia de COVID-19 ha tenido un impacto significativo en la economía mundial y las vidas de las personas. Muchos países han impuesto confinamientos y otras medidas de distanciamiento social para frenar la propagación del virus. A medida que los países comienzan a reabrir gradualmente, los gobiernos deben encontrar el equilibrio adecuado entre la salud pública y la recuperación económica.
Controlling diseases to ensure better animal healthDeepa Menon
This document discusses animal health and disease. It defines key terms like health, disease, and epidemiology. It describes how diseases impact animal productivity and economics. Diseases are classified by etiology, population, and clinical signs. The epidemiological triangle of host, agent, and environment is explained. Methods of disease transmission and proliferation are outlined. The document also discusses signs of health vs. disease, disease prevention through biosecurity, and provides an in-depth overview of Porcine Reproductive and Respiratory Syndrome (PRRS) as an example disease.
El documento describe la arquitectura del siglo XX. Se resumen los siguientes puntos clave:
1) La arquitectura moderna surgió como reacción a las guerras y dictaduras del siglo, buscando crear edificios llenos de luz, aire y salud.
2) El racionalismo y funcionalismo fueron corrientes influyentes, caracterizadas por formas geométricas, estructuras vistas y adecuación a la función.
3) Arquitectos influyentes como Le Corbusier y Mies van der
Лаконічні та елегантні автоматизовані тести? Безболісний (майже) тестовий стек для UI веб-додатків? Більше часу, щоб випити кави/пограти у Cuphead/ подивитись у порожнечу?
Ми поговоримо про Lombok, Vavr, Owner, чому вам варто використовувати готові рішення та як зробити тести більш лаконічними та читабельними. Вам знадобиться Vaper та/або гіроборд.
Saindo da zona de conforto… resolvi aprender androidDaniel Baccin
Palestra sobre Android realizada na Secomp - UECE. A ideia dessa palestra é motivar estudantes, profissionais e “devs”, em geral, a conhecer um pouco mais sobre o desenvolvimento de aplicativos na plataforma Android. Além disso, será discutido sobre os desafios enfrentados durante o aprendizado, oportunidades existentes no mercado, perspectivas futuras sobre a plataforma e experiências já adquiridas na área. Também, será abordando conceitos básicos e intermediários através de exemplos práticos, ferramentas utilizadas e dicas de boas práticas para o desenvolvimento.
The document provides an overview of key concepts in Android development including:
1) Android applications are built using Java and XML files and use the Android framework which is based on a component-based model with activities, intents, and manifest files.
2) The project structure separates code, resources, and configuration files. Activities display UI and respond to user input using callbacks.
3) Views display content on screen and are defined in XML layout files then accessed in code. Adapters populate views with data. Intents are used to start activities and pass data.
Spring Boot makes it easy to create production-grade Spring applications that require minimal configuration. It provides tools to generate a single jar file containing an embedded web server so applications can be run with no external dependencies. The document discusses setting up a Spring Boot project with MySQL database integration using JPA to store and retrieve objects. It demonstrates creating a basic RESTful service to add and fetch items from the database with minimal code.
This document discusses the Android action bar and fragment framework. It covers key action bar components like app icons, action buttons, and navigation modes. It also summarizes the fragment lifecycle callbacks and how to implement different navigation modes like standard, tabs and lists. Finally, it proposes interfaces for a container to manage fragments and a navigation interface for the action bar.
This document provides an overview of key Android development concepts and techniques. It discusses fragments, the support library, dependency injection, image caching, threading and AsyncTask, notifications, supporting multiple screens, and optimizing ListView performance. The document also recommends several popular Android libraries and open source apps that demonstrate best practices.
Pig and Java MapReduce are compared for analyzing customer product data stored in Hadoop. Pig Latin is found to be more readable and maintainable due to its SQL-like syntax and limited predefined functions. However, Java MapReduce may have better performance and tooling support from IDEs. The document shows Pig and Java code to calculate top products, average views/purchases, and average purchase amount for each customer group. The Java code uses custom DTOs and is more complex overall.
This document discusses various techniques for working with multimedia in Android applications, including detecting device capabilities, loading images from local storage and remote URLs, playing audio files from assets and raw resources, and improving performance through caching and asynchronous loading. It provides code examples for checking if a device has a front-facing camera, loading images while avoiding out of memory errors, playing audio files from assets, and using an AsyncTask to load images asynchronously to avoid blocking the UI. It also discusses potential memory leak issues and strategies for building an image cache.
Android TV: Building apps with Google’s Leanback LibraryJoe Birch
Android TV apps can be built using the Leanback library which provides UI components for TV. Key elements include BrowseFragments to display browsable content, PlaybackActivities for media playback, and custom card views. Interaction uses focus-based navigation via the D-pad. Testing involves performing clicks and other actions on view IDs. Features like picture-in-picture and recording are supported. Open source resources are provided to learn more about developing for Android TV.
This document discusses how to display records from a Northwind database in a JTable using NetBeans and SQL Server. It includes code to connect to the database, define a Product class with getters and setters, a ProductDAO class to retrieve data, and a GUI class to display the results in a JTable. The code retrieves product data including ID, name, category, supplier, price, quantity and units from the database and displays it in the table.
This document provides an overview of ASP.NET Web API, a framework for building HTTP-based services. It discusses key Web API concepts like REST, routing, actions, validation, OData, content negotiation, and the HttpClient. Web API allows building rich HTTP-based apps that can reach more clients by embracing HTTP standards and using HTTP as an application protocol. It focuses on HTTP rather than transport flexibility like WCF.
The document contains code for a Java class called Test that defines methods for uploading, downloading, and deleting files from a server. The main method calls the upload2 method, which constructs a JSON object from an AttachmentVO class containing file metadata, converts the file to an input stream, and sends a multipart POST request to an upload URL along with the JSON data to upload the file.
The document contains code listings for the interface and implementation files of the BirdWatching project, including files for the model layer (BirdSighting.h, BirdSighting.m, BirdSightingDataController.h, BirdSightingDataController.m), master view controller layer (BirdsMasterViewController.h, BirdsMasterViewController.m), detail view controller layer (BirdsDetailViewController.h, BirdsDetailViewController.m), and add scene view controller layer (AddSightingViewController.h, AddSightingViewController.m). The code listings do not include comments or unused methods.
Why SOLID matters - even for JavaScriptmartinlippert
The document discusses the importance of design principles like the SOLID principles even for JavaScript development. It provides examples of how applying principles like the Single Responsibility Principle and Open Close Principle can help improve the structure and flexibility of JavaScript code. Specifically, it shows how separating concerns between classes that handle products, carts and views leads to code that is more maintainable and extensible.
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo Ali Parmaksiz
This document summarizes a presentation about developing a MVP application using GWT, Spring Roo, and deploying it to CloudFoundry. The presentation covers MVP pattern in GWT, using activities and places for navigation, using Spring Roo for rapid development, and deploying the application to CloudFoundry. It provides code examples for implementing MVP using views, presenters, activities and places. It also outlines the steps to deploy an application to CloudFoundry including installing the vmc CLI and pushing the application.
Introduction To Google Android (Ft Rohan Bomle)Fafadia Tech
- Android is an open source software platform and operating system for mobile devices based on the Linux kernel. It allows developers to write managed code using Java and also supports C/C++.
- The Android SDK provides developers with tools like the Android Debug Bridge (adb) and an emulator to help develop and test Android applications. Eclipse IDE with the Android Development Tools plugin can be used to streamline the development process.
- Common Android application components include Activities for screens, Services for background tasks, Intents for communications between components, and Notifications. There is a standard file structure and applications declare their components in the AndroidManifest file.
The document provides an overview of new features in Android Honeycomb (3.0) and Ice Cream Sandwich (4.0), including:
1) New UI metaphors like the ActionBar and onscreen adaptive menus.
2) Spec hardware changes like the lack of hard buttons on newer devices.
3) A new "Holographic" look and feel with glows, depth lines, and 3D transitions.
4) New APIs like Fragments, the ActionBar, enhanced widgets/notifications, drag and drop, peer-to-peer networking via NFC Android Beam and WiFi Direct.
Aug '22 Drone Software Meetup shows how to label, train, deploy and test a machine learning model to count cars. Links to Jupyter Notebook and Drone source code for download.
Walkthrough of the DJI Mobile SDK tutorials that we converted from Java to Kotlin. See https://youtu.be/f5fWvFD5rwc for recording of the Drone Software SDK meetup
This session walks you through how our interns took some video from a drone and turned it into an Android App to count cars in a parking lot. This is a practical introduction to drone SDKs, Tensorflow and how to combine the two to do object detection on your Android phone from a drone.
Getting started with tensor flow datasets Godfrey Nolan
TensorFlow Datasets provides a variety of datasets that can be used for tasks like image classification, object detection, and question answering. It offers datasets for images, audio, text, and video. The library aims for simplicity, performance, determinism, customizability. Example code is provided to load datasets and split them into training, validation, and test sets. Popular image classification datasets included are CIFAR-10, MNIST, and ImageNet while COCO, KITTI, and OpenImages support object detection.
Using ML to make your UI tests more robustGodfrey Nolan
Common practice is to write lots of unit tests and API tests and only a few User Interface tests. Why? Because UI tests are brittle. Change one thing and all the other tests unravel. But what if we could use ML to help us out. Many of our apps have the same functionality such as login, checkout, share, pay etc. In this session we'll look at how we can use Object Detection and labeling techniques to make our UI tests more robust with a fraction of the code.
The document discusses Java best practices for writing high quality code. It recommends following principles like FIRST for unit testing - making tests fast, isolated, repeatable, self-verifying, and timely. It also recommends techniques like test-driven development, where you write a failing test first before producing the minimum amount of code to pass that test. Continuous integration, code coverage metrics, and refactoring existing code gradually with more tests are presented as ways to improve code quality over time. Finally, several books on software design patterns, refactoring, and effective Java practices are referenced for further guidance.
The document discusses using drones and AI to count sheep by taking images of sheep with a drone, training a neural network model to identify sheep in images, and deploying the model on the drone to count sheep in real time and validate the counts. Key components include the DJI Mobile SDK, Google Tensorflow, collecting training data, training and evaluating models in Google Cloud, and deploying the model on the drone to test and validate sheep counts.
The document discusses securing mobile apps for drones. It covers how drones can be hacked, such as connecting via WiFi or RF hijacking. Famous drone hacks are mentioned but not described. Mobile apps, manufacturers' SDKs, and the OWASP top 10 mobile risks are reviewed. Best practices discussed include not storing sensitive data locally and using SSL pinning. Resources for drone development and mobile security are provided. The presentation aims to help developers write more secure mobile apps for controlling drones.
The document discusses Agile testing techniques for Swift including unit testing with XCTest and GUI testing with XCUI. It provides details on mocking with Cuckoo, API testing with Postman, integrating tests with Jenkins, and measuring quality with SonarQube. Sample code is shown for unit tests, API tests, and GUI tests of a sample ETAMock app. Continuous integration with Jenkins and SonarQube is demonstrated along with links for further information.
The document discusses refactoring code to improve its structure and readability without changing its external behavior. It defines refactoring as restructuring software to make it easier to understand and modify. The goals of refactoring are to reduce technical debt by improving code quality. Examples show refactoring an Android app by extracting methods, renaming variables for clarity, and converting the architecture to MVP pattern to separate concerns. Lessons recommend writing unit tests first and using metrics as a guide rather than mandate when refactoring.
This document provides an agenda and overview for a mobile agile testing workshop covering both Android and iOS testing. The Android section covers unit, UI, and API testing tools like JUnit, Espresso, and Postman. It also discusses test-driven development. The iOS section similarly covers unit testing with XCTest, UI testing with XCUI, mocking with Cuckoo, and tools like Postman and Jenkins. The document emphasizes why testing is important for catching bugs, making changes confidently, and extending the lifespan of codebases.
This presentation discusses integrating Quickbooks data with Tableau visualization software. It covers new features in Tableau 10 like cluster analysis and cross database joins. It also explains how to export a Quickbooks company file to Quickbooks online, connect Tableau 10 to the online Quickbooks data, and use sample data to learn how to visualize Quickbooks financial information in Tableau dashboards and charts.
The document discusses a Tableau Meetup agenda on network graphs. The agenda includes an introduction to RIIS, an overview of what network graphs are, examples of network graphs in Tableau, a demo, resources, and plans for next month's meetup. It provides several links to external sites showing examples of network graphs and how to create them in Tableau and tools like Neo4j and NodeXL.
Best web hosting Vancouver 2025 for you businesssteve198109
Vancouver in 2025 is more than scenic views, yoga studios, and oat milk lattes—it’s a thriving hub for eco-conscious entrepreneurs looking to make a real difference. If you’ve ever dreamed of launching a purpose-driven business, now is the time. Whether it’s urban mushroom farming, upcycled furniture sales, or vegan skincare sold online, your green idea deserves a strong digital foundation.
The 2025 Canadian eCommerce landscape is being shaped by trends like sustainability, local innovation, and consumer trust. To stay ahead, eco-startups need reliable hosting that aligns with their values. That’s where 4GoodHosting.com comes in—one of the top-rated Vancouver web hosting providers of 2025. Offering secure, sustainable, and Canadian-based hosting solutions, they help green entrepreneurs build their brand with confidence and conscience.
As eCommerce in Canada embraces localism and environmental responsibility, choosing a hosting provider that shares your vision is essential. 4GoodHosting goes beyond just hosting websites—they champion Canadian businesses, sustainable practices, and meaningful growth.
So go ahead—start that eco-friendly venture. With Vancouver web hosting from 4GoodHosting, your green business and your values are in perfect sync.
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingsteve198109
Vancouver in 2025 is more than scenic views, yoga studios, and oat milk lattes—it’s a thriving hub for eco-conscious entrepreneurs looking to make a real difference. If you’ve ever dreamed of launching a purpose-driven business, now is the time. Whether it’s urban mushroom farming, upcycled furniture sales, or vegan skincare sold online, your green idea deserves a strong digital foundation.
The 2025 Canadian eCommerce landscape is being shaped by trends like sustainability, local innovation, and consumer trust. To stay ahead, eco-startups need reliable hosting that aligns with their values. That’s where 4GoodHosting.com comes in—one of the top-rated Vancouver web hosting providers of 2025. Offering secure, sustainable, and Canadian-based hosting solutions, they help green entrepreneurs build their brand with confidence and conscience.
As eCommerce in Canada embraces localism and environmental responsibility, choosing a hosting provider that shares your vision is essential. 4GoodHosting goes beyond just hosting websites—they champion Canadian businesses, sustainable practices, and meaningful growth.
So go ahead—start that eco-friendly venture. With Vancouver web hosting from 4GoodHosting, your green business and your values are in perfect sync.
Smart Mobile App Pitch Deck丨AI Travel App Presentation Templateyojeari421237
🚀 Smart Mobile App Pitch Deck – "Trip-A" | AI Travel App Presentation Template
This professional, visually engaging pitch deck is designed specifically for developers, startups, and tech students looking to present a smart travel mobile app concept with impact.
Whether you're building an AI-powered travel planner or showcasing a class project, Trip-A gives you the edge to impress investors, professors, or clients. Every slide is cleanly structured, fully editable, and tailored to highlight key aspects of a mobile travel app powered by artificial intelligence and real-time data.
💼 What’s Inside:
- Cover slide with sleek app UI preview
- AI/ML module implementation breakdown
- Key travel market trends analysis
- Competitor comparison slide
- Evaluation challenges & solutions
- Real-time data training model (AI/ML)
- “Live Demo” call-to-action slide
🎨 Why You'll Love It:
- Professional, modern layout with mobile app mockups
- Ideal for pitches, hackathons, university presentations, or MVP launches
- Easily customizable in PowerPoint or Google Slides
- High-resolution visuals and smooth gradients
📦 Format:
- PPTX / Google Slides compatible
- 16:9 widescreen
- Fully editable text, charts, and visuals
Reliable Vancouver Web Hosting with Local Servers & 24/7 Supportsteve198109
Looking for powerful and affordable web hosting in Vancouver? 4GoodHosting offers premium Canadian web hosting solutions designed specifically for individuals, startups, and businesses across British Columbia. With local data centers in Vancouver and Toronto, we ensure blazing-fast website speeds, superior uptime, and enhanced data privacy—all critical for your business success in today’s competitive digital landscape.
Our Vancouver web hosting plans are packed with value—starting as low as $2.95/month—and include secure cPanel management, free domain transfer, one-click WordPress installs, and robust email support with anti-spam protection. Whether you're hosting a personal blog, business website, or eCommerce store, our scalable cloud hosting packages are built to grow with you.
Enjoy enterprise-grade features like daily backups, DDoS protection, free SSL certificates, and unlimited bandwidth on select plans. Plus, our expert Canadian support team is available 24/7 to help you every step of the way.
At 4GoodHosting, we understand the needs of local Vancouver businesses. That’s why we focus on speed, security, and service—all hosted on Canadian soil. Start your online journey today with a reliable hosting partner trusted by thousands across Canada.
DNS Resolvers and Nameservers (in New Zealand)APNIC
Geoff Huston, Chief Scientist at APNIC, presented on 'DNS Resolvers and Nameservers in New Zealand' at NZNOG 2025 held in Napier, New Zealand from 9 to 11 April 2025.
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC
Terry Sweetser, Training Delivery Manager (South Asia & Oceania) at APNIC presented an APNIC update at NZNOG 2025 held in Napier, New Zealand from 9 to 11 April 2025.
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC
Joyce Chen, Senior Advisor, Strategic Engagement at APNIC, presented on 'APNIC Policy Development Process' at the Local APIGA Taiwan 2025 event held in Taipei from 19 to 20 April 2025.
Understanding the Tor Network and Exploring the Deep Webnabilajabin35
While the Tor network, Dark Web, and Deep Web can seem mysterious and daunting, they are simply parts of the internet that prioritize privacy and anonymity. Using tools like Ahmia and onionland search, users can explore these hidden spaces responsibly and securely. It’s essential to understand the technology behind these networks, as well as the risks involved, to navigate them safely. Visit https://torgol.com/
11. package alexandria.israelferrer.com.libraryofalexandria;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RatingBar;
import android.widget.TextView;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.squareup.picasso.Picasso;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
public class MainActivity extends Activity {
private static final String PACKAGE = "com.israelferrer.alexandria";
private static final String KEY_FAVS = PACKAGE + ".FAVS";
private List<ArtWork> artWorkList;
private ArtWorkAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ListView listView = (ListView) findViewById(R.id.listView);
InputStream stream = getResources().openRawResource(R.raw.artwork);
Type listType = new TypeToken<List<ArtWork>>() {
}.getType();
artWorkList = new Gson().fromJson(new InputStreamReader(stream), listType);
final SharedPreferences preferences = getSharedPreferences(getPackageName()
, Context.MODE_PRIVATE);
for (ArtWork artWork : artWorkList) {
artWork.setRating(preferences.getFloat(PACKAGE + artWork.getId(), 0F));
}
adapter = new ArtWorkAdapter();
listView.setAdapter(adapter);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.filter) {
adapter.orderMode();
return true;
}
return super.onOptionsItemSelected(item);
}
private class ArtWorkAdapter extends BaseAdapter {
private boolean isOrder;
private final List<ArtWork> orderedList;
public ArtWorkAdapter() {
super();
orderedList = new LinkedList<ArtWork>();
}
@Override
public int getCount() {
return artWorkList.size();
}
@Override
public Object getItem(int position) {
return artWorkList.get(position);
}
@Override
public long getItemId(int position) {
return Long.valueOf(artWorkList.get(position).getId());
}
public void orderMode() {
isOrder = !isOrder;
if (isOrder) {
orderedList.clear();
orderedList.addAll(artWorkList);
Collections.sort(orderedList);
notifyDataSetChanged();
} else {
notifyDataSetChanged();
}
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final ArtWork artWork;
if (isOrder) {
artWork = orderedList.get(position);
} else {
artWork = artWorkList.get(position);
}
View row;
switch (artWork.getType()) {
case ArtWork.QUOTE:
row = getLayoutInflater().inflate(R.layout.text_row, null);
TextView quote = (TextView) row.findViewById(R.id.quote);
TextView author = (TextView) row.findViewById(R.id.author);
quote.setText(""" + artWork.getText() + """);
author.setText(artWork.getAuthor());
break;
case ArtWork.PAINTING:
final SharedPreferences preferences = getSharedPreferences(getPackageName()
, Context.MODE_PRIVATE);
final HashSet<String> favs = (HashSet<String>) preferences
.getStringSet(KEY_FAVS,
new HashSet<String>());
row = getLayoutInflater().inflate(R.layout.painting_row, null);
ImageView image = (ImageView) row.findViewById(R.id.painting);
TextView painter = (TextView) row.findViewById(R.id.author);
painter.setText(artWork.getTitle() + " by " + artWork.getAuthor());
Picasso.with(MainActivity.this).load(artWork.getContentUrl()).fit()
.into(image);
RatingBar rating = (RatingBar) row.findViewById(R.id.rate);
rating.setRating(artWork.getRating());
rating.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
@Override
public void onRatingChanged(RatingBar ratingBar, float rating,
boolean fromUser) {
preferences.edit().putFloat(PACKAGE + artWork.getId(), rating).apply();
artWork.setRating(rating);
}
});
CheckBox fav = (CheckBox) row.findViewById(R.id.fav);
fav.setChecked(favs.contains(artWork.getId()));
fav.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
final HashSet<String> favs = new HashSet<String>((HashSet<String>)
preferences
.getStringSet(KEY_FAVS,
new HashSet<String>()));
if (isChecked) {
favs.add(artWork.getId());
} else {
favs.remove(artWork.getId());
}
preferences.edit().putStringSet(KEY_FAVS,
favs).apply();
}
});
break;
case ArtWork.MOVIE:
case ArtWork.OPERA:
row = new ViewStub(MainActivity.this);
break;
default:
row = getLayoutInflater().inflate(R.layout.text_row, null);
}
return row;
}
}
}
12. Classic Android
Pros
Better the devil you know
Cons
Activities and Fragments quickly become large
Painful to make changes or add new features
All the logic in Activities, unit testing is impossible
Classic Android is not MVC
16. package com.androidexample.mvc;
//imports
public class FirstScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.firstscreen);
final LinearLayout lm = (LinearLayout) findViewById(R.id.linearMain);
final Button secondBtn = (Button) findViewById(R.id.second);
//Get Global Controller Class object (see application tag in AndroidManifest.xml)
final Controller aController = (Controller) getApplicationContext();
/* ........ */
//Product arraylist size
int ProductsSize = aController.getProductsArraylistSize();
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
/******** Dynamically create view elements - Start **********/
for(int j=0;j< ProductsSize;j++)
{
// Get probuct data from product data arraylist
String pName = aController.getProducts(j).getProductName();
int pPrice = aController.getProducts(j).getProductPrice();
// Create LinearLayout to view elemnts
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.HORIZONTAL);
TextView product = new TextView(this);
product.setText(" "+pName+" ");
//Add textView to LinearLayout
ll.addView(product);
TextView price = new TextView(this);
price.setText(" $"+pPrice+" ");
//Add textView to LinearLayout
ll.addView(price);
final Button btn = new Button(this);
btn.setId(j+1);
btn.setText("Add To Cart");
// set the layoutParams on the button
btn.setLayoutParams(params);
17. package com.androidexample.mvc;
import java.util.ArrayList;
import android.app.Application;
public class Controller extends Application{
private ArrayList<ModelProducts> myProducts = new ArrayList<ModelProducts>();
private ModelCart myCart = new ModelCart();
public ModelProducts getProducts(int pPosition) {
return myProducts.get(pPosition);
}
public void setProducts(ModelProducts Products) {
myProducts.add(Products);
}
public ModelCart getCart() {
return myCart;
}
public int getProductsArraylistSize() {
return myProducts.size();
}
}
package com.androidexample.mvc;
public class ModelProducts {
private String productName;
private String productDesc;
private int productPrice;
public ModelProducts(String productName,String productDesc,int productPrice) {
this.productName = productName;
this.productDesc = productDesc;
this.productPrice = productPrice;
}
public String getProductName() {
return productName;
}
public String getProductDesc() {
return productDesc;
}
public int getProductPrice() {
return productPrice;
}
}
19. MVC
Pros
No business logic in UI
Easier to unit test
Cons
Doesn't scale, separates UI but not model
Controller often grows too big
27. public interface ArtistsMvpView extends MvpView{
void showLoading();
void hideLoading();
void showArtistNotFoundMessage();
void showConnectionErrorMessage();
void renderArtists(List<Artist> artists);
void launchArtistDetail(Artist artist);
}
public class ArtistsPresenter implements Presenter<ArtistsMvpView>, ArtistCallback {
private ArtistsMvpView artistsMvpView;
private ArtistsInteractor artistsInteractor;
public ArtistsPresenter() {
}
@Override public void setView(ArtistsMvpView view) {
if (view == null) throw new IllegalArgumentException("You can't set a null view");
artistsMvpView = view;
artistsInteractor = new ArtistsInteractor(artistsMvpView.getContext());
}
@Override public void detachView() {
artistsMvpView = null;
}
public void onSearchArtist(String string) {
artistsMvpView.showLoading();
artistsInteractor.loadDataFromApi(string, this);
}
public void launchArtistDetail(Artist artist) {
artistsMvpView.launchArtistDetail(artist);
}
//.....
}
public class ArtistsInteractor {
SpotifyService mSpotifyService;
SpotifyApp mSpotifyApp;
public ArtistsInteractor(Context context) {
this.mSpotifyApp = SpotifyApp.get(context);
this.mSpotifyService = mSpotifyApp.getSpotifyService();
}
public void loadDataFromApi(String query, ArtistCallback artistCallback) {
mSpotifyService.searchArtist(query)
.subscribeOn(mSpotifyApp.SubscribeScheduler())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(artistsSearch -> onSuccess(artistsSearch, artistCallback),
throwable -> onError(throwable, artistCallback));
}
29. public class MainActivity extends Activity implements MainView, AdapterView.OnItemClickListener {
private ListView listView;
private ProgressBar progressBar;
private MainPresenter presenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
listView = (ListView) findViewById(R.id.list);
listView.setOnItemClickListener(this);
progressBar = (ProgressBar) findViewById(R.id.progress);
presenter = new MainPresenterImpl(this);
}
@Override public void setItems(List<String> items) {
listView.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, items));
}
@Override public void showMessage(String message) {
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
}
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
presenter.onItemClicked(position);
}
}
package com.antonioleiva.mvpexample.app.main;
public interface MainPresenter {
void onResume();
void onItemClicked(int position);
void onDestroy();
}
public class MainPresenterImpl implements MainPresenter, FindItemsInteractor.OnFinishedListener {
private MainView mainView;
private FindItemsInteractor findItemsInteractor;
public MainPresenterImpl(MainView mainView) {
this.mainView = mainView;
findItemsInteractor = new FindItemsInteractorImpl();
}
@Override public void onResume() {
if (mainView != null) {
mainView.showProgress();
}
findItemsInteractor.findItems(this);
}
@Override public void onItemClicked(int position) {
if (mainView != null) {
mainView.showMessage(String.format("Position %d clicked", position + 1));
}
}
@Override public void onDestroy() {
mainView = null;
}
@Override public void onFinished(List<String> items) {
if (mainView != null) {
mainView.setItems(items);
mainView.hideProgress();
}
}
}
public interface MainView {
void showProgress();
void hideProgress();
void setItems(List<String> items);
void showMessage(String message);
}
http://antonioleiva.com/mvp-android/
30. MVP Testing
View
Test render logic and interaction with presenter,
mock Presenter.
Presenter
Test that view events invoke the right model
method. Mock both View and Model.
Model
Test the business logic, mock the data source and
Presenter.
31. MVP
Pros
Complex Tasks split into simpler tasks
Smaller objects, less bugs, easier to debug
Testable
Cons
BoilerPlate to wire the layers.
Model can’t be reused, tied to specific use case.
View and Presenter are tied to data objects since
they share the same type of object with the Model.
https://speakerdeck.com/rallat/androiddevlikeaprodroidconsf
32. MVVM
Microsoft Pattern
Removes UI code from Activities/Fragments
View has no knowledge of model
Data Binding = Bind ViewModel to Layout
Goodbye Presenter, hello ViewModel
36. MVVM
Pros
First Party Library
Compile time checking
Presentation layer in XML
Testable
Less code, no more Butterknife
Cons
Data Binding isn't always appropriate
Android Studio integration was flaky
37. Reactive - RxJava
Not really an architecture
Used in many other architectures
Event based Publish / Subscribe
38. public void doLargeComputation(
final IComputationListener listener,
final OtherParams params) {
Subscription subscription = doLargeComputationCall(params)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<Result>>>() {
@Override public void onNext(final List<Result> results) {
listener.doLargeComputationComplete(results);
}
@Override public void onCompleted() {}
@Override public void onError(final Throwable t) {
listener.doLargeComputationFailed(t);
}
}
);
}
private Observable<List<Result>> doLargeComputationCall(final OtherParams params) {
return Observable.defer(new Func0<Observable<List<Result>>>() {
@Override public Observable<List<Result>> call() {
List<Result> results = doTheRealLargeComputation(params);
if (results != null && 0 < results.size()) {
return Observable.just(results);
}
return Observable.error(new ComputationException("Could not do the large computation"));
}
}
);
}