The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms for those who already suffer from conditions like depression and anxiety.
The document discusses the Slim microframework for PHP. It provides an overview of Slim, describing how it is used to quickly write REST APIs. It covers installing Slim, using the Application class as the entry point, and handling requests and responses. Key aspects covered include registering routes, accessing request headers and body, setting response status and headers, and returning JSON responses.
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
The document contains information about OpenAPI/Swagger including:
- Members of the OpenAPI initiative including organizations from Oregon, São Paulo, and Frankfurt.
- Details about the Swagger specification and examples of using Swagger code generation to generate API client code in C# from a Swagger specification. The generated code includes models, API interfaces, and an API client to call the API.
The document provides an overview of the CakePHP view layer and its components. It discusses the presentation layer, template files, layouts, views, elements, helpers, and specific helpers like HtmlHelper and FormHelper. The view layer consists of layouts, views, elements, and helpers. Layouts wrap around views and contain common site elements. Views display unique content for each page. Elements contain reusable code snippets. Helpers provide logic and help generate forms, pagination, and other common code.
The RequestDispatcher interface in Java allows servlets to dispatch or forward requests to other resources on the server like HTML files, JSP pages, or other servlets. It provides two main methods - forward() to forward a request and include() to include the response of a resource in the current response. The getRequestDispatcher() method of the ServletRequest interface returns a RequestDispatcher object that can then be used to call the forward() or include() methods, passing the request and response objects. An example is provided of a login servlet that uses RequestDispatcher to forward successfully authenticated requests to a welcome servlet or include an error message on failed authentication.
Codeigniter : Two Step View - Concept Implementation
This document describes implementing a two-step view concept in CodeIgniter by using output buffering. It involves three main components: 1) an initialization hook to start output buffering, 2) a helper to generate the two-step view content and load it into a layout view, and 3) a layout view to echo the content. The helper gets the buffered content, loads a view to generate the content string, loads the layout view and passes the content, and the layout view echoes the content within the HTML structure. This allows separating view generation and rendering for a cleaner separation of logic and presentation.
This document discusses the WordPress REST API, which allows consuming and modifying WordPress data via a standards-compliant JSON REST API from within WordPress or another application. It provides examples of using the API to get posts, parse responses with Handlebars, and build a JavaScript client. The REST API offers advantages like decoupling the front-end from WordPress, and allows any front-end developer to work on a WordPress-powered site. It is currently a plugin but will be included in WordPress core.
This document outlines a course on PHP web services. It covers connecting to remote web services using CURL and Guzzle, creating REST and SOAP APIs, and consuming web services. The introduction defines web services and common types like SOAP and REST. Part 1 discusses JSON and encoding/decoding data. Part 2 focuses on connecting to external APIs using CURL and handling errors.
REST is an alternate and simpler approach for implementing WebServices. It is based on the HTTP protocol and hence leverages a lot of existing infrastructures. It uses an uniform interface thus making it easy to build client applications. In this session we will look at the fundamental concepts behind REST (Resource, URI, Stateless Conversation ..) and how to apply it in the context of a real applcation. We will also discuss the pros & cons of RESTful vs Soap based webservices. We will discuss the design of RESTful application and then look at how to implement it using Spring MVC.
The first of its kind Web Technology Conference on Open Source Technology, WebOSS '07 was organised in Kolkata on Sat, 13th Oct 07 and I spoke at the event as one of the participants on "Building Applications using AJAX". Here I will share my presentation.
On February 18th, 2010 was O'Reilly's "Exploring Rails 3" online conference and these are Gregg Pollack's slides. They are by no means a complete record of improvements in Rails 3, but they should serve to get your appetite wet.
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Explains how to use the Slim PHP micro-framework to quickly deploy a REST API. Includes sample code to implement common API requirements, such as authentication, request logging and multi-format support.
The document discusses building RESTful applications with Spring MVC. It covers the pillars of REST including resources, URIs, HTTP methods, and representations. It provides examples of modeling resources as controllers and mapping HTTP methods to controller actions. It also discusses content negotiation, supporting different data representations like JSON, XML and RSS using Spring views.
Zend Framework is a PHP web application framework that uses a model-view-controller (MVC) architecture. It provides modules for common tasks like database access and Google APIs. The framework encourages separating code into models, views, and controllers. It also includes tools for creating projects, actions, forms and connecting to databases to build full-featured web applications.
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
This document discusses using AngularJS to build single page applications for WordPress admin interfaces that use the WordPress REST API. It covers why this approach is beneficial, how to set it up using Angular routing, controllers, factories and HTTP requests to interact with the REST API. Benefits mentioned include making WordPress interfaces more modern and dynamic, empowering others to build plugins in a decentralized way, and the ease of transitioning to software as a service models. The document encourages readers to learn Angular and check out additional resources on the topic.
Rails 3 provides a concise overview of changes in Rails 3 including maintaining MVC structure and RESTful routing while improving areas like file structure, block helpers, routing and constraints, ActiveRecord querying, resources routing, and ActionMailer delivery. Key changes include a more Rack-like implementation, chainable ActiveRecord scopes, and pagination and layout support in ActionMailer.
Catalyst is a web framework for Perl that allows developers to build dynamic web applications in a modular, reusable way. It utilizes common Perl techniques like Moose, DBIx::Class and Template Toolkit to handle tasks like object modeling, database access and view rendering. Catalyst applications can be built in a model-view-controller style to separate application logic, data access and presentation layers. This framework provides a standard way to write reusable code and build web UIs for tasks like system administration and automation.
CakePHP 2.0 introduces major enhancements such as decoupling request and response handling, separating authentication logic into its own class, and allowing dynamic loading of components, helpers and behaviors through a new ObjectCollection class. It also resolves various issues like improving security, making pagination support GET requests, and allowing more flexible routes. The new version aims to improve decoupling, flexibility and performance while maintaining backwards compatibility.
This talk was given at the Dutch PHP Conference 2011 and details the use of Comet (aka reverse ajax or ajax push) technologies and the importance of websockets and server-sent events. More information is available at http://joind.in/3237.
Cookies and sessions allow storing and retrieving data across multiple requests in PHP. Cookies are stored on the client side while sessions are stored on the server side. Cookies are created using the setcookie() function and retrieved using the $_COOKIE superglobal array. Sessions are created using the session_start() function and data is stored in the $_SESSION superglobal array. Both cookies and sessions can be deleted by unset() or by letting them expire.
PHP is a server-side scripting language used for web development. It allows developers to embed PHP code into HTML pages which is executed on the server to produce dynamic web pages. Some key points about PHP include:
- It is free, open source, and runs on many platforms including Windows and Linux.
- PHP code is easy to embed into HTML and syntax uses opening and closing tags.
- It can be used to connect to databases like MySQL and Oracle to dynamically display data on web pages.
- Common PHP functions include echo to output content, if statements for conditional logic, and arrays to store multiple values.
- Cookies can be used to store and retrieve data on the client-side browser to
The document provides an introduction and overview of ASP.NET MVC, covering topics such as routing, controllers, actions, views, and passing data between controllers and views. It compares ASP.NET MVC to traditional ASP.NET WebForms, outlines the MVC architecture and project structure, and describes how routing maps URLs to controller actions. Key aspects of controllers, views, partial views, HTML helpers, and view engines are also summarized.
The document provides an overview of CGI (Common Gateway Interface) and how it enables dynamic web content. It discusses how CGI works, alternatives like PHP and Java servlets, configuring Apache web server for CGI, programming CGI applications using Perl and the CGI.pm module, handling input/output and errors. It also includes an example CGI application in Perl for counting button clicks using sessions and cookies to manage state.
The document provides an overview of controllers in CakePHP and their role in the MVC framework. It discusses how controllers parse request URLs, interact with models to access data and pass it to views. It then demonstrates how to add common controller actions like create, read, update and delete to manage item data in a catalog application. These actions include querying models, validating input, redirecting users and displaying messages.
This document provides an overview of RESTful APIs and how to build them using Laravel. It defines REST as an architectural style for designing networked applications that use HTTP to perform CRUD operations on resources. The key aspects of RESTful APIs covered include using HTTP verbs like GET, POST, PUT and DELETE; including HTTP headers and status codes; being stateless; and commonly returning JSON or XML responses. The document also discusses authentication methods like OAuth and JSON web tokens that can be used to secure REST APIs. Finally, it outlines the steps that will be covered to build a RESTful API using Laravel, including creating routes, migrations, seeders, models, controllers and request validation.
This document discusses using CodeIgniter hooks to implement access control lists (ACL) for authorization instead of hardcoding checks in controllers. It describes how to define a pre_controller hook that checks user permissions against defined roles and redirects unauthorized users. An Accesscheck class and permissions array centralize the ACL logic, allowing role-based access control without modifying core files. This provides a simpler, more flexible alternative to ACL implementations in other frameworks.
The document discusses the Slim microframework for PHP. It provides an overview of Slim, describing how it is used to quickly write REST APIs. It covers installing Slim, using the Application class as the entry point, and handling requests and responses. Key aspects covered include registering routes, accessing request headers and body, setting response status and headers, and returning JSON responses.
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
The document contains information about OpenAPI/Swagger including:
- Members of the OpenAPI initiative including organizations from Oregon, São Paulo, and Frankfurt.
- Details about the Swagger specification and examples of using Swagger code generation to generate API client code in C# from a Swagger specification. The generated code includes models, API interfaces, and an API client to call the API.
The document provides an overview of the CakePHP view layer and its components. It discusses the presentation layer, template files, layouts, views, elements, helpers, and specific helpers like HtmlHelper and FormHelper. The view layer consists of layouts, views, elements, and helpers. Layouts wrap around views and contain common site elements. Views display unique content for each page. Elements contain reusable code snippets. Helpers provide logic and help generate forms, pagination, and other common code.
The RequestDispatcher interface in Java allows servlets to dispatch or forward requests to other resources on the server like HTML files, JSP pages, or other servlets. It provides two main methods - forward() to forward a request and include() to include the response of a resource in the current response. The getRequestDispatcher() method of the ServletRequest interface returns a RequestDispatcher object that can then be used to call the forward() or include() methods, passing the request and response objects. An example is provided of a login servlet that uses RequestDispatcher to forward successfully authenticated requests to a welcome servlet or include an error message on failed authentication.
This document describes implementing a two-step view concept in CodeIgniter by using output buffering. It involves three main components: 1) an initialization hook to start output buffering, 2) a helper to generate the two-step view content and load it into a layout view, and 3) a layout view to echo the content. The helper gets the buffered content, loads a view to generate the content string, loads the layout view and passes the content, and the layout view echoes the content within the HTML structure. This allows separating view generation and rendering for a cleaner separation of logic and presentation.
This document discusses the WordPress REST API, which allows consuming and modifying WordPress data via a standards-compliant JSON REST API from within WordPress or another application. It provides examples of using the API to get posts, parse responses with Handlebars, and build a JavaScript client. The REST API offers advantages like decoupling the front-end from WordPress, and allows any front-end developer to work on a WordPress-powered site. It is currently a plugin but will be included in WordPress core.
This document outlines a course on PHP web services. It covers connecting to remote web services using CURL and Guzzle, creating REST and SOAP APIs, and consuming web services. The introduction defines web services and common types like SOAP and REST. Part 1 discusses JSON and encoding/decoding data. Part 2 focuses on connecting to external APIs using CURL and handling errors.
Building RESTful applications using Spring MVCIndicThreads
REST is an alternate and simpler approach for implementing WebServices. It is based on the HTTP protocol and hence leverages a lot of existing infrastructures. It uses an uniform interface thus making it easy to build client applications. In this session we will look at the fundamental concepts behind REST (Resource, URI, Stateless Conversation ..) and how to apply it in the context of a real applcation. We will also discuss the pros & cons of RESTful vs Soap based webservices. We will discuss the design of RESTful application and then look at how to implement it using Spring MVC.
The first of its kind Web Technology Conference on Open Source Technology, WebOSS '07 was organised in Kolkata on Sat, 13th Oct 07 and I spoke at the event as one of the participants on "Building Applications using AJAX". Here I will share my presentation.
On February 18th, 2010 was O'Reilly's "Exploring Rails 3" online conference and these are Gregg Pollack's slides. They are by no means a complete record of improvements in Rails 3, but they should serve to get your appetite wet.
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswanivvaswani
Explains how to use the Slim PHP micro-framework to quickly deploy a REST API. Includes sample code to implement common API requirements, such as authentication, request logging and multi-format support.
The document discusses building RESTful applications with Spring MVC. It covers the pillars of REST including resources, URIs, HTTP methods, and representations. It provides examples of modeling resources as controllers and mapping HTTP methods to controller actions. It also discusses content negotiation, supporting different data representations like JSON, XML and RSS using Spring views.
Zend Framework is a PHP web application framework that uses a model-view-controller (MVC) architecture. It provides modules for common tasks like database access and Google APIs. The framework encourages separating code into models, views, and controllers. It also includes tools for creating projects, actions, forms and connecting to databases to build full-featured web applications.
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Caldera Labs
This document discusses using AngularJS to build single page applications for WordPress admin interfaces that use the WordPress REST API. It covers why this approach is beneficial, how to set it up using Angular routing, controllers, factories and HTTP requests to interact with the REST API. Benefits mentioned include making WordPress interfaces more modern and dynamic, empowering others to build plugins in a decentralized way, and the ease of transitioning to software as a service models. The document encourages readers to learn Angular and check out additional resources on the topic.
Rails 3 provides a concise overview of changes in Rails 3 including maintaining MVC structure and RESTful routing while improving areas like file structure, block helpers, routing and constraints, ActiveRecord querying, resources routing, and ActionMailer delivery. Key changes include a more Rack-like implementation, chainable ActiveRecord scopes, and pagination and layout support in ActionMailer.
Catalyst is a web framework for Perl that allows developers to build dynamic web applications in a modular, reusable way. It utilizes common Perl techniques like Moose, DBIx::Class and Template Toolkit to handle tasks like object modeling, database access and view rendering. Catalyst applications can be built in a model-view-controller style to separate application logic, data access and presentation layers. This framework provides a standard way to write reusable code and build web UIs for tasks like system administration and automation.
CakePHP 2.0 introduces major enhancements such as decoupling request and response handling, separating authentication logic into its own class, and allowing dynamic loading of components, helpers and behaviors through a new ObjectCollection class. It also resolves various issues like improving security, making pagination support GET requests, and allowing more flexible routes. The new version aims to improve decoupling, flexibility and performance while maintaining backwards compatibility.
This talk was given at the Dutch PHP Conference 2011 and details the use of Comet (aka reverse ajax or ajax push) technologies and the importance of websockets and server-sent events. More information is available at http://joind.in/3237.
Cookies and sessions allow storing and retrieving data across multiple requests in PHP. Cookies are stored on the client side while sessions are stored on the server side. Cookies are created using the setcookie() function and retrieved using the $_COOKIE superglobal array. Sessions are created using the session_start() function and data is stored in the $_SESSION superglobal array. Both cookies and sessions can be deleted by unset() or by letting them expire.
PHP is a server-side scripting language used for web development. It allows developers to embed PHP code into HTML pages which is executed on the server to produce dynamic web pages. Some key points about PHP include:
- It is free, open source, and runs on many platforms including Windows and Linux.
- PHP code is easy to embed into HTML and syntax uses opening and closing tags.
- It can be used to connect to databases like MySQL and Oracle to dynamically display data on web pages.
- Common PHP functions include echo to output content, if statements for conditional logic, and arrays to store multiple values.
- Cookies can be used to store and retrieve data on the client-side browser to
The document provides an introduction and overview of ASP.NET MVC, covering topics such as routing, controllers, actions, views, and passing data between controllers and views. It compares ASP.NET MVC to traditional ASP.NET WebForms, outlines the MVC architecture and project structure, and describes how routing maps URLs to controller actions. Key aspects of controllers, views, partial views, HTML helpers, and view engines are also summarized.
The document provides an overview of CGI (Common Gateway Interface) and how it enables dynamic web content. It discusses how CGI works, alternatives like PHP and Java servlets, configuring Apache web server for CGI, programming CGI applications using Perl and the CGI.pm module, handling input/output and errors. It also includes an example CGI application in Perl for counting button clicks using sessions and cookies to manage state.
This document provides a list of 55 common PHP interview questions and their answers. Some key questions covered include: what PHP is and its uses, how to include files, the differences between include and require, how to declare arrays, use echo and print, create MySQL connections and queries, set and retrieve cookies and sessions, and common PHP functions like count(), in_array(), explode(), and trim(). The questions range from basic to more advanced topics and are meant to help candidates prepare for PHP interviews.
The document provides an overview of the MVC pattern and how it is implemented in Symfony. It discusses how Symfony separates code into models, views, and controllers and layers these components. It also describes common Symfony structures like modules, actions, and templates as well as tools like parameter holders, constants, and autoloading that are frequently used.
The document provides an overview of web services in Salesforce, specifically covering SOAP and REST web services. It defines SOAP and REST, compares the two approaches, and provides guidance on when to use each. It also covers how to create and consume SOAP web services in Salesforce, including exposing a SOAP web service publicly and making callouts to external web services. Security considerations for callouts like authentication and encryption are also briefly discussed.
OpenSocial aims to make the web more social by allowing developers to add social features to websites and applications. The OpenSocial APIs allow gadgets to access user profile data and enable social interactions through features like activities. Developers can focus on building engaging experiences while OpenSocial handles user management and relationships through standards-based gadget specifications and JavaScript APIs.
The document discusses extending service-oriented architecture (SOA) with REST and Web 2.0 principles. It defines representational state transfer (REST) and describes its characteristics, including being resource-centric, using uniform interfaces, and being stateless. It advocates designing SOAs in a RESTful way by following best practices like using standard HTTP methods and URIs to access resources.
This document provides an overview of Java servlets technology, including:
1. What Java servlets are and their main purposes and advantages such as portability, power, and integration with server APIs.
2. Key aspects of servlet architecture like the servlet lifecycle, the HttpServletRequest and HttpServletResponse objects, and how different HTTP methods map to servlet methods.
3. Examples of simple servlets that process parameters, maintain a session counter, and examples of deploying servlets in Eclipse IDE.
The document discusses using CGI::Application, Template::Toolkit, and DBIx::Class to create simple web applications in Perl. It provides an overview of MVC architecture and how these three modules separate code into the Model, View, and Controller components. It includes sample code for setting up a basic application using these modules, interacting with a database via DBIx::Class, and rendering views with Template::Toolkit.
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...Guillaume Laforge
Groovy is a dynamic language for the Java Virtual Machine that integrates with Java. Grails is a web framework built on Groovy that leverages existing Java technologies. The presentation discusses how Groovy's meta-programming capabilities, through its Meta Object Protocol, enable new patterns like dynamic finders that change how we approach common Java patterns like the Data Access Object and Service Locator.
The document provides an overview of model-view-controller (MVC) development using the CodeIgniter PHP framework. It discusses MVC patterns and variations, why CodeIgniter was chosen, CodeIgniter's implementation of MVC, basics of using CodeIgniter including its directory structure and core classes, and examples of building a basic web application and API with CodeIgniter.
ActiveWeb: Chicago Java User Group Presentationipolevoy
- ActiveWeb is a Java web framework that aims to make web programming fun and productive again through its simplicity, support for TDD, and immediate feedback.
- It provides convention over configuration routing and views, dependency injection with Guice, and integrates well with testing frameworks like allowing parameters to be passed to controllers and inspecting HTML responses.
- ActiveWeb has no XML configuration and aims to have as few dependencies as possible while still providing a full-stack framework for building RESTful web services and traditional MVC applications.
Similar to Designing CakePHP plugins for consuming APIs (20)
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 :
- Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants.
- REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2023 and the first deals of 2024.
7 Most Powerful Solar Storms in the History of Earth.pdfEnterprise Wired
Solar Storms (Geo Magnetic Storms) are the motion of accelerated charged particles in the solar environment with high velocities due to the coronal mass ejection (CME).
The Rise of Supernetwork Data Intensive ComputingLarry Smarr
Invited Remote Lecture to SC21
The International Conference for High Performance Computing, Networking, Storage, and Analysis
St. Louis, Missouri
November 18, 2021
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxSynapseIndia
Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Bert Blevins
Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.
Comparison Table of DiskWarrior Alternatives.pdfAndrey Yasko
To help you choose the best DiskWarrior alternative, we've compiled a comparison table summarizing the features, pros, cons, and pricing of six alternatives.
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
Quantum Communications Q&A with Gemini LLM. These are based on Shannon's Noisy channel Theorem and offers how the classical theory applies to the quantum world.
3. Types of CakePHP pluginsMini appsProvide full functionality you can include in your app e.g. blog, store locatorExtendersExtend your app with more functionality e.g. commentable & taggableEnhancersEnhance your apps existing functionality e.g. filterWrappersProvide functionality to access 3rd party APIs
5. My work so far has been mainly consuming RESTful APIs so this presentation and examples will focus on REST
6. But concepts illustrated in the design approach section later on can be applied to any protocolQuick intro to RESTREspresentational State Transfer“The largest known implementation of a system conforming to the REST architectural style is…” http://en.wikipedia.org/wiki/Representational_State_TransferThe World Wide WebClients and servers communicating via HTTPUses existing HTTP verbs (GET, POST etc)Acts on a resource (URI)
7. HTTPSend request<HTTP verb> <URI> HTTP/1.1<Header 1 name>: <Header 1 value>...<optional body>You’ll get some kind of response (hopefully)HTTP/1.1 <Status Code> <Status Message><Header 1 name>: <Header 1 value>...<optional body>
8. Simple HTTP GET Request & ResponseRequestGET http://www.example.com/index.html HTTP/1.1User-Agent: My Web BrowserResponseHTTP/1.1 200 OKContent-Type: text/htmlContent-Length: 70<html><head><title>My Web Page</title></head><body><h1>My Web Page</h1></body></html>
9. Simple HTTP POST Request & ResponseRequestPOST http://www.example.com/login HTTP/1.1Content-Type: application/x-www-form-urlencodedContent-Length: 38username=neilcrookes&password=abcd1234ResponseHTTP/1.1 301 Moved PermanentlyLocation: http://www.example.com/my_account
10. CakePHP’s HttpSocket Classcake/libs/http_socket.phpUsage: App::import(‘Core’, ‘HttpSocket’); $Http = new HttpSocket(); $response = $Http->request(array( ‘method’ => ‘POST’, ‘uri’ => array( ‘host’ => ‘example.com’, ‘path’ => ‘login’), ‘body’ => array( ‘username’ => ‘neilcrookes’, ‘password’ => ‘abcd1234’)));See HttpSocket::request property for defaults HttpSocketHandles creating, writing to and reading from sockets (because it extends CakeSocket)Constructs HTTP escaped, encoded requests from array parameters you send itParses HTTP response from the server intoStatusBodyCookiesCan handle Basic Auth (username:password@)
11. OAuthIn summary, it allows users of a service (e.g. Twitter) to authorize other parties (i.e. your application) access to their accounts on that service, without sharing their password with the other parties.In reality, it means:a little bit of handshaking between your app and the service provider to get various string tokensredirecting the user to the service in order for them to authorize your app to access their account, so the user only signs in to the service, not your app.the service provides you with a token you can persist and use to make authorized requests to their service on behalf of the userIn practice it’s just an extra header line (Authorization header) in the HTTP request which containssome arbitrary parameters e.g. timestampa token that identifies your application to the API providera signature string that signs the request and is a hash of various request parameters and the secret tokens you retrieved aboveUsed by e.g. Twitter & Google APIs
14. Traditional approach: DataSourceComplex DataSource containing all the logicCall methods on the DataSource directly from your models or controllersor as implied by the example Twitter DataSource in the cook book: access DataSource methods through your models but include most of the logic in the DataSourcehttp://book.cakephp.org/view/1077/An-ExampleWorks well for simple stuffThis is how I started implementing
15. However...Does not scale well for large APIsTwitter has ~100 API calls available, all with a wide variety of options and parameters. The cook book Twitter DataSource partially implements 2 API calls and is 86 linesDoes not exploit built-in CakePHP goodnessCallbacksValidationPaginationDoes not allow for multiple models (and therefore multiple schemas) to use the same DataSourceDidn’t feel right to me
16. So what does feel right?What operations are we actually doing?Reading dataCreating and updating dataDeleting datai.e. Find, save & deleteWhat type of classes in CakePHP provide these methods?
17. ModelsPhoto by memoflores, available under creative commonshttp://www.flickr.com/photos/memoflores/And what should models be?...
18. FAT!Photo by cstreetus, available under creative commonshttp://www.flickr.com/photos/cstreetus/Sorry but every other image I found through searching for “fat models” or “fat ladies” was completely inappropriate ;-)
19. So if we move our API calls into Model::find(), Model::save() and Model::delete() methodsIt feels like the right placeWe’re more familiar with interacting with theseWe can have lots of simple models classes to achieve scale, separation of concerns and different models can have different validation rules and schemas and we can collect them together in a pluginBut...
20. But what about CakePHP goodness?Triggering callbacksbeforeFind(), afterFind(), beforeSave(), afterSave(), beforeValidate(), beforeDelete(), afterDelete()Triggering validationHandling custom find typesIf we made the API calls directly in these methods and returned the response, to exploit this excellent built-in additional CakePHP functionality we’d have to trigger/code them manuallyWe’d be duplicating loads of code from CakePHP’s core Model class.Not very DRY
21. To understand the solution, we must understand CakePHP Model internalsModel methods like find(), save() and delete() accept various params such as conditions, data to save etcHandle custom find types for find() onlyHandle validation for save() onlyTrigger the before*() callbacksCall create(), read(), update() or delete() on that model’s DataSourceTrigger the after*() callbacksReturn the result
22. So what’s my solution for designing CakePHP plugins for consuming APIs?Plugin containing one model for each type of resource in the API e.g. TwitterStatus or YouTubeVideoModels implement find() (or actually more commonly just CakePHP custom find types), save() and delete() methods as appropriateThese methods set the details of the request, i.e. The array that represents an HTTP request that HttpSocket::request() methods expects (as we saw earlier in this presentation) in a request property of your model, then calls the same method on the parent object i.e. Model.Cont...
23. Solution continuedCakePHP Model class handles validation and custom find types, triggers callbacks etc then calls create(), read(), update() or delete() on the child model’s (your model’s) DataSource, and passes the model objectYour model’s useDbConfig property should be set to a custom DataSource that you also include in your pluginYour DataSource implements the appropriate CRUD method(s) and issues the API call described in the model’s requestproperty, and returns the results
24. Hmmm, sounds complicatedIt’s notI’ve written a REST DataSource you can use (see later)All you have to do is create a model that has find() or save() methods, in which you set a request property to an array expected by HttpSocket::request() and call the same method on the parent.
25. E.g. Creating a tweet<?phpclass TwitterStatus extends AppModel { public function save($data = null) { $this->request = array( 'uri' => array( 'host' => 'api.twitter.com', 'path' => '1/statuses/update.json'), 'body' => array( 'status' => $data['TwitterStatus']['text'])); return parent::save($data); }}?>
26. Which you call like thisClassRegistry::init('Twitter.TwitterStatus')->save(array( 'TwitterStatus' => array( 'text' => “Hello world!”)));... from anywhere you like in your CakePHP application, e.g. In your Post model afterSave() method, thus automatically creating a tweet every time you create a new post.
28. This diagram illustrates the flow through the methods an classes involved in creating a tweethttps://docs.google.com/drawings/edit?id=1Aht7huICl9bhl2hWRdM0VdoaBePpJ0kXkceyQpAR8os&hl=en_GB&authkey=CISSqJkN
29. In summaryBy designing plugins like this you’re providingSimple (1 line) method calls to API functionsThat are familiar to all CakePHP bakersAnd easy to documentYou also get to exploit CakePHP goodness such as validation and callbacks etcYou can have multiple models, one for each resource type on the API, each with it’s own schema (which the FormHelper uses) and validation rules