Posts Tagged ‘DevoxxBE2013’
[DevoxxBE2013] Riddle Me This, Android Puzzlers
Stephan Linzner and Richard Hyndman, Google Android Developer Advocates, unravel enigmatic Android behaviors through interactive puzzles. Stephan, an automation aficionado and runner, teams with Richard, a 12-year mobile veteran from startups to operators, to probe component lifecycles, UI quirks, and KitKat novelties. Their session, blending polls and demos, spotlights content providers’ primacy, ViewStub pitfalls, and screen recording tools, arming developers with debugging savvy.
Android’s intricacies, they reveal, demand vigilance: from process spawning to WebView debugging. Live polls engage the audience, transforming head-scratchers into teachable moments.
Component Creation Order and Lifecycle
Stephan kicks off with a poll: which component initializes first post-process spawn? Hands favor activities, but content providers lead—crucial for data bootstrapping.
Richard demos service lifecycles, warning against onCreate leaks; broadcasts’ unregistered crashes underscore registration discipline.
UI Rendering Quirks and Optimizations
ViewStub inflation puzzles Stephan: pre-inflate for speed, but beware null children post-inflation. Richard explores ListView recycling, ensuring adapters populate recycled views correctly to avoid visual glitches.
These gotchas, they stress, demand profiler scrutiny for fluid UIs.
KitKat Innovations and Debugging Aids
KitKat’s screen recording, Richard unveils, captures high-res videos sans root—ideal for demos or Play Store assets. Stephan spotlights WebView debugging: Chrome DevTools inspect remote views, editing CSS live.
Monkey tool’s seeded crashes aid reproducible testing, simulating user chaos.
Interactive Polls and Community Insights
Polls gauge familiarity with overscan modes and transition animations, fostering engagement. The duo fields queries on SurfaceView security and WebView copies, clarifying limitations.
This collaborative format, they conclude, equips developers to conquer Android’s riddles.
Links:
[DevoxxBE2013] Business Strategies for Small Independent Developers
Joe Cieplinski, Creative Director at Bombing Brain Interactive, imparts wisdom on navigating the indie development landscape, drawing from his journey with apps like Teleprompt+ and Setlists. A former Apple Store presenter and app designer since 2008, Joe shares monetization tactics, customer engagement, and marketing essentials for sustaining a living through mobile software. His session, infused with anecdotes from his iOS and OS X ventures, underscores premium pricing, in-app purchases, and responsive support as pillars of success.
Indie developers, Joe contends, thrive by treating apps as products with ongoing value. He recounts Bombing Brain’s evolution, from manual support to PDF/iBooks guides, reducing queries while building loyalty. Effective strategies, he illustrates, blend quality delivery with community interaction, turning users into advocates.
Monetization Models and Pricing Wisdom
Joe advocates premium upfront pricing for perceived value, citing Teleprompt+’s $19.99 tagline drawing discerning users. Subscriptions and in-app upgrades, he demos, extend revenue—unlocking features like cloud sync fosters recurring income.
Avoid free apps’ ad pitfalls, Joe warns; targeted promotions on App Store or forums yield better conversions than broad ads.
Customer Support and Resource Creation
Exemplary support, Joe emphasizes, differentiates indies. He shares Tim Mosley’s empathetic responses, turning complaints into testimonials. Comprehensive manuals—100-page PDFs for Teleprompt+—preempt queries, saving time while showcasing depth.
Social media, though secondary for his audience, amplifies reach; Twitter/App.net engagements build rapport.
Building Reputation and Marketing Tactics
Reputation accrues through consistent excellence, Joe asserts. Cross-platform ports, like Teleprompt+ for iPad/iPhone/OS X, expand ecosystems. Collaborations with friends, as in his trio, infuse passion into products.
Marketing favors organic growth: user reviews, niche forums, and targeted outreach outperform paid campaigns for bootstrapped teams.
Lessons from Bombing Brain’s Journey
Joe reflects on x2y’s launch, balancing innovation with sustainability. He urges indies to prioritize joy—his “lifestyle” approach sustains creativity amid challenges.
This blueprint, Joe concludes, equips solo creators for enduring viability in app markets.
Links:
[DevoxxBE2013] Part 1: Thinking Functional Style
Venkat Subramaniam, an award-winning author and founder of Agile Developer, Inc., guides developers through the paradigm shift of functional programming on the JVM. Renowned for Functional Programming in Java and his global mentorship, Venkat uses Java 8, Groovy, and Scala to illustrate functional tenets. His session contrasts imperative statements with composable expressions, demonstrating how to leverage lambda expressions and higher-order functions for elegant, maintainable code.
Functional programming, Venkat posits, transcends syntax—it’s a mindset fostering immutability and data flow. Through practical examples, he showcases Groovy’s idiomatic functional constructs and Scala’s expression-driven purity, equipping attendees to rethink application design.
Functional Principles and Expressions
Venkat contrasts statements—imperative, mutation-driven blocks—with expressions, which compute and return values. He demos a Java 8 stream pipeline, transforming data without side effects, versus a loop’s mutability.
Expressions, Venkat emphasizes, enable seamless composition, fostering cleaner, more predictable codebases.
Groovy’s Functional Idioms
Groovy, though not purely functional, excels in functional style, Venkat illustrates. He showcases collect and findAll for list transformations, akin to Java 8 streams, with concise closures.
These idioms, he notes, simplify data processing, making functional patterns intuitive for Java developers.
Scala’s Expression-Driven Design
Scala’s expression-centric nature shines in Venkat’s examples: every construct returns a value, enabling chaining. He demos pattern matching and for-comprehensions, streamlining complex workflows.
This purity, Venkat argues, minimizes state bugs, aligning with functional ideals.
Higher-Order Functions and Composition
Venkat explores higher-order functions, passing lambdas as arguments. A Groovy example composes functions to filter and map data, while Scala’s currying simplifies partial application.
Such techniques, he asserts, enhance modularity, enabling parallelization for performance-critical tasks.
Practical Adoption and Parallelization
Venkat advocates starting with small functional refactors, like replacing loops with streams. He demos parallel stream processing in Java 8, leveraging multi-core CPUs.
This pragmatic approach, he concludes, bridges imperative habits with functional elegance, boosting scalability.
Links:
[DevoxxBE2013] Part 1: Java EE 7: What’s New in the Java EE Platform
Antonio Goncalves and Arun Gupta, luminaries in Java EE advocacy, deliver a comprehensive exploration of Java EE 7’s advancements, blending simplification with expanded capabilities. Antonio, a senior architect and author of Beginning Java EE 6 Platform with GlassFish 3, collaborates with Arun, Red Hat’s Director of Developer Advocacy and former Java EE pioneer at Sun Microsystems, to unveil WebSocket, JSON processing, and enhanced CDI and JTA features. Their session, rich with demos, highlights how these innovations bolster HTML5 support and streamline enterprise development.
Java EE 7, they assert, refines container services while embracing modern web paradigms. From WebSocket’s real-time communication to CDI’s unified bean management, they showcase practical integrations, ensuring developers can craft scalable, responsive applications.
WebSocket for Real-Time Communication
Antonio introduces WebSocket, a cornerstone for HTML5’s bidirectional connectivity. He demonstrates @ServerEndpoint-annotated classes, crafting a chat application where messages flow instantly, bypassing HTTP’s overhead.
Arun details encoders/decoders, transforming POJOs to wire-ready text or binary frames, streamlining data exchange for real-time apps like live dashboards.
JSON Processing and JAX-RS Enhancements
Arun explores JSON-P (JSR 353), parsing and generating JSON with a fluid API. He demos building JSON objects from POJOs, integrating with JAX-RS’s HTTP client for seamless RESTful interactions.
This synergy, Antonio notes, equips developers to handle data-driven web applications, aligning with HTML5’s data-centric demands.
CDI and Managed Bean Alignment
Antonio unveils CDI’s evolution, unifying managed beans with injectable interceptors. He showcases constructor injection and method-level validation, simplifying dependency management across EJBs and servlets.
Arun highlights JTA’s declarative transactions, enabling @Transactional annotations to streamline database operations, reducing boilerplate.
Simplified JMS and Batch Processing
Arun introduces JMS 2.0’s simplified APIs, demonstrating streamlined message publishing. The new Batch API (JSR 352), Antonio adds, orchestrates chunk-based processing for large datasets, with demos showcasing job definitions.
These enhancements, they conclude, enhance usability, pruning legacy APIs while empowering enterprise scalability.
Resource Definitions and Community Engagement
Antonio details expanded resource definitions, configuring data sources via annotations. Arun encourages JCP involvement, noting Java EE 8’s community-driven roadmap.
Their demos—leveraging GlassFish—illustrate practical adoption, inviting developers to shape future specifications.
Links:
[DevoxxBE2013] The Unpuzzling Kotlin: Bringing Clarity to Your Code
Svetlana Isakova and Aleksei Sedunov, core Kotlin developers at JetBrains, dissect Java’s perplexing behaviors through Kotlin’s lens, affirming its mission for safer, concise JVM code. Svetlana, a language architect and Scala educator, pairs with Aleksei, IDE tooling specialist and Kotlin In-Depth author, to translate infamous Java Puzzlers—exposing casting pitfalls, expression ambiguities, and exception quirks—into Kotlin equivalents that eliminate obscurity.
Kotlin, they assert, rectifies Java’s design flaws via smart casts, safe calls, and extension functions, fostering intuitive industrial programming. Their analysis, rooted in real-world fixes, invites scrutiny at JetBrains’ booth.
Expressions and Control Structures
Svetlana contrasts Java’s operator precedence puzzles with Kotlin’s explicit parentheses, averting silent errors. She demos a chained assignment mishap, resolved in Kotlin by immutable vals.
Aleksei explores null safety: Kotlin’s ?. safe calls and !! assertions prevent NPEs, unlike Java’s unchecked casts.
Exception Handling and Resource Management
Java’s checked exceptions burden APIs, Aleksei notes; Kotlin’s unchecked model simplifies signatures. He illustrates try-with-resources emulation via use extensions, ensuring cleanup.
Svetlana highlights Elvis operator (?:) for concise defaults, streamlining null propagation absent in Java.
Objects, Classes, and Nullability
Kotlin’s data classes auto-generate equals/hashCode, eclipsing Java’s boilerplate. Aleksei demos sealed classes for exhaustive when branches, enhancing pattern matching.
Svetlana unveils nullable types: platform types from Java interop demand explicit handling, with smart casts post-checks yielding type safety.
Extensions and Practical Wisdom
Extensions augment classes without inheritance, Aleksei shows, adding string utilities seamlessly. He addresses puzzler avoidance: Kotlin’s design sidesteps most Java gotchas, though vigilance persists.
Svetlana fields queries on closures and extensions, affirming Kotlin’s simplicity for Java migrants.
Links:
[DevoxxBE2013] Architecting Android Applications with Dagger
Jake Wharton, an Android engineering luminary at Square, champions Dagger, a compile-time dependency injector revolutionizing Java and Android modularity. Creator of Retrofit and Butter Knife, Jake elucidates Dagger’s divergence from reflection-heavy alternatives like Guice, emphasizing its speed and testability. His session overviews injection principles, Android-specific scoping, and advanced utilities like Lazy and Assisted Injection, arming developers with patterns for clean, verifiable code.
Dagger, Jake stresses, decouples class behaviors from dependencies, fostering reusable, injectable components. Through live examples, he builds a Twitter client, showcasing modules for API wrappers and HTTP clients, ensuring seamless integration.
Dependency Injection Fundamentals
Jake defines injection as externalizing object wiring, promoting loose coupling. He contrasts manual factories with Dagger’s annotation-driven graphs, where @Inject fields auto-resolve dependencies.
This pattern, Jake demonstrates, simplifies testing—mock modules swap implementations effortlessly, isolating units.
Dagger in Android Contexts
Android’s lifecycle demands scoping, Jake explains: @Singleton for app-wide instances, activity-bound for UI components. He constructs an app graph, injecting Twitter services into activities.
Fragments and services, he notes, inherit parent scopes, minimizing boilerplate while preserving encapsulation.
Advanced Features and Utilities
Dagger’s extras shine: @Lazy defers creation, @Assisted blends factories with injection for parameterized objects. Jake demos provider methods in modules, binding interfaces dynamically.
JSR-330 compliance, augmented by @Module, ensures portability, though Jake clarifies Dagger’s compile-time limits preclude Guice’s AOP dynamism.
Testing and Production Tips
Unit tests leverage Mockito for mocks, Jake illustrates, verifying injections without runtime costs. Production graphs, he advises, tier via subcomponents, optimizing memory.
Dagger’s reflection-free speed, Jake concludes, suits resource-constrained Android, with Square’s hiring call underscoring real-world impact.
Links:
[DevoxxBE2013] Lambda: A Peek Under the Hood
Brian Goetz, Java Language Architect at Oracle, offers an illuminating dissection of lambda expressions in Java SE 8, transcending syntactic sugar to reveal the sophisticated machinery powering this evolution. Renowned for Java Concurrency in Practice and leadership in JSR 335, Brian demystifies lambdas’ implementation atop invokedynamic from Java SE 7. His session, eschewing introductory fare, probes the VM’s strategies for efficiency, contrasting naive inner-class approaches with optimized bootstrapping and serialization.
Lambdas, Brian asserts, unlock expressive potential for applications and libraries, but their true prowess lies in performance rivaling or surpassing inner classes—without the bloat. Through benchmarks and code dives, he showcases flexibility and future-proofing, underscoring the iterative path to a robust design.
From Syntax to Bytecode: The Bootstrap Process
Brian traces lambdas’ lifecycle: source code desugars to invokedynamic callsites, embedding a “recipe” for instantiation. The bootstrap method, invoked once per callsite, crafts a classfile dynamically, caching for reuse.
This declarative embedding, Brian illustrates, avoids inner classes’ per-instance overhead, yielding leaner bytecode and faster captures—non-capturing lambdas hit 1.5x inner-class speeds in early benchmarks.
Optimization Strategies and Capture Semantics
Capturing lambdas, Brian explains, leverage local variable slots via synthetic fields, minimizing allocations. He contrasts “eager” (immediate class creation) with “lazy” (deferred) strategies, favoring the latter for reduced startup.
Invokedynamic’s dynamic binding enables profile-guided refinements, promising ongoing gains. Brian’s throughput metrics affirm lambdas’ edge, even in capturing scenarios.
Serialization and Bridge Methods
Serializing lambdas invokes writeReplace to a serialized form, preserving semantics without runtime overhead. Brian demos bridge methods for functional interfaces, ensuring compatibility.
Default methods, he notes, extend interfaces safely, avoiding binary breakage—crucial for library evolution.
Lessons from Language Evolution
Brian reflects on Lambda’s odyssey: discarded ideas like inner-class syntactic variants paved the way for invokedynamic’s elegance. This resilience, he posits, exemplifies evolving languages amid obvious-but-flawed intuitions.
Project Lambda’s resources—OpenJDK docs, JCP reviews—invite deeper exploration, with binary builds for experimentation.
Links:
[DevoxxBE2013] CQRS for Great Good
Oliver Wolf, principal consultant and executive board member at INNOQ, challenges conventional architectures with CQRS (Command-Query Responsibility Segregation). A SOA and Java expert, Oliver traces CQRS’s evolution from CQS, demonstrating incremental adoption—from read-write separation to event sourcing. His session, enriched with examples, equips developers to rethink data flows, optimizing for asymmetric workloads in banking and beyond.
CQRS decouples commands (writes) from queries (reads), enabling tailored models. Oliver illustrates phased implementation, culminating in event-sourced systems for auditability and scalability.
From CQS to CQRS: Foundational Concepts
Oliver recalls CQS—Bertrand Meyer’s principle segregating mutators from inspectors. CQRS extends this, allowing distinct read/write models. He demos a simple e-commerce app, splitting a unified model into command (order placement) and query (inventory views).
This separation, Oliver explains, resolves impedance mismatches, enhancing performance.
Incremental Adoption Strategies
Phased rollout minimizes risk: start with asymmetric databases, Oliver advises, using separate stores for reads/writes. He showcases materialized views, syncing via background jobs.
Advanced steps introduce event sourcing: commands emit events, replayed for state reconstruction, ensuring immutability.
Event Sourcing and Distribution
Event sourcing captures changes as immutable logs, Oliver illustrates, rebuilding state on demand. Distribution follows: client/server variants, with web frontends querying dedicated services.
In banking, Oliver notes, CQRS optimizes configurable systems, balancing risk with extensibility.
Guidelines for Application
Oliver urges starting small: identify read-heavy operations, segregate gradually. Avoid over-engineering; CQRS suits complex domains, not simple CRUD.
Community examples, he shares, validate phased approaches, with INNOQ projects exploring hybrid models.
Links:
[DevoxxBE2013] OpenShift Primer: Get Your Applications into the Cloud
Eric D. Schabell, JBoss technology evangelist at Red Hat, demystifies OpenShift, a PaaS revolutionizing cloud deployment for Java EE, PHP, Ruby, and beyond. Author of the OpenShift Primer e-book, Eric—drawing from his integration and BPM expertise—guides attendees through rapid app migration, showcasing portability without code rewrites. His action-packed session deploys a Java project in minutes, contrasting OpenShift’s ease with cumbersome VMs.
OpenShift’s open-source ethos, Eric argues, delivers developer freedom: Git-based workflows, auto-scaling gears, and cartridge-based runtimes. From free tiers to enterprise scalability, it transforms cloud adoption, with European data centers addressing latency and privacy concerns.
Demystifying PaaS and OpenShift Fundamentals
Eric contrasts IaaS’s VM drudgery with PaaS’s streamlined abstraction. OpenShift, atop Red Hat Enterprise Linux, provisions environments via cartridges—pre-configured stacks for languages like Java.
He demos creating an app: rhc app create, Git push, and instant deployment, emphasizing no vendor lock-in.
Rapid Deployment and Portability
Portability reigns: Eric deploys a legacy Java EE app unchanged, leveraging JBoss EAP cartridges. PHP/Ruby examples follow, highlighting multi-language support.
This agnosticism, Eric notes, preserves investments, scaling from localhost to cloud seamlessly.
Scaling, Monitoring, and Security
Auto-scaling gears adjust to loads, Eric illustrates, with hot-deploy for zero-downtime updates. Monitoring via console tracks metrics; security integrates LDAP and SSL.
For Europe, Irish data centers mitigate latency, with GDPR-compliant options addressing data sovereignty.
Why OpenShift? Open-Source Advantages
Eric’s pitch: unmatched ease, no code changes, and open-source values. Free tiers on AWS East Coast suit demos, with paid plans offering local regions like Ireland.
He invites booth chats, contrasting OpenShift’s speed with competitors’ rigidity.
Links:
[DevoxxBE2013] Introducing Vert.x 2.0: Taking Polyglot Application Development to the Next Level
Tim Fox, the visionary project lead for Vert.x at Red Hat, charts the course of this lightweight, high-performance application platform for the JVM. With a storied tenure at JBoss and VMware—where he spearheaded HornetQ messaging and RabbitMQ integrations—Tim unveils Vert.x 2.0’s maturation into an independent powerhouse. His session delves into the revamped module system, Maven/Bintray reusability, and enhanced build tool/IDE synergy, alongside previews of Scala, Clojure support, and Node.js compatibility.
Vert.x 2.0 empowers polyglot, reactive applications, blending asynchronous eventing with synchronous legacy APIs via worker verticles. Tim’s live demos illustrate deploying modules dynamically, underscoring Vert.x’s ecosystem for mobile, web, and enterprise scalability.
Core API Refinements and Asynchronous Foundations
Tim highlights Vert.x’s event-driven core, refined in 2.0 with intuitive APIs for non-JVM languages. He demonstrates verticles—lightweight actors—for handling requests asynchronously, avoiding blocking calls.
This reactive model, Tim explains, scales to thousands of connections, ideal for real-time web apps, contrasting traditional thread-per-request pitfalls.
Module System and Ecosystem Expansion
The new module system, Tim showcases, leverages Maven repositories for seamless dependency management. He deploys a web server via module names, pulling artifacts from Bintray—eliminating manual installations.
This reusability fosters a vibrant ecosystem, with core modules for HTTP, MySQL (via reversed-engineered async drivers), and more, enabling rapid composition.
Build Tool and IDE Integration
Vert.x 2.0’s Maven/Gradle plugins streamline development, as Tim demos: configure a pom.xml, run mvn vertx:run, and launch a cluster. IDE support, via plugins, offers hot-reloading and debugging.
These integrations, Tim notes, lower barriers, allowing developers to iterate swiftly without Vert.x-specific tooling.
Polyglot Horizons: Scala, Clojure, and Node.js
Tim previews Scala/Clojure bindings, enabling functional paradigms on Vert.x’s event bus. Node.js compatibility, via drop-in modules, bridges JavaScript ecosystems, allowing polyglot teams to collaborate seamlessly.
This inclusivity, Tim asserts, broadens Vert.x’s appeal, supporting diverse languages without sacrificing performance.
Worker Verticles for Legacy Compatibility
For synchronous APIs like JDBC, Tim introduces worker verticles—executing on thread pools to prevent blocking. He contrasts with pure async MySQL drivers, offering flexibility for hybrid applications.
This pragmatic bridge, Tim emphasizes, integrates existing Java libraries effortlessly.