The document discusses JavaFX Mobile and provides an overview of its features and current status. It summarizes a speaker's presentation on designing a JavaFX Mobile application and examples shown, including calling JME code, posting content via HTTP requests, and loading resources via binding. While JavaFX Mobile was promising in 2009-2010, its future is uncertain given the dominance of Android and iOS. The speaker plans to research porting their application to Android and JME to catch platforms not adopting newer technologies.
Performance Optimization and JavaScript Best PracticesDoris Chen
Performance optimization and JavaScript best practices tips are discussed in the talk. Here are some of the tips:
Put stylesheets at the top (css)
Move scripts to the bottom (javascript)
Provide a clean separation of content, CSS, and JavaScript
De-reference unused objects
Think Asynchronous
Working with Objects
Defer Loading Resources
Use JSLint -- Code Quality Tool
Reduce the size of JavaScript file
gzip
General JavaScript Coding Best Practices
Use === Instead of ==
Eval = Bad
Don’t Use Short-Hand
Reduce Globals: Namespace
Don't Pass a String to "SetInterval" or "SetTimeOut"
Use {} Instead of New Object()
Use [] Instead of New Array()
Building High Perf Web Apps - IE8 FirestarterMithun T. Dhar
Video recordings of this session can be found here:
1. http://channel9.msdn.com/tags/IE%208%20Firestarter - (Developer)
2. http://edge.technet.com/Tags/IE+8+Firestarter/ - (IT Pro's)
If you need to download this file, or need more infomation contact Mithun Dhar via http://blogs.msdn.com/mithund
Singletons in PHP - Why they are bad and how you can eliminate them from your...go_oh
While Singletons have become a Pattern-Non-Grata over the years, you still find it surprisingly often in PHP applications and frameworks. This talk will explain what the Singleton pattern is, how it works in PHP and why you should avoid it in your application.
Performance Optimization and JavaScript Best PracticesDoris Chen
Performance optimization and JavaScript best practices tips are discussed in the talk. Here are some of the tips:
Put stylesheets at the top (css)
Move scripts to the bottom (javascript)
Provide a clean separation of content, CSS, and JavaScript
De-reference unused objects
Think Asynchronous
Working with Objects
Defer Loading Resources
Use JSLint -- Code Quality Tool
Reduce the size of JavaScript file
gzip
General JavaScript Coding Best Practices
Use === Instead of ==
Eval = Bad
Don’t Use Short-Hand
Reduce Globals: Namespace
Don't Pass a String to "SetInterval" or "SetTimeOut"
Use {} Instead of New Object()
Use [] Instead of New Array()
Building High Perf Web Apps - IE8 FirestarterMithun T. Dhar
Video recordings of this session can be found here:
1. http://channel9.msdn.com/tags/IE%208%20Firestarter - (Developer)
2. http://edge.technet.com/Tags/IE+8+Firestarter/ - (IT Pro's)
If you need to download this file, or need more infomation contact Mithun Dhar via http://blogs.msdn.com/mithund
Singletons in PHP - Why they are bad and how you can eliminate them from your...go_oh
While Singletons have become a Pattern-Non-Grata over the years, you still find it surprisingly often in PHP applications and frameworks. This talk will explain what the Singleton pattern is, how it works in PHP and why you should avoid it in your application.
While known for its first-class JSON handling for Java, Jackson is not limited to JSON: with no fewer than 9 supported data formats it can be used for reading and writing data in almost any data format. This talk offers introduction to reading and writing XML and CSV using Jackson.
JavaFX and HTML5 - Like Curds and RiceStephen Chin
JavaFX 2 is an exciting new platform for developing rich user interfaces with animation, media, and advanced controls with pure Java code. HTML5 is the next standard for web technologies promising richer graphics, native media support, and offline storage among other features. So which technology should you choose? We say you can have your curds with your rice! With one HTML5 expert and one JavaFX wizard on stage, we will show how you can leverage both of these technologies to create a new breed of application that goes beyond your expectations.
Moving to the Client - JavaFX and HTML5Stephen Chin
Talk given at JavaOne India about taking the best parts of JavaFX and HTML5 and leveraging them together. This talk contains an integration of Google Maps into a native Java application with interactive controls.
Presentation about the features of JavaFX. See how to use video, different deployment types, JavaScript integration, annimations and more. Demo's not included.
While known for its first-class JSON handling for Java, Jackson is not limited to JSON: with no fewer than 9 supported data formats it can be used for reading and writing data in almost any data format. This talk offers introduction to reading and writing XML and CSV using Jackson.
JavaFX and HTML5 - Like Curds and RiceStephen Chin
JavaFX 2 is an exciting new platform for developing rich user interfaces with animation, media, and advanced controls with pure Java code. HTML5 is the next standard for web technologies promising richer graphics, native media support, and offline storage among other features. So which technology should you choose? We say you can have your curds with your rice! With one HTML5 expert and one JavaFX wizard on stage, we will show how you can leverage both of these technologies to create a new breed of application that goes beyond your expectations.
Moving to the Client - JavaFX and HTML5Stephen Chin
Talk given at JavaOne India about taking the best parts of JavaFX and HTML5 and leveraging them together. This talk contains an integration of Google Maps into a native Java application with interactive controls.
Presentation about the features of JavaFX. See how to use video, different deployment types, JavaScript integration, annimations and more. Demo's not included.
This presentation takes a pragmatic approach to comparing JavaFX and HTML5, using an application written in JavaFX versus the same functionality written in HTML5 to illustrate the pros and cons of each.
When JavaFX Script was released, the mobile component was an important part. It was also one of the reasons many people and analysts believed in JavaFX as a real cross-platform client-side framework. For a number of reasons, JavaFX on mobile disappeared from the official Java roadmap. Fortunately, the OpenJFX team at Oracle made all the required sources available, and the JavaFXPorts initiative worked on providing JavaFX SDK's for the mobile platforms. In this session, we will show the current state of JavaFX on Mobile. We will show how to create a real cross-platform JavaFX Application using an IDE, and how easy it actually is to deploy that application on Android and iOS devices. We will show some of the features and limitations, and talk about the eco-system that is starting to take shape.
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)Stephen Chin
JavaFX 2.0 is the next version of a revolutionary rich client platform for developing immersive desktop applications. One of the new features in JavaFX 2.0 is a set of pure Java APIs that can be used from any JVM language, opening up tremendous possibilities. This presentation demonstrates the benefits of using JavaFX 2.0 together with the Scala programming language to provide a type-safe declarative syntax with support for lazy bindings and collections. Advanced language features, such as DelayedInit and @specialized will be discussed, as will ways of forcing prioritization of implicit conversions for n-level cases. Those who survive the pure technical geekiness of this talk will be rewarded with plenty of JavaFX UI eye candy.
ES6 Metaprogramming presentation at MediterraneaJS on June 22th, 2015.
ES6 delivers some exciting metaprogramming capabilities with its new Proxies feature. Metaprogramming is powerful, but remember: "With great power comes great responsibility". In the talk we will shortly revisit Javascript metaprogramming and explain ES6 Proxies with code examples.
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineRoman Kirillov
This is a slide deck of a talk given to a London GDG meeting on 2013/07/10. It covers following topics:
* Building RESTful APIs using Cloud Endpoints and Google AppEngine
* Building Javascript and Android clients for these APIs
* Enabling OAuth2 authentication for this APIs.
Full video recording of the talk will be available later.
Describes the overview process and technique of lazy loading javascript from external 3rd parties or your own in-house stuff and provides a simple example with the possible benefits for large javascript applications.
Overview of The Scala Based Lift Web FrameworkIndicThreads
All of us having experience with other web frameworks such as Struts,Tapestry, Rails, etc would ask “Why another framework? Does Lift really solve problems any differently or more effectively than the ones we’ve used before? The Lift Web Framework provides an advanced set of tools for quickly and easily building real-time, multi-users, interactive web applications. Lift has a unique advantage that no other web framework currently shares: the Scala programming language. Scala is a relatively new language developed by Martin Odersky and his group at EPFL Switzerland. Scala is a hybrid Object Oriented and Functional language that runs at native speeds on the JVM and fully interoperates with Java code. Lift is a hybrid web framework built on Scala. Lift derives its features and idioms from the best of existing web frameworks as well as the functional and OO features in Scala. It compiles to Java bytecode and runs on the JVM, which means that we can leverage the vast ecosystem of Java libraries just as we would with any other java web framework. This presentation details the advantages of this Scala based Web framework over all the existing frameworks that we have used uptil now and shows a small sample application built with Lift. We will create a basic application with a model that maps to RDBMS, web pages that correspond to back end logic and bind dynamically created content to elements on the webpage.
Async/await is a new language feature that will ship with Swift 5.5 this year. There’s no doubt it will have a significant impact on how we write asynchronous code.
In this talk, we’re going to look at some use cases for async/await, how we can call existing Swift APIs using this new feature, and why your decision to write your SDK in Objective-C might turn out to have been a very clever move.
We’ll also have a look at the refactoring support Apple is adding to Xcode and how it will help you migrate your existing code base.
Talk at RubyKaigi 2015.
Plugin architecture is known as a technique that brings extensibility to a program. Ruby has good language features for plugins. RubyGems.org is an excellent platform for plugin distribution. However, creating plugin architecture is not as easy as writing code without it: plugin loader, packaging, loosely-coupled API, and performance. Loading two versions of a gem is a unsolved challenge that is solved in Java on the other hand.
I have designed some open-source software such as Fluentd and Embulk. They provide most of functions by plugins. I will talk about their plugin-based architecture.
Is your web app drowning in a sea of JavaScript? Has your client-side codebase grown from "a snippet here and there" to "more JavaScript than HTML"? Do you find yourself writing one-off snippets instead of generalized components? You're not the only one. Learn about a handful of strategies you can use to keep your JavaScript codebase lean, modular, and flexible. We'll cover all the major pain points — MVC, templates, persisting state, namespacing, graceful error handling, client/server communication, and separation of concerns. And we'll cover how to do all this incrementally so that you don't have to redo everything from scratch.
OSGi ecosystems compared on Apache Karaf - Christian Schneidermfrancis
OSGi Community Event 2015
A look at three competing OSGi ecosystems (Declarative Services, Blueprint, CDI). Capabilities of each DI framework. Comparison of support for EE technologies like JPA, Security, SOAP and REST services, UIs. Looking into some of the recent advancements like Aries JPA 2 featuring closure based transactions, JAAS Security, JSP and JSF on OSGi. Attendees will get a good overview about the stacks as well as recommendations where each is most applicable.
This DrupalCon 2019 Amsterdam talk provides a look beyond the world of PHP and Javascript. It explores how other languages such as Ruby, Java, Rust and Perl handle things and highlights some interesting features of those languages. Not all the things that other languages can do can be done in PHP or Javascript but the concepts and ideas can still be used.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
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/
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
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
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
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
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.
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.
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.
2. AGENDA
> Putting JavaFX (Mobile) in context
> My case study
> Main features of JavaFX (Mobile)
> JavaFX Mobile through a few examples
> Current status of JavaFX Mobile
> Conclusion
2
3. About the speaker
> Fabrizio.Giudici@tidalwave.it
> Senior Architect, Mentor, Technical Writer
> Working with Java (all the editions, plus exotic stuff) since 1996
> Working with Java ME since 1999
– First J2ME edition at JavaOne™ (Palm)
– Developed a couple of research projects with the University of Genoa
– Developed a couple of customer projects with my former company
– Consulting for customer projects
– Author of mobile FLOSS: windRose and blueBill Mobile
> Co-leader of JUG Milano
3
4. What's wrong with JME
> Everything was so good at the old, Palm times
– Small devices → no big expectations
– One reference platform
– One pervasive runtime
> With more devices, JME got fragmented
– JSR as extension points (e.g. bluetooth, location)
– Multiple combinations
– Harder and harder to test
– windRose pain
4
5. Hoping in Java FX Mobile
> JavaFX announced by Sun Microsystems in 2007
– A specific scripting language + a runtime
– Fight the “Ugly Java UI stereotype”
– Re-designed UI controls
– Integration with graphics designers workflow (e.g. NetBeans + Photoshop)
– Profiles for multiple targets (desktop / web, mobile)
> JavaFX Mobile profile
– Can sit on top of JME (MSA: Mobile Service Architecture, a.k.a. JSR-248)
– Maybe no more (or reduced) fragmentation?
> Oracle commitment after the Sun buy
> A fulfilled promise?
– Answers at the end :-) 5
6. My case study: blueBill Mobile
> “The field tool for birdwatchers”
– Records geotagged observations
– Reference guides with multimedia
– Social capabilities (à la Google Friends)
> Started in 2009 with JavaFX
> Currently the most advanced version is the Android one
– JavaFX version being redesigned (more later)
> Demo
6
7. Main features of JavaFX
> The languages is both imperative and declarative
– Imperative: for normal processing
– Declarative: mostly for the UI (no XML, no separate layout descriptor)
Binding
– Has got closures, mixins
> Compiles to the same VM bytecode
– Can mix with Java code (e.g. reference a Java library)
– On the desktop, can be mixed with Swing (in addition to its own UI widgets)
– On the mobile, runs its own UI widgets
7
8. Some code examples
> Example 1: Calling JME code
> Example 2: Posting contents (REST)
> Example 3: Getting resources (REST)
> Example 4: Binding (if time allows)
8
9. Example: calling JME code
> Not much to say: it just works
package it.tidalwave.bluebillmfx;
import javax.microedition.location.Criteria;
import javax.microedition.location.LocationProvider;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;
import it.tidalwave.geo.mapfx.model.Coordinates;
public class PositionTracker
{
public-read var currentPosition : Coordinates;
def criteria = new Criteria();
var locationProvider : LocationProvider;
postinit {
locationProvider = LocationProvider.getInstance(criteria);
pollingTimeline.play();
}
9
10. Example: calling JME code
> Need to copy data in JavaFX classes if you want binding support
function getPosition(): Void {
def location = locationProvider.getLocation(5); // JME stuff
def coordinates = location.getQualifiedCoordinates();
if (coordinates != null ) {
def lat = coordinates.getLatitude();
def lon = coordinates.getLongitude();
currentPosition = Coordinates { latitude: lat; longitude: lon };
}
}
def pollingTimeline = Timeline {
repeatCount: Timeline.INDEFINITE
keyFrames: KeyFrame { time: 10s; action: periodicTask }
};
function periodicTask(): Void {
getPosition();
// update the map position, etc...
}
} 10
11. Example: posting contents
> HttpRequest provides a skeleton
public class ObservationRDFUpload extends HttpRequest
{
public-init var serviceURL = "http://myHost:8084/blueBillGeoService";
override public var method = HttpRequest.POST;
public var content : String;
override var output on replace {
if (output != null) {
output.write(content.getBytes());
output.close();
}
}
override function start(): Void {
location = "{serviceURL}/postObservation"; // REST call
setHeader("Content-Type", "application/rdf");
super.start();
}
} 11
12. Example: posting contents
> HttpRequest provides a skeleton
def upload = ObservationRDFUpload
{
content: // ... assemble the string with the contents
};
upload.start();
12
13. Example: reading resources
> The relevant model class
public class Taxon
{
public-read protected var id : String;
public-read var urlsLoaded = false;
var urlsLoading = false;
var imageURLs : String[]; // [] is a list (“sequence”), not an array
var images : DeferredImage[];
public bound function getImage (index : Integer): DeferredImage {
def dummy = loadImageURLs(); // assignment is a requirement for the bound function
return images[index];
}
public bound function imageCount(): Integer {
return sizeof images;
}
13
14. Example: reading resources
> Getting a JSON resource catalog
function loadImageURLs(): Boolean {
if (not urlsLoading and not urlsLoaded) {
urlsLoading = true;
def fixedId = clean(id); // get rid of/escape “bad” chars such as :, #, etc...
def url = "http://kenai.com/svn/bluebill-mobile~media/catalog/{fixedId}.json";
def request : HttpRequest = HttpRequest { // mere instantiation, not subclassing!
location: url;
method: HttpRequest.GET;
onInput: function (is: InputStream) { // hey, this is not a switch() label!
if (request.responseCode != 200) {
imageURLs = "media/black_glossy_web20_icon_012.png";
}
else {
try {
def parser = PullParser { documentType: PullParser.JSON;
input: is; onEvent: parseEventCallback };
parser.parse();
}
catch (e: Exception) {
println("Exception {e} while parsing {url}");
}
finally {
is.close(); 14
}
}
}
15. Example: reading resources
> Getting a JSON resource catalog
onException: function (e: Exception) {
imageURLs = "media/black_glossy_web20_icon_012.png";
urlsLoaded = true;
}
onDone: function() {
images = for (url in imageURLs) {
DeferredImage { url: url };
}
imageURLs = null;
urlsLoaded = true;
}
}
request.start();
}
return urlsLoaded;
}
def parseEventCallback = function (event: Event): Void {
if ((event.type == PullParser.TEXT) and (event.name == "url")) {
insert event.text into imageURLs;
} 15
}
}
16. Example: reading resources
> Loading an image
> JavaFX Image loads automatically when initialized
var imageCounter = 0;
public class DeferredImage
{
public-init var url : String;
public-read var progress = bind image.progress;
public-read var error = bind image.error;
def id = imageCounter++;
public-read var image : Image;
public function load() { // start loading only when load() is called
if (image == null)
{
image = Image {
url: url
backgroundLoading: true
}
}
} 16
}
17. Example: binding
> Introducing TaxonSearchController
– Manages a list of Taxons
– Produces a filtered list of Taxons whose names match a substring
– Provides a hint for autocompletion
Eg. you type “He”
That matches only “Heron ***”
Hints is “Heron “
17
18. Example: binding
> Some relevant parts of Taxon
public class Taxon
{
public-read protected var displayName : String;
public-read protected var scientificName : String;
public-read protected var id : String;
override function toString() {
return "{displayName} ({scientificName}) ({id})"
}
}
18
19. Example: binding
> TaxonSearchController (1/3)
public class TaxonSearchController
{
public var taxons: Taxon[];
public var filteredTaxons: Taxon[];
public var selectedTaxonIndex : Integer = -1; // set from the UI
public var selectedTaxon = bind
if (selectedTaxonIndex < 0) then null
else filteredTaxons[selectedTaxonIndex];
// setting this property will trigger filtering
public var filter = "" on replace {
filteredTaxons = taxons[taxon | matches(taxon, filter)];
updateHint();
}
public-read var hint = ""; // the auto-completed hint
19
20. Example: binding
> TaxonSearchController (2/3)
protected function matches (taxon : Taxon, string: String) : Boolean {
if (string == "") {
return true;
}
if (taxon.displayName.toLowerCase().startsWith(string.toLowerCase())) {
return true;
// more complex in the real case, as it also deals with scientific name
// but not relevant now
}
return false;
}
20
21. Example: binding
> TaxonSearchController (3/3)
protected function updateHint(): Void {
def hintTry = commonLeadingSubstring(filteredTaxons);
//
// Sometimes it can't find a better auto-completion than the current filter,
//
hint = if (hintTry.length() > filter.length())
then hintTry
else filter;
}
}
21
22. Example: binding
> TaxonSearchScreen
public class TaxonSearchScreen extends Container // e.g. a UI panel
{
// warning: there are some simplifications, but the concepts are here
public-read def controller = TaxonSearchController {
selectedTaxonIndex: bind list.selectedIndex;
}
def list = ListBox { // the list widget in the UI
items: bind controller.filteredTaxons
};
def hint = bind controller.hint on replace {
if (hint != "") {
filter = hint;
}
}
var resetSelectionWhenFilterChanges = bind controller.selectedTaxon on replace {
if (controller.selectedTaxon != null) {
list.selectedIndex = 0;
}
}
TextBox { // a text input box in the UI
text: bind controller.filter with inverse
}
Text { // a label rendering a text in the UI
content: bind "{sizeof controller.filteredTaxons} specie(s)" 22
}
23. JavaFX mobile in 2009
> Development tools available (emulator, etc...)
> First capable phones at J1: LG Incite, HTC Touch Diamond
> Announced a “JavaFX Mobile player”
– Would run JavaFX on MSA (JSR 248) JME phones
> Looked very promising
– That's why blueBill Mobile started with it
23
24. Status updates in 2010
> Barcelona Mobile World Congress 2010
– “Feature phones” (Qualcomm and the Brew Mobile Platform OS)
– Sony-Ericsson in “upcoming phones”
> Recent phone status update (JavaFX forums, March 16, 2010)
– LG Incite, HTC Touch Diamond... still!
– “Unofficially” runs on any Windows Mobile 6.x device (e.g. HTC HD2)
> JavaFX 1.3 released on May 14, 2010
– Shares many improvements with the desktop/web profile
– Mobile emulator runs on Mac OS X
> JavaFX Mobile Player MIA (I mean, it's Windows Mobile only)
> No further manufacturer endorsements?
24
25. My view of Java-related mobile solutions
> We're in the climax of the “next generation mobile” war
– iPhone/iPad, Android leading on the growth rates
– Adobe Flash at stake, but if it survives will be relevant
> Is there still room for JavaFX Mobile? JME?
> JavaFX Mobile
– Still excites me, technically
– The Oracle-Sun deal might have slowed down deals – but...
– … timing out this Summer
–Hoping in a specific Android port/adaptation (using the Android UI/runtime)
Hearing a few people talking about that
Would bring-in e.g. the integration with graphic designer workflow
> JME still relevant for the “glorious old guard” (Nokia, etc..., BlackBerry)
– “Oldies but goodies” 25
26. My research for the Summer
> Two/threefold strategy
– Android (it delivers, short time-to-market)
– JME (catch the “old glorious guard”)
– JavaFX (if industry endorsements / Android support will show up)
> Study whether it is possible to reuse code
– Not thinking of “catch-all” frameworks
– Reusing only the models, writing ad-hoc UIs (no “GCD syndrome”)
– Maven for re-using artifacts
– Byte-code manipulation (e.g. RetroWeaver) for fitting JME Java 1.3?
– Follow my blog and my space at Dzone.com
> The “new” blueBill Mobile for JavaFX code is not yet available
– Under heavy refactoring, catching up with the Android version 26
27. Questions?
> Thanks for your attention
– http://javafx.com
– http://bluebill.tidalwave.it/mobile
– http://windrose.tidalwave.it
27