Recently I was asked to separate the public from the administration portion of a web application and deploy them to different servers. I'll present a Rails application where the admin and public portions are activated based on an application running mode flag.
In order to achieve this the application components are separated in Rails engines, and I'll go trough some common pitfalls with this approach as well as discussing its long term benefits.
This tutorial from TIB acdaemy is useful for both Beginners and experienced persons. this tutorial covers,
spring web stck
MVC
web frameworks
context
urlrewrite
mapping
rest
Http methods
page
handler
return types
A brief introduction to Rails Eingines. The joy and shortcomings of building modular web apps the Rails way. Originally presented at the 22nd Athens Ruby Meetup.
Recently I was asked to separate the public from the administration portion of a web application and deploy them to different servers. I'll present a Rails application where the admin and public portions are activated based on an application running mode flag.
In order to achieve this the application components are separated in Rails engines, and I'll go trough some common pitfalls with this approach as well as discussing its long term benefits.
This tutorial from TIB acdaemy is useful for both Beginners and experienced persons. this tutorial covers,
spring web stck
MVC
web frameworks
context
urlrewrite
mapping
rest
Http methods
page
handler
return types
A brief introduction to Rails Eingines. The joy and shortcomings of building modular web apps the Rails way. Originally presented at the 22nd Athens Ruby Meetup.
This talk covers a successful utilization of Rails Engines to share features that cut across the layers of MVC in different Rails 3 projects. Rails Engines thus provide the best of both worlds: improved productivity by reusing MVC code (including assets like Javascript, CSS, and Images) and better flexibility by allowing different applications to customize behavior as needed without reliance on application-dependent conditionals. Rails Engine patterns will be provided to guide developers on how to leverage Rails Engines' reusability and flexibility without sacrificing maintainability.
Para desenvolver um site institucional simples ou um hotsite pequeno, não é preciso muito mais que um pouco de HTML, um ou dois arquivos de CSS, alguns arquivos de JavaScript, e um sistema de CMS. No entanto, à medida que a complexidade de um site aumenta, o código passa a se tornar cada vez mais extenso, complexo, difícil de ser organizado, e projeto acaba virando um grande "code spaghetti".
Para garantir que isso não aconteça, é necessário implementar uma estrutura sólida para o HTML, CSS e JavaScript, de modo que os componentes da aplicação funcionem independentemente e sejam facilmente mantidos e modificados. Nesta palestra, mostrei como elaborar uma arquitetura de front-end que sustente uma aplicação de larga escala.
Ever wondered how to get rid of that spaghetti, single-filed JavaScript code? Wouldn't it be nice if you could write maintainable modules, easily test them, port them to different projects, handle its library dependencies, and have them decoupled from other modules?
In this talk, we'll see how using the AMD API and an event-driven design will help taming an application's JavaScript code and scaling it to the future and beyond.
This talk covers a successful utilization of Rails Engines to share features that cut across the layers of MVC in different Rails 3 projects. Rails Engines thus provide the best of both worlds: improved productivity by reusing MVC code (including assets like Javascript, CSS, and Images) and better flexibility by allowing different applications to customize behavior as needed without reliance on application-dependent conditionals. Rails Engine patterns will be provided to guide developers on how to leverage Rails Engines' reusability and flexibility without sacrificing maintainability.
Para desenvolver um site institucional simples ou um hotsite pequeno, não é preciso muito mais que um pouco de HTML, um ou dois arquivos de CSS, alguns arquivos de JavaScript, e um sistema de CMS. No entanto, à medida que a complexidade de um site aumenta, o código passa a se tornar cada vez mais extenso, complexo, difícil de ser organizado, e projeto acaba virando um grande "code spaghetti".
Para garantir que isso não aconteça, é necessário implementar uma estrutura sólida para o HTML, CSS e JavaScript, de modo que os componentes da aplicação funcionem independentemente e sejam facilmente mantidos e modificados. Nesta palestra, mostrei como elaborar uma arquitetura de front-end que sustente uma aplicação de larga escala.
Ever wondered how to get rid of that spaghetti, single-filed JavaScript code? Wouldn't it be nice if you could write maintainable modules, easily test them, port them to different projects, handle its library dependencies, and have them decoupled from other modules?
In this talk, we'll see how using the AMD API and an event-driven design will help taming an application's JavaScript code and scaling it to the future and beyond.
Simple C arm construction for PCNL puncture simulation .
Interpretation ,Demonstration Evolution ,
https://youtu.be/Pzx5lSQQOU0
https://youtu.be/Ucfe99z3kHg
https://youtu.be/axD0-SklFMw
https://youtu.be/XAXvcciwJJU
Magento Live Australia 2016: Request FlowVrann Tulika
As a web application, Magento 2’s web request processing flow is similar to all other web framework flows, but offers more extension points to third-party developers. In this session, we will walk through a web request path in the Magento 2 application, from index.php to browser JS application, and will look at extension points available on that path.
Leverage patterns of large-scale JS – such as modules, publish-subscribe and delegation – to achieve extreme performance without sacrificing maintainability.
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...OdessaJS Conf
Are you ready for production? Are you sure? Is your application prefetchable? Is it readable for search engine robots? Will it fit into Content Delivery Network? Do you want to make it even faster? Meet the Server-Side Rendering concept. Learn how to bring first meaningful paint immediately, work with server-side Angular code, optimize API calls and more!
Creating your own framework on top of Symfony2 ComponentsDeepak Chandani
Symfony is a set of reusable standalone PHP components that can be used to solve many web dev problems. We will pick some of the important components (bricks) & will create our own framework on top of those bricks.
Capistrano is an open source tool for running scripts on multiple servers. It’s primary use is for easily deploying applications. While it was built specifically for deploying Rails apps, it’s pretty simple to customize it to deploy other types of applications.
capifony is a deployment recipes collection that works with both symfony and Symfony2 applications.
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
HA websites are where the rubber meets the road - at 200km/h. Traditional separation of dev and ops just doesn't cut it.
Everything is related to everything. Code relies on performant and resilient infrastructure, but highly performant infrastructure will only get a poorly written application so far. Worse still, root cause analysis in HA sites will more often than not identify problems that don't clearly belong to either devs or ops.
The two options are collaborate or die.
This talk will introduce 3 core principles for improving collaboration between operations and development teams: consistency, repeatability, and visibility. These principles will be investigated with real world case studies and associated technologies audience members can start using now. In particular, there will be a focus on:
- fast provisioning of test environments with configuration management
- reliable and repeatable automated deployments
- application and infrastructure visibility with statistics collection, logging, and visualisation
Slides from my talk on #ruby-mg meeting.
Intro about how we in catars.me are using postgREST to create fast and simple API that can be represented with various mithril.js components.
Similar to feature flagging with rails engines v0.2 (20)
Build and maintain large Ruby applications 2023Enrico Teotti
Slides from 2023/03/09 NYC.rb
A presentation about managing large Ruby applications using gems.
Here's an example repository: https://github.com/agenteo/lab-best_health
Find more blog posts I wrote (in 2016) on the topic here: https://teotti.com/create-dependency-structures-with-local-ruby-gems/
and here https://teotti.com/topics/maintainability/
Build and maintain large ruby applications Ruby Conf Australia 2016Enrico Teotti
This presentation will talk about the challenges of building large Ruby web applications and how to maintain existing ones.
I will use examples adapted from real applications that I worked on during my 10 years of experience with Ruby outlining: technical limitations of the language, how to use a modular dependency structure to enforce boundaries in complex domains.
A presentation exploring our mindsets, offering my take on the research lead by Carol Dweck and her students, motivated after watching Linda Rising's Agile mindset.
ACEP Magazine edition 4th launched on 05.06.2024Rahul
This document provides information about the third edition of the magazine "Sthapatya" published by the Association of Civil Engineers (Practicing) Aurangabad. It includes messages from current and past presidents of ACEP, memories and photos from past ACEP events, information on life time achievement awards given by ACEP, and a technical article on concrete maintenance, repairs and strengthening. The document highlights activities of ACEP and provides a technical educational article for members.
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
Low power architecture of logic gates using adiabatic techniquesnooriasukmaningtyas
The growing significance of portable systems to limit power consumption in ultra-large-scale-integration chips of very high density, has recently led to rapid and inventive progresses in low-power design. The most effective technique is adiabatic logic circuit design in energy-efficient hardware. This paper presents two adiabatic approaches for the design of low power circuits, modified positive feedback adiabatic logic (modified PFAL) and the other is direct current diode based positive feedback adiabatic logic (DC-DB PFAL). Logic gates are the preliminary components in any digital circuit design. By improving the performance of basic gates, one can improvise the whole system performance. In this paper proposed circuit design of the low power architecture of OR/NOR, AND/NAND, and XOR/XNOR gates are presented using the said approaches and their results are analyzed for powerdissipation, delay, power-delay-product and rise time and compared with the other adiabatic techniques along with the conventional complementary metal oxide semiconductor (CMOS) designs reported in the literature. It has been found that the designs with DC-DB PFAL technique outperform with the percentage improvement of 65% for NOR gate and 7% for NAND gate and 34% for XNOR gate over the modified PFAL techniques at 10 MHz respectively.
A review on techniques and modelling methodologies used for checking electrom...nooriasukmaningtyas
The proper function of the integrated circuit (IC) in an inhibiting electromagnetic environment has always been a serious concern throughout the decades of revolution in the world of electronics, from disjunct devices to today’s integrated circuit technology, where billions of transistors are combined on a single chip. The automotive industry and smart vehicles in particular, are confronting design issues such as being prone to electromagnetic interference (EMI). Electronic control devices calculate incorrect outputs because of EMI and sensors give misleading values which can prove fatal in case of automotives. In this paper, the authors have non exhaustively tried to review research work concerned with the investigation of EMI in ICs and prediction of this EMI using various modelling methodologies and measurement setups.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
10. ● are ruby gems
● are special ruby gems that provide extra
behaviour (models, views, routes, rake
tasks) to a Rails application
● they can be hosted on a gemserver or
they can live inside your repository
● can be tested in isolation
rails engines
33. group :admin_app do
path 'components' do
gem 'admin_ui'
gem 'legacy_migration'
end
end
group :public_app do
path 'components' do
gem 'public_ui'
end
end
Gemfile
http://teotti.com/reduce-memory-footprint-requiring-portions-of-your-component-based-rails-applications/
http://teotti.com/gemfiles-hierarchy-in-ruby-on-rails-component-based-architecture/
37. Gem::Specification.new do |s|
# ... other fields up here
s.name = "admin_ui"
s.add_dependency "rails", "~> 4.1.1"
s.add_dependency 'jquery-rails'
s.add_dependency 'mongoid'
s.add_dependency 'faraday'
s.add_dependency "domain_logic"
s.add_dependency "shared_ui"
s.add_development_dependency 'byebug'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'rspec-rails', '2.99.0'
s.add_development_dependency 'vcr'
s.add_development_dependency 'webmock'
s.add_development_dependency 'capybara'
s.add_development_dependency 'poltergeist'
end
admin_ui.gemspec
38. Gem::Specification.new do |s|
# ... other fields up here
s.name = "admin_ui"
s.add_dependency "rails", "~> 4.1.1"
s.add_dependency 'jquery-rails'
s.add_dependency 'mongoid'
s.add_dependency 'faraday'
s.add_dependency "domain_logic"
s.add_dependency "shared_ui"
s.add_development_dependency 'byebug'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'rspec-rails', '2.99.0'
s.add_development_dependency 'vcr'
s.add_development_dependency 'webmock'
s.add_development_dependency 'capybara'
s.add_development_dependency 'poltergeist'
end
admin_ui/admin_ui.gemspec
39. source "https://rubygems.org"
gem 'domain_logic', path: '../domain_logic'
gem 'shared_ui', path: '../shared_ui'
# Declare your gem's dependencies in admin_ui.gemspec.
# Bundler will treat runtime dependencies like base
dependencies, and
# development dependencies will be added by default to the :
development group.
gemspec
admin_ui/Gemfile
53. Failures:
1) Staff booking a cargo booking a cargo fitting a pending voyage
Failure/Error: visit '/admin/cargos'
LoadError:
No such file to load -- admin_ui/domain_logic/application_controller
# ./engines/admin_ui/app/controllers/admin_ui/cargos_controller.rb:1:in `<top (required)>'
# ./spec/features/book_cargo_spec.rb:12:in `block (2 levels) in <top (required)>'
Finished in 0.03067 seconds (files took 1.85 seconds to load)
2 examples, 1 failure
scaffolding and other generators
54. Failures:
1) Staff booking a cargo booking a cargo fitting a pending voyage
Failure/Error: visit '/admin/cargos'
RuntimeError:
Circular dependency detected while autoloading constant AdminUi::AdminUi::CargosHelper
# ./engines/admin_ui/app/controllers/admin_ui/application_controller.rb:2:in `<module:AdminUi>'
# ./engines/admin_ui/app/controllers/admin_ui/application_controller.rb:1:in `<top (required)>'
# ./engines/admin_ui/app/controllers/admin_ui/cargos_controller.rb:1:in `<top (required)>'
# ./spec/features/book_cargo_spec.rb:12:in `block (2 levels) in <top (required)>'
scaffolding and other generators
55. Failures:
1) Staff booking a cargo booking a cargo fitting a pending voyage
Failure/Error: visit '/admin/cargos'
ActionView::Template::Error:
undefined local variable or method `new_domain_logic_cargo_path' for #<#<Class:0x007fb38887bb38>:0x007fb388873690>
# ./engines/admin_ui/app/views/admin_ui/cargos/index.html.erb:29:in
`_engines_admin_ui_app_views_admin_ui_cargos_index_html_erb__4343322268368929370_70204533119300'
# ./spec/features/book_cargo_spec.rb:12:in `block (2 levels) in <top (required)>'
scaffolding and other generators
56. fang:domain_logic agenteo$ rails generate mongoid:config
/Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/mongoid-4.0.0/lib/rails/generators/mongoid/config/config_generator.rb:16:in `app_name': undefined
method `parent' for nil:NilClass (NoMethodError)
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/railties-4.1.4/lib/rails/generators.rb:157:in `invoke'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/railties-4.1.4/lib/rails/commands/generate.rb:11:in `<top (required)>'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/railties-4.1.4/lib/rails/engine/commands.rb:19:in `require'
from /Users/agenteo/.rvm/gems/ruby-2.1.2@worldwide_shipping/gems/railties-4.1.4/lib/rails/engine/commands.rb:19:in `<top (required)>'
from bin/rails:12:in `require'
from bin/rails:12:in `<main>'
mongoid generators