This document provides an overview of best practices for Android Wear development. It discusses how to pair Wear devices, common APIs with Android, showing notifications, distributing Wear apps, defining layouts, accessing views, useful libraries like Gson and EventBus, and other tips.
This ppt provide basic understanding regarding Spring Boot. And how to configure Spring Boot application with Hibernate and mysql by using eclipse IDE. Also provides understanding about how to configure Spring Tool Suit (STS) in Eclipse.
Getting Reactive with Spring Framework 5.0’s GA releaseVMware Tanzu
As a major revision of the core Spring Framework, 5.0 comes with a Java 8+ baseline and many infrastructure refinements: e.g. our own Commons Logging bridge autodetecting Log4j 2, SLF4J, JUL by default; streamlined use of Servlet 3.1+; and support for JUnit 5.0!
Rest assured that the reactive focus does not impact the existing Spring MVC model; these options live alongside each other. Work continues on the traditional servlet-based Spring MVC stack; there are many further refinements across the framework.
Join Juergen Hoeller, Rossen Stoyanchev, Stephane Maldini and the Spring Team to learn about:
* Reactive programming: Spring WebFlux framework built on Reactor 3.1, with support for RxJava 2.1 and running on Tomcat, Jetty, Netty or Undertow.
* Functional style with Java 8 & Kotlin: several API refinements and Kotlin extensions across the framework, in particular for bean registration and functional web endpoints.
* Integration with Java EE 8 APIs: support for Servlet 4.0, Bean Validation 2.0, JPA 2.2, as well as the JSON Binding API (as an alternative to Jackson/Gson in Spring MVC).
* JDK 9 support: fully aligned with JDK 9 at runtime, on the classpath as well as the module path (on the latter: as filename-based “automatic modules” for the time being).
Attendees will also learn about the role of Project Reactor and its Reactive Streams foundation as the core reactive engine not only for Spring Framework, but increasingly across the Spring ecosystem. Spring Framework 5.0 adopters will benefit from an in-depth understanding of Project Reactor as they start using the 5.0 release.
Presenter : Juergen Hoeller, Rossen Stoyanchev, Stephane Maldini and Arjen Poutsma
During this talk, speaker told about the architecture of web applications based on SpringBoot. The main idea of his presentation was to show that SpringBoot and some other Spring technologies can be efficiently used to improve project performance.
This presentation by Mykhailo Brodskyi (Senior Software Engineer, Consultant at GlobalLogic Kharkiv), was delivered at GlobalLogic Kharkiv Java Conference 2018 on June 10, 2018.
This ppt provide basic understanding regarding Spring Boot. And how to configure Spring Boot application with Hibernate and mysql by using eclipse IDE. Also provides understanding about how to configure Spring Tool Suit (STS) in Eclipse.
Getting Reactive with Spring Framework 5.0’s GA releaseVMware Tanzu
As a major revision of the core Spring Framework, 5.0 comes with a Java 8+ baseline and many infrastructure refinements: e.g. our own Commons Logging bridge autodetecting Log4j 2, SLF4J, JUL by default; streamlined use of Servlet 3.1+; and support for JUnit 5.0!
Rest assured that the reactive focus does not impact the existing Spring MVC model; these options live alongside each other. Work continues on the traditional servlet-based Spring MVC stack; there are many further refinements across the framework.
Join Juergen Hoeller, Rossen Stoyanchev, Stephane Maldini and the Spring Team to learn about:
* Reactive programming: Spring WebFlux framework built on Reactor 3.1, with support for RxJava 2.1 and running on Tomcat, Jetty, Netty or Undertow.
* Functional style with Java 8 & Kotlin: several API refinements and Kotlin extensions across the framework, in particular for bean registration and functional web endpoints.
* Integration with Java EE 8 APIs: support for Servlet 4.0, Bean Validation 2.0, JPA 2.2, as well as the JSON Binding API (as an alternative to Jackson/Gson in Spring MVC).
* JDK 9 support: fully aligned with JDK 9 at runtime, on the classpath as well as the module path (on the latter: as filename-based “automatic modules” for the time being).
Attendees will also learn about the role of Project Reactor and its Reactive Streams foundation as the core reactive engine not only for Spring Framework, but increasingly across the Spring ecosystem. Spring Framework 5.0 adopters will benefit from an in-depth understanding of Project Reactor as they start using the 5.0 release.
Presenter : Juergen Hoeller, Rossen Stoyanchev, Stephane Maldini and Arjen Poutsma
During this talk, speaker told about the architecture of web applications based on SpringBoot. The main idea of his presentation was to show that SpringBoot and some other Spring technologies can be efficiently used to improve project performance.
This presentation by Mykhailo Brodskyi (Senior Software Engineer, Consultant at GlobalLogic Kharkiv), was delivered at GlobalLogic Kharkiv Java Conference 2018 on June 10, 2018.
CDI portable extensions are one of greatest features of Java EE allowing the platform to be extended in a clean and portable way. But allowing extension is just part of the story. CDI opens the door to a whole new eco-system for Java EE, but it’s not the role of the specification to create these extensions.
Apache DeltaSpike is the project that leads this brand new eco-system by providing useful extension modules for CDI applications as well as tools to ease the creation of new ones.
In this session, we’ll start by presenting the DeltaSpike toolbox and show how it helps you to develop for CDI. Then we’ll describe the major extensions included in DeltaSpike, including 'configuration', 'scheduling' and 'data'.
This document is about how to Write a CRUD App with Spring Boot Jpa or jdbc. a related example for this document is on github with the following address :
https://github.com/ghorbanihamid/SpringBoot_AOP_JPA_Example
Selenium RC: Automated Testing of Modern Web Applicationsqooxdoo
This talk is concerned with automated testing of Web applications. It
looks at testing Web apps in general, its goals and challenges; it will
present Selenium and Selenium RC in particular as a testing platform;
and will then focus on adaptions made to Selenium to ease the effort
to test apps made with qooxdoo, a JavaScript framework.
SpringOne Platform 2017
Juergen Hoeller, Pivotal
"Spring Framework 5.0 brings a lot of refinements all across the framework: some of rather obvious elements of our major programming model themes (functional & reactive)... but also some less prominent and less commonly presented features.
This brief session highlights a few personal favorites beyond the major themes."
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
In this presentation I will go through latest features being added in Spring 3.1/3.2 one more time and also will try to look behind the scene on what new features are comming in Spring 4 which should be released at the end of this year.
Hands-on lab given at #geecon for Visage Android development. A full VirtualBox image for running through the lab yourself is supplied here:
http://projavafx.com/VisageLab/
Griffon: Re-imaging Desktop Java TechnologyJames Williams
Griffon is a desktop framework for Java Swing leveraging the dynamic language Groovy and values convention over configuration.
Presented at Devoxx 2008
CDI portable extensions are one of greatest features of Java EE allowing the platform to be extended in a clean and portable way. But allowing extension is just part of the story. CDI opens the door to a whole new eco-system for Java EE, but it’s not the role of the specification to create these extensions.
Apache DeltaSpike is the project that leads this brand new eco-system by providing useful extension modules for CDI applications as well as tools to ease the creation of new ones.
In this session, we’ll start by presenting the DeltaSpike toolbox and show how it helps you to develop for CDI. Then we’ll describe the major extensions included in DeltaSpike, including 'configuration', 'scheduling' and 'data'.
This document is about how to Write a CRUD App with Spring Boot Jpa or jdbc. a related example for this document is on github with the following address :
https://github.com/ghorbanihamid/SpringBoot_AOP_JPA_Example
Selenium RC: Automated Testing of Modern Web Applicationsqooxdoo
This talk is concerned with automated testing of Web applications. It
looks at testing Web apps in general, its goals and challenges; it will
present Selenium and Selenium RC in particular as a testing platform;
and will then focus on adaptions made to Selenium to ease the effort
to test apps made with qooxdoo, a JavaScript framework.
SpringOne Platform 2017
Juergen Hoeller, Pivotal
"Spring Framework 5.0 brings a lot of refinements all across the framework: some of rather obvious elements of our major programming model themes (functional & reactive)... but also some less prominent and less commonly presented features.
This brief session highlights a few personal favorites beyond the major themes."
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
In this presentation I will go through latest features being added in Spring 3.1/3.2 one more time and also will try to look behind the scene on what new features are comming in Spring 4 which should be released at the end of this year.
Hands-on lab given at #geecon for Visage Android development. A full VirtualBox image for running through the lab yourself is supplied here:
http://projavafx.com/VisageLab/
Griffon: Re-imaging Desktop Java TechnologyJames Williams
Griffon is a desktop framework for Java Swing leveraging the dynamic language Groovy and values convention over configuration.
Presented at Devoxx 2008
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
Apache Cordova is a platform for building mobile applications using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile application developers to access mobile native functions such as (Audio, Camera, File, Battery, Contacts ...) using JavaScript. Although there are many JavaScript mobile application frameworks, jQuery mobile is one of the best mobile web application frameworks which allows the web developers to develop neat mobile web apps. This session illustrates how to use Apache Cordova with the combination of jQuery mobile in order to design, develop, and deploy a complete hybrid Android (and iOS) app. The demo app utilizes the device native functions (Audio and Camera) using pure JavaScript.
PhoneGap (aka Cordova) is a cross-platform framework for developing mobile apps using standard web development tools like HTML, CSS, and JavaScript. Join Troy Miles to learn how to create mobile apps with PhoneGap by building a simple but full-featured app during this hands-on class. Troy explores PhoneGap’s important capabilities, including GPS, camera, and audio recordings. Because JavaScript has a reputation as a somewhat difficult language, Troy teaches techniques for keeping your code robust and clean. To give your app the appropriate look and feel for the device on which it is running, the class will use the open source Chocolate Chip UI framework for testing. Troy shares ways to debug the code by running it as a web app, using browser development tools, or as a phone app, using the Chrome browser’s remote debugging features. Leave with the basics you need to start building your own cross-platform mobile apps.
Lab session given at OSCON Java 2011:
Visage is the successor to the JavaFX Script Language, a domain-specific language for writing UIs. It excels at rapid application design and can be used on any platform that supports Java. In this lab you will have an opportunity to write Visage applications that deploy to and run on Android mobile devices. No prior experience with Android or Visage development is required.
Spring boot is a suite, pre-configured, pre-sugared set of frameworks/technologies to reduce boilerplate configuration providing you the shortest way to have a Spring web application up and running with smallest line of code/configuration out-of-the-box.
From React to React Native - Things I wish I knew when I startedsparkfabrik
INTRO
Why RN
Welcome to the Mobile world
The app bundle
UI COMPONENTS/NAVIGATION
Android Jetpack
iOS UIKit
React Navigation
THE JAVASCRIPT ENGINE
JavaScriptCore
Chrome V8
Hermes
THE LOCAL DEVELOPMENT
Metro
Flipper
Gradle
CocoaPods
Fastlane
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
Apache Cordova is a platform for building native mobile applications using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile application developers to access mobile native functions such as (Audio, Camera, File, Battery, Contacts …etc) using JavaScript. Although there are many JavaScript mobile application frameworks, jQuery mobile is one of the best mobile web application frameworks which allows the web developers to develop web applications that are mobile friendly. This session illustrates how to use Apache Cordova with the combination of jQuery mobile in order to develop a native Android application and deploy on a real Android device. The demo application (“Memo” application) utilizes mobile native functions (Audio and Camera) using pure JavaScript.
React Native for multi-platform mobile applicationsMatteo Manchi
Since its 2013 release, React has brought a new way to design UI components in the world wide web. The same foundamentals have been taken to another important environment in our contemporary world: the mobile application.
This month we'll see the philosophy behind React Native - learn once, write anywhere - and how this new framework helps new developers to build native apps using React.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Connector Corner: Automate dynamic content and events by pushing a button
Lecture android best practices
1. Android Development Best
Practices. Android Wear
by Yuriy Voznyak, Software Engineer
eleks.com
You can view the presentation on http://eleksdev.blogspot.com
1
3. How to pair with?
● Install the Android Wear app
● Tap “Pair with a new watch”
● Tap “Enable Notifications”
Some Wear devices can be
paired with iOS
3
4. What systems have in common?
Android Wear and Android have common API. Except:
● No WebView in Wear;
● No direct internet connection: use Data Layer API
instead;
● No print subsystem;
● No cloud backup subsystem;
● No application widgets (e.g. on Launchers);
● No interaction with USB devices.
4
5. How to Show Notifications
Do nothing :) all Push Notifications appear
on Wear. Or customize notifications with
Wear extensions:
5
● User can interact with Wear notifications via Pending
Intent;
● Notifications on Wear can be customized;
● Show only wearable notification, not on handheld;
● Set custom backgrounds.
6. Distributing Wear apps
When publishing to users, you must package a wearable
app inside of a handheld app, because users cannot
browse and install apps directly on the wearable. If
packaged properly, when users download the handheld
app, the system automatically pushes the wearable app to
the paired wearable.
While developing, installing apps with adb install or
Android Studio directly to the wearable is required.
6
7. Defining Layouts
Specify Different Layouts for Square and Round Screens
<android.support.wearable.view.WatchViewStub
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/watch_view_stub"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rectLayout="@layout/rect_activity_wear"
app:roundLayout="@layout/round_activity_wear">
</android.support.wearable.view.WatchViewStub>
7
8. Accessing layout views
The layouts that you specify for square or round screens are not inflated until WatchViewStub
detects the shape of the screen, so your app cannot access their views immediately. To access
these views, set a listener in your activity to be notified when the shape-specific layout has been
inflated:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wear);
WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
@Override public void onLayoutInflated(WatchViewStub stub) {
TextView tv = (TextView) stub.findViewById(R.id.text); // Now you can access views
...
}
});
}
8
9. Also You Can
● Design new Watch Faces;
● Work with built-in speakers into
Wearables;
● Debug over Bluetooth;
● Send and collect data via Sync
mechanism;
● … And much much more.
9
11. GSON
Gson is a Java library used for serializing and deserializing Java objects
from and into JSON. A task you will frequently need to do if you
communicate with APIs. JSON is recommended to use because it’s
lightweight and much simpler than XML.
// Serialize
String userJSON = new Gson().toJson(user);
// Deserialize
User user = new Gson().fromJson(userJSON, User.class);
Gson works great with Retrofit as serializer/deserializer.
See more on https://github.com/google/gson
11
12. EventBus
EventBus is a library that simplifies communication between different parts of your
application. For example, sending something from an Activity to a running Service,
or easy interaction between fragments.
EventBus is an Android optimized publish/subscribe event bus. A typical use case
for Android apps is gluing Activities, Fragments, and background threads together.
Conventional wiring of those elements often introduces complex and error-prone
dependencies and life cycle issues. With EventBus propagating listeners through all
participants (e.g. background service -> activity -> multiple fragments or helper
classes) becomes deprecated. EventBus decouples event senders and receivers
and thus simplifies communication between app components. Less code, better
quality. And you don't need to implement a single interface!
12
13. EventBus Example
public class HomeActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this); // register EventBus
}
@Override
protected void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this); // unregister EventBus
}
public void onEventMainThread(NetworkStateChanged event) {
if (!event.isInternetConnected()) {
Toast.makeText(this, "No Internet connection!", Toast.LENGTH_SHORT).show();
}
}
}
public class NetworkStateChanged {}
EventBus.getDefault().post(new NetworkStateChanged());
See more on http://greenrobot.org/eventbus/
13
14. Butterknife
A library for binding Android views to fields and methods (for instance, binding a view OnClick to a
method). Annotate fields with @Bind and a view ID for Butter Knife to find and automatically cast
the corresponding view in your layout.
class ExampleActivity extends Activity {
@BindView(R.id.title) TextView title;
@BindView(R.id.subtitle) TextView subtitle;
@BindView(R.id.footer) TextView footer;
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.simple_activity);
ButterKnife.bind(this);
// TODO Use fields...
}
}
See more on http://jakewharton.github.io/butterknife/
14
15. Dagger 2
15
Dagger is a fully static, compile-time dependency injection framework for both Java
and Android. It is an adaptation of an earlier version created by Square and now
maintained by Google. Dagger creates instances of your classes and satisfies their
dependencies. It relies on javax.inject.Inject annotation to identify which constructors
or fields should be treated as dependencies.
Dagger 2 is the successor of the famous Dagger dependency injection library. One of
the major improvements is using zero reflection in generated injection code, which
makes debugging a lot easier.
Dagger 2 is the first to implement the full stack with generated code. The guiding
principle is to generate code that mimics the code that a user might have hand-written
to ensure that dependency injection is as simple, traceable and performant as it can
be.
16. Dagger Code Example
class Thermosiphon implements Pump {
private final Heater heater;
@Inject
Thermosiphon(Heater heater) {
this.heater = heater;
}
...
}
class CoffeeMaker {
@Inject Heater heater;
@Inject Pump pump;
...
}
16
Also allows to resolve dependencies;
Build the dependencies Graph; Resolve
constructors as Singletons; Lazy
Injections; Compile-time validation and
much much more.
Read more on
http://google.github.io/dagger/
17. Glide
Glide is the library to use for loading images. Current alternatives are Universal Image Loader
and Picasso.
Glide is recommended by Google.
Here's a simple example how you can use Glide to load an image from a URL into ImageView:
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);
See more on https://github.com/bumptech/glide/wiki
17
18. DBFlow
The Fastest Android ORM Database Library
DBFlow uses Annotation Processing functionality to generate all sorts of classes and
interactions with the database at compile time. This enables the library to run at native speed
and becomes as fast as writing the code yourself. Also, generating code is transparent–we can
see the code that the app executes and catch errors at compile time. Reflection is difficult to
debug, since we will only catch errors at runtime.
List devices = new Select().from(DeviceObject.class)
.where(
Condition.column(DeviceObject$Table.NAME).is("Samsung-Galaxy-S5"),
Condition.column(DeviceObject$Table.CARRIER).is("T-Mobile")).queryList();
Delete.table(DeviceObject.class);
See more on https://github.com/Raizlabs/DBFlow
18
19. It is only small amount
Think about using libraries!
19
20. Gradle
● Build different flavours or variants of your app
● Make simple script-like tasks
● Manage and download dependencies
● Customize keystores
● And more
20
21. Maven Dependencies for Gradle
The main reason is not to keep the library locally as Jar or something else
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.hibernate', name: 'hibernate-core', version: '3.6.7.Final'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
Or
dependencies {
compile 'org.hibernate:hibernate-core:3.6.7.Final'
} 21
23. Components and UI
● Avoid using nested layouts; Avoid deep hierarchy for
views
● Use styles instead of views spot customization;
● Don`t put much code to Activities or Fragments;
● Dont`use Intents for in-application communication. Use
RxJava or EventBus if possible;
● Don`t rely on Android System-level intents.
23
24. ProGuard
ProGuard is a tool for code obfuscation, shrinking and
optimization
● Use it;
● Verify Release builds for ProGuard rules;
● Keep mapping.txt for every release.
24