This document discusses new features in C# 4 related to dynamic coding. It describes how dynamic typing allows easier COM automation without needing interop types. Anonymous type instances can now be passed to methods using dynamic parameters. The document also discusses dynamic objects in JavaScript and how ExpandoObjects in .NET allow objects to have dynamically added and modified properties at runtime similar to dynamic objects in JavaScript.
Introduction to TypeScript, demo ( http://goo.gl/VtE4Vm ), Comparison with couple of popular alternatives. (Sadly layout of the slides are a bit ruined by conversion to SlideShare format - original file: http://goo.gl/eeJgbR )
The first deck of a two part learning deck about TypeScript.
Here you can view a first introduction to the language and some attention call for some of TypeScript detailes.
TypeScript is a super set of JavaScript. This slide covers the key features of TypeScript including basics of typescript, basic types, Interfaces, Functions, Classes, Generics, Modules.
Introduction to TypeScript, demo ( http://goo.gl/VtE4Vm ), Comparison with couple of popular alternatives. (Sadly layout of the slides are a bit ruined by conversion to SlideShare format - original file: http://goo.gl/eeJgbR )
The first deck of a two part learning deck about TypeScript.
Here you can view a first introduction to the language and some attention call for some of TypeScript detailes.
TypeScript is a super set of JavaScript. This slide covers the key features of TypeScript including basics of typescript, basic types, Interfaces, Functions, Classes, Generics, Modules.
Technical presentation given by Laurent Duveau at the House of Commons in Ottawa on April 25, 2017.
Thanks to Dan Wahlin for providing the original version of the slides. I added more content to fit in a 1h talk.
An introduction to Typescript for programmers who use JavaScript.
It goes through what it is, what's it useful for, how to start using it and some things I've observed while using it.
Notes are not available but feel free to PM me if you have any question.
FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo W...Dierk König
Diskusssion of what kind of differences there are between Haskell 2010 and Frege, how difficult they are to resolve, what their impact is, and what to do about them. Also: how to allow essential differences that will never work outside the JVM and demarcate them from supposed-to-be vanilla Haskell.
Swift Tutorial Part 2. The complete guide for Swift programming languageHossam Ghareeb
Part 2 of The complete guide for Swift programming language. In this part we introduced:
Classes
Inheritance
Computed Properties
Type Level
Lazy
Property Observers
Structures
Equality Vs Identity
Type Casting
Any Vs AnyObject
Protocols
Delegation
Extensions
Generics
Operator Functions
TypeScript 101. TypeScript is a tool that allows you to utilize object oriented programming techniques with your JavaScript code. With TypeScript you have the same sort of namespaces and classes that you use to build your business objects. TypeScript classes support both inheritance and interfaces. We’ll introduce you to these concepts and show you how to use TypeScript to manage and organize your JavaScript code.
Kotlin is a great language for developing server-side applications; it's an object-oriented language and also a functional one, supporting features such as function types, lambdas or higher order functions. But...is this enough to switch completely from a imperative paradigm to a functional paradigm?
In this talk we'll see how features from Arrow library completes Kotlin in order to follow a pure functional way.
Brief introduction to F# presentation for CAFE user group meeting on 1/22/15. Accompanying code can be found at: https://github.com/mjyeaney/FSharpTalks
TypeScript is an amazing substitute for JavaScript that solves a bunch of significant problems that are surprisingly common in large JavaScript code bases. But, by solving those problems, it also creates a new one: it's now easier than ever to create larger and more complex code bases. It turns out that accommodating that complexity while supporting all the different JavaScript environments is quite a challenge.
Which is why TypeScript has multiple module systems, unfortunately with confusing names and poor guidance. In this session, we sort out the mess and talk about the differences between internal and external modules, writing client and server code, how the TypeScript modules map to JavaScript modules in different versions of JavaScript, and about integration with build tools like Gulp.
These are the slides for the talk I gave at the JavaScript Israel Meetup: http://www.meetup.com/JavaScript-Israel/events/228923402/
Understanding some of the Groovy language features by comparison with the Java language (and occasionally with JavaScript). This presentation explores closures, properties, some the Groovy language annotations and Groovy specifics such as Elvis operator, memoization etc.
This session is an introduction to the weird side of JavaScript, and it definitely has a weird side! .NET developers will find a lot of intriguing "features" when they begin to write code in the world's most widely used language. Join us to learn about all the gotchas to watch out for and discover some of the great functionality that JavaScript has to offer…
Kotlin is a great language for developing server-side applications; it's an object-oriented language and also a functional one, supporting features such as function types, lambdas or higher order functions. But...is this enough to switch completely from a imperative paradigm to a functional paradigm?
In this talk we'll see how features from Arrow library completes Kotlin in order to follow a pure functional way.
Understanding Typing. Understanding Ruby.Justin Lin
- What is typing?
- Pros and cons of type declarations.
- What does quacking like a dock mean?
- Static Typing vs Unit Testing.
- Making us better at Ruby.
你可以在以下鏈結找到中文說明:
http://www.codedata.com.tw/social-coding/understanding-typing-understanding-ruby/
Technical presentation given by Laurent Duveau at the House of Commons in Ottawa on April 25, 2017.
Thanks to Dan Wahlin for providing the original version of the slides. I added more content to fit in a 1h talk.
An introduction to Typescript for programmers who use JavaScript.
It goes through what it is, what's it useful for, how to start using it and some things I've observed while using it.
Notes are not available but feel free to PM me if you have any question.
FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo W...Dierk König
Diskusssion of what kind of differences there are between Haskell 2010 and Frege, how difficult they are to resolve, what their impact is, and what to do about them. Also: how to allow essential differences that will never work outside the JVM and demarcate them from supposed-to-be vanilla Haskell.
Swift Tutorial Part 2. The complete guide for Swift programming languageHossam Ghareeb
Part 2 of The complete guide for Swift programming language. In this part we introduced:
Classes
Inheritance
Computed Properties
Type Level
Lazy
Property Observers
Structures
Equality Vs Identity
Type Casting
Any Vs AnyObject
Protocols
Delegation
Extensions
Generics
Operator Functions
TypeScript 101. TypeScript is a tool that allows you to utilize object oriented programming techniques with your JavaScript code. With TypeScript you have the same sort of namespaces and classes that you use to build your business objects. TypeScript classes support both inheritance and interfaces. We’ll introduce you to these concepts and show you how to use TypeScript to manage and organize your JavaScript code.
Kotlin is a great language for developing server-side applications; it's an object-oriented language and also a functional one, supporting features such as function types, lambdas or higher order functions. But...is this enough to switch completely from a imperative paradigm to a functional paradigm?
In this talk we'll see how features from Arrow library completes Kotlin in order to follow a pure functional way.
Brief introduction to F# presentation for CAFE user group meeting on 1/22/15. Accompanying code can be found at: https://github.com/mjyeaney/FSharpTalks
TypeScript is an amazing substitute for JavaScript that solves a bunch of significant problems that are surprisingly common in large JavaScript code bases. But, by solving those problems, it also creates a new one: it's now easier than ever to create larger and more complex code bases. It turns out that accommodating that complexity while supporting all the different JavaScript environments is quite a challenge.
Which is why TypeScript has multiple module systems, unfortunately with confusing names and poor guidance. In this session, we sort out the mess and talk about the differences between internal and external modules, writing client and server code, how the TypeScript modules map to JavaScript modules in different versions of JavaScript, and about integration with build tools like Gulp.
These are the slides for the talk I gave at the JavaScript Israel Meetup: http://www.meetup.com/JavaScript-Israel/events/228923402/
Understanding some of the Groovy language features by comparison with the Java language (and occasionally with JavaScript). This presentation explores closures, properties, some the Groovy language annotations and Groovy specifics such as Elvis operator, memoization etc.
This session is an introduction to the weird side of JavaScript, and it definitely has a weird side! .NET developers will find a lot of intriguing "features" when they begin to write code in the world's most widely used language. Join us to learn about all the gotchas to watch out for and discover some of the great functionality that JavaScript has to offer…
Kotlin is a great language for developing server-side applications; it's an object-oriented language and also a functional one, supporting features such as function types, lambdas or higher order functions. But...is this enough to switch completely from a imperative paradigm to a functional paradigm?
In this talk we'll see how features from Arrow library completes Kotlin in order to follow a pure functional way.
Understanding Typing. Understanding Ruby.Justin Lin
- What is typing?
- Pros and cons of type declarations.
- What does quacking like a dock mean?
- Static Typing vs Unit Testing.
- Making us better at Ruby.
你可以在以下鏈結找到中文說明:
http://www.codedata.com.tw/social-coding/understanding-typing-understanding-ruby/
The F# community has been steadily working on extensions to the F# core libraries. These extensions provide helpful features that are "missing," add common parts found in other functional languages, and help with compatibility in other .NET languages.
One of the main reasons Titanium Mobile has been so successful is that the technology has significantly lowered the barrier to entry for native mobile development. A major force behind this is JavaScript, Titanium's primary programming language. The JavaScript programming language is small enough where the basics can be learned in a matter of hours, which has enabled developers from many different backgrounds to become productive using Titanium. But there's much more to JavaScript than just control structures and a handful of primitive data types - JavaScript is a beautiful functional programming language with great features you might not be using.
Most developers working on the web today have had some exposure to JavaScript, but there's a difference between using jQuery for DOM manipulation on a web page and writing an entire application in JavaScript. This talk, intended for beginner or intermediate JavaScript developers, will focus on the essential language features you will need to write professional JavaScript applications, including but not limited to:
Object Oriented Programming in JavaScript
The Good Parts and Bad Parts of JavaScript
Useful JavaScript Patterns, Tricks, and Style Guidelines
The JavaScript runtime in Titanium Mobile
Further Reading and ways to stay up to date on JavaScript
iPhone, the next generation mobile platform has revolutionized the way one uses phones as it's a combination of a phone, an iPod and an internet device. The iPhone is a richer platform for application delivery due to an exponential growth and wide spread usage.
The critical factor, for a successful mobile application is the end user experience: application usability, reliability, and performance which the iPhone delivers in style. There are thousands of applications created by hundreds of developers for the iPhone. This kind of innovation helps you start developing the next generation of innovative mobile applications now.
Topics Covered
* Current State of iPhone Development
* Fast Track to Objective C
* Fast Track to XCode and Interface Builder
* Getting Productive using OR-Framework, Testing, Serialization
Munjal Budhabhatti is a senior solution developer at ThoughtWorks. He possesses over 10 years of experience in designing large-scale enterprise applications and has implemented innovative solutions for some of the largest microfinance, insurance and financial organizations. He loves writing well-designed enterprise applications using Agile processes. His article on "Test-Driven Development and Continuous Integration for Mobile Applications" was recently published in the Microsoft Architecture Journal.
Source code recovery is one of the most tedious, and interesting, tasks in reverse engineering. During the course of this talk, the author will talk about a tool being developed (on and off) since last year that aims to generate auto-compilable source code from binaries. The tool is currently working though it needs a lot more work.
Von Gleichungen zu Funktionen
Überblick über ganzrationale Funktionen
Koordinatensysteme für Graphen ganzrationaler Funktionen mit Excels Liniendiagrammen erstellen
Einfache Analyse ganzrationaler Funktionen anhand deren Graphen
Von linearen zu quadratischen Gleichungssystemen
Verschiedene Möglichkeiten quadratische Gleichungssysteme grafisch zu lösen
Koordinatensysteme für quadratische Graphen mit Excels Liniendiagrammen erstellen und Gleichungen damit grafisch lösen
Grafische Interpretation der Lösungen von Normalparabel-Gerade Kombinationen
Diagramme
Einführung linearer Gleichungssysteme mit zwei Unbekannten
Rechnerische und grafische Lösung linearer Gleichungssysteme
Wertetabellen mit Excel erstellen
Koordinatensysteme und lineare Graphen mit Excels Liniendiagrammen erstellen und Gleichungen damit grafisch lösen
Mit großen Tabellen arbeiten
Sortieren und Filtern
Objekte einfügen
Formeln und rechnen mit Excel, insbesondere Zahlen und Textbearbeitung
Relative und absolute Zellbezüge
Funktionen: SUMME(), ANZAHL(), MIN(), MAX(), MITTELWERT(), JETZT(), HEUTE(), ZUFALLSZAHL(), PI() und SUMMEWENN()
Mathematische Probleme in Tabellenform
Geschichtliche Entwicklung
Grundlegende Konzepte und Begriffe in Excel
Selektion, Dateneingabe und Datentypen
Zellformatierung und Inhaltsformatierung
- Vector- and Raster-based Graphics
-- Idea behind Vector- and Raster-based Graphics
-- Crispness
-- Overview of Raster-based Drawing APIs
- Platform independent Graphics and GUIs in the Web Browser
-- Bare HTML Pages
-- Plugins and Problems
-- From rich Content to HTML 5
- Drawing with HTML 5 Canvas
-- Continuous, Event driven and free Drawing
-- Basic Drawing "How does Drawing work with JavaScript?"
-- Interaction with Controls
- Vector- and Raster-based Graphics
-- Idea behind Vector- and Raster-based Graphics
-- Crispness
-- Overview of Raster-based Drawing APIs
- Platform independent Graphics and GUIs in the Web Browser
-- Bare HTML Pages
-- Plugins and Problems
-- From rich Content to HTML 5
- Drawing with HTML 5 Canvas
-- Continuous, Event driven and free Drawing
-- Basic Drawing "How does Drawing work with JavaScript?"
-- Interaction with Controls
- Wires and Bulbs
- Batch Processing
- Terminal and Mainframe
- From the Command-Line to Killer Applications
- Vector Displays and Raster Displays
- Color Displays
- The Mouse and the Takeoff of Interactivity
- The Desktop Metaphor
- Wires and Bulbs
- Batch Processing
- Terminal and Mainframe
- From the Command-Line to Killer Applications
- Vector Displays and Raster Displays
- Color Displays
- The Mouse and the Takeoff of Interactivity
- The Desktop Metaphor
(7) c sharp introduction_advanvced_features_part_iiNico Ludwig
This presentation comes with many additional notes (pdf): http://de.slideshare.net/nicolayludwig/7-c-sharp-introductionadvanvcedfeaturespartii-38640489
Check out these exercises: http://de.slideshare.net/nicolayludwig/6-7-c-sharp-introductionadvancedfeaturespartipartiiexercises
- Object-based and generic Collections
- Delegates and Events
- Custom Attributes
- Reflection
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.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
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/
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
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.
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
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
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.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
New c sharp4_features_part_v
1. 1
New C#4 Features – Part V
Nico Ludwig (@ersatzteilchen)
2. 2
TOC
● New C#4 Features – Part V
– Dynamic COM Automation with C#
– Dynamic Objects in JavaScript
– Expando Objects in C#
● Sources:
– Jon Skeet, CSharp in Depth
3. 3
Dynamic Coding – A better Experience with COM
● You no longer need interop types:
– Just don't use them:
● if you want lazy dispatching and you don't bother finding method signatures yourself...
● or if you simply don't want to or can't use type infos (w/o type library)! - You just use dynamic.
– (Use them if you want to exploit early dispatching, e.g. if you want to use IntelliSense.)
– To have no need to create code as an extra step is a key benefit of dynamic coding.
● But if you use interop types w/o PIAs, the DLR still makes your life easier:
– No-PIA deployed types provide the type dynamic instead of object in their APIs.
– E.g. IDispatch and VARIANTs are exposed as dynamics, reducing cast operations.
● With dynamic typing and COM you now have a "natural" coding experience:
– "Plain old CLR objects" (POCOs) and COM objects can be programmed like peers.
– During debugging the new "Dynamic View" assists you watching COM objects.
● COM as "peer objects" is one advantage of VB and
PowerShell programming.
4. 4
Example with COM Automation
<DynamicComInteropCSharp>
aThis example shows the application of C# dynamic coding to allow
simple COM automation.
5. 5
Example: Transportation of Anonymous Types' Instances
● Passing or returning anonymous types' instances from or to methods is limited.
– Feasible solutions like generic methods or using the type Object are quite limiting...
– You could only call Object's methods within such a method, not the anonymous type's ones (well, you might use reflection...).
● With dynamic you can overcome these limits.
● You'll get following features:
– Easy to use adapters.
– But data-binding, e.g. from IList<dynamic> to your controls is still fully functional (Windows Forms and WPF).
● !!You can't access properties of anonymous types in non-friend assemblies!!
– Anonymous types are internal and accessing them publicly may fail.
– => Keep using them in the same assembly!
● This is just one selected example of how dynamic typing
simplifies coding problems. Passing anonymous types'
instances to methods accepting dynamic arguments is used
with view models in ASP.Net MVC.
● Basically dynamic makes it possible to use otherwise only
locally known anonymous types in other methods.
● Databinding in WPF is less "sensitive", because it also
accepts different types having equally named properties. The
default behavior in Windows Forms requires identical types.
● Situation in non-friend assemblies: On accessing the
anonymous type's instance's properties (via a dynamically
typed symbol) you'll get a RuntimeBinderException on the
caller side, because the properties couldn't be bound.
● More:
● The type dynamic enables us to solve a problem on
programming of generics: we can call arbitrary methods on
unconstrained types' instances! Esp. we can call operators
in generics with dynamic dispatching!
● .Net remoting: Also can we use dynamic dispatch to access
the interface of proxy objects on marshaled instances w/o
having the object's type in avail.
6. 6
Leering at JavaScript: Dynamic Objects
<Safari Web Inspector as REPL>
Shows how we can exploit dynamic objects with dynamic
properties in JavaScript.
Key aspects of dynamic programming:
(1. Dynamic Typing)
(2. Late Binding)
(3. Duck Typing)
4. Dynamic Objects
● The ability to modify objects during run time is
another aspect of dynamic programming that is
shown here. -> Dynamic objects.
7. 7
Dynamic Objects with .Net ExpandoObjects
● Dynamic programming allows creating types, whose interfaces change at run time.
– These interface changes are based on how you use instances of such dynamic types.
● Dynamic objects are objects that have their own late binding logic!
– (In contrast to static objects that get bound by the compiler (early binding).)
– We can create own dynamic APIs to put mighty data driven APIs into effect!
– The easiest way to get this is a dynamic property bag, via the type ExpandoObject.
– ExpandoObjects are similar to JavaScript's dynamic objects that work like dictionaries.
– In many dynamic languages (e.g. JavaScript, Python) all objects are property bags.
● How to make use of .Net's ExpandoObject:
– Import the namespace System.Dynamic.
– Create a new ExpandoObject and assign it to a dynamic to enable dynamic dispatch.
– Add/modify members during run time and exploit ExpandoObjects as dictionaries.
● In static typing types are immutable, if you don’t have
the source code. - In dynamic typing this is no longer
the case, because the dynamic type information of an
object is part of the object's value!
● You should also check, whether a member of a
dynamic object is really present, before accessing it
(RuntimeBinderException). - This is a duck-typing
aspect (Does "it" lay eggs?)!
● As a matter of fact in .Net there also exists the type
IExpando, which is implemented by JScript .Net objects
(and by dynamic objects in some situations).
● ExpandoObjects can also have functions as properties
of a Delegate type!
● Interoperability when hosting a DLR scripting language:
Expose your C# objects to IronRuby as
ExpandoObjects!
● The class ExpandoObject is sealed. The discussion of
more flexible dynamic objects is discussed in the next
lecture.
8. 8
ExpandoObjects in Action
<DynamicObjects>
Shows the basic usage of ExpandoObjects.
Key aspects of dynamic programming:
(1. Dynamic Typing)
(2. Late Binding)
(3. Duck Typing)
4. Dynamic Objects