This document provides an introduction to dependency injection. It explains that dependency injection allows code to request dependencies rather than create them directly, making code more flexible and testable. It demonstrates how to define interfaces for dependencies and configure a dependency injection container to resolve them. Writing unit tests is easier with dependency injection because mock dependencies can be passed in instead of real implementations. The document also discusses additional features of dependency injection containers like lifetime management and configuration options.
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...Frank van der Linden
The world of (XPages) developer is moving fast. Customers rethinking platforms and solutions. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". In combination with Thymeleaf can it be good alternative for your XPages applications.
In this session I give an introduction of Spring Boot and Thymeleaf and how to get started. I will show the differences and similarities between Spring Boot in combination with Thymeleaf and XPages.
I will explain the challenges I faced when moving an application.
In this talk Aviel shares how they code, build, ship and monitor their apps at Chegg. From the modular project architecture, 3rd party tools and how they know and control what's going in production.
A bit on JavaScript History
Learn how to program in the modern JavaScript i.e., ECMAScript 2015 (Version 6) / ECMAScript 6 / ES2015 / ES6 complied by BabelJS
Program with the best practices (Airbnb coding style) and style checking tools by ESLint
Tests immutable when refactoring - SegFault Unconference Cracow 2019Grzegorz Miejski
Some time ago, when refactoring code or adding business logic, my tests failed -> leaving me unsure if I did break something or not.
How to write tests, where you can completely change the implementation and verify that it still works without breaking any test? Feels like a utopia? Come and see how to do this with "real" project example!
Github project:
https://github.com/gmiejski/dvd-rental-tdd-example
Breaking Dependencies to Allow Unit TestingSteven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
Presented at FalafelCON 2014, San Francisco, September 2014
Discussion on ECMAScript 6 to TypeScript selective features before jump into Angular and brushing your JS programming concepts. Whats new with ECMAScript 6, why ES6 superset - TypeScript adopted by the Angular community and warming up JavaScript philosophy.
Better End-to-End Testing with Page Objects Model using ProtractorKasun Kodagoda
This presentation focuses on implementing Page Objects Model using Protractor for AngularJS apps for more maintainable, reusable and flexible end-to-end testing for your project. The presentations was done at 99X Technology as a Tech Talk session done by Team Finale.
Many Java developers use ORM in their projects but most of them don’t do deep dive into configuration, settings and tuning to achieve really good performance. What is worse most of them even don’t know what options do they have to improve performance. In this talk we will review them on practical samples and give concrete recommendations how to make your Hibernate work much better in real projects.
Code samples can be found here: https://github.com/xpinjection/hibernate-performance
.
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
If you have ever played with LEGO®, you will know that adding, removing or changing features of a completed castle isn’t as easy as it seems. You will have to deconstruct large parts to get to where you want to be, to build it all up again afterwards. Unfortunately, our software is often built the same way. Wouldn’t it be better if our software behaved like a bag of marbles? So you can just add, remove or replace them at will?
Most of us have taken different approaches to building software: a big monolith, a collection of services, a bus architecture, etc. But whatever your large scale architecture is, at the granular level (a single service or host), you will probably still end up with tightly couple code. Adding functionality means making changes to every layer, service or component involved. It gets even harder if you want to enable or disable features for certain deployments: you’ll need to wrap code in feature flags, write custom DB migration scripts, etc. There has to be a better way!
So what if you think of functionality as loose feature assemblies? We can construct our code in such a way that adding a feature is as simple as adding the assembly to your deployment, and removing it is done by just deleting the file. We would open the door for so many scenarios!
In this talk, I will explain how to tackle the following parts of your application to achieve this goal: WebAPI, Entity Framework, Onion Architecture, IoC and database migrations. And most of all, when you would want to do this. Because… ‘it depends’.
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...Frank van der Linden
The world of (XPages) developer is moving fast. Customers rethinking platforms and solutions. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". In combination with Thymeleaf can it be good alternative for your XPages applications.
In this session I give an introduction of Spring Boot and Thymeleaf and how to get started. I will show the differences and similarities between Spring Boot in combination with Thymeleaf and XPages.
I will explain the challenges I faced when moving an application.
In this talk Aviel shares how they code, build, ship and monitor their apps at Chegg. From the modular project architecture, 3rd party tools and how they know and control what's going in production.
A bit on JavaScript History
Learn how to program in the modern JavaScript i.e., ECMAScript 2015 (Version 6) / ECMAScript 6 / ES2015 / ES6 complied by BabelJS
Program with the best practices (Airbnb coding style) and style checking tools by ESLint
Tests immutable when refactoring - SegFault Unconference Cracow 2019Grzegorz Miejski
Some time ago, when refactoring code or adding business logic, my tests failed -> leaving me unsure if I did break something or not.
How to write tests, where you can completely change the implementation and verify that it still works without breaking any test? Feels like a utopia? Come and see how to do this with "real" project example!
Github project:
https://github.com/gmiejski/dvd-rental-tdd-example
Breaking Dependencies to Allow Unit TestingSteven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
Presented at FalafelCON 2014, San Francisco, September 2014
Discussion on ECMAScript 6 to TypeScript selective features before jump into Angular and brushing your JS programming concepts. Whats new with ECMAScript 6, why ES6 superset - TypeScript adopted by the Angular community and warming up JavaScript philosophy.
Better End-to-End Testing with Page Objects Model using ProtractorKasun Kodagoda
This presentation focuses on implementing Page Objects Model using Protractor for AngularJS apps for more maintainable, reusable and flexible end-to-end testing for your project. The presentations was done at 99X Technology as a Tech Talk session done by Team Finale.
Many Java developers use ORM in their projects but most of them don’t do deep dive into configuration, settings and tuning to achieve really good performance. What is worse most of them even don’t know what options do they have to improve performance. In this talk we will review them on practical samples and give concrete recommendations how to make your Hibernate work much better in real projects.
Code samples can be found here: https://github.com/xpinjection/hibernate-performance
.
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
If you have ever played with LEGO®, you will know that adding, removing or changing features of a completed castle isn’t as easy as it seems. You will have to deconstruct large parts to get to where you want to be, to build it all up again afterwards. Unfortunately, our software is often built the same way. Wouldn’t it be better if our software behaved like a bag of marbles? So you can just add, remove or replace them at will?
Most of us have taken different approaches to building software: a big monolith, a collection of services, a bus architecture, etc. But whatever your large scale architecture is, at the granular level (a single service or host), you will probably still end up with tightly couple code. Adding functionality means making changes to every layer, service or component involved. It gets even harder if you want to enable or disable features for certain deployments: you’ll need to wrap code in feature flags, write custom DB migration scripts, etc. There has to be a better way!
So what if you think of functionality as loose feature assemblies? We can construct our code in such a way that adding a feature is as simple as adding the assembly to your deployment, and removing it is done by just deleting the file. We would open the door for so many scenarios!
In this talk, I will explain how to tackle the following parts of your application to achieve this goal: WebAPI, Entity Framework, Onion Architecture, IoC and database migrations. And most of all, when you would want to do this. Because… ‘it depends’.
This talk was give at the South Shore .NET Users Group.
Unit Testing is now considered a required skill for developers. There are a ton of tools out there. However, there's nothing that shows you how to tie them all together to make your software fast, testable, and flexible. This talk will go over my toolset:
• MSTest
• Moq - Mocking framework
• NCover - for coverage
• MSBuild - for automation
• Dotcover - coverage from VS
• Unity - for dependency injection
This talk has a very long demo
Serverless architectures let you build and deploy applications and services with infrastructure resources that require zero administration. In the past, you had to provision and scale servers to run your application code, install and operate distributed databases, and build and run custom software to handle API requests. Now, AWS provides a stack of scalable, fully-managed services that eliminates these operational complexities.
In this session, you will learn about the benefits of serverless architectures and the basics of the serverless stack AWS provides. We will also walk through how you can use serverless architectures for everything from data processing to mobile and web backends.
AWS DevDay San Francisco, June 21, 2016.
Presenter: Jeremy Edberg, Co-Founder, CloudNative, & AWS Community Hero
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
If you have ever played with LEGO®, you will know that adding, removing or changing features of a completed castle isn’t as easy as it seems. You will have to deconstruct large parts to get to where you want to be, to build it all up again afterwards. Unfortunately, our software is often built the same way. Wouldn’t it be better if our software behaved like a bag of marbles? So you can just add, remove or replace them at will?
Most of us have taken different approaches to building software: a big monolith, a collection of services, a bus architecture, etc. But whatever your large scale architecture is, at the granular level (a single service or host), you will probably still end up with tightly couple code. Adding functionality means making changes to every layer, service or component involved. It gets even harder if you want to enable or disable features for certain deployments: you’ll need to wrap code in feature flags, write custom DB migration scripts, etc. There has to be a better way!
So what if you think of functionality as loose feature assemblies? We can construct our code in such a way that adding a feature is as simple as adding the assembly to your deployment, and removing it is done by just deleting the file. We would open the door for so many scenarios!
In this talk, I will explain how to tackle the following parts of your application to achieve this goal: WebAPI, Entity Framework, Onion Architecture, IoC and database migrations. And most of all, when you would want to do this. Because… ‘it depends’.
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...Frank van der Linden
The world of (XPages) developer is moving fast. Customers rethinking platforms and solutions. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". In combination with Thymeleaf can it be good alternative for your XPages applications.
In this session I give an introduction of Spring Boot and Thymeleaf and how to get started. I will show the differences and similarities between Spring Boot in combination with Thymeleaf and XPages.
I will explain the challenges I faced when moving an application.
Breaking Dependencies to Allow Unit TestingSteven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
This presentation talks about the Dependency Injection design principle, providing an overview of the pattern and its benefits while showing examples on how to apply it using Autofac, a specific dependency injection tool for .NET development.
Autofac: http://code.google.com/p/autofac/
A book on DI: http://www.manning.com/seemann/
Microsoft Fakes help you isolate the code you are testing by replacing other parts of the application with substitute code. These substitutes are called stubs and shims and are under the control of your tests. Microsoft Fakes is ideal when you need to test legacy or “legacy” code that is either restricted for refactoring or “refactoring” practically means rewriting and cost you a lot.
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014FalafelSoftware
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
Slides from my presentation at CodeIgniter Conference 2010 in Bristol in August 2010.
What I talked about:
- Startups: methodologies & techniques
- CodeIgniter: applying what we’ve learned
- The future: how could things be better
10 clues showing that you are doing OSGi in the wrong manner - Jerome Molieremfrancis
This presentation aims to show common pitfalls in OSGi architecture and development and how to avoid them. It involves concrete use cases and their solutions. Antipatterns, bad designs , bad tooling will be presented during this session... This session is user oriented and aimed to give concrete feedbacks and good practices...
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
Similar to Introduction to Dependency Injection (20)
Responsive Web Design using the Foundation 5 CSS FrameworkSolTech, Inc.
This is the presentation originally presented by Chris Morrow, Senior UI Developer / Creative Director, at the DevNexus 2015 conference. The presentation includes UI dev tools; Yeoman, Grunt, and Bower. Foundation 5 is then presented along with resource links and testing tools for responsive web design.
Here are 10 tips on how to empower your job search. Whether you are straight out of college or mid-career, this is a list of our top 10 tips to excel at making your next career move.
Written by Veanne Smith
@veannesmith
Introduction to Angular JS by SolTech's Technical Architect, Carlos Muentes.
To learn more about SolTech's custom software and recruiting solution services, visit http://www.soltech.net.
Debugging Javascript by SolTech's UI Architect, Chris Morrow.
To learn more about SolTech's custom software and recruiting solution services, visit http://www.soltech.net.
SolTech's The Constantly Connected CustomerSolTech, Inc.
SolTech's presentation on the Constantly Connected Customer, Statistics on Mobile adoption and key talking points in creating your mobile strategy.
To learn more about SolTech's custom software and recruiting solution services, visit http://www.soltech.net.
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
# Internet Security: Safeguarding Your Digital World
In the contemporary digital age, the internet is a cornerstone of our daily lives. It connects us to vast amounts of information, provides platforms for communication, enables commerce, and offers endless entertainment. However, with these conveniences come significant security challenges. Internet security is essential to protect our digital identities, sensitive data, and overall online experience. This comprehensive guide explores the multifaceted world of internet security, providing insights into its importance, common threats, and effective strategies to safeguard your digital world.
## Understanding Internet Security
Internet security encompasses the measures and protocols used to protect information, devices, and networks from unauthorized access, attacks, and damage. It involves a wide range of practices designed to safeguard data confidentiality, integrity, and availability. Effective internet security is crucial for individuals, businesses, and governments alike, as cyber threats continue to evolve in complexity and scale.
### Key Components of Internet Security
1. **Confidentiality**: Ensuring that information is accessible only to those authorized to access it.
2. **Integrity**: Protecting information from being altered or tampered with by unauthorized parties.
3. **Availability**: Ensuring that authorized users have reliable access to information and resources when needed.
## Common Internet Security Threats
Cyber threats are numerous and constantly evolving. Understanding these threats is the first step in protecting against them. Some of the most common internet security threats include:
### Malware
Malware, or malicious software, is designed to harm, exploit, or otherwise compromise a device, network, or service. Common types of malware include:
- **Viruses**: Programs that attach themselves to legitimate software and replicate, spreading to other programs and files.
- **Worms**: Standalone malware that replicates itself to spread to other computers.
- **Trojan Horses**: Malicious software disguised as legitimate software.
- **Ransomware**: Malware that encrypts a user's files and demands a ransom for the decryption key.
- **Spyware**: Software that secretly monitors and collects user information.
### Phishing
Phishing is a social engineering attack that aims to steal sensitive information such as usernames, passwords, and credit card details. Attackers often masquerade as trusted entities in email or other communication channels, tricking victims into providing their information.
### Man-in-the-Middle (MitM) Attacks
MitM attacks occur when an attacker intercepts and potentially alters communication between two parties without their knowledge. This can lead to the unauthorized acquisition of sensitive information.
### Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS) Attacks
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
Talk presented at Kubernetes Community Day, New York, May 2024.
Technical summary of Multi-Cluster Kubernetes Networking architectures with focus on 4 key topics.
1) Key patterns for Multi-cluster architectures
2) Architectural comparison of several OSS/ CNCF projects to address these patterns
3) Evolution trends for the APIs of these projects
4) Some design recommendations & guidelines for adopting/ deploying these solutions.
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
2. What is this thing?
• Dependency Injection (also called Inversion of Control) is a technique for
providing the things your code needs at runtime.
• Relies very heavily on abstraction layers (interfaces, base classes)
• When used properly, can make your code simpler and easier to test!
3. Let’s Start at the Beginning
public class MyBusinessLogic
{
public MyBusinessLogic()
{
}
public void DoesSomethingInteresting(MyDataItem item)
{
MyDataAccessLayer foo = new MyDataAccessLayer();
foo.AddItem(item);
}
}
4. Why is this a problem?
• It ties us to a particular data access layer
• What if I want to be able to support a different database engine?
• What if I want to use a Web Service?
• Etc.
• It’s hard to test
• I can’t verify the code works unless I have a database
• It takes time to set the database up
• What happens when more than one person wants to run a test at the same time?
5. How can we fix this?
• Instead of hard-coding the use of MyDataAccessLayer let’s make things
more flexible
• Define a new interface: IMyDataAccessLayer
• Visual Studio makes this pretty easy; right-click the class and choose “Extract Interface
• Use this interface instead of the concrete class
6. How can we fix this (contd.)?
public class MyBusinessLogic
{
IMyDataAccessLayer _myDAL;
public MyBusinessLogic(IMyDataAccessLayer myDAL)
{
_myDAL = myDAL;
}
public void DoesSomethingInteresting(MyDataItem item)
{
_myDAL.AddItem(item);
}
}
7. How can we get this into our class?
• Simplest way: supplying it to the constructor (aka Constructor injection)
• This works, but isn’t much better than the original
• Better way: use a Dependency Injection Container
• Unity
• Ninject
• SimpleIOC
• etc.
var myBLL = new MyBusinessLogic(new MyDataAccessLayer)
8. Using a DI Container
• Most containers use a registration mechanism mapping type-to-type:
• Resolve types at runtime:
myContainer.RegisterType(typeof(IFoo), typeof(Foo))
myContainer.RegisterType<IFoo, Foo>()
var instance = myContainer.Resolve(typeof(IFoo))
var instance = myContainer.Resolve<IFoo>()
9. But wait, there’s more!
• Every DI container supports dependency chains
• If registered type A takes an instance of registered type B as a constructor argument, then
an instance of B will be automatically created:
• Many frameworks use DI containers to automatically resolve types
• For example, ASP.NET MVC’s Dependency Resolver
• NuGet makes this very easy - Unity bootstrapper
myContainer.RegisterType<IMyBusinessLogic, MyBusinessLogic>();
myContainer.RegisterType<IMyDataAccessLayer, MyDataAccessLayer>();
var myBLL = myContainer.Resolve(IMyBusinessLogic);
11. Where does “testable” come in?
• Classes that take dependencies as configuration are much easier to test!
• This is where the abstraction layer comes in very handy!
• Rather than supply that dependency, pass something that looks like it.
• Simplest approach: derive a “fake” class from the base class/interface
• Better approach: use a mocking framework like Moq!
• Code/configure your fake to behave the way you expect it to, and assert that
*your* code behaves as it should.
12. The concept:
• The two-port model
• For a given input, you expect a certain output
Your CodeInput Output
13. DEMO: USING MOQ IN A UNIT TEST
Verifying that the controller does what it should
14. What else can we do with this?
• Once you start thinking in terms of dependencies, you can start making your
code a LOT cleaner.
• AKA “Separation of Concerns” – have classes that do one type of thing and have other
classes use them as Lego blocks to build complex systems.
• Deliver your code faster
• Defining the “contract” in terms of interfaces and expected behavior allows different people
to work in parallel!
• Make your own code easier to maintain
• If each class has its own job, and you have interfaces defining the API, you can change
implementations without modifying the calling code
• Instead of writing one-off test apps, write unit tests
15. Stupid Container Tricks
• Lifetime Management
• LifetimeManager
• A way to create a singleton from any class
• Named registrations
• RegisterType<T>(“Name”)
• ResolveAll<T>()
• Can be used as an extensibility point – “plugins”
• XML Configuration
• Rather than declaring everything in code, use an XML file
• Discovery
• Use reflection to find all types that implement a given interface and register them
• Microsoft Extensibility Framework
16. References
• Microsoft Unity
• https://unity.codeplex.com/
• “Dependency Injection with Unity”
http://www.microsoft.com/en-us/download/details.aspx?id=39944
• Moq
• https://github.com/Moq/moq4