The use of libraries or frameworks forces us to write a considerable amount of initialization code, often very repetitive and usually difficult to remember; it is what we call boilerplate code. In this talk, different mechanisms available in Android Studio and the Java language will be presented. In particular, we will provide an overview of the code completion mechanisms, ADT Templates, Gradle plugins, Annotation Processors and Android Studio/IntelliJ IDEA plugin system.
CakePHP is a nice way of using MVC architecture in you PHP environment. Looking through this presentation you'll get introduced to MVC and get some start up code examples for you to explore.
Presented at Codemotion 2016. Discusses the beginner-level dynamics of the performance-improved PHP 7. Gain expanded knowledge of the spaceship and null coalescing operators, anonymous classes, the new error exception, and the security features of PHP 7.
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
For developers used to working with frameworks like Spring, and Rails, Go's lack of advice on how to structure your application can be bewildering. Many new developers, reach for their favourite Spring, or Rails equivalent, and rely on its structure, but that is a mistake! Go gives us wonderful tools to put Domain-driven design into practice, and create beautiful applications.
Getting started with go - Florin Patan - Codemotion Milan 2016Codemotion
This talk focuses on people which are interested the Go programming language and want to learn it. In it I will present the various resources new gophers have to learn Go, what are the usual pitfalls and how to get help when they are stuck.
CakePHP is a nice way of using MVC architecture in you PHP environment. Looking through this presentation you'll get introduced to MVC and get some start up code examples for you to explore.
Presented at Codemotion 2016. Discusses the beginner-level dynamics of the performance-improved PHP 7. Gain expanded knowledge of the spaceship and null coalescing operators, anonymous classes, the new error exception, and the security features of PHP 7.
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
For developers used to working with frameworks like Spring, and Rails, Go's lack of advice on how to structure your application can be bewildering. Many new developers, reach for their favourite Spring, or Rails equivalent, and rely on its structure, but that is a mistake! Go gives us wonderful tools to put Domain-driven design into practice, and create beautiful applications.
Getting started with go - Florin Patan - Codemotion Milan 2016Codemotion
This talk focuses on people which are interested the Go programming language and want to learn it. In it I will present the various resources new gophers have to learn Go, what are the usual pitfalls and how to get help when they are stuck.
Slides of my talk I gave @ PyRE.it in ReggioEmilia about developing a Rest Api in Python using a little bit of Flask and SqlAlchemy.
www.pyre.it
www.alessandrocucci.it/pyre/restapi
When migrating, we often need to review old code and target only interesting issues. This session will connect the backward incompatibilities and new features to actual location in the code, relying on static analysis to process a large code base quickly. Based on the accumulated experience of the tools, we will review the issues, diagnose criticality, select the best fixes, and prioritize tasks. All tools used will be open source, and you can try them at home for more validation.
The Drizzle Project is a fork of the MySQL 6.0 server. One of the many goals of Drizzle is to enable a large plugin ecosystem by improving, simplifying, and modernizing the application programming interfaces between the kernel and the modules providing services for Drizzle. This tutorial serves to showcase the new APIs for Drizzle's replication through a series of in-depth examples.
It's a Kind of Magic: Under the Covers of Spring BootVMware Tanzu
SpringOne Platform 2017
Brian Clozel, Pivotal; Stéphane Nicoll, Pivotal
"One of Spring Boot's most powerful features is its auto-configuration. This magic is key to the convention-over-configuration approach that has brought a huge boost in productivity to Java developers. But is it really magic? We don't think so.
In this session we'll take a look under the covers of Spring Boot. You'll learn about auto-configuration and the conditional configuration model that powers it, helping you to be even more productive when writing Spring Boot applications."
React mit TypeScript – eine glückliche Eheinovex GmbH
In seiner Brownbag sprach inovexler Johann über die Verwendung von TypeScript in einer React-Anwendung.
Als Java-Land Immigrant mit Typisierungshintergrund, fällt es einem in der neuen JavaScript-Welt erstmal schwer auf etablierte Refactoring-Traditionen und die gute, alte Code-Literatur zu verzichten. TypeScript bringt verloren geglaubte Möglichkeiten zurück und ist auch zu React eine willkommene Bereicherung.
In diesem Vortrag wird gezeigt, wie man möglichst einfach ein React-Projekt mit TypeScript aufsetzt, einfache Typisierungsregeln etabliert und bekannte Bibliotheken integriert.
Event: Brownbag bei inovex
Speaker: Johann Böhler, inovex
Datum: 25.06.2018
Weitere Tech-Vorträge: https://www.inovex.de/de/content-pool/vortraege/
Weitere Tech-Artikel: www.inovex.de/blog
These are the slides for the talk given at https://www.meetup.com/South-Florida-Software-Testing/events/233980212
Short summary:
KISS (Keep It Simple Stupid) techniques and practices in Web UI Automation on topics:
- selenium webdriver vs wrappers
- XPath vs CSS Selectors + Selene
- End to End vs Atomic tests
- Pretty vs Simple reports
- BDD vs XUnit style of tests
- PageObject vs PageModules (OOP vs Procedural/Modular programming)
This workshop is a hands-on training where a real Zend Framework application is used as an example to start improving QA using tools to test, document and perform software metric calculations to indicate where the software can be improved. I also explain the reports produced by a CI system.
TYPO3 Extension development using new Extbase frameworkChristian Trabold
My presentation for the TYPO3 community day in Tokyo, Japan.
The code is available at https://github.com/ctrabold/t3ski-workshop.
Due to copyright issues I had to remove all pictures of Miffy.
"I have a framework idea" - Repeat less, share more.Fabio Milano
macOS, tvOS, iOS, watchOS, Extensions. In such a dense ecosystem, creating a framework enables us to easily share code between components of our universal applications and with the open-source community.
In this talk, we will learn about processes and tools that help create, 'ship' and maintain a multi platform framework. Throughout all steps, we will see how to use CocoaPods and Carthage, integrate CI tools to keep our code robust, see best practices for authoring frameworks. We'll show how frameworks could change our way of designing an application infrastructure and how you can contribute to the open-source community by turning your idea into a framework.
Slides of my talk I gave @ PyRE.it in ReggioEmilia about developing a Rest Api in Python using a little bit of Flask and SqlAlchemy.
www.pyre.it
www.alessandrocucci.it/pyre/restapi
When migrating, we often need to review old code and target only interesting issues. This session will connect the backward incompatibilities and new features to actual location in the code, relying on static analysis to process a large code base quickly. Based on the accumulated experience of the tools, we will review the issues, diagnose criticality, select the best fixes, and prioritize tasks. All tools used will be open source, and you can try them at home for more validation.
The Drizzle Project is a fork of the MySQL 6.0 server. One of the many goals of Drizzle is to enable a large plugin ecosystem by improving, simplifying, and modernizing the application programming interfaces between the kernel and the modules providing services for Drizzle. This tutorial serves to showcase the new APIs for Drizzle's replication through a series of in-depth examples.
It's a Kind of Magic: Under the Covers of Spring BootVMware Tanzu
SpringOne Platform 2017
Brian Clozel, Pivotal; Stéphane Nicoll, Pivotal
"One of Spring Boot's most powerful features is its auto-configuration. This magic is key to the convention-over-configuration approach that has brought a huge boost in productivity to Java developers. But is it really magic? We don't think so.
In this session we'll take a look under the covers of Spring Boot. You'll learn about auto-configuration and the conditional configuration model that powers it, helping you to be even more productive when writing Spring Boot applications."
React mit TypeScript – eine glückliche Eheinovex GmbH
In seiner Brownbag sprach inovexler Johann über die Verwendung von TypeScript in einer React-Anwendung.
Als Java-Land Immigrant mit Typisierungshintergrund, fällt es einem in der neuen JavaScript-Welt erstmal schwer auf etablierte Refactoring-Traditionen und die gute, alte Code-Literatur zu verzichten. TypeScript bringt verloren geglaubte Möglichkeiten zurück und ist auch zu React eine willkommene Bereicherung.
In diesem Vortrag wird gezeigt, wie man möglichst einfach ein React-Projekt mit TypeScript aufsetzt, einfache Typisierungsregeln etabliert und bekannte Bibliotheken integriert.
Event: Brownbag bei inovex
Speaker: Johann Böhler, inovex
Datum: 25.06.2018
Weitere Tech-Vorträge: https://www.inovex.de/de/content-pool/vortraege/
Weitere Tech-Artikel: www.inovex.de/blog
These are the slides for the talk given at https://www.meetup.com/South-Florida-Software-Testing/events/233980212
Short summary:
KISS (Keep It Simple Stupid) techniques and practices in Web UI Automation on topics:
- selenium webdriver vs wrappers
- XPath vs CSS Selectors + Selene
- End to End vs Atomic tests
- Pretty vs Simple reports
- BDD vs XUnit style of tests
- PageObject vs PageModules (OOP vs Procedural/Modular programming)
This workshop is a hands-on training where a real Zend Framework application is used as an example to start improving QA using tools to test, document and perform software metric calculations to indicate where the software can be improved. I also explain the reports produced by a CI system.
TYPO3 Extension development using new Extbase frameworkChristian Trabold
My presentation for the TYPO3 community day in Tokyo, Japan.
The code is available at https://github.com/ctrabold/t3ski-workshop.
Due to copyright issues I had to remove all pictures of Miffy.
"I have a framework idea" - Repeat less, share more.Fabio Milano
macOS, tvOS, iOS, watchOS, Extensions. In such a dense ecosystem, creating a framework enables us to easily share code between components of our universal applications and with the open-source community.
In this talk, we will learn about processes and tools that help create, 'ship' and maintain a multi platform framework. Throughout all steps, we will see how to use CocoaPods and Carthage, integrate CI tools to keep our code robust, see best practices for authoring frameworks. We'll show how frameworks could change our way of designing an application infrastructure and how you can contribute to the open-source community by turning your idea into a framework.
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
Adam has authored CodeIgniter 1.7 Professional Development; the first advanced CodeIgniter book, gives an overview of what's new with CodeIgniter 2.0, how to upgrade your applications and a detailed overview of how to create drivers.
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Esta charla comprende las lecciones aprendidas convirtiendo la app de Android de Teambox (una app repleta de deuda técnica y con un alto nivel de acoplamiento entre clases), en la versión actual de Redbooth, que intenta cumplir la arquitectura Hexagonal y los principios SOLID. Durante la exposición explicaremos como fuimos desenredando el código paso a paso; como aplicamos por partes los conceptos de la arquitectura hexagonal; como dejamos de lado componentes del framework de Android que dificultaban el mantenimiento de la app; y que errores cometimos, como los solucionamos y como se podrían haber evitado.
The most hated thing a developer can imageine is writing documentation but on the other hand nothing can compare with a well documented source code if you want to change or extend some code. PhpDocumentor is one of many tools enabling you to parse the inline documentation and generate well structured and referenced documents. This tallk will show you how to get the most out of phpDocumentor and shall enable you to write fantastic documentation.
Today’s web and mobile app localization industry relies on numerous standards, libraries and file formats to facilitate the exchange between developers and translators. While some formats are somewhat sophisticated, others lack even the most basic features, like pluralization and contextualization. And most can’t offer support for more advanced localization features, like language cases.
The most common localization formats include Gettext PO, PHP Arrays, Android XML, YAML, .Net RESX, iOS Strings and many others. A typical developer today works with many frameworks - for instance a Laravel backend app (PHP Arrays) with Ember front end (i18n JS) and iOS mobile app (Strings). Since all standards have distinct syntax, in many cases translations cannot be shared across applications.
Translation Markup Language (TML) aims to solve both these problems by introducing a powerful extensible cross-platform syntax that offers support for pluralization, language contextualization, language cases, reusable decorators and much more. TML libraries are available for all major web and mobile platforms. TML allows translators to do in-context translations - where they can translate right from within the apps. TML libraries also eliminate the need for developers to ever deal with the resource files, as all extractions and translation substitution is done realtime and the resource files are only used as a transport between the apps and the Translation Exchange platform.
Translation Exchange stores all translations in Universal Translation Memory (UTM), a graph database which stores all translations with their context, tone, rank and other attributes for accurate matching. This allows translations to be shared across all apps in the Translation Exchange Network. The translation memories of each app are extracted from the UTM graph and are managed by their individual localization teams. During this presentation we will look at some of the features of TML and how it can be used to quickly translate a Laravel application into any number of languages using in-context translation tools. We will also look at how the data is stored and shared across applications using UTM.
How to improve your code quality? The answer is continuous refactoring. Learn more about refactoring. Know the most frequent code smells (antipatterns), telling when to refactor. Go through the catalog of well-known refactorings, telling how to improve your code.
Learn what is Chromecast and which are its possibilities in order to cast content from your mobile device (smartphone or tablet, Android or iOS) and website. Also, library dependencies and publishing options are analyzed.
Wearable devices seem to be the next revolution to come. In this presentation, we analyze how to incorporate the Android Wear preview API into our Android app and which are its main features.
An introduction to the development of software applications for Google Glass (Glassware) using the preview version of the Glass Development Kit extension to Android. To illustrate the GDK, we have created a sample application, called Breaking Glass, based on the awesome TV series Breaking Bad
Video of the presentation: https://www.youtube.com/watch?v=pV2_HjZk1W0
Code available on: https://github.com/everywaretech/BreakingGlass
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
2. Tomás Ruiz-López
Software Design Manager at Everyware Technologies
@tomasruizlopez
@everywaretech
/everywaretech
http://www.everywaretech.es
WHO AM I?
Postdoctoral Fellow at Cancer Registry of Norway
Everyware Technologies
tomas@everywaretech.es
5. public
class
MyParcelable
implements
Parcelable
{
private
int
mData;
!
public
int
describeContents()
{
return
0;
}
!
public
void
writeToParcel(Parcel
out,
int
flags)
{
out.writeInt(mData);
}
!
public
static
final
Parcelable.Creator<MyParcelable>
CREATOR
=
new
Parcelable.Creator<MyParcelable>()
{
public
MyParcelable
createFromParcel(Parcel
in)
{
return
new
MyParcelable(in);
}
!
public
MyParcelable[]
newArray(int
size)
{
return
new
MyParcelable[size];
}
};
private
MyParcelable(Parcel
in)
{
mData
=
in.readInt();
}
}
60. <?xml
version="1.0"?>
<recipe>
<dependency
mavenUrl="com.squareup.retrofit:retrofit:1.8.0"/>
!
!
<copy
from="res/values/urls.xml"
to=“${resOut}/values/urls.xml"
/>
!
!
<instantiate
from="src/app_package/Service.java.ftl"
to="${srcOut}/${className}.java"
/>
!
<open
file="${srcOut}/${className}.java"
/>
!
</recipe>
recipe.xml.ftl
PRO TIP: Put an open command at the end of your recipe to make sure
everything executed correctly
63. ADT Templates
Generates multiple files, even projects
Customizable
Only for creation
Automatic UI wizard generated
Complex syntax
Difficult to test and verify correctness
94. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
95. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
PRO TIP: Use com.squareup.JavaPoet
to generate code
96. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
97. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
Allows other processors to
handle the same annotations
98. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
99. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
PRO TIP: Use AutoService
to generate META-INF
100. Processing annotations
@AutoService(Processor.class)
public
class
MyProcessor{
!
@Override
public
Set<String>
getSupportedAnnotationTypes(){
return
Collections.singleton(MyAnnotation.class.getName());
}
!
@Override
public
SourceVersion
getSupportedSourceVersion(){
return
SourceVersion.latestSupported();
}
!
@Override
public
boolean
process(Set<?
extends
TypeElement>
annotations,
RoundEnvironment
roundEnv){
!
Set<?
extends
Element>
elements
=
roundEnv.getElementsAnnotatedWith(MyAnnotation.class);
//
Process
elements
and
generate
code
!
return
false;
}
}
121. About ADT Templates
Official documentation
https://android.googlesource.com/platform/sdk/+/refs/heads/master/templates/docs/index.html
About Gradle Plugins
Writing Custom Plugins
https://gradle.org/docs/current/userguide/custom_plugins.html
!
Lessons learned from our first Gradle plugin for Android,
Victor
https://trello.engineering/victor/
!
Hugo
https://github.com/JakeWharton/hugo
122. About Annotation Processors
Annotation Processing Boilerplate Destruction
https://speakerdeck.com/jakewharton/annotation-processing-boilerplate-destruction-droidcon-nyc-2014
About IntelliJ Plugins
Getting Started with Plugin Development
https://confluence.jetbrains.com/display/IDEADEV/Getting+Started+with+Plugin+Development
!