The document discusses integrating Inversion of Control (IOC) concepts into JavaScript applications. It describes how to build modular components using Asynchronous Module Definition (AMD) and CommonJS module formats. It advocates for separating components from their dependencies and connections using an application composition layer. This allows for looser coupling between components, improved testability, and more flexibility to change implementations. It also covers topics like asynchronous programming, dependency injection, and aspect-oriented programming as ways to further decouple components and manage complexity in JavaScript applications.
In this session, Aaron Gustafson introduces attendees to the client-side scripting language known as JavaScript. After being taken on a quick tour through the language's features and syntax, attendees will be introduced through a series of examples to ways in which JavaScript can progressively enhance the user experience and really make their designs sing. This session also introduces attendees to several JavaScript libraries and demonstrate how to execute the same task in each.
In recent years we have seen explosion of languages which run on Java Virtual Machine. We also have seen existing languages getting their implementations being rewritten to JVM. With all of the above we have seen rapid development of tools like parsers, bytecode generators and such, even inside JVM we saw initiatives like Da Vinci Machine Project, which led to invoke dynamic in JDK 7 and recent development of Graal and Truffle projects.
Is it really hard to write new programming language running on JVM? Even if you are not going to write your own I think it is worth to understand how your favorite language runs undercover, how early decisions can impact language extensibility and performance, what JVM itself and JVM ecosystem has to offer to language implementors.
During session I will try to get you familiar with options you have when choosing parsers and byte code manipulation libraries. which language implementation to consider, how to test and tune your "new baby". Will you be able after this session to develop new and shiny language, packed with killer features language? No. But for sure you will understand difference between lexers and parsers, how bytecode works, why invoke dynamic and Graal and Truffle are so important to the future of JVM platform. Will we have time to write simple, compiled language?
Yes, we will, just to show you that even person who didn't studied computer science, compilers theory, and for majority of his life didn't know what AST is, can do it :)
Modern JavaScript, HTML5 and CSS3 techniques and examples. There’s an endless amount of materials available around these topics so naturally this set doesn’t cover everything there is to know. Instead this is more like a summary of good techniques and practices I’ve encountered while doing web software development.
In this session, Aaron Gustafson introduces attendees to the client-side scripting language known as JavaScript. After being taken on a quick tour through the language's features and syntax, attendees will be introduced through a series of examples to ways in which JavaScript can progressively enhance the user experience and really make their designs sing. This session also introduces attendees to several JavaScript libraries and demonstrate how to execute the same task in each.
In recent years we have seen explosion of languages which run on Java Virtual Machine. We also have seen existing languages getting their implementations being rewritten to JVM. With all of the above we have seen rapid development of tools like parsers, bytecode generators and such, even inside JVM we saw initiatives like Da Vinci Machine Project, which led to invoke dynamic in JDK 7 and recent development of Graal and Truffle projects.
Is it really hard to write new programming language running on JVM? Even if you are not going to write your own I think it is worth to understand how your favorite language runs undercover, how early decisions can impact language extensibility and performance, what JVM itself and JVM ecosystem has to offer to language implementors.
During session I will try to get you familiar with options you have when choosing parsers and byte code manipulation libraries. which language implementation to consider, how to test and tune your "new baby". Will you be able after this session to develop new and shiny language, packed with killer features language? No. But for sure you will understand difference between lexers and parsers, how bytecode works, why invoke dynamic and Graal and Truffle are so important to the future of JVM platform. Will we have time to write simple, compiled language?
Yes, we will, just to show you that even person who didn't studied computer science, compilers theory, and for majority of his life didn't know what AST is, can do it :)
Modern JavaScript, HTML5 and CSS3 techniques and examples. There’s an endless amount of materials available around these topics so naturally this set doesn’t cover everything there is to know. Instead this is more like a summary of good techniques and practices I’ve encountered while doing web software development.
JavaScript - An Introduction is a beginner's guide to JavaScript. It starts with very basic level and goes to intermediate level. You'll be introduced with every language constructs, Event handling, Form handling and AJAX which is supported by JavaScript with XMLHttpRequest object. This XHR object is discussed in enough detail so that you can understand how the underlying AJAX functionality works in jQuery. At the end it discusses advance concepts and library build on/around JavaScript.
This presentation shall address the web2py web framework, my favorite way to develop web apps.
web2py is a free, open-source web framework for agile development of secure database-driven web applications; it is written in Python and programmable in Python. web2py is a full-stack framework, meaning that it contains all the components you need to build fully functional web applications.
Ease of use is the primary goal for web2py. For us, this means reducing the learning and deployment time. This is why web2py is a full-stack framework without dependencies. It requires no installation and has no configuration files. Everything works out of the box, including a web server, database and a web-based IDE that gives access to all the main features.
I will show you why web2py can make you more productive by bringing the result of a reflection over the best ideas of the most popular MVC based web frameworks enforcing the best practices for a fast, scalable and secure web application with minimal effort. There will be a live demo where you can get a faster grasp on how does it work and how fun it can be.
For more: www.web2py.com
JavaScript - An Introduction is a beginner's guide to JavaScript. It starts with very basic level and goes to intermediate level. You'll be introduced with every language constructs, Event handling, Form handling and AJAX which is supported by JavaScript with XMLHttpRequest object. This XHR object is discussed in enough detail so that you can understand how the underlying AJAX functionality works in jQuery. At the end it discusses advance concepts and library build on/around JavaScript.
This presentation shall address the web2py web framework, my favorite way to develop web apps.
web2py is a free, open-source web framework for agile development of secure database-driven web applications; it is written in Python and programmable in Python. web2py is a full-stack framework, meaning that it contains all the components you need to build fully functional web applications.
Ease of use is the primary goal for web2py. For us, this means reducing the learning and deployment time. This is why web2py is a full-stack framework without dependencies. It requires no installation and has no configuration files. Everything works out of the box, including a web server, database and a web-based IDE that gives access to all the main features.
I will show you why web2py can make you more productive by bringing the result of a reflection over the best ideas of the most popular MVC based web frameworks enforcing the best practices for a fast, scalable and secure web application with minimal effort. There will be a live demo where you can get a faster grasp on how does it work and how fun it can be.
For more: www.web2py.com
Slides from the talk I presented March 17th at the IOC Online Conference http://www.internationalonlineconference.org/2010/program - I made a few post-talk adjustments to include some of the interactions and screen shots of the work of Dan Porter who provided live, electronic graphic recording of the talk.
This presentation gives you eight simple tips on how to make your PowerPoint presentation slides more visually engaging, creative and fun. Try out these advice and you will make your best PowerPoint presentation ever.
This presentation was created by my powerpoint design agency Slides. We are based in Spain but have clients worldwide.
Drop me an email and we will discuss your project.
Writing NodeJS applications is an easy task for JavaScript developers. However, getting what is happening under the hood in NodeJS may be intimidating, but understanding it is vital for web developers.
Indeed, when you try to learn NodeJS, most tutorials are about the NodeJS ecosystem like Express, Socket.IO, PassportJS. It is really rare to see some tutorials about the NodeJS runtime itself.
By this meetup, I want to spot the light on some advanced NodeJS topics so as to help developers answering questions an experienced NodeJS developer is expected to answer. Understanding these topics is essential to make you a much more desirable developer. I want to explore several topics including the famous event-loop along with NodeJS Module Patterns and how dependencies actually work in NodeJS.
I hope that this meetup would help you to be more comfortable understanding advanced code written in NodeJS.
Javascript and first-class citizenry: require.js & node.js
Javascript on web pages is ubiquitous and its problems are legendary. Javascript, seen as a second-class code citizen, is usually hacked together even by seasoned developers. New libraries (jQuery, prototype, backbone, knockout, underscore) and runtime tools (firebug, jasmine) look like they solve many problems - and they do. But they still leave poorly written code as just that. One key problem is that all javascript code lives globally and this results in poorly managed, tested and delivered code.
In this session, I will illustrate that we can treat javascript as a first-class citizen using with require.js and node.js: it can be modular, encapsulated and easily unit tested and added to continuous integration cycle. The dependencies between javascript modules can also be managed and packaged just like in C# and Java. In the end, we can resolve many javascript difficulties at compile time rather than waiting until runtime.
This is a presentation I prepared for a local meetup. The audience is a mix of web designers and developers who have a wide range of development experience.
Webpack has quickly become one of the most popular choices among web developer builder tools. It can build, minify, split and do others awesome things to your assets.
We will do a simple walk through to let you familiar with the basics of webpack and all its potential.
A quick introduction to node.js in order to have good basics to build a simple website.
This slide covers:
- node.js (you don't say?)
- express
- jade
- mongoDB
- mongoose
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
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.
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.
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.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
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
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
2. Who?
Two back-end engineers who defected to the front-end
The main characters behind cujo.js
3. What?
cujo.js
Spring-like concepts, but not a port of Spring to Javascript
Embraces Javascript's functional and prototypal roots
Provides architectural tools for next-generation JavaScript
applications
http://cujojs.com/
4. How?
Less slides, please!
Moar awesum codez, plz!
Q&A at the end and during code demos!
Code demos: Monty Hall UI && TodoMVC
5. Recent project stats
6 "HTML Pages"
300+ Javascript modules
100+ "View modules" each of which has:
HTML templates
CSS files
i18n bundles
test harnesses
Not including 3rd party modules!
7. Help!
Larger, more complex apps require carefully crafted rigorous
architecture, patterns, and code organization.
-- Brian
8. IOC
We know from Spring, good architectural plumbing helps to
manage complexity
Javascript is no exception
In the browser and on the server
9. Can we ...?
Build smaller modules that are easier to maintain and test
Separate configuration and connection from application logic
Glue it all back together
10. Apply IOC concepts in Javascript
Declarative component creation
Lifecycle management
Configuration
Dependency injection
AOP
11. IOC for front-end Javascript
What might it look like?
XML? Not very Javascript-ish
Annotations? No existing infrastructure, need to parse source
Javascript is flexible: Can we work with the language?
14. Three main parts
Module format
Run-time loader
Build-time compiler (recommended for production)
15. AMD
Designed with browser environments in mind
Loads asynchronously
No parsing or transpiling needed
Built-in closure
Loads other resource types via plugins
16. Who supports it?
dojo 1.7+
cujo.js
jQuery 1.7+
MooTools 2+
Lodash and many, many others
28. AMD Plugins
Same dependency mechanism
Non-AMD resources
text! - HTML Templates and other text
css! and link! - stylesheets
i18n! - localization
Google Maps
JSON data, etc.
29. AMD Plugins
Can do even more powerful things
wire! - wire.js IOC container integration
has! - has.js feature detection and conditional module loading
cs! - loads and transpiles Coffeescript
31. CommonJS Module format
Every file is a module with its own scope
No closure, no factory, no define()
require, exports, and module are “free variables”
34. WTF
I know what you’re thinking
Which one?!?
Why are there 2 (3?) module formats, and how am I supposed to
know which one to pick?!?!!1
35. It gets worse
ES Harmony modules are coming
Problem: Harmony is an authoring format. It doesn't handle:
Dependency management
Packaging, version management
Compiling, concatenation
Non-harmony resources (CSS, HTML, JSONP, etc.)
44. Connections
The lines in your box-and-line diagrams
Can be just as important as the stuff you put inside the boxes
Unfortunately, we end up putting the lines inside the boxes
45. AMD
Maintains good separation of concerns
But more like Java import, which isn't necessarily right for all
situations.
47. What's that smell?
this.datastore = new JsonRest(..) is essentially a
line inside our Controller box
How would you unit test it?
Could you use this with another type of data store?
Multiple instances, each with a different type of store?
different target URL?
49. Or Similarly
define(function() { // No AMD deps!
// Rely on the IOC Container to beget new instances
return {
datastore: null,
addItem: function(thing) {
return this.datastore.put(thing);
},
// ...
};
});
50. What did we do?
Decoupled the concrete JsonRest implementation
Refactored to rely on a datastore interface
Even though the interface is implicit
51. What did we accomplish?
Moved the responsibility of drawing the line out of the
Controller.
Made Controller more flexible and easier to test
61. DOM Events
define(['some/domLib', some/domEventsLib'], function(domLib,
domEventsLib) {
function Controller() {
domEventsLib.on('click', domLib.byId('the-button'),
this.addItem.bind(this));
}
Controller.prototype = {
addItem: function(domEvent) {
// Add the item to the cart
}
}
return Controller;
});
62. That same smell, only worse!
Depends on:
hardcoded event type,
HTML id,
DOM selection lib
DOM events lib
More mocking
63. Refactor
define(function() { // No AMD deps!
function Controller() {}
Controller.prototype = {
addItem: function(domEvent) {
// Update the thing
}
}
return Controller;
});
64. Better
Only cares about a general event: "Now it's time to add the item
to the cart"
Different/multiple event types on multiple DOM nodes
No hardcoded DOM selector: multiple Controller instances
Only have to mock the domEvent, then call addItem
70. Things we can improve
Controller now dependent on CartCountView interface
Have to mock CartCountView to unit test Controller
What if there are other times we'd like to update the cart count?
72. Better
Application Composition layer makes the connection
Controller no longer dependent on CartCountView
Neither component needs to be re-unit tested when making this
connection
Nor if the connection is removed later
Only need to re-run functional tests
Could completely remove CartCountView simply by cutting it
out of the Application Composition spec
79. Coupled parameters
Controller receives a domEvent, but must locate the associated
data to update
Need DOM traversal, and understand the DOM structure
data id or hash key hiding in a DOM attribute?
Have to mock for unit testing
83. Transform function
define(function() {
// Encapsulate the work of finding the item
return function findItemFromEvent(domEvent) {
// Find the item, then
return item;
}
});
85. Ahhh, at last
Controller is easier to unit test
Algorithm for finding the thing
can also be unit tested separately and more easily
can be changed separately from Controller
can be reused in other parts of the app
87. What about asynchrony?
Occurs most often at component and system boundaries
Hence, connections often need to be asynchronous
Canonical example: XHR
90. Uh oh
Moved the function result from the return value to the parameter
list
Since addItem can't return anything, afterReturning doesn't
work!
And how do we provide the callback?
91. Brief, asynchronous detour
Javascript is designed around a single-threaded event loop
Browser DOM events and network I/O are async
SSJS platforms (Node, RingoJS, etc) are built around async I/O
AMD module loading is async--the A in AMD!
95. Callback infestation
// It's turtles all the way *up*
function getStuff(handleContent, handleError) {
xhr('GET', '/stuff',
function(content) {
// transform content somehow, then
// (what happens if this throws?)
handleContent(content);
},
function(error) {
// Maybe parse error, then
// (what happens if THIS throws?!?)
handleError(error);
}
);
}
96. Async is messy
Code quickly becomes deeply nested and harder to reason
about
Familiar programming idioms don't work
It's upside-down: Values and errors flow down the stack now
rather than up.
Functions are no longer easily composable: g(f(x)) doesn't
work anymore
try/catch/finally, or something reasonably similar is impossible
Callback and errback parameters must be added to every
function signature that might eventually lead to an
asynchronous operation
Coordinating multiple async tasks is a pain
97. Promises
Synchronization construct
Not a new idea
Similar to java.util.concurrent.Future
Placeholder for a result or error that will materialize later.
98. Example
Return a promise, into which the content, or an error, will
materialize.
function getStuff() {
var promise = xhr('GET', '/stuff');
return promise;
}
99. Promises
Restore call-and-return semantics
Move function results back to the return value
Remove callback function signature pollution
Provide an async analog to exception propagation
It's right-side up
100. More about Promises
http://en.wikipedia.org/wiki/Futures_and_promises
http://blog.briancavalier.com/async-programming-part-1-its-
messy
http://blog.briancavalier.com/async-programming-part-2-
promises
http://github.com/cujojs/when/wiki
http://wiki.commonjs.org/wiki/Promises/A
101. Promises
Several proposed standards
Promises/A defacto standard
cujo.js: when.js
Dojo: dojo/Deferred
jQuery: $.Deferred (well, close enough)
Q
soon YUI, Ember
102. IOC + Promises
Promises/A is an integration standard for asynchrony
IOC is about gluing components together so they can
collaborate
Sounds like a match!
103. Refactor to return a promise
Controller.prototype.addItem = function(item) {
// Asynchronously add the item, then
return promise;
}
105. Win
Count will only be incremented after the item has been added
successfully!
If adding fails, show the error
106. Async without async
Promise-aware AOP for async connections
AMD loaders manage async module loading and dependency
graph resolution.
Promise-aware IOC container:
Integrate with AMD loader to load modules used in
application composition specs.
Async component creation: constructor or plain function can
return a promise
Async DI: component references are injected as promises for
the components resolve
Component startup/shutdown methods can return a promise
107. Connections
Implement application logic in components
Connect components non-invasively via Application
Composition
DI, events (DOM and JS), AOP, Promise-aware AOP
Adapt APIs by transforming data along connections
Enjoy the easier testing and refactoring :)
111. Case: View-component
View-components consist of
HTML(5) template (keep it simple!)
CSS file (structural bits of OOCSS/SMACCS)
i18n file(s)
javascript controller (optional)
test harness (also for design)
any assets necessary for rendering
any view-specific data transforms, validations, etc.
wire spec (optional)
114. Testing visual components
Double-duty test harnesses
Fixture for creating HTML and designing CSS
Harness for user-driven tests
Harness for unit tests