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
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
Cordova APIs
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
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.
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
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
Cordova APIs
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
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.
Slides of a talk of a seminars series I gave at WebRatio in January 2014.
I implemented many best practices and advices in this presentation in a generic app template available here: https://github.com/iivanoo/cordovaboilerplate
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
Ponencia de Jorge del Casar en DroidconMAD2013.
Sinopsis: Cordova es un framework de desarrollo móvil de código abierto que permite usar tecnologías web standard como HTML5, CSS3 y Javascript para el desarrollo multiplataforma, evitando desarrollar en el lenguaje nativo de cada plataforma. La nueva Command Line Interface (CLI) desarrollada en Node.js te permite automatizar la creación de proyectos, adición de plataformas y plugins así como la construir la app y probarla en simuladores y dispositivos reales.
When it comes to developing enterprise-level web apps using PHP, a laravel development company can be your best business partner. A new version of the framework is also available – Laravel 9. Here you’ll learn more about the framework and what the newest version brings to the table.
Designing the foundations of an iOS application is important to reduce the cost of maintenance and evolution. In this session we will see some best practices on how to organize iOS apps both from the point of view of the Xcode project and the source code. Based on the typical iOS client/server application, we will see how to structure the layers ranging from the user interface to the netwrok layer.
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...Yandex
In 2012 Facebook relaunched their iOS app to use native code. This was a big shift in architecting and implementing the Facebook app experience, the most widely used third party app on the entire iOS platform. Adam Ernst will speak about how the decision was made to switch to native code and how the company prepared to rewrite the app. He will share an inside look at the APIs and technical architecture Facebook uses to enable dozens of iOS developers to work on the same application. Automated testing is very important to Facebook, so Adam will also speak about how Facebook uses testing on iOS to keep the app reliable.
EuroPython 2011 - How to build complex web applications having fun?Andrew Mleczko
Web development is a complexity challenge nowadays. Growing number of functionalities results in customer expectations increase which makes project design more difficult. Using proper tools that suite your customer needs is essential.
This talk is about successful story using closely together Pyramid and Plone. Basing on these examples you will see the main reasons for using Plone as a CMS only and letting Pyramid do the rest (vertical application).
The only constant in software development is CHANGE. Every piece of software that has been developed and shipped to a customer will be changed numerous times during it's life cycle. Depending on how well the code is designed, it is more or less easy to implement changes. MVC, which is an acronym for Model - View - Controller is no new concept. In fact this design paradigm was created by Xerox in the 80's, and it is becoming THE recommended model for designing frameworks - especially on the web. The session will give an overview of design pattern in general and MVC in particular. We will show, how to use the MVC design paradigm in an XPages application and demonstrate, how easy it is to implement changes. Need to read/write your data from/to an XML file instead of using a Notes View. MVC makes software maintenance easy as 1-2-3
JavaScript basics
JavaScript event loop
Ajax and promises
DOM interaction
JavaScript object orientation
Web Workers
Useful Microframeworks
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
Building applications for mobile devices has its additional challenges: The network connection can be flaky and slow, so the application should still work when the device is offline. Users expect application icons on their home screens to start them. Depending on your use cases you want to access sensors that are not available in the browser.
This Meetup Martin Sotirov (@unclemartycodes) will talk about Vue on mobile devices and take a look at the different ways you can deploy a Vue app on mobile. We start with a PWA, go through a hybrid solution using Ionic Capacitor and then finally arrive at a NativeScript app which renders native iOS and Android views.
https://martinsotirov.com
contact@martinsotirov.com
Most of the major internet companies have now declared themselves to be mobile first. Smartphones have become ubiquitous throughout the development world. But mobile development is fraught with challenges. There are more Android devices than iOS, but iOS users tend to spend more money. If you build your app for one, it is a complete re-write for the other. You may have heard of Cordova/PhoneGap, but the apps tend to be somewhat clunky looking.
Enter the Ionic Framework, a cross platform framework which combines PhoneGap with AngularJS and super fast CSS3 to make apps which perform at near native levels.
Slides of a talk of a seminars series I gave at WebRatio in January 2014.
I implemented many best practices and advices in this presentation in a generic app template available here: https://github.com/iivanoo/cordovaboilerplate
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
Ponencia de Jorge del Casar en DroidconMAD2013.
Sinopsis: Cordova es un framework de desarrollo móvil de código abierto que permite usar tecnologías web standard como HTML5, CSS3 y Javascript para el desarrollo multiplataforma, evitando desarrollar en el lenguaje nativo de cada plataforma. La nueva Command Line Interface (CLI) desarrollada en Node.js te permite automatizar la creación de proyectos, adición de plataformas y plugins así como la construir la app y probarla en simuladores y dispositivos reales.
When it comes to developing enterprise-level web apps using PHP, a laravel development company can be your best business partner. A new version of the framework is also available – Laravel 9. Here you’ll learn more about the framework and what the newest version brings to the table.
Designing the foundations of an iOS application is important to reduce the cost of maintenance and evolution. In this session we will see some best practices on how to organize iOS apps both from the point of view of the Xcode project and the source code. Based on the typical iOS client/server application, we will see how to structure the layers ranging from the user interface to the netwrok layer.
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...Yandex
In 2012 Facebook relaunched their iOS app to use native code. This was a big shift in architecting and implementing the Facebook app experience, the most widely used third party app on the entire iOS platform. Adam Ernst will speak about how the decision was made to switch to native code and how the company prepared to rewrite the app. He will share an inside look at the APIs and technical architecture Facebook uses to enable dozens of iOS developers to work on the same application. Automated testing is very important to Facebook, so Adam will also speak about how Facebook uses testing on iOS to keep the app reliable.
EuroPython 2011 - How to build complex web applications having fun?Andrew Mleczko
Web development is a complexity challenge nowadays. Growing number of functionalities results in customer expectations increase which makes project design more difficult. Using proper tools that suite your customer needs is essential.
This talk is about successful story using closely together Pyramid and Plone. Basing on these examples you will see the main reasons for using Plone as a CMS only and letting Pyramid do the rest (vertical application).
The only constant in software development is CHANGE. Every piece of software that has been developed and shipped to a customer will be changed numerous times during it's life cycle. Depending on how well the code is designed, it is more or less easy to implement changes. MVC, which is an acronym for Model - View - Controller is no new concept. In fact this design paradigm was created by Xerox in the 80's, and it is becoming THE recommended model for designing frameworks - especially on the web. The session will give an overview of design pattern in general and MVC in particular. We will show, how to use the MVC design paradigm in an XPages application and demonstrate, how easy it is to implement changes. Need to read/write your data from/to an XML file instead of using a Notes View. MVC makes software maintenance easy as 1-2-3
JavaScript basics
JavaScript event loop
Ajax and promises
DOM interaction
JavaScript object orientation
Web Workers
Useful Microframeworks
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
Building applications for mobile devices has its additional challenges: The network connection can be flaky and slow, so the application should still work when the device is offline. Users expect application icons on their home screens to start them. Depending on your use cases you want to access sensors that are not available in the browser.
This Meetup Martin Sotirov (@unclemartycodes) will talk about Vue on mobile devices and take a look at the different ways you can deploy a Vue app on mobile. We start with a PWA, go through a hybrid solution using Ionic Capacitor and then finally arrive at a NativeScript app which renders native iOS and Android views.
https://martinsotirov.com
contact@martinsotirov.com
Most of the major internet companies have now declared themselves to be mobile first. Smartphones have become ubiquitous throughout the development world. But mobile development is fraught with challenges. There are more Android devices than iOS, but iOS users tend to spend more money. If you build your app for one, it is a complete re-write for the other. You may have heard of Cordova/PhoneGap, but the apps tend to be somewhat clunky looking.
Enter the Ionic Framework, a cross platform framework which combines PhoneGap with AngularJS and super fast CSS3 to make apps which perform at near native levels.
Apache Cordova is a platform for building mobile apps using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile app developers to utilize mobile native functions such as (Audio, Camera, Contacts …etc) using JavaScript. This session discusses and demonstrates the advanced aspects of Apache Cordova. Advanced aspects include extending Apache Cordova framework by creating custom plugins in order to access more device hardware features. Advanced aspects also include empowering Apache Cordova apps with Push notifications and Cloud services. Finally, this session demonstrates the power of automated JavaScript unit testing for producing quality Apache Cordova apps.
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularTodd Anglin
Do you want to build native mobile apps for iOS and Android? Are you a web developer? Then NativeScript is the perfect framework for you. NativeScript is an open source framework for creating native mobile apps using the skills of the web developer: JavaScript, CSS and simple tag-based markup. Create rich, high-performance iOS and Android apps with 100% native UI using many of the skills you already have.
Topics covered include:
NativeScript framework core concepts and getting started
Accessing native device capabilities with JavaScript
Building native mobile apps with Angular 2
Common app patterns (login, settings, data bound list and more)
Styling NativeScript with CSS
Targeting specific devices and screens
Debugging and deploying to devices
There has never been a better (and easier) way for web developers to create native mobile apps.
Hybrid vs native mobile development – how to choose a tech stackJacques De Vos
Choosing the wrong mobile tech stack sets you up for a world of pain. But how do you select the right one from a plethora of current options?
As an iOS developer I am convinced that a carefully designed native app provides the best user experience. So why would we choose Ionic2/Angular2 on Cordova (a bleeding edge Hybrid JavaScript framework) for our latest mobile App? In this short talk I will share our thinking and experiences on the current landscape of mobile stack options.
I will introduce the contenders: Native (iOS and Android) vs Semi-Native (Xamarin and React Native) vs Hybrid (Ionic2/Angular2 on Cordova) vs Web. We will then go through some of the prominent tradeoffs between the different options: cost, reuse, single language, speed and user experience, device support, learning curve.
This should give you some (opinionated) guidelines to choosing the right mobile stack for your particular App.
Hybrid mobile app development slide with Ionic Framework. This is a subset of slides presented during my Ionic Mobile Development course.
In addition to the items in this slide, the course will cover Ionic application Architecture, Important AngularJS principles for Ionic development, Native vs Hybrid and code signing to Google Play and AppStore.
It is a hands-on based approach training where 80% of the course (normally from 10 am to 5 pm) will be guided lab activity or mini project activity.
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.
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.
This Presentation will give u information about Android :
1. Working with resources- String resource,
2. Color resource,
3. Array resource Android layouts and views Handling user interaction events Grouping,
4. accessing of resources Localization of Resources Handling runtime changes of resources Designing your GUI
Introduction to PhoneGap
Background
Setting up the environment for Android
Handling Events
Working With The Device, The Network, And Notifications
Getting Information from the Device
Determining the Connection Type
Using Notifications
Using Alerts
Using Confirmation Dialogs
Using Beeps
Using Vibrations
Accelerometer
Using the Acceleration Object
Using Accelerometer Methods
Media
The Media Object
Using Media Methods
Camera
Using The Camera Object
Using The Getpicture Method
Using Camera Options
Geolocation
Position, PositionError, Coord
Geolocation Methods
Geolocation Options
Deployment using Phonegap (Android)
Hands-on exercises
Storage
Available options
Db object
localStorage
Files
Filessystem
File read & write
Handling errors
Contacts
Creating contacts
Finding contacts
Handling errors
Capture
Video
Audio
Handling errors
Hands-on exercises
Introduction to PhoneGap
Background
Setting up the environment for Android
Handling Events
Working With The Device, The Network, And Notifications
Getting Information from the Device
Determining the Connection Type
Using Notifications
Using Alerts
Using Confirmation Dialogs
Using Beeps
Using Vibrations
Accelerometer
Using the Acceleration Object
Using Accelerometer Methods
Media
The Media Object
Using Media Methods
Camera
Using The Camera Object
Using The Getpicture Method
Using Camera Options
Geolocation
Position, PositionError, Coord
Geolocation Methods
Geolocation Options
Deployment using Phonegap (Android)
Hands-on exercises
Storage
Available options
Db object
localStorage
Files
Filessystem
File read & write
Handling errors
Contacts
Creating contacts
Finding contacts
Handling errors
Capture
Video
Audio
Handling errors
Hands-on exercises
Hybrid applications are web applications (or web pages) in the native browser, such as
UIWebView in iOS and WebView in Android (not Safari or Chrome). Hybrid Mobile
Applications are Commonly Developed using CSS, HTML & Javascript.
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...Ivano Malavolta
Slides of my invited talk at the 2nd workshop on Quality and Reliability Assessment of Robotic Software Architectures and Components (QRARSAC), co-located with the International Conference on Robotics and Automation (ICRA 2023).
Abstract of the talk. Today robotic systems are central to many industrial sectors, such as logistics, autonomous warehousing, and healthcare. If on one side ROS is helping roboticists by providing a standardized communication platform for robotic systems, on the other side ROSsystems are getting more and more large and complex, thus making it extremely difficult to ensure their level of quality, e.g., in terms of performance, security, energy efficiency, testability, maintainability. Improving the quality of robotic systems is not a new activity, but in this talk, we tackle it from a different perspective: we look at them from a software architecture perspective. In this talk, I will walk you through a series of experiments we conducted at the Vrije Universiteit Amsterdam targeting the architecture of ROS systems, we will discuss some architectural tactics for ROS systems, and will close with an overview of our open-source tool for automatically executing experiments on robotics software.
The slides of a short presentation I gave about my experience about working in the context of EU grants. It contains tips and tricks for the before/during/after phases of a EU project.
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)Ivano Malavolta
The slides of my presentation about the Green Lab at the event called Research Cocktail (October 2020). The event is organized by the Computer Science Department of the Vrije Universiteit Amsterdam.
The source code of our tools and the replication package of our experiments performed in the Green Lab can be found here: https://github.com/S2-group
For further details about the Green Lab and all our activities around it, you can contact me at i.malavolta@vu.nl
Navigation-aware and Personalized Prefetching of Network Requests in Android ...Ivano Malavolta
Slides of my presentation at the NIER track of the 41th International Conference on Software Engineering (ICSE 2019).
The paper is available here: http://www.ivanomalavolta.com/files/papers/ICSE_2019_NAPPA.pdf
How Maintainability Issues of Android Apps Evolve [ICSME 2018]Ivano Malavolta
Slides of my presentation at the Research track of the 34th International Conference on Software Maintenance and Evolution (ICSME 2018).
The full paper is available here: http://www.ivanomalavolta.com/files/papers/ICSME_2018.pdf
Collaborative Model-Driven Software Engineering: a Classification Framework a...Ivano Malavolta
Slides of my presentation at the Journal first track of the 40th International Conference on Software Engineering (ICSE 2018).
The accompanying extended abstract is available here: http://www.ivanomalavolta.com/files/papers/ICSE_2018_JournalFirst.pdf
The original TSE paper is available here: http://www.ivanomalavolta.com/files/papers/TSE_2017.pdf
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Modeling behaviour via UML state machines [Software Design] [Computer Science...Ivano Malavolta
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Ivano Malavolta
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
Modeling and abstraction, software development process [Software Design] [Com...Ivano Malavolta
This presentation is about a lecture I gave within the "Software Design" course of the Computer Science bachelor program, of the Vrije Universiteit Amsterdam.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
[2017/2018] AADL - Architecture Analysis and Design LanguageIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
[2017/2018] Introduction to Software ArchitectureIvano Malavolta
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.infn.it/.
http://www.ivanomalavolta.com
This presentation is about a lecture I gave within the "Software systems and services" immigration course at the Gran Sasso Science Institute, L'Aquila (Italy): http://cs.gssi.it/.
http://www.ivanomalavolta.com
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
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
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
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.
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.
3. PhoneGap VS Cordova
Adobe/Nitobi donated the PhoneGap codebase to the Apache foundation
wider audience and contributors
PhoneGap is a distribution of
Apache Cordova
transparent governance
Better documentation
easier contributions for companies
Apache Licensing
There was only one problem....
trademark ambiguity
CORDOVA
4. You develop your app using the usual three guys
You use the same web view of the native OS
•
•
iOS = UIWebView
Android = android.webkit.WebView
http://phonegap.com/blog/2013/06/20/coming-soon-phonegap30/
Cordova
5. Cordova
The UI layer is a web browser view
•
•
100% width
100% height
Headless web browser
•
•
•
•
No URL bar
No decorations
No zooming
No text selection
6. Can I use HTML5, JS and CSS libraries I use everyday?
9. When Cordova API is not enough...
Sometimes PhoneGap is not enough as is for our purposes
•
•
unsupported feature
heavyweight data processing is faster in native code
ex. images manipulation
•
background processing is better handled natively
ex. files sync
•
complex business logic
You can develop a
Cordova plugin
10. Cordova plugins
Purpose:
To expose a Phone native functionality to the browser
This is done by developing
•
a custom Native Component
it will be different for each platform
•
a custom JavaScript API
it should be always the same
Mobile Web app
JavaScript
Plugin A
JavaScript
Plugin B
iOS
Plugin A
iOS
Plugin B
Native Platform
11. Cordova plugin architecture
Since the 3.0 version, Cordova has a slim core with only the very basic native to web bridge
technology
All other APIs are optionally installable
Developers
Cordova contributors
Users
Can compose a version of
PhoneGap suited to their
project needs
Can revision APIs
independently + it is easier to
upgrade and extend APIs
Smaller and faster apps
Plugins are installed and removed using the Cordova CLI instrument
15. Recurrent app architecture
App
The app acts as a client for user interaction
Application server
The app communicates with an application server to receive data
Data repository
The application server handles business logic and communicates with a back-end data
repository
16. The app
It generally uses the single-page application model
•
•
•
•
the application logic is inside a single HTML page
this page is never unloaded from memory
data will be displayed by updating the HTML DOM
data is retrieved from the application server using Ajax
17. The server
It is a classical web server
•
•
server-side scripting language such as Java, .NET, PHP, etc…
communication can be based on:
- RESTful services (XML, JSON, etc.)
- SOAP
•
it performs business logic, and generally gets or pushes data from a separate repository
18. The data repository
It may be:
•
•
a standard DB (even deployed in the same machine of the application server)
an external API
Both application server and back-end repository can be provided as a service BaaS
20. Cordova CLI
CLI = Command-Line Interface
The main tool to use for the cross-platform workflow
It allows you to:
•
•
•
•
•
•
create new projects
add platforms
build a project w.r.t. different platforms
emulate a project on platform-specific emulators
run a project on device
include specific plugins into a project
If you prefer to use platformspecific SDKs, you can still use it
to initialize your project
21. Project creation
Creates template project
•
•
•
PATH
the folder that will contain your project
ID
package identifier in reverse-domain style (optional)
NAME
display name of the app (optional)
22. Project structure
The create command creates a
predefined project structure
•
•
•
•
merges
a mirror of the www folder containing platform-specific assets
platforms platform specific projects (ex. an Eclipse project for Android, XCode for iOS)
plugins
installed plugins (both JS files and native resources)
www
contains your HTML, JS, CSS files
config.xml contains core Cordova API features,
plugins, and platform-specific settings. See here
for the iOS values:
http://goo.gl/1CcmyL
23. Add platforms
With this command you add a target platform of your project.
The platform will appear as subfolder of platforms containing the platform-specific project
mirroring the www folder
You can use an SDK such as Eclipse or
Xcode to open the project you created
•
PLATFORM_NAME
the name of the platform (e.g., ios, android, wp8)
If you do something like this:
cordova platform remove ios
you are removing a specific platform
24. Build the app
This generates platform-specific code within the project's platforms subdirectory
•
PLATFORM_NAME
the name of the platform to be built (e.g., ios, android, wp8)
If you do not specify the PLATFORM_NAME,
Cordova will build for all installed platforms
25. emulate/run the app
The emulate command will run the app on a platform-specific emulator
The run command will run the app on a previously setup device (e.g., connected via USB and
configured for being used as device for testing purposes)
•
PLATFORM_NAME
the name of the platform to be built (e.g., ios, android, wp8)
26. add plugins
The list of plugins can be found here
http://plugins.cordova.io
This generates platform-specific code within the project's platforms subdirectory
•
PLUGIN_ID
the id of the repository containing the source code of the plugin to be added to the project
If the plugin you want to add is not in
the cordova.io registry, you can
directly refer to the URL of his
GitHub repository
If you do something like this:
cordova plugin remove PLUGIN_NAME
you are removing a specific plugin
27. Platform custom code
Sometimes it may happen to need different JavaScript code, CSS stylesheets or generic assets for
a specific platform
ex.
Android-specific CSS stylesheet
iOS-specific assets for managing the back button graphics
...
In these cases you can put the platform-specific assets into the merges/PLATFORM_NAME folder
Cordova’s build command will take care of integrating them in your deployed app for the specific
platform
29. The killer app!
•
•
•
•
Check console
Breakpoints
Update the DOM at run-time
Access to all local DBs
•
•
•
•
Network profiling
CPU and memory profiling
Monitor event listeners
Monitor elements’ rendering time
30. Desktop Browser
PRO
•
•
very quick
very handy functions
•
•
see Chrome’s Web Development Tools
Breakpoints
CONS
•
•
•
browsers’ small differences and bugs
cannot test all Cordova’s specific functionalities
you need Phonegap shims
32. Chrome Security Restriction
If you need to test your JSON calls from a local web app, you need to relax Chrome’s security policies
with respect to local files access and cross-domain resources access
•
OSX
open -a Google Chrome.app --args “ --disable-web-security“
•
Windows
chrome.exe --disable-web-security
DO IT ONLY FOR
DEBUGGING!
33. Desktop Browser - Tools
Browser’s extension for window dimensions
Resolution Test
http://goo.gl/fQpbH
PhoneGap Shims, there are many, this is the most used:
PhoneGap-Desktop
https://github.com/jxp/phonegap-desktop
34. Ripple
It is based on Ripple, a Chrome
plugin for mobile dev
PRO
•
•
•
very quick
can use Chrome’s Web Development Tools
You can test Cordova’s API from the Desktop
CONS
•
•
browsers’ small differences and bugs
cannot test the interaction with external apps
from Cordova 3.0.0, you need to use
the Ripple available at Apache
npm install -g ripple-emulator
ripple emulate
36. Simulator
PRO
•
•
Officially supported by platform vendors
CONS
•
device’s performance is not considered
•
You use the “real” device’s browser
•
•
this is iOS-specific
Android’s emulator is a joke
device’s capabilities are only simulated
38. Remote Debugging
Since Android 4.4, this feature is
available via Chrome’s web dev kit
From iOS 6, Apple provided Mobile Safari with a remote web inspector
You can debug your app by using the classical web inspector of Desktop Safari
It can connect both to
•
The iOS emulator
•
The real device
39. Remote Debugging for older platforms
Weinre http://people.apache.org/~pmuellr/weinre/docs/latest/
3 main components:
Debug Server
the HTTP server for debug data
Debug Target
the (web) app you are debugging
Debug Client
the Web Inspector user interface
Public debug server:
debug.phonegap.com
40. Debugging reference table
iOS
Android
Desktop Browser
✓
✓
Ripple
✓
✓
Device/emulator
✓
✓
Weinre
✓
✓
Safari Web
Inspector
✓
X
Chrome Web
Inspector
X
✓
Make a favor to yourself,
don’t debug craftsman way:
console.log() + alert()
42. My development environment
Sublime Text 2
HTML Prettify
http://www.sublimetext.com
https://github.com/victorporof/Sublime-HTMLPrettify
SublimeText Package Control
SublimeLinter
http://wbond.net/sublime_packages/package_control
https://github.com/SublimeLinter/SublimeLinter
Sidebar Enhancer
JsFormat
https://github.com/titoBouzout/SideBarEnhancements
https://github.com/jdc0589/JsFormat
43. My development workflow
1. Code & test using Ripple (very quick)
Quick sketch of layout and complete business logic
2. Run and debug in the XCode simulator (handy & accurate)
Complete the UI for iOS devices and ~99% confidence about business logic
3. Run and debug on devices (complete control & confidence)
Complete the UI for Android too and ~99% confidence about business logic
44. Remarks
These are MY development environment and development workflow
There are many tools and IDEs out there
Consider this as a starting point & feel free to use the ones that fit well with your
attitude
45. Roadmap
•
•
•
•
•
•
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
Cordova APIs
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Accelerometer
Geolocation
Compass
Capturing audio and video & camera
Media playback
Contacts
Connection
Device information
Events
Notification
Local Storage
File system access
Globalization
In-app browser
Splashscreen
48. watchAcceleration
var watchID = navigator.accelerometer.watchAcceleration(win, fail, [options]);
It gets the device's current acceleration at a regular interval
win
callback function with an Acceleration parameter, it is called at regular intervals
fail
error callback
options
the interval is specified in the frequency parameter
50. The Acceleration object
It contains accelerometer data captured at a specific point in time
these values include the effect
of gravity (9.81 m/s^2)
Properties
x (Number): Amount of acceleration on the x-axis. (in m/s^2)
y (Number): Amount of acceleration on the y-axis. (in m/s^2)
z (Number): Amount of acceleration on the z-axis. (in m/s^2)
timestamp (DOMTimestamp): Creation timestamp in milliseconds
51. Accelerometer example
var options = { frequency: 3000 };
var watchID = navigator.accelerometer.watchAcceleration(win, fail, options);
function win(acc) {
if((acc.x == 0) && (acc.y == 0) && (acc.z == 9,81))
console.log(“I am on a table”);
stop();
} else {
console.log(“Please, leave me on the table”);
}
}
function fail() {
console.log(“error”);
}
function stop() {
if(watchID) {
navigator.accelerometer.clearWatch(watchID);
watchID = null;
}
}
{
53. Accelerometer
Geolocation
Geolocation refers to geospatial data collection and manipulation
ex. LatLon calculations, geocoding, etc.
Mapping refers to the activity of creating a map through some cartographic works
ex. maps, layers, markers, routes, etc.
In Cordova you can use any JS library for maps:
GMaps, Leaflet, Bing Maps,
Cordova plugins for native maps
54. Geolocation
The API itself is agnostic of the underlying location information sources
Common sources of location information include
•
Global Positioning System (GPS)
•
location info from IP address, RFID, WiFi,GSM cell IDs, etc.
This API is based on the W3C Geolocation API
Specification, and only executes on devices that
don't already provide an implementation
57. watchPosition
var id = watchPosition(win, [fail], [options]);
It gets the device's position when a change in position has been detected
win
callback function with an Position parameter
fail
error callback
options
geolocation options
59. Options
enableHighAccuracy (Boolean)
receive the best possible results (e.g., GPS)
* by default Cordova uses network-based methods
timeout (Number)
the maximum length of time (msec) that is allowed to pass from the call until the
corresponding callback is invoked, otherwise the error callback is called
maximumAge (Number)
accept a cached position whose age is no greater than the specified time in milliseconds
60. The Position object
Contains the data created by the geolocation API
It is passed as argument to the success callbacks of getCurrentPosition and watchPosition
Properties
•
coords: a set of properties that describe the geographic coordinates of a position
•
timestamp: creation timestamp as a Date object
61. The Coordinates object
Properties
latitude (Number)
latitude in decimal degrees
longitude (Number)
longitude in decimal degrees
accuracy (Number)
accuracy level of the latitude and longitude coordinates in meters
http://bit.ly/Ln6AtM
62. The Coordinates object
altitude (Number)
height of the position in meters above the ellipsoid
altitudeAccuracy (Number)
accuracy level of the altitude coordinate in meters
http://bit.ly/Ln7V3H
63. The Coordinates object
heading (Number)
direction of travel, specified in degrees counting clockwise relative to the true north
speed (Number)
current ground speed of the device, specified in meters per second
http://bit.ly/LnanXV
64. The PositionError object
Encapsulates the error code resulting from a failed position capture operation
It contains a pre-defined error code
PositionError.PERMISSION_DENIED
PositionError.POSITION_UNAVAILABLE
PositionError.TIMEOUT
65. Geolocation Example
var options = { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true };
navigator.geolocation.watchPosition(win, fail, options);
function win(pos) {
var el = ‘<div>Latitude: ‘ + pos.coords.latitude + '</div>');
el += ‘<div>Longitude: ‘ + pos.coords.longitude + '</div>');
el += ‘<div>timestamp: ‘ + pos.timestamp + '</div>');
$(‘#block’).html(el);
}
function fail(err) {
console.log(err.code);
}
68. watchHeading
var id = watchHeading(win, [fail], [options]);
It gets the device's heading at a regular interval
win
callback function with an Heading parameter
fail
error callback
options
compass options
70. Options
frequency (Number)
How often to retrieve the compass heading in milliseconds
filter (Number) iOS only
in iOS the success callback of a watchHeading call can also be called once the sensed
heading values are greater than a given filter
the filter option represents the change in degrees required to initiate a watchHeading
success callback
71. The CompassHeading object
Properties
magneticHeading (Number)
the heading in degrees from 0-359.99 at a single moment in time
trueHeading (Number)
The heading relative to the geographic North Pole
headingAccuracy (Number)
the deviation in degrees between the reported heading and the true heading
timestamp (Number)
The time at which this heading was determined in milliseconds
72. The CompassError object
Encapsulates the error code resulting from a failed heading capture operation
It contains a pre-defined error code
CompassError.COMPASS_INTERNAL_ERR
CompassError.COMPASS_NOT_SUPPORTED
73. Compass example
var options = { frequency: 2000 };
navigator.compass.watchHeading(win, fail, options);
function win(compass) {
console.log(compass.magneticHeading);
}
function fail(err) {
console.log(err.code);
}
74. Accelerometer
Capturing Audio and Video
navigator.device.capture
Provides access for capturing directly from the device
Audio
Image
Video
Omogeneous APIs between audio, image, and video
capturing based on a W3C specification
75. Supported formats
They all contain an array of
ConfigurationData objects
The navigator.device.capture object the supported formats it can record in three
properties
supportedAudioModes
The audio recording formats supported by the device
supportedImageModes
The recording image sizes and formats supported by the device
supportedVideoModes
The recording video resolutions and formats supported by the device
76. The ConfigurationData object
It is used to describe media capture modes supported by the device
Properties
ex.
• video/3gpp
type (String)
• video/quicktime
the string in lower case representing the media type • image/jpeg
• audio/amr
height (Number)
• audio/wav
the height of the image or video in pixels
width (Number)
the height of the image or video in pixels
77. Supported format example
var imageModes = navigator.device.capture.supportedImageModes;
for each (var mode in imageModes) {
console.log(mode.type);
console.log(mode.height);
console.log(mode.width);
}
78. Audio capture
captureAudio(win, [fail], [options]);
Starts the audio recorder app and returns information about captured audio clip files
win
callback function with an array of MediaFile parameter
It uses the device's default
audio recording app
fail
error or when the users cancels the capture operation before capturing any media file
options
compass options
The operation allows the device
user to capture multiple
recordings in a single session
79. Options
limit (Number)
not supported in iOS
the maximum number of audio clips the user can record in a single capture operation
duration (Number)
not supported in Android
the maximum duration of an audio sound clip, in seconds
80. Audio capture example
var options = { limit: 2, duration: 5 };
navigator.device.capture.captureAudio(win, fail, options);
function win(mediaFiles) {
var i;
for (i=0; i<mediaFiles.length; i++) {
console.log(mediaFiles[i]);
}
}
function fail(error) {
console.log(‘Error with code: ' + error.code);
}
81. Image capture
captureImage(win, [fail], [options]);
Start the camera application and return information about captured image file(s)
win
callback function with an array of MediaFile parameter
It uses the device's
default camera app
fail
error or when the users cancels the capture operation before capturing any media file
options
compass options
The operation allows the device
user to capture multiple images
in a single session
83. Video capture
captureVideo(win, [fail], [options]);
Start the camera application and return information about captured video file(s)
win
callback function with an array of MediaFile parameter
It uses the device's
default camera app
fail
error or when the users cancels the capture operation before capturing any media file
options
compass options
The operation allows the device
user to capture multiple videos
in a single session
84. Options
limit (Number)
not supported in iOS
the maximum number of videos the user can take in a single capture operation
duration (Number)
the maximum duration of each video, in seconds
85. The MediaFile object
A MediaFile encapsulates properties of a media capture file
Properties
name (String): the name of the file, without path information
fullPath (String) : the full path of the file, including the name
type (String): The file's mime type
lastModifiedDate (Date): the date and time that the file was last modified
size (Number): the size of the file, in bytes
86. MediaFile format data
mediaFile.getFormatData(win, [fail]);
It is used to get information about the format of a captured media file
win
callback function with a MediaFileData parameter
fail
error callback
87. The MediaFileData object
Encapsulates format information about a media file
Properties
codecs (String): The actual format of the audio and video content
bitrate (Number) : The average bitrate of the content (zero for images)
height (Number): the height of the image or video in pixels (zero for audio clips)
width (Number): the width of the image or video in pixels (zero for audio clips)
duration (Number): the length of the video or sound clip in seconds (zero for images)
88. Capture Error
Encapsulates the error code resulting from a failed media capture operation
It contains a pre-defined error code
CaptureError.CAPTURE_INTERNAL_ERR
CaptureError.CAPTURE_APPLICATION_BUSY
CaptureError.CAPTURE_INVALID_ARGUMENT
CaptureError.CAPTURE_NO_MEDIA_FILES
CaptureError.CAPTURE_NOT__SUPPORTED
89. Camera
navigator.camera
It provides an home-grown API for capturing images from the device’s default camera
application
It is developed in-house by Cordova in order to provide more options to developers
Methods:
getPicture
cleanup
90. MediaFile format data
camera.getPicture(win, [fail], [options]);
Takes a photo using the camera or retrieves a photo from the device's album
win
callback function with a image data parameter
fail
error callback
options
capture parameters
The result of getPicture can be:
• a base64 encoded string
• the URI of an image file
Encoding the image using Base64
can cause memory issues on some
devices
97. MediaFile format data
iOS only
camera.cleanup(win, [fail]);
Removes intermediate photos taken by the camera from temporary storage
win
callback function
fail
error callback
Valid only when
• the value of Camera.sourceType === Camera.PictureSourceType.CAMERA
• the Camera.destinationType === Camera.DestinationType.FILE_URI
98. Camera example
var options = { quality: 50,
destinationType: destinationType.FILE_URI,
sourceType: pictureSource.PHOTOLIBRARY
});
navigator.camera.getPicture(win, fail, options);
function win(imageURI) {
var element = $(“#block”);
element.src(imageURI);
}
function fail (error) {
console.log(error); // this is provided by the device’s native code
}
99. Accelerometer
Media playback
Media
The Media object provides the ability to record and play back audio files on a device
It does not adhere to any W3C
specification, it is just a convenience API
provided by Cordova
100. The Media object
var media = new Media(src, win, [fail], [status]);
src (String): A URI containing the audio content
The URI can be local or can be a URL addressable by a standard HTTP get request
win: callback executed when the object executes a play, record, or stop action
fail: error callback
Media status possible parameters:
status: callback executed to indicate status changes • Media.MEDIA_NONE = 0;
•
•
•
•
Media.MEDIA_STARTING = 1;
Media.MEDIA_RUNNING = 2;
Media.MEDIA_PAUSED = 3;
Media.MEDIA_STOPPED = 4;
102. Media Error
Encapsulates the error code resulting from a failed media operation
It contains a pre-defined error code
MediaError.MEDIA_ERR_ABORTED
MediaError.MEDIA_ERR_NETWORK
MediaError.MEDIA_ERR_DECODE
MediaError.MEDIA_ERR_NONE_SUPPORTED
103. Media example
var media = new Media(“http://path/to/mp3”, win, fail);
// every second we log the position
var myTimer = setInterval(function () {
media.getCurrentPosition(
function (position) {
if (position > -1) {
console.log((position) + " seconds");
}
});
}, 1000);
function stopAudio() {
if (media) {
media.stop();
}
clearInterval(myTimer);
myTimer = null;
}
105. Creating contacts
navigator.contacts.create(properties);
One of the few synchronous functions of Cordova
It that returns a new Contact object
The properties parameter is a map of properties of the new Contact object
To persist the Contact object to the device, you have to invoke the Contact.save method
106. The Contact object
It contains all the properties that a contact can have
Every platform has its own quirks,
you better check them on the
Cordova documentation
107. The Contact object
A contact object provides the following methods:
clone()
returns a new Contact object that is a deep copy of the calling object, its id property is null
remove(win, fail)
removes the contact from the device contacts database
save(win, fail)
saves a new contact to the device contacts database
updates an existing contact if a contact with the same id already exists
108. Create contact example
var contact = navigator.contacts.create({
"displayName": “Ivano“
});
var name = new ContactName();
name.givenName = “Ivano“;
name.familyName = “Malavolta“;
contact.name = name;
contact.birthday = new Date(“19 July 1983");
contact.save(win, fail);
function win(contact) {
console.log("Save Success");
};
function fail(contactError) {
console.log("Error = " + contactError.code);
};
109. Finding contacts
navigator.contacts.find(fields, win, fail, options);
It queries the device contacts database and returns an array of Contact objects
fields: contact fields to be used as search qualifier. Only these fields will have values in the
resulting Contact objects
win: callback function with the array of contacts returned from the contacts database
fail: error callback
fail: search options to filter contacts
110. Contact fields
Specifies which fields should be included in the Contact objects resulting from a find
operation
var fields = ["displayName", "name"]; // or [“*”]
navigator.contacts.find(fields, win, fail);
function win(contacts) {
console.log(‘ok');
};
function fail(err) {
console.log(err.code);
};
111. Contact find options
Contains properties that can be used to filter the results
filter (String)
the search string used to find contacts, a case-insensitive, partial value match is applied
to each field specified in the contactFields parameter
multiple (Boolean)
determines if the find operation should return multiple contacts
112. Contact Error
Encapsulates the error code resulting from a failed lookup operation in the contacts DB
It contains a pre-defined error code
ContactError.UNKNOWN_ERROR
ContactError.INVALID_ARGUMENT_ERROR
ContactError.TIMEOUT_ERROR
ContactError.PENDING_OPERATION_ERROR
ContactError.IO_ERROR
ContactError.NOT_SUPPORTED_ERROR
ContactError.PERMISSION_DENIED_ERROR
113. Contact find example
var options = new ContactFindOptions();
options.filter = “Ivano";
options.multiple = true;
filter = ["displayName",“birthday"];
navigator.contacts.find(filter, win, fail, options);
function win(contacts) {
for (var i=0; i<contacts.length; i++) {
console.log(contacts[i].displayName);
}
};
function fail(contactError) {
console.log("Error = " + contactError.code);
};
115. Connection.type
Encapsulates the error code resulting from a failed lookup operation in the contacts DB
Values:
Connection.UNKNOWN
Connection.CELL_3G
Connection.ETHERNET
Connection.CELL_4G
Connection.WIFI
Connection.CELL
Connection.CELL_2G
Connection.NONE
iOS can't detect the type of cellular network
connection, it will return always Connection.CELL_2G
117. Device properties
A device object provides the following properties:
device.model
http://theiphonewiki.com/wiki/Models
the name of the device's model or product (ex. “iPad 2”, “iPhone 5,1”, etc.)
device.cordova
the version of Cordova running on the device
device.platform
the devices’ operating system (ex. “Android”, “iOS”, etc.)
118. Device properties
device.uuid
a unique identifier of the user’s device (UUID)
Android: a unique 64-bit integer generated at device’s first boot
iOS: a string of hash values created from multiple hardware identifies
in iOS it is not reliable: The uuid on iOS is not unique to a
device, but varies for each application, for each installation
device.version
the OS version of the device (ex. “4.1”, “2.2”, etc.)
120. Accelerometer
Events
An event is an action that can be detected by your JavaScript code
In traditional JS programs, any element of the page can have certain events
ontouchstart, onclick, ...
To use any event, you’ll want to use an event listener
document.addEventListener(EVENTNAME, callback, false);
121. Cordova events
•
deviceready
•
pause, resume
•
online, offline
•
batterycritical, batterylow, batterystatus
•
backbutton, menubutton, searchbutton
•
startcallbutton, endcallbutton
•
volumedownbutton, volumeupbutton
Android buttons events
these work on Blackberry 10 only
122. deviceready
It is the most important in event in a Cordova app
Once deviceready is fired, you know two things:
•
The DOM has loaded
•
the Cordova native API are loaded too
123. App lifecycle events
Based on two main events:
pause
In the pause handler, any calls to the Cordova API or to native
plugins that go through Objective-C do not work,, they are
only processed when the app resumes.
fires when an application is put into the background
resume
fires when a paused application is put back into the foreground
resign, active
iOS-specific events that are triggered when the users locks/unlocks the device
124. Connection events
Based on two main events:
online
fires when the application's network connection changes to being online
(that is, it is connected to the Internet)
offline
fires when the application's network connection changes to being offline
(that is, no Internet connection available)
125. Battery events
Based on two main events:
This value is device-specific
batterycritical
fires when the battery has reached the critical level threshold
batterylow
similar to batterycritical, but with a higher threeshold
batterystatus
fires a change in the battery status is detected
The battery status must
change of at least 1%
126. Battery events
The handler of a battery event is always called with an object that contains two properties:
level (Integer)
The percentage of battery (0-100)
isPlugged (Boolean)
true if the device is plugged to the battery charger
128. Alert
navigator.notification.alert(message, callback, [title], [button]);
Shows a custom alert to the user
•
message: the string to present to the user
•
callback: the function invoked when the user taps on the button
•
title: title of the alert (default is “Alert”)
•
button: name of the confirm button (default is “Ok”)
129. Confirm
navigator.notification.alert(message, callback, [title], [buttons]);
Similarly to alert, it shows a customizable confirmation dialog to the user
•
message: the string to present to the user
•
callback: the function invoked when the dialog is dismissed
it takes a “buttonIndex“ parameter to know which button has been pressed (it starts from 1)
•
title: title of the dialog (default is “Confirm”)
•
buttons: comma-separated string containing the button labels (default is “Ok, Cancel”)
130. Prompt
navigator.notification.prompt(message, callback, [title], [buttons], [text]);
It shows a customizable dialog with a prompt to the user
•
message: the string to present to the user
•
callback: the function invoked when the dialog is dismissed
it takes a “results“ parameter to know which button has been pressed (it starts from 1) and
the text entered by the user
•
title: title of the dialog (default is “Prompt”)
•
buttons: comma-separated string containing the button labels (default is “Ok, Cancel”)
•
text: default text in the input box
131. Beep
navigator.notification.beep(times);
It playes a beep sound
•
times (Number): the number of times to repeat the beep
Android plays the default "Notification ringtone" specified
under the "Settings/Sound & Display" panel
133. Accelerometer and file system access
Local storage
There are 4 ways to store data locally in Cordova:
•
Web storage
•
Local Storage
•
Session Storage
•
WebSQL
•
Indexed DB
•
File System Access
Web storage, WebSQL, and IndexedDB
conform to W3C specifications and are
provided by the browser itself
File system access API conforms to its
corresponding W3C specification
134. Web Storage
LocalStorage
stores data in key/value pairs
persists across browser sessions
SessionStorage
stores data in key/value pairs
data is erased when a browser session ends
135. WebSQL
relational DB
support for tables creation, insert, update, …
transactional
persists across browser sessions
Its evolution is called IndexedDB
136. WebSQL
It provides you a structured SQL relational database
You have to setup a DB schema
You can then perform classical SQL queries
tx.executeSql("SELECT * FROM User“, [],
function(tx, result) {
// callback code
});
137. IndexedDB
•
It tries to combine Web Storage and WebSQL
•
You can save data as key/value pairs
•
You can define multiple DBs
•
Good Performance
data is indexed
asynchronous
You can see a store as a big SQL table with only key/value pairs
you don’t need to define a schema upfront
it does not block the UI
138. File System
•
you can access files locally to your app
•
supports main FS operations
creation, move, delete, rename, etc.
•
it is not transactional
•
persists across browser sessions
139. Considerations
You will likely use more than one API in combination
Use the right API for the right job
Web Storage
•
it is not transactional race conditions
•
very simple API, no schema
•
only String data performance issues for complex data due to JSON serialization
•
session storage will be cleared after the app is closed
•
limited quota
140. Considerations
WebSQL
SQL-based fast and efficient
transactional more robust
asynchronous does not block the UI
rigid data structure data integrity vs agility
limited quota
141. Considerations
IndexedDB
simple data model easy to use
transactional more robust
asynchronous does not block the UI
good search performance indexed data
data is unstructured integrity problems
limited quota
not supported by every platform (e.g., iOS)
142. Considerations
File System
asynchronous does not block the UI
not transactional
indexing and search are not built-in you have to implement your lookup functions
unlimited quota useful for images, videos, documents, etc.
144. About quotas...
Local Storage
Indexed DB
~ 10Mb
~ 50-80Mb (depends on the device)
Session Storage
File system
~ 10Mb
unlimited
WebSQL
Native DB
~ 50-80Mb (depends on the device)
unlimited
146. What is not covered in this talk
•
Cordova Native Platform Dev workflow & Plugman
•
Cordova’s less important or already known APIs:
•
Splashscreen
•
local storage & File API details
•
InAppBrowser
•
Globalization
•
PhoneGap Build
•
How to develop a plugin