10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019Matt Raible
Spring Boot is an excellent way to build Java applications with the Spring Framework. If you’re developing apps that handle sensitive data, you should make sure they’re secure.
This session will cover HTTPS, dependency checking, CSRF, using a CSP to prevent XSS, OIDC, password hashing, and much more!
You’ll learn how to add these features to a real application, using the Java language you know and love.
* Blog post: https://developer.okta.com/blog/2018/07/30/10-ways-to-secure-spring-boot
* Cheat sheet: https://snyk.io/blog/spring-boot-security-best-practices/
Slides from the NestJS MasterClass.
We learned how to build JavaScript server-side applications with NestJS - A progressive NodeJS framework built with TypeScript.
You can find the code on GitHub:
https://github.com/nirkaufman/task-manager
Introduction to unit testing in general and to unit testing with RSpec. Described unit testing in general, basic terms and RSpec components, best practices.
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019Matt Raible
Spring Boot is an excellent way to build Java applications with the Spring Framework. If you’re developing apps that handle sensitive data, you should make sure they’re secure.
This session will cover HTTPS, dependency checking, CSRF, using a CSP to prevent XSS, OIDC, password hashing, and much more!
You’ll learn how to add these features to a real application, using the Java language you know and love.
* Blog post: https://developer.okta.com/blog/2018/07/30/10-ways-to-secure-spring-boot
* Cheat sheet: https://snyk.io/blog/spring-boot-security-best-practices/
Slides from the NestJS MasterClass.
We learned how to build JavaScript server-side applications with NestJS - A progressive NodeJS framework built with TypeScript.
You can find the code on GitHub:
https://github.com/nirkaufman/task-manager
Introduction to unit testing in general and to unit testing with RSpec. Described unit testing in general, basic terms and RSpec components, best practices.
Paolo Alvarado Customer Support Engineer, Fastly at Altitude 2016
Customer Support Engineer Paolo Alvarado discusses various useful features of advanced Varnish Configuration Language (VCL).
Design & Performance - Steve Souders at Fastly Altitude 2015Fastly
Fastly Altitude - June 25, 2015. Chief SpeedCurver Steve Souders explains how design and web performance are more interconnected than ever before. Users want a fast website with a rich design, but sometimes the interplay between design and performance feels like a fixed sum game: one side's gain is the other side's loss. Design and performance are indeed connected, but it's more like the yin and yang. They aren't opposing forces, but instead complement each other. Bringing these processes together produces experiences that are rich and fast.
Video from the talk: http://fastly.us/Altitude2015_Design-Performance
Steve's bio: Steve Souders is a co-founder at SpeedCurve, where he develops web performance services. His book, High Performance Web Sites, explains his best practices for performance; it was #1 in Amazon's Computer and Internet bestsellers. His follow-up book, Even Faster Web Sites, provides performance tips for today's Web 2.0 applications. Steve is the creator of many performance tools and services including YSlow, the HTTP Archive, Cuzillion, Jdrop, SpriteMe, ControlJS, and Browserscope. He serves as co-chair of Velocity, the web performance and operations conference from O'Reilly, and is co-founder of the Firebug Working Group.
Andrew Betts Web Developer, The Financial Times at Fastly Altitude 2016
Running custom code at the Edge using a standard language is one of the biggest advantages of working with Fastly’s CDN. Andrew gives you a tour of all the problems the Financial Times and Nikkei solve in VCL and how their solutions work.
Hacking the Mesh: Extending Istio with WebAssembly Modules | DevNation Tech TalkRed Hat Developers
Moving common network functionality such as client load-balancing and circuit-breaking into out-of-process proxies has kickstarted the technology we call Service Mesh, with Istio as its most popular incarnation. With the introduction of WASM support, you can now extend its functionality by writing custom Filters for Istio's proxy, Envoy, in any language that supports WASM. Let's take a closer look at developing, building, and deploying WASM Filters using the example of an OpenID Connect Filter that adds Keycloak Authentication functionality to any service in your Mesh - no code changes required.
Vielseitiges In-Memory Computing mit Apache Ignite und KubernetesQAware GmbH
IT-Tage 2017, Frankfurt am Main: Vortrag von Mario-Leander Reimer (@LeanderReimer, Cheftechnologe bei QAware)
Abstract:
Mit Apache Ignite steht eine hochperformante, integrierte und verteilte In-Memory-Plattform bereit, die im Zusammenspiel mit Kubernetes zu wahrer Hochform aufläuft. In dieser Kombination lassen sich flexibel skalierbare In-Memory Computing-Systeme elegant realisieren.
In diesem Vortrag stellen wir die wesentlichen Features und die Architektur von Apache Ignite vor. Anhand von anschaulichen Beispielen zeigen wir mögliche Use Cases, wie etwa den Einsatz als Kommunikations-Backbone einer Microservice-Architektur oder als Plattform zur Verarbeitung von kontinuierlichen Event-Daten. Zur Demonstration von Resilienz und Skalierbarkeit des In-Memory Data-Grids werden die Beispiele auf einem Kubernetes Cluster ausgeführt.
OSGi Puzzlers - Neil Bartlett & Peter Kriensmfrancis
OSGi Community Event 2013 (http://www.osgi.org/CommunityEvent2013/Schedule)
Lightning Talk
ABSTRACT
A fun look at some of the traps and pitfalls that people come across when working with OSGi, along with suggestions on how you should deal with these cases in point.
Die Komplexität und Größe von verteilten Systemen nehmen stetig zu. Steht nun ein einzelner Service nicht oder nur eingeschränkt zur Verfügung, kann sich dies schnell auf die Verfügbarkeit des ganzen und auf benachbarte Systeme auswirken. Mit Hilfe der Bibliothek Hystrix von Netflix hat man die Möglichkeit auf solche Ereignisse mit wenig Aufwand geeignet zu reagieren.
Der Vortrag zeigt, an welchen Stellen Hystrix eingesetzt werden sollte und welche Stolpersteine es geben kann. U.a. kann das Zusammenspiel mit anderen Bibliotheken für Querschnittsfunktionalitäten wie z.B. Logging und Transaktionshandling für einige Überraschungen sorgen. Auch der deklarative Einsatz von Hystrix kann einen vor neue Herausforderungen stellen.
Speaker: Gerrit Brehmer, inovex GmbH
Event: inovex Meetup (http://www.meetup.com/de-DE/inovex-karlsruhe/)
Datum: 20.10.2016
Mehr Vorträge: https://www.inovex.de/de/content-pool/vortraege/
Altitude NY 2018: Programming the edge workshopFastly
Through our support for running your own code on our edge servers, Fastly's network offers you a platform of unparalleled speed, reliability and efficiency to which you can delegate a surprising amount of logic that has traditionally been in the application layer. In this workshop, you'll implement a series of advanced edge solutions, and learn how to apply these patterns to your own applications to reduce your origin load, dramatically improve performance, and make your applications more secure.
Paolo Alvarado Customer Support Engineer, Fastly at Altitude 2016
Customer Support Engineer Paolo Alvarado discusses various useful features of advanced Varnish Configuration Language (VCL).
Design & Performance - Steve Souders at Fastly Altitude 2015Fastly
Fastly Altitude - June 25, 2015. Chief SpeedCurver Steve Souders explains how design and web performance are more interconnected than ever before. Users want a fast website with a rich design, but sometimes the interplay between design and performance feels like a fixed sum game: one side's gain is the other side's loss. Design and performance are indeed connected, but it's more like the yin and yang. They aren't opposing forces, but instead complement each other. Bringing these processes together produces experiences that are rich and fast.
Video from the talk: http://fastly.us/Altitude2015_Design-Performance
Steve's bio: Steve Souders is a co-founder at SpeedCurve, where he develops web performance services. His book, High Performance Web Sites, explains his best practices for performance; it was #1 in Amazon's Computer and Internet bestsellers. His follow-up book, Even Faster Web Sites, provides performance tips for today's Web 2.0 applications. Steve is the creator of many performance tools and services including YSlow, the HTTP Archive, Cuzillion, Jdrop, SpriteMe, ControlJS, and Browserscope. He serves as co-chair of Velocity, the web performance and operations conference from O'Reilly, and is co-founder of the Firebug Working Group.
Andrew Betts Web Developer, The Financial Times at Fastly Altitude 2016
Running custom code at the Edge using a standard language is one of the biggest advantages of working with Fastly’s CDN. Andrew gives you a tour of all the problems the Financial Times and Nikkei solve in VCL and how their solutions work.
Hacking the Mesh: Extending Istio with WebAssembly Modules | DevNation Tech TalkRed Hat Developers
Moving common network functionality such as client load-balancing and circuit-breaking into out-of-process proxies has kickstarted the technology we call Service Mesh, with Istio as its most popular incarnation. With the introduction of WASM support, you can now extend its functionality by writing custom Filters for Istio's proxy, Envoy, in any language that supports WASM. Let's take a closer look at developing, building, and deploying WASM Filters using the example of an OpenID Connect Filter that adds Keycloak Authentication functionality to any service in your Mesh - no code changes required.
Vielseitiges In-Memory Computing mit Apache Ignite und KubernetesQAware GmbH
IT-Tage 2017, Frankfurt am Main: Vortrag von Mario-Leander Reimer (@LeanderReimer, Cheftechnologe bei QAware)
Abstract:
Mit Apache Ignite steht eine hochperformante, integrierte und verteilte In-Memory-Plattform bereit, die im Zusammenspiel mit Kubernetes zu wahrer Hochform aufläuft. In dieser Kombination lassen sich flexibel skalierbare In-Memory Computing-Systeme elegant realisieren.
In diesem Vortrag stellen wir die wesentlichen Features und die Architektur von Apache Ignite vor. Anhand von anschaulichen Beispielen zeigen wir mögliche Use Cases, wie etwa den Einsatz als Kommunikations-Backbone einer Microservice-Architektur oder als Plattform zur Verarbeitung von kontinuierlichen Event-Daten. Zur Demonstration von Resilienz und Skalierbarkeit des In-Memory Data-Grids werden die Beispiele auf einem Kubernetes Cluster ausgeführt.
OSGi Puzzlers - Neil Bartlett & Peter Kriensmfrancis
OSGi Community Event 2013 (http://www.osgi.org/CommunityEvent2013/Schedule)
Lightning Talk
ABSTRACT
A fun look at some of the traps and pitfalls that people come across when working with OSGi, along with suggestions on how you should deal with these cases in point.
Die Komplexität und Größe von verteilten Systemen nehmen stetig zu. Steht nun ein einzelner Service nicht oder nur eingeschränkt zur Verfügung, kann sich dies schnell auf die Verfügbarkeit des ganzen und auf benachbarte Systeme auswirken. Mit Hilfe der Bibliothek Hystrix von Netflix hat man die Möglichkeit auf solche Ereignisse mit wenig Aufwand geeignet zu reagieren.
Der Vortrag zeigt, an welchen Stellen Hystrix eingesetzt werden sollte und welche Stolpersteine es geben kann. U.a. kann das Zusammenspiel mit anderen Bibliotheken für Querschnittsfunktionalitäten wie z.B. Logging und Transaktionshandling für einige Überraschungen sorgen. Auch der deklarative Einsatz von Hystrix kann einen vor neue Herausforderungen stellen.
Speaker: Gerrit Brehmer, inovex GmbH
Event: inovex Meetup (http://www.meetup.com/de-DE/inovex-karlsruhe/)
Datum: 20.10.2016
Mehr Vorträge: https://www.inovex.de/de/content-pool/vortraege/
Altitude NY 2018: Programming the edge workshopFastly
Through our support for running your own code on our edge servers, Fastly's network offers you a platform of unparalleled speed, reliability and efficiency to which you can delegate a surprising amount of logic that has traditionally been in the application layer. In this workshop, you'll implement a series of advanced edge solutions, and learn how to apply these patterns to your own applications to reduce your origin load, dramatically improve performance, and make your applications more secure.
A Slideshow which reached my inbox via a circular e-mail sent by David Frugtniet, a well known broker of freight and transport risks who is based in Southampton
In this session, see Google Web Toolkit used in exotic and creative ways to solve interesting engineering problems, from authoring OpenSocial apps that run as both Web gadgets and native Android applications, to developing Adobe AIR applications using GWT, compiling CSS selectors to Javascript at compile time, running multithreaded code with GWT and Gears workers, or exporting GWT libraries for JavaScript users. Learn the secrets of writing "faster than possible" GWT code, how to use Generators and Linkers in harmony, and make seamless procedure calls from GWT code to other environments like Flash, Gears, or Android.
me ranting about the downsides of Spring Boot / Netflix OSS. Sorry that the slides are a little rare on text, so most likely hard to understand without the actual talk. feel free to send me any questions, though!
Cassandra Day NY 2014: Getting Started with the DataStax C# DriverDataStax Academy
So you’ve grabbed the latest 2.0 beta of DataStax C# driver from NuGet. Now what? In this talk, Luke will walk you through some of the basics of the C# driver--how to bootstrap the driver and connect to a cluster, execute statements, and retrieve result sets. Wondering what the difference between a PreparedStatement and a SimpleStatement is? Not sure what the appropriate lifetime for a Cluster or a Session object is and whether you should reuse one (from multiple threads)? What about ADO.NET and LINQ support? We’ll cover this and more, so that you can get on with building applications on top of Cassandra and .NET.
7.1 Identify which attribute scopes are thread-safe:
Local variables
Instance variables
Class variables
Request attributes
Session attributes
Context attributes
7.2 Identify correct statements about differences between the multithreaded and single-threaded servlet models.
7.3 Identify the interface used to declare that a servlet must use the single thread model.
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegelermfrancis
OSGi Community Event 2015
The Enterprise OSGi Specs R6 have been released this summer. There is a lot of good stuff in there! Asynchronous Services, REST management, HTTP Whiteboard, cool DS enhancements and much more. In this talk David and Carsten will give an overview of the new technologies so you can get started with it right away.
This talk will explain the Google Web Toolkit (GWT), GWT architecture, and why you would want to use GWT. In addition, it will include a demo of GWT and the recently released GWT Designer (a tool that makes GWT development easy and that makes it fast to generate a complicated UI).
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
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.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
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/
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
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.
3. Gin Guice for GWT apps 100% Client Side Based on Deferred Binding, so some limitations Fast
4. Guicevs Spring Spring Config Hell Promise of simplicity Ever expanding config files Lots of subprojects Becomes more brittle, in that it becomes harder to extract code for reuse.
5. Guicevs Spring Guice Java Source “configuration” Convention over configuration. Annotation based Opposite of Spring in defaults Prefer constructor injection Prefer new instances (“Prototype”) over Singletons Provider<T> interface encourages mixing scopes Type Safe – you got static typing, use it!
7. Guice 101 public class MyClass{ private final MyService service; @Injectpublic MyClass(finalMyService service){this.service = service;} public String sayHelloToUser(){ return this.service.hello();} } @ImplementedBy(MyServiceImpl.class)public interface MyService{ public String hello();}
8. Guice 101 @Singleton public class MyServiceImpl implements MyService { private final Provider<MySessionObject> sessionProvider; public MyServiceImpl(final Provider<MySessionObject> sessionProvider){ this.sessionProvider = sessionProvider; } @Override public String hello() { return "Hello, "+sessionProvider.get().getName() +"!"; } }
9. Guice 101 import com.google.inject.servlet.SessionScoped; @SessionScoped public class MySessionObject { private String name; public String getName(){ return this.name; } public void setName(String name){ this.name = name; } }
10. Guice 101 What have we done? MyClass gets a MyService injected. MyService is implemented by MyServiceImpl as a Singleton MyServiceImpl gets a Provider<MySessionObject> The hello() method fetches the Session scoped MySession object, and says Hello!
11. Guice 101 @ImplementedBy provides defaults for any interface (You don’t need to config these if the default is OK) Injection is type safe on constructors (Unit tests have obvious requirements) Scope annotations (@SessionScoped, @Singleton) provide defaults. Provider<T> hides the scope shift from the Singleton service in a single thread method.
15. Guice 101 @Singleton public class MyServlet extends HttpServlet{ private final Provider<MySessionObject> sessionProvider; private final MyClassmyClass; @Inject public MyServlet(final Provider<MySessionObject> sessionProvider, MyClassmyClass){ this.sessionProvider = sessionProvider; this.myClass = myClass; } @Override public void doGet(HttpServletRequestreq, HttpServletResponse res) throws IOException { this.sessionProvider.get().setName(req.getParameter("name")); res.getWriter().println(myClass.hello()); } }
16. Guice 101 So this is interesting. What happened there? The SessionScoped object was created, and set on the session. MyClass was created one off for injection into the servlet. Since it wasn’t a Provider<MyClass> it was implicitly @Singleton with the servlet But since the MyClass implementation used a provider, it ended up performing a singleton-session scoped op.
17. Guice 101 What else? Servlets, Filters, etc must always be @Singleton of course, this just makes sense. They can *still* get anything injected into them. You need to add your boostrapGuiceContextListener to your web.xml For Servlet < 3.0 you need to add a com.google.inject.servlet.GuiceFilter to /*
18. Guice 201 Why does this rock? (Hint GWT stuff…) Can you say RemoteServiceServlet? No more calls to getThreadLocalX() for servlet context stuff. Just use Provider<T>
19. Guice 201: Warp The Warp-* projects provide a lot of utility ops for Guice: @Transactional scope Transaction per Request Some stuff not dissimilar to Spring WebFlow or Stripes.
20. Guice 201: More Config @Named lets you provide named values in your configuration. (You can also create custom annotations) You can also use @Provides for factory methods in your modules for simple providers @Provides public Connection getConnection(@Named(“jdbc-url”) String jdbcUrl) { DriverManager.forName(whatever); DriverManager.getConnection(jdbcUrl); }
21. Guice 201: More Config binder.bind(String.class).annotatedWith(Names.named(“jdbc-url”)).toInstance(“jdbc:mysql://localhost/mydb”); Note: @Provides methods could do JNDI lookups, or get other stuff. (This is a stupid example!)
22. Of Junipers and Bathtubs Gin is Google Guice for GWT client side apps. Based on DeferrredBinding. Certain features lost: Binding .toInstance() on any module Anonymous Provider<T> can’t be done (@Provides is *kinda* OK) Scoping needs to be by hard class reference.
23. Of Junipers and Bathtubs That is.. in(Singleton.class) not .asEagerSingleton() or with @Singleton Gin seems both stupid and too smart. Binding a RemoteServiceAsync class works out of the box… Unless you want to do @Provides Gin created classes are new Class() not GWT.create(Class.class); -- except for RemoteServiceAsync, which is a special scope.
24. Gin 101 @GinModules(MyGinModule.class) public interface Injector extends Ginjector { public static final Injector INSTANCE = GWT.create(Injector.class); public MyStartupClassstartupClass(); } public class Module extends AbstractGinModule { @Override protected void configure() { this.bind(Resources.class) .toProvider(ResourcesProvider.class) .in(Singleton.class) } } public static class ResourcesProvider implements Provider<Resources> { @Override public Resources get() { return GWT.create(Resources.class); } }
25. Gin 101 Does this step on the toes of DeBi? OK, maybe a little bit. Sure you could do a singleton Resources.INSTANCE but injection makes Unit testing without dropping into GWTTestCase more frequent. (Read: much, much faster) This reserves DeBi for what it is best for: local environment specific code.
26. Gin 201 What can’t you do with Gin? Remember your Injector.INSTANCE is compile-time: No “toInstance()” bindings… ever. No “toProvider(AnonymousProvider(){})” providers need to be public scoped static classes at the least. Gin treats RemoteServiceAsync specially. You can do a provider, but if you try @Provides methods in your GinModule classes, you will get a duplicate declaration error.
27. Gin 201 All this aside, stacked with DeBi, Gin can rock rough and stuff with its Afro Puffs. Replace your Startup call with a Sync method. Replace your Async classes with thing that talk to local storage. Automagically retry onFailure() methods on network errors while your uses if offline.
28. Way way more Warp-* is some great stuff: http://code.google.com/p/warp-persist/ http://code.google.com/p/google-sitebricks/ Guice with JAX-WShttps://jax-ws-commons.dev.java.net/guice/ (Strangely harder than JAX-RS)