Apache Cordova is used to wrap HTML5 applications into native mobile applications that can access device capabilities. A demo application was shown that used Cordova for the mobile portion and Java EE 7 on the server side. Key technologies discussed included Cordova plugins, RESTful web services, Java API for JSON, and Java API for WebSockets for bidirectional communication between the mobile app and server. jQuery Mobile was also mentioned as a potential UI framework.
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
When we talk about prices, we often only talk about Lambda costs. In our applications, however, we rarely use only Lambda. Usually we have other building blocks like API Gateway, data sources like SNS, SQS or Kinesis. We also store our data either in S3 or in serverless databases like DynamoDB or recently in Aurora Serverless. All of these AWS services have their own pricing models to look out for. In this talk, we will draw a complete picture of the total cost of ownership in serverless applications and present a decision-making list for determining if and whether to rely on serverless paradigm in your project. In doing so, we look at the cost aspects as well as other aspects such as understanding application lifecycle, software architecture, platform limitations, organizational knowledge and plattform and tooling maturity. We will also discuss current challenges adopting serverless such as lack of high latency ephemeral storage, unsufficient network performance and missing security features.
Continuous Integration and Deployment Best Practices on AWSAmazon Web Services
With AWS, organizations now have the ability to develop and run their applications with speed and flexibility like never before. Working with an infrastructure that can be 100% API-driven enables organizations to use lean methodologies and realize these benefits. In this session, we will explore some key concepts and design patterns for continuous deployment and continuous integration, two elements of lean application and infrastructure development. We will look at several use cases where IT organizations leveraged AWS to rapidly develop and iterate on applications for scale, high availability and cost optimization.
Speaker: Adrian White, Solutions Architect, Amazon Web Services
A presentation covering three new services from Amazon Web Services: the new Application Load Balancer (ALB), recent updates to the EC2 Container Service (ECS), and the new Kinesis Analytics.
Ben McCormick gave a presentation on how to save time by testing with Jest. He began with an introduction and explained that Jest is a JavaScript testing framework developed by Facebook that aims to solve common testing problems. He then demonstrated how Jest saves time through fast setup, writing tests quickly using familiar syntax and APIs, running tests in parallel and with a smart watch mode, and providing clear errors to fix tests fast. He concluded with a demo of Jest's features and took questions.
The Dark Side of Single Page ApplicationsDor Kalev
The story of all the pitfalls we had while transferring FTBpro.com from the good old web to a Backbone single page application... and all the great solutions we've came up with
Have you ever cried yourself to sleep unable to find the cause of a horrendous bug in your node app? Cry no more, your tears will be reshaped into blinding swords as we explore uncharted territories laced with mystical creatures.
JavaScript debugging is an often avoided topic due to the uncertainty of how best to accomplish it and the lack of powerful introspective tools. This talk will explore new territory and showcase tools that help you debug complex and difficult issues in your node or frontend app. Libraries and tools such as node-inspector, Time-Travel Debugging, Visual Studio Code, vorlon.js, Vantage and memory leak catchers will be used to slay dragons.
No more shall you fear building complex apps with JavaScript!
The document discusses various aspects of developing modular applications using J2EE, OSGi, and RCP frameworks. It covers:
1. The structure and organization of modules, projects, and dependencies when using different frameworks like J2EE, Spring, Maven, and OSGi.
2. How modules, plugins, and bundles can be developed and packaged for each framework. This includes module/plugin sources, views, packaging, and dependencies.
3. Integration aspects like how to integrate databases, connection pools, templating engines, and more through extension bundles/plugins across frameworks.
Alfresco DevCon 2019 Performance Tools of the TradeLuis Colorado
Discover tips and tools that will help you to keep your Alfresco environment in shape. Most of the best tools are free or Open Source, and this presentation will guide you through the steps to improve the performance of your system.
The document discusses the 12 factor app methodology for building software-as-a-service applications. It covers the 12 factors which are codebase, dependencies, configuration, backing services, build/release/run, processes, port binding, concurrency, disposability, development/production parity, logs, and admin processes. The presentation provides examples and explanations of how to design apps adhering to these 12 factors for scalability, maintainability and portability.
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Fwdays
Ember.js is being adopted more and more broadly as time passes, and is an excellent choice for highly complex data-driven UIs. With the recent release of the "2.0" version of the framework, things are faster, smarter, and easier than ever. With a focus on productivity and reducing the number of trivial decisions developers must make while building an app, it's astonishing how quickly one can get up and running, and how well the abstractions hold up as the codebase scales in size and complexity.
I'd like to give a general overview of Ember, and pause to reflect on some important differences that may be important when considering what the best tool is for your project.
The Scala programming language has been gaining significant traction over the last few years, being adopted by vastly different organizations from startups to large enterprises. While the language itself is pretty well understood and explained in tutorials and books, there is an apparent dearth of practical advice for new adopters on the best approach to integrating the new technology. In this talk I’ll attempt to offer such advice gathered over several years of production Scala use, focusing on tools, practices, patterns and the community, in the hope of making your transition into the Scala ecosystem easier and better-informed up front.
A talk given at JavaOne 2015 in San Francisco.
Find out how to configure and package clustered Payara Micro with load balancing, automatic scaling and dedicated storage for building cloud-native microservices. Then with the help of cloud scripting and triggering, automate CI/CD for the deployed application and emulate the load to check the scaling and performance results.
The document discusses various JVM web frameworks including Play, Ratpack, Spring Boot, and Rails. It provides code examples for templating, databases, servers, and other aspects of each framework. It compares the strengths and weaknesses of frameworks like Play, Ratpack, and Spring Boot. It emphasizes that modern JVM web development uses languages like Scala, Groovy, JRuby and Clojure rather than traditional Java web apps with WAR files. The document encourages the audience to pick a framework like Play, Ratpack or Rails and provides the basic commands to create a new project in each.
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
This was a talk given at the second CT Software Developers Meetup (http://www.meetup.com/CT-Software-Developers-Meetup/). It covers how NorthPage is using Docker and Vagrant with a home grown Preview tool to increase the efficiency of the GitHub Pull Request Workflow.
Write Once, Run Everywhere - Ember.js MunichMike North
The document discusses building applications that can run everywhere using Ember.js and Electron. It introduces Electron and how it allows packaging Ember apps with Chromium for desktop distribution. It also covers using Ember addons to integrate Cordova and native device capabilities. The document demonstrates building a sample Ember app that uses routing, components and animations, and packaging it into a desktop app with Electron.
Abstract:
A apresentação centra-se na temática de ter forma de controlar, versionar e actualizar toda a parte de Base de Dados de um projecto. Estamos a falar, desde a produção de modelos ER, a versionamento de scripts, passando pelo deploy dos mesmos e terminado na documentação. A apresentação conta ainda com uma breve demonstração do uso da ferramenta Flyway para versionar e controlar a execução de scripts nos diversos ambientes de um projecto.
Sobre o Nuno Alves:
Chamo-me Nuno Alves nascido em Coimbra, Portugal e vivi maioritariamente em Leiria. Licenciado em Engenharia Informática na ESTG-IPLeiria (Escola Superior de Tecnologia e Gestão) onde o gosto por dados e bases de dados se começou a desenvolver. Daí, profissionalmente a minha área de actuação ser em torno de bases de dados e infra-estruturas. Tenho cerca de 10 anos de experiência repartidos pelas áreas Financeira, Seguros, Governo, Militar em tecnologias que vão desde Oracle, PostgreSQL, MSSQLServer a DB2.
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Matt Raible
JavaScript MVC Frameworks are all the rage these days. They’ve taken the web development world by storm. This session explores the various features of the three hottest JavaScript MVC frameworks: AngularJS, Ember.js and React.js. It also compares client-side templating vs. server-side templating and how well each framework supports Isomorphic JavaScript (code that can run both client-side and server-side). Finally, it ranks each framework on 10 different criteria using Yevgeniy Brikman’s framework scorecard.
Video on InfoQ: https://www.infoq.com/presentations/comparing-angular-ember-react
An Intense Overview of the React EcosystemRami Sayar
React has been named the front-end library to learn in 2016 however few people talk about the React without mentioning Flux (or Redux or React Native or Relay). In this talk, we will explore the ecosystem of tools and libraries that surround React. We will look at the various Flux implementations (including a short explanation of Flux) like Redux, at react-router, at some of the reactive database or reactive API libraries and finally at everyday tools and techniques that make the React developer happy. By the end of this talk, you will have a greater grasp of the ecosystem and leave with new tools in your developer arsenal.
This document discusses service-oriented architecture (SOA) and how Ruby on Rails can be used to build SOA systems. It defines a service as a system that responds to HTTP requests, usually to modify or retrieve data. The document explains benefits of SOA like isolation, scalability, and reusability. It also introduces some Ruby tools like Sinatra and HTTParty that are useful for building RESTful services and APIs.
Apache Lucene is the de-facto standard open source library for Java developers to implement full-text-search capabilities.
While it’s thriving in its field, it is rarely mentioned in the scope of Java EE development.
In this talk we will see for which features many developers love Lucene, make some concrete examples of common problems it elegantly solves, and see some best practices about using it in a Java EE stack.
Finally we'll see how some popular OSS projects such as Hibernate ORM (JPA provider), WildFly (Java EE runtime) and Infinispan (in-memory datagrid, JCache implementor) actually provide great Lucene integration capabilities.
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Ryan Cuprak
Java EE 7 provides a strong foundation for developing the back end for your HTML5 mobile applications. This heavily code-driven session shows you how you can effectively utilize Java EE 7 as a back end for your Apache Cordova mobile applications. The session demonstrates Java EE 7 technologies such as JAX-RS 2.0, WebSocket, JSON-P, CDI, and Bean Validation. It provides an overview of the basics of Apache Cordova as well as the tooling support added in NetBeans 8. The session also demonstrates an integrated approach to rapidly developing HTML5 mobile applications with Java EE 7 and NetBeans and concludes with best practices and pitfalls.
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
JavaOne 2016
This session provides 50 best practices for Java EE 7, with examples. The best practices covered focus primarily on JPA, CDI, JAX-WS, and JAX-RS. In addition, topics involving testing and deployment are covered. This presentation points out where best practices have changed, common misconceptions, and antipatterns that should be avoided. This is a fast-paced presentation with many code samples.
The document provides an overview of the Java EE 8 specification update including proposed enhancements and changes. Key points include:
- Servlet 4.0 will add support for HTTP/2 to improve performance. Other specifications like JAX-RS 2.1 and JSF 2.3 will be enhanced.
- Some originally planned specifications like JMS 2.1 and Java EE Management 2.0 may be dropped from Java EE 8.
- A "reboot" was conducted and the scope of some specs like Security 1.0 was expanded. New specifications around areas like health checking and configuration may be added.
- Specification groups are actively working on drafts and milestones for specs like CDI
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014Ryan Cuprak
This session provides 50 best practices for EJB 3 in 50 minutes with examples. These best practices involve not only EJB 3.2 but also its integration with other Java EE 7 technologies, not only coding best practices but also testing and production practices. The presentation targets Java EE 7 and also points out where best practices have changed, what patterns you should embrace, and antipatterns to avoid. This is a fast-paced presentation with many code samples. Categories covered include configuration, JPA, concurrency, testing, performance tuning, exception handling, CDI integration, JMS queue patterns, pattern changes, and many more.
JavaOne 2013: Organizing Your Local CommunityRyan Cuprak
The document provides background information on user groups and describes the history of the CT Java User Group, which the author helped restart in 2002. It discusses how the group was initially dormant but grew over time through regular meetings, connecting with speakers, and acquiring a website and domain names. Lessons learned include that user groups require dedication, investment of time and money, and don't require the leader to be a "Java rockstar." The document provides tips for starting a new user group, including legal and financial considerations, logos, websites, recruitment, scheduling meetings, and selecting meeting topics and venues.
This document provides an overview of extending Docker using plugins, specifically an image whitelist plugin. It discusses Docker's plugin architecture, provides examples of volume and network plugins, and goes through setting up and implementing an image whitelist plugin. Key points include:
- Docker plugins allow extending Docker's capabilities by running external processes that communicate with the Docker daemon.
- Examples of plugin types are volumes, networks, authorization. A volume plugin enables integration with external storage, a network plugin supports different networking technologies.
- The document demonstrates setting up an image whitelist Docker plugin that checks images against a whitelist before allowing them to run.
- Implementing the plugin involves creating a client to communicate with Docker's API, parsing a cron
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinAlessandro Nadalin
A look at how we try to make our architecture robust, resilient and fun to work with: Namshi is not github or spotify but... ...imitation is the sincerest form of flattery!
geOrchestra is the free, modular and secure Spatial Data Infrastructure software born in 2009 to meet the requirements of the INSPIRE directive in Europe. It is built on top of the latest stable versions of GeoServer and GeoNetwork. In this talk we will briefly present the geOrchestra SDI, before going through the major contributions during the previous year, to answer the following questions:
* how the project moved from tainted to generic artifacts (war files, debian packages, docker images)
* how to deploy a geOrchestra SDI instance in 10 minutes
* how to build your robust, high performance and high availability SDI in the clouds.
Introduction to Docker - Learning containerization XP conference 2016XP Conference India
Docker containers package applications and their dependencies to run consistently regardless of environment. Containers are more lightweight than virtual machines and use fewer resources. Docker images define the components of containers. The Dockerfile defines how to build images. Docker Compose defines multi-container applications through a YAML file specifying images, networking, volumes etc.
Using docker to develop NAS applicationsTerry Chen
This document introduces using Docker to develop NAS applications. It begins with an overview of Docker and containers, then demonstrates how to build Docker images, run containers, and deploy NAS applications as Docker containers using Container Station. It also addresses some common questions about Docker including how to skip Container Station initialization, debug closed containers, backup container data, access NAS information from containers, and resources for learning Docker.
Docker "Global Mentor Week" is your opportunity to #learndocker. to learn how to build, ship, and run modern distributed applications with ease. thanks to the Docker platform.
Right now, Docker has developed out a series of self-paced online labs that will be available during the meetup. Docker’s meetup groups worldwide are hosting a series of complimentary events to help newcomers and intermediate users learn Docker.
We'll have hands-on labs for both beginners and intermediate users, labs targeting both developers and operations. There is something for everyone. Docker mentor will be on hand at this event to help you prepare. and work through the self-paced materials. Bring your laptop, have fun and learn Docker!
This document provides an overview comparison of JavaFX and HTML5 for building mobile applications. It includes a demo of a sailboat racing application built with both JavaFX and HTML5. The technical comparison section analyzes the architectures, controls, data binding, tables, multimedia support and other features of JavaFX and HTML5. It finds that while HTML5 has broader deployment options, JavaFX provides more robust and integrated core features out of the box. The document also discusses the perspectives and limitations of both JavaFX and HTML5.
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)Ryan Cuprak
Java is a general-purpose language and is not particularly well suited for performing statistical analysis. Special languages and software environments have been created by and for statisticians to use. Statisticians think about programming and data analysis much different from Java programmers. These languages and tools make it easy to perform very sophisticated analyses on large data sets easily. Tools, such as R and SAS, contain a large toolbox of statistical tools that are well tested, documented and validated. For data analysis you want to use these tools.
In this session we will provide an overview of how to leverage the power of R from Java. R is the leading open source statistical package/language/environment. The first part of the presentation will provide an overview of R focusing on the differences between R and Java at the language level. We’ll also look at some of the basic and more advanced tests to illustrate the power of R. The second half of the presentation will cover how to integrate R and Java using rJava. We’ll look at leverage R from the new Java EE Batching (JSR 352) to provide robust statistical analysis for enterprise applications.
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Baruch Sadogursky
A private Java (Maven or Gradle) repository as a service can be setup in the cloud. A private Docker registry as a service can be easily setup in the cloud. But what if you want to build a holistic CI/CD pipeline, and on the cloud of YOUR choice?
In this talk Baruch will take you through steps of setting up a universal artifact repository, which can serve for both Java and Docker. You’ll learn how to build a CI/CD pipeline with traceable metadata from the Java source files all the way to Docker images. Amazon, Azure, and Google Cloud (do you have setup that works on these?) will be used as an example although the recipes shown would be applicable to other cloud as well.
This document introduces Docker containers. It begins by explaining that Docker solves the problem of inconsistent environments by packaging applications with all their dependencies into standardized units called containers. It then defines what a Docker image is, as a read-only template with layered filesystem changes that form the basis for containers. Finally, it describes how containers are running instances of images that isolate processes but share resources with the host machine, making them lightweight and portable compared to virtual machines.
- Cordova allows developers to build mobile apps using HTML, CSS and JavaScript that can be deployed across platforms like iOS, Android, Windows Phone etc.
- It works by wrapping web content in a native container, allowing access to native device capabilities through JavaScript APIs.
- Developers can write code once and deploy it to multiple app stores, avoiding the need to learn different languages for each platform.
Cross-platform Mobile Development on Open SourceAll Things Open
This document provides an overview of cross-platform mobile development using open source tools. It discusses hybrid mobile frameworks like Apache Cordova that allow building mobile apps with web technologies that are deployed to native app stores. While early hybrid apps had performance issues, newer frameworks discussed like React Native and NativeScript claim to generate truly native apps with high code reuse across platforms using JavaScript. The document also covers adjacent native frameworks like Xamarin that compile to native apps from C# instead of web technologies. Overall it introduces a variety of open source options for cross-platform mobile development.
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
This document provides an introduction to Phonegap, a framework for building hybrid mobile apps using web technologies. It describes the different types of mobile apps, including native, web-based, and hybrid. Phonegap allows developing hybrid mobile apps using HTML, CSS, and JavaScript, and accessing native device capabilities through plugins. It has wide platform support and plugins for common device APIs. Developers can test and debug apps using browser dev tools or services like Phonegap Build for cloud-based app builds. Phonegap is now known as Apache Cordova and is an open source project.
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
This document discusses cross-platform development using HTML, CSS, and JavaScript. It covers JavaScript engines, the differences between JavaScript and Node.js, and frameworks like Electron, PhoneGap/Cordova, and Ionic that allow building cross-platform desktop and mobile applications with web technologies. It also provides an overview of creating a basic Cordova application, installing required tools, adding platforms, and deploying to devices.
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
PhoneGap allows developers to build mobile apps using HTML, CSS and JavaScript instead of relying on platform-specific languages like Objective-C or Java. The document discusses PhoneGap's capabilities and advantages, including writing apps once that run on multiple platforms, using web technologies that are widely known by developers, and leveraging growing browser capabilities on mobile through HTML5. It also outlines PhoneGap's APIs, tools, libraries, and community to help developers get started building cross-platform mobile apps.
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapNick Landry
The final demo for this presentation can be downloaded at:
https://www.dropbox.com/s/9j09wip6wz84b61/JSDevConMobile-JQM-PhoneGap-Demo.zip
SESSION ABSTRACT
=================
Write Once, Run Everywhere. How many times have we been promised true cross-platform development? HTML5 seems to be the closest we’ve ever been to writing applications once and running them on multiple mobile devices, such as iOS, Android, Windows Phone or Blackberry.
But native mobile apps have taken all the spotlight in recent years thanks to the introduction of hundreds of thousands of apps in various app stores from Apple, Google, Microsoft and BlackBerry. Apps offer a great native platform experience, but they can be expensive to build and require specific languages, SDKs and skill sets across multiple platforms. Mobile web sites offer a great way to engage with consumers and corporate workers alike without requiring the installation of any app, and can in turn be adapted as deployable "hybrid" apps.
This session explores the fundamentals of native vs. web apps, and how to choose the right approach for any given scenario. We begin with an exploration of the benefits of web development for smartphones using the most popular HTML5 & JavaScript framework for mobile: jQuery Mobile (JQM). We’ll go over a quick primer on HTML5, CSS3 and JavaScript, followed by everything you need to get started with JQM. We’ll cover the most common development environment options, how to build your first jQuery Mobile page, and how to debug your mobile web code with some of the available tools. We’ll also discuss how to develop a native-like experience on each mobile platform thanks to JQM’s adaptive rendering, and how to save and retrieve data with the cloud using Microsoft Azure Mobile Services.
We'll then learn how to leverage PhoneGap to wrap our mobile web UI into a native smartphone or tablet app. Discover how PhoneGap exposes native device hardware like cameras, sensors, GPS and more. We’ll also discuss the pros and cons of PhoneGap-based apps, how to deal with the UI design guidelines across platforms, and learn some do’s and don’ts of cross-platform mobile development.
Native mobile apps have their place for mass market revenue-generating models, but you also need to master cross-platform techniques when the situation calls for it such as in enterprise mobility scenarios and other niche areas. Web development is a critical skill required by every mobile developer; come learn how to get started and reach hundreds of millions of users through a smart mobile web & hybrid approach.
PhoneGap is an open source framework that allows developers to create mobile apps using standardized web technologies like HTML, CSS, and JavaScript. It works by including web code in a native mobile project, and using Apache Cordova to expose native device APIs to the web code through JavaScript. Cordova is the underlying platform that PhoneGap is built on top of, providing access to device functionality through JavaScript APIs. PhoneGap supports creating apps for many mobile platforms from a single codebase.
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
Building cross-platform mobile apps using open source tools. A manic paced session where I build the same app across 4 different open source mobile development frameworks.
An overview of mobile html + java script frameworksSasha dos Santos
This document provides an overview of several mobile HTML and JavaScript frameworks: jQuery Mobile, Kendo UI, PhoneGap, Sencha Touch 2. It discusses their features, architectures, and includes demos. It also covers tools for testing mobile web applications, including using IIS Express to allow remote access for testing on emulators and devices over WiFi using Adobe Shadow.
This document discusses hybrid mobile applications. It begins by describing the major smartphone operating systems and types of smartphone apps, including native, web, and hybrid. It then focuses on hybrid apps, explaining that they are developed with HTML5, CSS, and JavaScript but can access native device features by being wrapped in a thin native container. Popular hybrid mobile platforms and frameworks are listed, including Cordova, PhoneGap, and Ionic, which is described in more detail. The document outlines the technologies used to develop apps with Ionic including Node.js, AngularJS, and Gulp/Grunt. It also provides an overview of setting up an Ionic development environment.
Developing a native mobile apps using Ionic&CordovaDamir Beylkhanov
- Hybrid mobile apps are built using web technologies like HTML, CSS, and JavaScript but wrapped in a native container using frameworks like Cordova or Apache Cordova. This allows them to work as native apps and access device capabilities.
- Ionic is a popular framework for developing interactive hybrid mobile apps that uses Angular and supports mobile-specific components. Apps are developed using web technologies and published using Cordova.
- The architecture involves a client-side single page app interacting via RESTful services with a server-side backend for business logic and data storage. Cordova tools provide access to native device features.
This document discusses hybrid mobile apps that can be built using Angular and the Ionic framework. Hybrid apps allow developers to build apps that can run on multiple platforms using web technologies like HTML, CSS, and JavaScript. The Ionic framework builds on Apache Cordova to provide access to native device capabilities and solve issues with supporting multiple screen resolutions. Developers can use Angular for features like data binding and services, and Ionic adds capabilities specific to building mobile apps like routing and UI components optimized for touch. The document provides instructions for setting up Ionic and Cordova and creating a basic sidemenu template project to get started developing hybrid mobile apps.
Cross-Platform Development using Angulr JS in Visual StudioMizanur Sarker
The document discusses different types of mobile applications including native, web, and hybrid applications. It provides details on the characteristics and development approaches for each type. It also covers topics like tools needed to develop hybrid apps using Apache Cordova and Visual Studio, and how to integrate plugins and services into hybrid applications.
This document discusses building mobile apps using Ionic and MeteorJS. It provides an overview of Ionic, which allows building native-looking apps through HTML5, CSS3 and JavaScript. Ionic uses Cordova to create apps that can be deployed across platforms like iOS, Android and Windows. The document then discusses how Ionic works with AngularJS and MeteorJS to create real-time mobile apps with a single code base that can be deployed across platforms. It provides sample code for common Ionic components like lists, tabs, side menus and navigation. Finally, it outlines the Meteor CLI commands needed to create an Ionic project and add features like the camera plugin.
Apache Cordova phonegap plugins for mobile app developmentwebprogr.com
Phonegap application development company - Using Apache Cordova 6.0 + plugins
Webprogr.com's experience and expertise as an experienced Phonegap application development company in designing and developing engaging mobile applications help serve your enterprise cross platform business app needs better. Our rich Phonegap cross platform development experience, flexible business model, and rigorous processes can translate to high quality, faster time-to-market, and cost effective mobile apps.Webprogr.com is ranked among the best phonegap developers and top cross platform mobile application development companies in India. To discuss more on cross platform app developers and PhoneGap experts' services and how we could help you with your enterprise app needs please contact us at sales@webprogr.com or call TEL: USA 703 495 5847 , INDIA: +91 44 24850191.
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Hazem Saleh
This document provides an overview of developing native mobile apps using Apache Cordova. Cordova allows developing apps with HTML, CSS and JavaScript that can be deployed across platforms. It introduces Cordova, discusses its advantages over native development, and covers Cordova commands, APIs and integration with jQuery Mobile. An example Memo app demo is also presented.
Similar to Hybrid Mobile Development with Apache Cordova and (20)
Embracing Jakarta EE 10 not only enable you to write better structured applications, it also enables you to write more testable applications. Correctly leveraging CDI enables integration testing where you can simulate a database error and verify that JMS messages are lost due to a RuntimeException. This session will focus on strategies and techniques for testing message handing, transaction management, security, and data model integrity. You will see how you can check message delivery and error handling, session failover, database versioning, and two-phase commits with JMS and databases. All too often assumptions are made that are proven wrong in production. This session will show you how to take your testing to the next level.
DIY Home Weather Station (Devoxx Poland 2023)Ryan Cuprak
Weather is a fascinating and important aspect of our lives, and with the rise of smart home technology, it has become easier than ever to track and monitor weather conditions in your own backyard. In this presentation, I will explore the process of building a home weather station.
I will discuss the hardware components needed to build a weather station, including sensors for temperature, humidity, pressure, and precipitation, as well as the embedded board itself. I will also cover the programming aspect of the project, including how to read data from the sensors and transmit it wirelessly to the cloud.
By the end of this presentation, you will have a solid understanding of how to build and program a home weather station using Arduino, and how to customize and expand the project to fit your specific needs.
Jakarta EE is an open source Java platform that provides a wide range of APIs for building enterprise applications. It is made up of specifications covering areas like web services, security, and object-relational mapping. The document discusses the history and evolution of Jakarta EE, its relationship to other technologies like Spring and MicroProfile, and its importance for businesses, careers, and the Java ecosystem. It also outlines proposals for future versions like Jakarta EE 10 that aim to improve areas like security, messaging, and NoSQL support.
The new GraalVM from Oracle supports multiple language including JavaScript, Python, Ruby, R, C++ as well as Java and other JVM languages. This opens up interesting possibilities for polygot enterprise applications. Now you can use a Node library in a Java application or call an R statistical function from an EJB. Previously, this type of integration was extremely challenging. This session will provide recipes to get up and running along with best practices and some cool demos.
Code: https://github.com/rcuprak/graalvm_jee
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
Memory leaks are not always simple or easy to find. Heap dumps from production systems are often gigantic (4+ gigs) with millions of objects in memory. Simple spot checking with traditional tools is woefully inadequate in these situations, especially with real data. Leaks can be entire object graphs with enormous amounts of noise. This session will show you how to build custom tools using the Apache NetBeans Profiler/Heapwalker APIs. Using these APIs, you can read and analyze Java heaps programmatically to ask really hard questions. This gives you the power to analyze complex object graphs with tens of thousands of objects in seconds.
Node.js Development with Apache NetBeansRyan Cuprak
This session covers the basics of developing Node.js applications with NetBeans. NetBeans includes fully integrated support for both JavaScript and Node.js. You’ll get a tour of the features and learn how NetBeans can accelerate your projects. The presentation looks at basic code editing capabilities provided by the IDE, tool integration (npm/Grunt/Bower/Webpack), frameworks such as Express, and debugging capabilities. You’ll see why NetBeans is the best free JavaScript/Node.js IDE.
Java 9 ships in July, are you ready for Java 9 modules? Java 9 modules (aka Project Jigsaw) is the biggest fundamental change to the Java runtime. Code that use Oracle/Sun private APIs will break. This session will cover the basics of Java 9 modules and also the current state of tooling. The ramifications to existing and legacy applications will be covered along with the steps you’ll need to take to harness the power of modules and write more maintainable systems.
Gradle is an open source build automation tool that uses Groovy for its build configuration files rather than XML like Maven. It offers features like incremental compilation, parallel task execution, and a built-in dependency management system. Projects can be configured as multi-module builds with hierarchical or flat layouts. Gradle supports plugins for tasks like compilation, testing, packaging, and publishing. It integrates with IDEs like IntelliJ, Eclipse, and NetBeans and can be used to build Java EE applications and other projects.
Java EE 8 Presentation given at NYC Java SIG on May 4, 2017. This presentation provides the latest information on the forthcoming release of Java EE 8 in June.
JDK.IO 2016 (http://jdk.io)
Java EE 7 introduced a new batch processing API. This session will go over how to use the batch processing API introduced with Java EE 7. This API is makes it easy to implement long running data/compute intensive jobs which need to be scheduled or initiated on-demand. Basics of the API will be demonstrated via code samples. The API will also be compared to Spring Batching and Hadoop to provide context and guidance on when these technologies are appropriate.
Faster java ee builds with gradle [con4921]Ryan Cuprak
JavaOne 2016
It is time to move your Java EE builds over to Gradle! Gradle continues to gain momentum across the industry. In fact, Google is now pushing Gradle for Android development. Gradle draws on lessons learned from both Ant and Maven and is the next evolutionary step in Java build tools. This session covers the basics of switching existing Java EE projects (that use Maven) over to Gradle and the benefits you will reap, such as incremental compiling, custom distributions, and task parallelization. You’ll see demos of all the goodies you’ve come to expect, such as integration testing and leveraging of Docker. Switching is easier than you think, and no refactoring is required.
JavaOne 2016
JMS is pretty simple, right? Once you’ve mastered topics and queues, the rest can appear trivial, but that isn’t the case. The queuing system, whether ActiveMQ, OpenMQ, or WebLogic JMS, provides many more features and settings than appear in the Java EE documentation. This session looks at some of the important extended features and configuration settings. What would you need to optimize if your messages are large or you need to minimize prefetching? What is the best way to implement time-delayed messages? The presentation also looks at dangerous bugs that can be introduced via simple misconfigurations with pooled beans. The JMS APIs are deceptively simple, but getting an implementation into production and tuned correctly can be a bit trickier.
5. DemoApplication
• Broadcast race course
• Boat registration
• Time check and start notification
• Boat tracking
• Race announcements
• Results
• Weather information
Functional Requirements
6. DemoApplication
• Mobile
• Apache Cordova
• User interface
• JQuery Mobile
• Tooling
• NetBeans
• NodeJS
• Server
• GlassFish 4.1 (EE 7)
• Android dev tools
• iOS dev tools
Overview
7. DemoApplication
• What is Apache Cordova?
• Open source mobile development framework.
• Applications implemented using HTML5, CSS3, and JavaScript.
• Applications bundled and wrapped in a native shell.
• APIs for accessing device features.
• Benefits:
• Write once, run everywhere.
• Leverage familiar frameworks and tools (jQuery, Angular, etc.)
• Rapidly develop applications
• Low barrier to entry… no massive learning curve
Why choose Apache Cordova?
8. DemoApplication
• Standard set of APIs
• Multiple vendors implementations
• Longevity, continuity, and backwards compatibility.
• Technical reasons:
• Support for current technologies, REST, WebSockets
• Resource management: object pooling, thread management,
threading,
• Transactions
• Security
• Scalability
• Testability
• Messaging
• Extended features: clustering, distributed caches
Why choose Java EE?
14. MobilePlatforms
• Dominated by Google’s Android and Apple’s iOS
platforms.
• Android’s US market share is about 52% against iOS’s 42%
• Windows Phone is at a distance 3rd place with about 4%
share.
• Globally, Android’s market share is even higher.
Status 2015
15. MobileOverview
• Native App
• Built for a specific platform
• Downloadable app
• Objective-C/Swift/xCode, Java/Android Studio etc.
• Mobile Web App
• Service side apps that run in the device’s web browser
• HTML 5, CSS3, JavaScript
• jQuery Mobile, Sencha Touch
• Responsive and Adaptive Web Designs
• Hybrid App
• Developed mostly using Mobile Web App technologies, but are
executed like a native app in a native (wrapper) container
• Apache Cordova (PhoneGap), ADF Mobile, IBM Worklight,
AeroGear, Appcelerator
Development Models
16. MobileOverview
• Single Page Application (SPA)
wrapped in Native application.
• Native application displays a
WebView – embedded browser.
• Logic:
• JavaScript
• JavaScript platform extensions
• UI
• HTML5 markup
• SVG
• Canvas
• WebGL
• All assets are bundled with the
application.
Hybrid Applications
18. MobileOverview
SPA – Single Page Application
index.html
<html><body>
<div id=“page”>
<a href=“menu.html”>
Menu
</a>
</div>
</body></html>
menu.html
<html><body>
<div id=“page”>
<a href=“info.html”>
Info </a>
</div>
</body></html>
info.html
<html><body>
<div id=“page”>
Info
</div>
</body></html>
<a href=“info.html”>
Info </a>
Info
19. MobileOverview
Framework License
jQuery Mobile
http://jquerymobile.com
MIT
Sencha Touch
http://sencha.com
Commercial(Free) & Open
Source (GPLv3)
Intel App Framework
http://app-framework-software.intel.com
MIT
Ionic
http://ionicframework.com
MIT
M-Project
http://www.the-m-project.org
MIT
Kendo UI
http://www.telerik.com
Commercial
Twitter Bootstrap 3
http://getbootstrap.com
MIT
Mobile Frameworks
25. Tooling
• iOS (xCode)
Apple App Store – search for XCode
• Android (Android Studio)
https://developer.android.com/tools/index.html
• Windows Phone
http://dev.windows.com/en-us/develop/downloads
• Tizen
https://developer.tizen.org/downloads/tizen-sdk
• BlackBerry
http://developer.blackberry.com
Platform Tools and SDKs
Note: NetBeans has integration with Android/iOS tooling.
Thanks to PhoneGap, we can also build in the cloud!
30. ApacheCordova
• Originally named PhoneGap.
• Mobile development framework
• Development started in 2009.
• Wraps HTML5 applications in a native
wrapper.
• Purchased by Adobe in 2011.
• Code donated to Apache as Apache
Cordova.
• PhoneGap built on Cordova
• Adobe provides cloud build system for
PhoneGap.
Overview
31. ApacheCordova
Plugins
Battery Status Geolocation
Camera Globalization
Contacts InAppBrowser
Device Media
Device Motion Media Capture
Device Orientation Network Information
Dialogs Splashscreen
File System Vibrate
File Transfer
Common Plugins
Supports custom plugins!
32. ApacheCordova
• HTML5 apps will not match platform UI exactly.
• Not all hardware features are accessible.
• Each platform has its quirks:
• iOS network information is Cellular or Ethernet.
• iOS fires network available after application startup.
• Windows 7 phone emulator reports network connection
Unknown.
• Device UID on iOS is app specific (to block tracking)
• Camera unavailable in iOS simulator
• Altitude accuracy not supported on Android
• Windows phone doesn’t provide battery level information
Quirks
39. ApacheCordova
Plugin: Device Information
Don’t always believe what you see:
• Simulators and actual phones return
different values.
• You should probably test both ARM and
Intel-based phones!
43. ApacheCordova
• Start with HTML5 project in NetBeans without Cordova.
• Test in Simulator’s browser.
• Profile code using Chrome Profiler
• Test with Chrome
• Write JavaScript unit tests
• Isolate networking code
• Don’t assume network access/availability
• Never store confidential information on the phone!
Development Best Practices
46. Java EE7 + Cordova
Device/Server Connectivity
Java EE 7
App Server
REST
Web Sockets
Request/Response
Bidirectional
Restful Web Service
Web Socket Endpoint
JavaScript/HTML5
47. Java EE7 + Cordova
• Introduced with HTML5.
http://www.html5rocks.com/en/tutorials/websockets/basics/
• Offers true bi-directional (full-duplex) communication over a
single TCP connection.
• Initial hand-shake over HTTP, but subsequent conversations
over Web Sockets (connection upgraded).
• Supports asynchronous, extremely low-lag communication
• Perfect for applications like chat and games
• Uses existing web technologies and security standards
• Transmits Text or binary data
• Text is transmitted as Unicode.
• URL prefix ws: or wss:
Web Sockets Refresher
48. Java EE7 + Cordova
• RESTful web services.
• Requests performed using HTTP Methods:
GET/DELETE/POST/PUT/HEAD/Options
• Client initiates the connection.
• Server responds and connection is closed.
• Web Sockets
• Client initiates the connection.
• Both client and server can send data
simultaneously.
• Client (phone) initiates the connection. Both
sides can simultaneously send messages.
Connectivity Technologies
JAX-RS 2.0
Java API for
WebSocket
49. Java EE7 + Cordova
Data is exchanged using JSON (JavaScript Object Notation)
• Two data structures: objects and arrays
• Types: String, number, object, array, true, false, null.
• Extremely compact and simple to exchange
Exchanging Data using JSON
50. Java EE7 + Cordova
Relating Java EE 7 to Mobile
JAX-RS
Java API for
WebSocket
Java API for
JSON
JAXB*
Mobile Device (running Cordova)
POJO <-> JSON
51. Java EE7 + Cordova
• JAX-RS 2.0 is the REST development API for Java
• Major upgrade with Java EE 7. (JSR-339)
• Client API, Aysnc, Validation, Filters/Handlers, Interceptors,
and Content Negotiation.
• Server and client
• Integrates with JAXB and Bean Validation
• Annotation based, declarative
• @Path, @GET, @POST, @PUT, @DELETE,
• Pluggable and extensible.
REST
52. Java EE7 + Cordova
REST Example with JAX-RS
HTTP POST to http://<server>/n34/race/join/<id>/<class>
58. Java EE7 + Cordova
Java API for WebSockets
• High level declarative API for WebSocket
• API similar to JavaScript WebSocket API
• Both client and server-side
• Important pieces:
• Annotations for annotated endpoints:
@ServerEndpoint, @OnOpen, @OnClose,
@OnMessage, @OnError
• Session object – used to send messages.
• RemoteEndpoint object – used to sent messages to a client
• MessageHandler – interface used by programmatic endpoints.
• Pluggable and extensible
• Encoders, decoders, sub-protocols
Web Sockets
59. Java EE7 + Cordova
Web Socket in JavaScript
Creating WebSocket in JavaScript:
60. Java EE7 + Cordova
Sending JSON via WebSockets
61. Java EE7 + Cordova
• Programmatic (powerful)
• Life-cycle and message handling can be implemented as separate
classes.
• Same message handler can be used for multiple clients.
• Annotated (easy)
• Configured using annotations.
• Any POJO can be an endpoint.
• Endpoint and message handler are combined.
Two Types of Web Socket Endpoints
62. Java EE7 + Cordova
• javax.websocket.Session most important object.
• Represents the connection to the client.
• Nearest you will come to the “raw” socket connection.
• Provides key methods for:
• Sending messages back to the client
• Closing the connection
• Storing state
• Obtaining information about the connection
• Acquiring the principal
• Retrieving a list of all connections to a client
• Retrieving unique identifier representing the session
• Acquire in onOpen or onMessage methods
Web Sockets: Session
63. Java EE7 + Cordova
Web Sockets: Programmatic Endpoint
64. Java EE7 + Cordova
Web Sockets – Annotated Endpoint
65. Java EE7 + Cordova
Sending a message
Synchronously sends a message back to the client.
66. Java EE7 + Cordova
Type Parameter Type Partial Message Notes
Text String No
Text int,long,float,etc. No
Text String, boolean Yes True finished
Text Custom Object No Decoder.Text
Binary byte[] No
Binary Byte[],boolean Yes True finished
Binary ByteBuffer No
Binary ByteBuffer,boolean Yes True finished
Binary InputStream Yes
Binary Custom Object No Decoder.Binary
Pong PongMessage No
Web Sockets: onMessage Parameters
67. Java EE7 + Cordova
• Defined in JSR 353 – included with Java EE 7
• Provides ability to parse, transform, and query JSON.
• Used to create or read JSON.
• Does NOT perform JSON <-> Object mapping
• Useful for hand-coding JSON for JavaScript.
• Can be used with JAX-RS instead of auto-JAXB JSON production
• APIs:
• Object Model API (like DOM)
• Streaming API (like SAX)
Java API for JSON
68. Java EE7 + Cordova
• WebSocket connection processes many types of messages.
Java API for JSON
AbstractMessage
ChatMessage TrackingMessage RaceMessage
69. Java EE7 + Cordova
Java API for JSON
Message Object
Decoders/encoders
72. Java EE7 + Cordova
• WebSockets can be Singleton Bean or a Stateful Session Bean.
• With Stateful Session Bean you can use extended persistence
context!
@PersistenceContext(type=PersistenceContextType.EXTENDED)
private EntityManager em;
• Annotate OnClose/OnError with @Remove to release the
stateful bean.
• Limitations with stateful beans:
• Cannot receive CDI events.
• WebSocket Session can be accessed from other threads to
send messages to the client.
Web Sockets and Java EE
73. Java EE7 + Cordova
• No compression supported by default!
• Binary data is transmitted using Base64 encoded.
• Don’t use WebSockets on the main login/landing page.
• ws: can be sniffed as easily and packets injected.
• Each message can take upwards of 2kb header – much smaller
than issuing a RESTful service call.
• WebSocket connection limit is different than the HTTP
connection limit.
• User can open an unlimited number of connections to a single
server.
Web Sockets (generically)
74. Java EE7 + Cordova
Server Load: Web Sockets vs. REST
Java EE 7 Server
Java EE 7 Server
REST
WebSockets
76. jQueryMobile
• UI Framework needed!
• Mobile UIs are different.
• Touch based
• Certain UI conventions.
• jQuery Mobile
• Optimized for mobile devices
• Themeable
• 12 Kb compressed
• Accessibility support
• jQuery Mobile requires
jQuery
Overview
77. jQueryMobile
• Use NetBeans to install jQuery and jQuery Mobile.
• Don’t use CDN – all content must be packaged with the
application.
Configuration
81. Security
• Apache Cordova App != mobile web application
• No HTTP session
• Users do not expect to authenticate on each launch!
• Do you log into email/twitter on each launch?
• Password should never be stored
• Phones are lost/stolen regularly
• Obscurity isn’t security
• Many users re-use password
Overview
82. Security
User Interaction Timeline
Cordova App Java EE Server
Retrieve account info
Retrieve race info
Join race
Update account info
View results
10 sec
25 min
User quits and motors out of harbor
Checks email
User goes racing…
2 hours
3 hours
Celebratory beer
83. Security
Goal is to use Java EE security on the server side:
Java EE Security
JAX-RS
Endpoint
EJBs
(roles)
86. Security
• Token based security (generated UUID)
• User authenticates once using username/password
• HTTP authentication performed using POST
• Server generates a token (UUID) which client stores
• Client submits token with each request (HTTP Header)
• If token isn’t valid, user is forced to re-authenticate
• Token authentication is performed before web service
invocation.
• Remember:
• Servers can log HTTP requests – don’t include token in URL.
Token Authentication/Authorization
88. Security
Drawbacks:
• Authentication performed on each request
• Client must cache credentials and resubmit each time
• Container repeatedly checks the database
Alternate approach – authentication module (JASPIC)
• Java Authentication API for Containers
• Developed under JSR 196
• Operates on messages (think web requests)
• Standardizes the authentication module development
• Authentication ultimately performed via ServerAuthModule.
Token Verification via Filter
89. Security
• JASPIC puzzle piecesL
• ServletContextListener – initial registration of AuthConfigProvider
• AuthConfigProvider
• ServerAuthConfig
• ServerAuthContext
• ServerAuthModule does the actual authentication work]
• Factory nightmare…
Server Authentication Module
94. Summary
• Apache Cordova simplifies cross-platform mobile
development.
• Java EE 7 provides a standardized server stack to enable
Apache Cordova development.
95. Summary
Store Owner Platform Cost
AppStore Apple iOS $99/year
Android Market Google Android $20
AppWorld RIM BlackBerry BlackBerry Free
Amazon AppStore Amazon Android $99/year
Marketplace Microsoft Windows $99/year
App Store Distribution
I would like to welcome you to Hybrid Mobile Development with Apache Cordova and Java EE 7.
How many of you are already mobile application developers?
How many are using Apache Cordova? How many have heard of Apache Cordova?
The objective of this session is to enable you to become the next app store millionaire.
Two things:
Enable you to write a single application for multiple platforms.
Enable you to write a robust and powerful backend that can scale.
This is the agenda for this session. We are going to start out by first looking at the demo application, then a brief review of mobile today, then discuss tooling…
[Ryan]
In today’s presentation we are going to look at a racing application.
This is interesting for several reasons, first:
It is a complex example that allows us to look at threading
It has a sufficiently complex data model
Java EE 7 adds several important features that allow us to build this application.
[Ryan]
[Ryan]
There are several technologies we
[Ryan]
If this is an HTML5 application, why Java EE? Where does Java EE fit into the picture?
[Michael]
This is going to be our data model for the application. We’ll discuss each of these pieces in great depth as we go through the presentation.
One thing to drive home here is the complexity of the application. This application coordinates activities between multiple users and has a graphical interface.
This is a mult-tier architecture
Leverages practically every feature of Java EE
Unlike most demo applications, this one has a rich data model.
Over 16 tables and this was an early draft of the application! We have multiple relations.
[Ryan]
Demo application
[Michael]
[Michael]
What is the mobile landscape like today: currently the two biggest players are Android and iOS. Blackberry which used to dominate the market is just a shadow of its former self.
[Ryan]
With mobile development you have three different models to choose from. There is the native, mobile web and hybrid. Each one has its strengths and weaknesse.
With native you are leveraging native platform resources,
Native App
Best user experience
Access all device/hardware capabilities
But, development/maintenance will have to be done for every target mobile platform
Mobile Web App
Target multiple platforms from a singe code base
Low barrier to entry – low learning curve, nothing to download for users
But, native development may still be needed and performance may also suffer slightly
Hard to access – user must browse to the ‘site’
Native HTML5 Apps
Target multiple platforms from a single code base.
Requires development tools for each platform.
Access to device features but with limitations.
[Michael]
Native HTML5 applications are fundamentally different from mobile web applications. An HTML5 application is a “Single Page Application” – this means that the application resides in a single “page.”
There is no:
Back button
URL bar
History
Shortcuts
The user cannot escape from your application.
You code the logic of the application in JavaScript -
[Ryan]
First, the server doesn’t serve up the pages. The pages are bundled with the application.
Lack of HTTP Session should get your attention – this is a major difference.
[Ryan]
Graphically let’s get a better understanding of what we mean by a SPA.
It doesn’t mean that we’ve got a 10,000 line html file. The content does get segmented into multiple files. Your application does get split up into multiple JS and HTML5 files.
Note, you should have a post process step, say using Grunt which will minify your resources.
[Michael]
You mobile framework to get going.
Don’t re-invent the wheel.
Desktop web development skills are different than mobile web development skills
Have to handle touch, small devices, device orientation changes.
Angular can be used although it isn’t listed.
[Michael]
Sencha Touch framework has an IDE
Visually develop the pages
Forces good MVC practices
Development similar to that in xCode, Android Studio
Costs $400 for a license (Sencha Touch libaries are free)
[Ryan]
Next up, we are going to look at tooling!
[Michael]
Need quite a few tools in order to get started.
Need our platform tools installed
Xcode
Android Developer Studio
Microsoft Tools
[Ryan]
Tooling is incredibly important and also challenging.
Dealing with multiple technologies
May not all play nice
[Michael]
[Michael]
Her we have the various tools.
Need multiple operating systems in addition to multiple devices.
Using PhoneGap we can build in the cloud.
[Michael]
Cordova is installed via the Node package manager, - you can choose to circumvent.
[Michael]
- To simplify development it is easiest to test in Chrome.
- NetBeans enables you to debug in Chrome
[Michael]
Create a new Cordova project in NetBeans (hello world) and launch it.
Set a breakpoint.
[Michael]
- Next we will talk about Apache Cordova!
Up to this point we’ve been alluding to Apache Cordova…
[Michael]
Cordova has many plugins allowing you to talk to devices.
[Ryan]
Native HTML5 applications are fundamentally different from mobile web applications. An HTML5 application is a “Single Page Application” – this means that the application resides in a single “page.”
There is no:
Back button
URL bar
History
Shortcuts
The user cannot escape from your application.
You code the logic of the application in JavaScript -
[Michael]
The project layout is relatively straightforward
Web assets- html files, JS, etc. go under www. Test fles are under test. Plugins are installed in the plugins directory. Etc.
[Ryan]
[Ryan]
[Michael]
Config.xml is the global configuration file.
There is a config.xml file for each platform (iOS/Android).
Access origin - * means it can access anything
Specify n34sailor to lock to only our site. If someone did inject JavaScript (and it was interpreted) it could be used to hack our server
[Michael]
In that last slide, we saw how Cordova would allow us to access any site. We need
[Michael]
Values in simulator are different
Vary significantly across phones
Intel vs. ARM
- Capturing a picture is easy – can use AJAX to send the picture to a RESTful web service.
- Picture is transmitted as Base64 and must be decoded.
Java 8 included Base64 decode support.
- Requires special JAX-RS configuration to receive the multi-part MIME request.
[Ryan]
[Ryan]
[Ryan]
Client initiates the request.
Client/server communication from mobile applications commonly happens over HTTP, more often using REST style services
Stateless, lightweight, scalable
Typically JSON over HTTP/HTTPS.
XML occasionally used.
Commonly supported HTTP verbs include GET, POST, PUT, and DELETE
Uses existing web technologies and security standards
Fully supported by Java EE 6 & 7.
In terms of connecting connecting a mobile application with the the backend servers you have two main types of connectivity: Restful webservices and Websockets. Both of these use HTTP at their core. Using HTTP as opposed to direct socket communication ensures the the mobile application is able to reach the server wherever it it running. HTTP is well understood by fire walls and proxy servers.
Restful web services map the HTTP functions PUT/POST/DELETE, etc. to business functionality.
Text based exchange format.
JSON defines only two data structures: objects and arrays. An object is composed of name-value pairs and an array is a list of values.
JAX RS is the Java standard API for rest.
With Java EE 7 JAXRS received a major upgrade.
This is an example JAX-RS endpoint.
[Ryan]
ServerApplicationEndpoint- represents an endpoint.
- WebSocket implementation will check with each decoder until it finds one that can decode the message- .
Minimize parsing in the willDecode or cache for the decode method.
Exceptions processing messages can wreak havoc.
The client racing app is constantly retrieving information from the server.
This is what we want to happen on the serverside…
In this example here we see an example of how to use basic authentication against the server. The problem with this approach is that we would have to cache the username and password in the application.
Caching the username and password in the application would be bad.
What we are going to do instead is take a token approach. With a token approach.
One solution to token verification is to write a WebFilter.
However, there are two flaws with this code:
To use the servlet logic, we would have to retrieve the username and password to then log in the user. The container would then hit the database table again to perform password validation. At least two selects on the database on every restful web service invocation.
The password is hashed and the container expects a plain text password.
So this solution will not work.