This presentation is from Code::Dive conference. It is all about metaprogramming in C++ - it covers the history, current status, and future directions.
Presented at the November '07 ThoughtWorks UK Away Day, the talk was centered around the various techniques used to create and mold your objects and domain model using declaritive, self-inspecting, and self-modifying code.
This document discusses object models, metaprogramming, and dynamic programming in Ruby. It begins with an overview of getter and setter methods in different languages like Java, .NET, and Ruby. It then covers key aspects of metaprogramming in Ruby like classes always being open, everything being an object, and method calls having receivers. Specific metaprogramming techniques like class_eval, define_method, and method_missing are explained in detail through examples. The document concludes with discussions around eigenclasses, singleton methods, and how metaprogramming is used in Ruby on Rails for conventions like associations and validations.
This document discusses various metaprogramming techniques in Ruby including monkey patching, open classes, class and module definitions, method execution context, dynamic and ghost methods, method missing, closures, scope gates, instance eval, class eval, class variables, singleton methods, eigenclasses, and method aliases. It provides examples and explanations of how to programmatically modify classes and define methods at runtime in Ruby.
The document discusses metaprogramming in Ruby and domain specific languages (DSLs). It provides examples of metaprogramming in programs like the Java compiler and Ruby interpreter. It also shows how DSLs are used to define languages for specific domains like musical notes or guitar chords. The presentation introduces metaprogramming and DSL implementation, including changing self, missing constants/methods, and custom operators.
Update:
Video available from Oredev: vimeo.com/53147485
Metaprogramming is the dirty little secret behind the success of many Java frameworks such as Spring and Struts2, and constitutes the backbone of many of the most fundamental APIs across the JEE technology stack. This session aims introduce the topic and highlight, with code examples, the different mechanisms and techniques to take advantage of this underused feature of the Java Programming Language.
This session will adopt a learn-by-example approach that combines the philosophy and theory behind metaprogramming with concrete code examples. The audience will be walked real-life scenarios to highlight the benefits of this technique such as minimizing the number of lines of code, reduced development time, and greater flexibility, etc… Design patterns, and best practices will be picked up along the way.
No previous knowledge or exposure to the topic is required, but an intermediate understanding of Java SE is expected.
"What is the future of Java?" is a hard question to tackle. It should be given serious thought whether you are a veteran with a lot invested, a noob trying to figure out what is worthwhile, or just a self-proclaimed Java hater.
In this session, Abdelmonaim will start by introducing the concept of Programming Languages Darwinism to answer what really determines the fate of a technology. A series of questions will be addressed to achieve some clarity such as: How is the paradigm shifting? Why do functional programming languages matter? What is the state of mobile Java? How does the patent wars affect Java? What about the recent security threats? And many more... Expect this session to be controversial, emotionally-charged, and very opinionated.
Ruby & Rails Overview presented by Michal Poczwardowski on 11/05/15. Ruby is a dynamic, object-oriented language that is elegant and easy to read. Rails is a web application framework built on Ruby that follows conventions over configurations. It uses the MVC pattern with models, views, controllers, and routes to quickly develop powerful websites and applications. The presentation demonstrated core Ruby concepts and how to build a basic Rails application.
The document discusses Python metaprogramming. It provides examples of decorators, class decorators, and metaclasses in Python. Decorators allow adding new functionality to existing functions or methods without permanently changing them. Class decorators modify classes. Metaclasses allow controlling class creation and customizing class objects. The document demonstrates how metaprogramming techniques like decorators and metaclasses can add capabilities like logging and validation to functions and classes.
2. • What is Metaprogramming?
• Ruby Object Model
• Sharing functionalities
• instance_eval and class_eval
• Magic of method_missing
Topics I will touch…
5. • Classes are always open
• Class definitions are live
• Classes are objects
• Every method call has a
receiver
• Anonymous or ghost classes
CLASSES