An introduction to Zend Framework 1.8 using Zend_Tool, Zend_Application, a simple DAO and a very simple model that uses that DAO.
In the end you have a fully working application
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
The document discusses quality assurance for PHP projects through implementing tools like Git or SVN with pre-commit hooks, PHP tools like PHPDepend and PHPUnit, and continuous integration servers like Jenkins. It provides an overview of how to set up these tools and implement common practices like pre-commit hooks, continuous integration, and deployment strategies.
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
This document discusses techniques for scaling web applications using Nginx, Memcached, PHP-FPM and APC. It introduces Nginx as an alternative to Apache for serving static files and routing requests to backend servers. PHP-FPM is presented as a way to run PHP processes separately from the web server for improved performance. Memcached is described as a fast caching solution to store frequently accessed content like database queries. APC provides opcode caching to speed up PHP execution. Benchmarking and monitoring tools like New Relic are recommended to identify bottlenecks.
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
Php Dependency Management with Composer ZendCon 2016Clark Everetts
A deep-dive for beginners into Composer, the dependency manager for PHP. Learn how Composer helps you obtain the components your applications depend upon, installs them into your project, and controls their update to newer versions.
Hans Lellelid introduces Phing, a build tool for PHP projects. Phing allows developers to automate tasks like configuring, packaging, deploying, testing, and more through XML build files and tasks. It is based on Apache Ant and provides capabilities like selecting files with patterns, transforming files, running PHPUnit tests, and packaging code. Phing aims to be a familiar PHP-based build tool that integrates well with PHP applications and development workflows.
Website deployment is a tedious and intricate task that lends itself to human error (oops, did I forget to update the DB schema?). Using Phing in conjunction with deployment techniques can greatly reduce the risk of human error and increase productivity. The presentation will cover using Phing to sync files, run tasks, migrate databases, target configuration, and other deployment techniques.
This document discusses coding style guidelines for PHP, CSS, JavaScript, and other front-end technologies. It recommends following established style guides like PSR-1 and PSR-2 for PHP coding style. For CSS and Sass, it suggests using PostCSS instead of compilers for readability and linting support. JavaScript recommendations include using Airbnb style guidelines for both ES5 and ES6, and leveraging tools like ESLint. Tools mentioned include EditorConfig, PHP Code Sniffer, PHP Coding Standards Fixer, Stylelint, and various PostCSS plugins.
Building and deploying PHP applications with PhingMichiel Rook
Slides for my talk at the PHP UK Conference 2012.
Some of the examples discussed during the talk can be found at http://www.touchdownconsulting.nl/conferences/phing-phpuk2012-examples.tgz
If you attended, please leave me some feedback at http://joind.in/4954 - thanks!
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Zend con 2016 bdd with behat for beginnersAdam Englander
Learn the basics of behavioral driven development (BDD) with Behat to build high quality and well documented applications. You'll learn how BDD can help you deliver greater business value more efficiently while accurately documenting the functionality of your application along the way. You'll learn how to utilize Behat as your BDD tool. With Behat, you'll create tests for the features in your application by utilizing a natural language syntax called Gherkin backed by PHP code to execute the steps executed in the feature's scenarios.
This will be a hands-on tutorial. You'll learn how to implement BDD for a web application. This will include utilizing Selenium WebDriver for real world multi-browser testing including introductions to Selenium Grid and hosted integration services utilizing Selenium.
Ant is a Java-based build tool that is well-suited for automation and scripting tasks. Phing is a PHP-based build tool that is similar to Ant. Both tools use XML configuration files to define projects, targets, tasks, properties and types. Common tasks include executing commands, copying/deploying files, testing, and more. Properties can be used to define variables. Filesets are used to select files. Ant and Phing can both be integrated with tools like Jenkins to enable continuous integration.
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
The web is growing fast and online games and other compute-intensive applications expand their user-bases every day. These trends create a growing demand on performance in JavaScript applications. Even though JavaScript has benefited from huge performance improvements in recent years, there is great potential for an even faster web. Browser technologies such as asm.js or Google’s NativeClient enable near-native performance in browsers. More recent efforts led to the specification of WebAssembly, the future vendor-independent standard for native webapps. This talk takes a closer look at Emscripten, a toolchain that transpiles C++ to asm.js. The talk answers questions regarding performance and about the integration with the popular CMake build system.
Deploying an application can be tedious and error-prone. Using Phing’s rich set of tasks, easy extension points and simple XML build files to handle the packaging, deploying and testing of your application can help you save time and increase quality. After this talk you will know how to use Phing and how to tailor it to your specific situation. A number of demonstrations will help illustrate transformation, file synchronization, database migration and other real-world use cases.
Phing - A PHP Build Tool (An Introduction)Michiel Rook
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
These are slides from my talk during the Unconference at the Dutch PHP 2011 Conference (Amsterdam). During this talk I gave an overview of the features and how to use, adapt and extend Phing.
This document provides an overview of new features and changes in Maven 3.0, including improved compatibility, speed, efficiency and extensibility compared to previous versions. It discusses updates to the POM format like additional validations and the consolidation of profiles. New capabilities in Maven 3.0 include parallel builds, artifact resolution caching, and changes to plugin behavior. The document also introduces mvnshell and polyglot Maven, which expand the Maven command-line and allow projects to use alternative DSLs.
This document discusses using Gearman for work queue processing in PHP. It begins with an introduction to Gearman and how it allows work to be distributed across languages and machines. Several examples are provided of using Gearman in PHP for both client and worker applications. CodeIgniter integration is also demonstrated. Overall the document provides an overview of Gearman and examples of implementing work queues in PHP using this system.
Composer - Package Management for PHP. Silver Bullet?Kirill Chebunin
Modern package management for PHP projects.
http://packagist.org/
http://github.com/composer/composer
This document discusses practical PHP deployment with Jenkins. It begins with an introduction of the author and overview of continuous integration and deployment. The main topics covered are using Jenkins for continuous integration and deployment of PHP applications, with a demonstration of deploying a 500K line Pimcore CMS project using Jenkins jobs for source control, testing, packaging, and deployment. Best practices and architectures involving Git, Jenkins and Zend Server are also discussed.
This document discusses Phing, an open source build tool for PHP projects that is based on Apache Ant. Phing uses XML build files to define targets and tasks for automating build processes like deployment, testing, documentation generation, and more. It provides features like file manipulation, code analysis, packaging, and integration with tools like Subversion, PHPUnit, and PhpDocumentor. The document provides examples of how to install, configure, and use Phing to implement automated build processes for PHP projects.
This document provides troubleshooting information for Puppet failures. It begins with common failure messages and their potential causes such as "can't find puppet", "can't connect to puppet", and "can't get certificate". It then covers tools for investigating failures like the Puppet REST API, debugging Puppet compiles and applies, and checking for issues via notify resources and debug scripts. The document outlines techniques for locating problems with nodes, workers, variables, and resources conflicting or going stale.
This document summarizes Hans Lellelid's presentation on Phing, an open source build tool for PHP projects that is modeled after Apache Ant. The presentation covers Phing fundamentals like creating build files and tasks, as well as more advanced topics like customizing Phing through extensions. It provides examples of using Phing for tasks like file copying, database operations, documentation generation, and unit testing. The goal is to demonstrate how Phing can be used to automate common build, testing and deployment tasks.
The document discusses how to get started with the Zend Framework by installing it, setting up Zend Tool, creating a new Zend Framework project, and configuring a virtual host to view the new project. Key steps include downloading and extracting the Zend Framework files, installing and configuring Zend Tool, using Zend Tool to generate a new project skeleton, copying the Zend Framework library files into the project, and editing configuration files to set up the virtual host.
This document provides an overview and introduction to the Zend Framework. It begins with introductions of the speaker and an outline of topics to be covered, which include basics of the Zend Framework, its model-view-controller implementation, components and libraries, and what's new. It then discusses what the Zend Framework is, how it was developed, its requirements, flexible licensing, and benefits of using it. The rest of the document explains key aspects of the Zend Framework including its front controller, action controllers, views, models, and how they work together in the traditional MVC pattern. It also provides examples of controllers, views, models, and customizing the framework.
This document discusses coding style guidelines for PHP, CSS, JavaScript, and other front-end technologies. It recommends following established style guides like PSR-1 and PSR-2 for PHP coding style. For CSS and Sass, it suggests using PostCSS instead of compilers for readability and linting support. JavaScript recommendations include using Airbnb style guidelines for both ES5 and ES6, and leveraging tools like ESLint. Tools mentioned include EditorConfig, PHP Code Sniffer, PHP Coding Standards Fixer, Stylelint, and various PostCSS plugins.
Building and deploying PHP applications with PhingMichiel Rook
Slides for my talk at the PHP UK Conference 2012.
Some of the examples discussed during the talk can be found at http://www.touchdownconsulting.nl/conferences/phing-phpuk2012-examples.tgz
If you attended, please leave me some feedback at http://joind.in/4954 - thanks!
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Zend con 2016 bdd with behat for beginnersAdam Englander
Learn the basics of behavioral driven development (BDD) with Behat to build high quality and well documented applications. You'll learn how BDD can help you deliver greater business value more efficiently while accurately documenting the functionality of your application along the way. You'll learn how to utilize Behat as your BDD tool. With Behat, you'll create tests for the features in your application by utilizing a natural language syntax called Gherkin backed by PHP code to execute the steps executed in the feature's scenarios.
This will be a hands-on tutorial. You'll learn how to implement BDD for a web application. This will include utilizing Selenium WebDriver for real world multi-browser testing including introductions to Selenium Grid and hosted integration services utilizing Selenium.
Ant is a Java-based build tool that is well-suited for automation and scripting tasks. Phing is a PHP-based build tool that is similar to Ant. Both tools use XML configuration files to define projects, targets, tasks, properties and types. Common tasks include executing commands, copying/deploying files, testing, and more. Properties can be used to define variables. Filesets are used to select files. Ant and Phing can both be integrated with tools like Jenkins to enable continuous integration.
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
The web is growing fast and online games and other compute-intensive applications expand their user-bases every day. These trends create a growing demand on performance in JavaScript applications. Even though JavaScript has benefited from huge performance improvements in recent years, there is great potential for an even faster web. Browser technologies such as asm.js or Google’s NativeClient enable near-native performance in browsers. More recent efforts led to the specification of WebAssembly, the future vendor-independent standard for native webapps. This talk takes a closer look at Emscripten, a toolchain that transpiles C++ to asm.js. The talk answers questions regarding performance and about the integration with the popular CMake build system.
Deploying an application can be tedious and error-prone. Using Phing’s rich set of tasks, easy extension points and simple XML build files to handle the packaging, deploying and testing of your application can help you save time and increase quality. After this talk you will know how to use Phing and how to tailor it to your specific situation. A number of demonstrations will help illustrate transformation, file synchronization, database migration and other real-world use cases.
Phing - A PHP Build Tool (An Introduction)Michiel Rook
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
These are slides from my talk during the Unconference at the Dutch PHP 2011 Conference (Amsterdam). During this talk I gave an overview of the features and how to use, adapt and extend Phing.
This document provides an overview of new features and changes in Maven 3.0, including improved compatibility, speed, efficiency and extensibility compared to previous versions. It discusses updates to the POM format like additional validations and the consolidation of profiles. New capabilities in Maven 3.0 include parallel builds, artifact resolution caching, and changes to plugin behavior. The document also introduces mvnshell and polyglot Maven, which expand the Maven command-line and allow projects to use alternative DSLs.
This document discusses using Gearman for work queue processing in PHP. It begins with an introduction to Gearman and how it allows work to be distributed across languages and machines. Several examples are provided of using Gearman in PHP for both client and worker applications. CodeIgniter integration is also demonstrated. Overall the document provides an overview of Gearman and examples of implementing work queues in PHP using this system.
Composer - Package Management for PHP. Silver Bullet?Kirill Chebunin
Modern package management for PHP projects.
http://packagist.org/
http://github.com/composer/composer
This document discusses practical PHP deployment with Jenkins. It begins with an introduction of the author and overview of continuous integration and deployment. The main topics covered are using Jenkins for continuous integration and deployment of PHP applications, with a demonstration of deploying a 500K line Pimcore CMS project using Jenkins jobs for source control, testing, packaging, and deployment. Best practices and architectures involving Git, Jenkins and Zend Server are also discussed.
This document discusses Phing, an open source build tool for PHP projects that is based on Apache Ant. Phing uses XML build files to define targets and tasks for automating build processes like deployment, testing, documentation generation, and more. It provides features like file manipulation, code analysis, packaging, and integration with tools like Subversion, PHPUnit, and PhpDocumentor. The document provides examples of how to install, configure, and use Phing to implement automated build processes for PHP projects.
This document provides troubleshooting information for Puppet failures. It begins with common failure messages and their potential causes such as "can't find puppet", "can't connect to puppet", and "can't get certificate". It then covers tools for investigating failures like the Puppet REST API, debugging Puppet compiles and applies, and checking for issues via notify resources and debug scripts. The document outlines techniques for locating problems with nodes, workers, variables, and resources conflicting or going stale.
This document summarizes Hans Lellelid's presentation on Phing, an open source build tool for PHP projects that is modeled after Apache Ant. The presentation covers Phing fundamentals like creating build files and tasks, as well as more advanced topics like customizing Phing through extensions. It provides examples of using Phing for tasks like file copying, database operations, documentation generation, and unit testing. The goal is to demonstrate how Phing can be used to automate common build, testing and deployment tasks.
The document discusses how to get started with the Zend Framework by installing it, setting up Zend Tool, creating a new Zend Framework project, and configuring a virtual host to view the new project. Key steps include downloading and extracting the Zend Framework files, installing and configuring Zend Tool, using Zend Tool to generate a new project skeleton, copying the Zend Framework library files into the project, and editing configuration files to set up the virtual host.
This document provides an overview and introduction to the Zend Framework. It begins with introductions of the speaker and an outline of topics to be covered, which include basics of the Zend Framework, its model-view-controller implementation, components and libraries, and what's new. It then discusses what the Zend Framework is, how it was developed, its requirements, flexible licensing, and benefits of using it. The rest of the document explains key aspects of the Zend Framework including its front controller, action controllers, views, models, and how they work together in the traditional MVC pattern. It also provides examples of controllers, views, models, and customizing the framework.
In this talk we show the skeleton web application for Zend Framework 2. We introduce the new features of the framework, such as the new MVC layer, the Event Manager, the Dependency Injection and much more. The aim of this talk is how to start to programming using ZF2.
The document discusses Zend Framework forms, subforms, display groups, and decorators. It explains that Zend Framework provides object-oriented interfaces for building forms, validating input, and grouping form elements. Decorators handle the markup of forms and implement the decorator design pattern. The document demonstrates how developers can create form elements and add validators, while web integrators can style forms by adding decorators to control rendering.
Debugging PHP with xDebug inside of Eclipse PDT 2.1Bastian Feder
Integrated development plattforms (IDEs) like Eclipse or Netbeans do get more popular these days.
One cause might be the beautiful benefits a developer gains from using an IDE like a type history or a code completion.
This talk shall enable the attendee to get knowleadge about the possibilites of Eclipse PDT to use xDebug as internal debugger
It shows howto install xDebug and give a deep introduction about how to enable Eclipse PDT version 2 to communicate with xDebug.
Another topic of this talk would be the different debugging mechanism Eclipse PDT provides and how they work.
The document introduces the Zend Framework, which is a modular PHP library that aims to simplify common tasks. It provides best practices for PHP 5 development and serves as a starting point for applications. The framework uses a Model-View-Controller pattern and includes features like input filtering, email sending, searching, and more. It has a goal of being industry-leading, high-quality, and modular while also having an extremely simple interface.
This document provides an overview of IBM i tutorial events occurring at ZendCon '09, including PHP sessions on Tuesday and an IBM i networking reception. It introduces Mike Pavlak, the Solution Consultant giving the tutorial, and reviews tools for developing PHP applications on IBM i like Zend Core, Studio, and Server. The tutorial agenda includes using toolkit functions, debugging with Zend Platform, and integrating procedural PHP with the Zend Framework.
PHP - Programming language war, does it matterMizno Kruge
Slide for Software Architect Indonesia Community (SARCCOM) meetup 26th August 2017 at Microsoft Indonesia
https://www.meetup.com/Software-Architect-Indonesia/events/242334607/
The document summarizes a presentation about PHP 7. It introduces PHP 7 and its new Zend engine. It shows benchmarks demonstrating PHP 7's improved speed over PHP 5. It highlights new features in PHP 7 like uniform variable syntax, exceptions in the engine, and null coalesce operator. It provides instructions for setting up an environment to test PHP 7. It also briefly discusses the CVE-201504024 vulnerability, which allows denial-of-service attacks on PHP 5 servers through specially crafted HTTP headers. The presentation includes code demos and links to documentation for further reading.
This document provides instructions for setting up a development environment for creating Zend framework projects. It outlines the requirements including Apache, PHP 5.2+, and a database server. It describes downloading the Zend framework library and setting up an IDE like NetBeans. It provides steps for installing Zend, creating a demo project, and basic commands. It also covers configuring NetBeans for PHP and Zend development, creating a project, and debugging with Xdebug.
The document introduces the Zend Framework, an open-source PHP framework. It discusses what the framework is, the goals in developing it, why another framework was needed for PHP, how it takes advantage of PHP5 features, and how developers can get started using the framework, including an overview of its MVC architecture and input filtering capabilities.
From Zero to ZF: Your first zend framework project on ibm iAlan Seiden
Step by step, I'll demonstrate the creation of a Zend Framework (ZF) project, with special attention to configuring the db2 adapter so it works well with IBM i.
Ansible new paradigms for orchestrationPaolo Tonin
- Ansible provides a simple way to automate application deployment, server configuration management, and provisioning using SSH. It uses YAML files called playbooks to define tasks that are executed across multiple servers.
- Playbooks allow users to define infrastructure as code and configure servers in an idempotent way. They contain ordered lists of tasks that can install packages, copy files, start services, and more using simple YAML syntax.
- Ansible is agentless and communicates to servers over SSH, requiring only Python to be installed on managed nodes. It has a wide range of core modules and supports provisioning on cloud platforms like AWS.
This document provides instructions for setting up a Zend Framework development environment and creating a sample project. It discusses requirements like installing Apache, PHP, and a database. It explains how to download and set up Zend Framework, configure the include path and environment variables. It demonstrates creating a sample "demo" project using the zend command line tool and describes the basic folder structure generated. It also covers setting up a project in NetBeans IDE and debugging PHP projects.
This document provides an introduction to migrating from PHP4 to PHP5. It discusses the key things to consider for migration including direct assignment to $this, array_merge parameters, and case sensitivity changes. It outlines the main benefits of migration such as improved security, flexibility, and support for modern web technologies. Finally, it highlights important PHP5 features like its improved object model, exceptions, and native XML and SOAP support.
Zend Products and PHP for IBMi provides an overview of Zend technologies for the IBM i platform, including:
1) Zend Server which is a PHP application server that improves performance, reliability, and security of PHP applications on IBMi.
2) The Zend Framework which is installed automatically with Zend Server and provides a set of PHP components and libraries.
3) The new open source PHP toolkit which provides a set of classes that allow PHP applications to access IBMi functions through a compatibility wrapper.
The document discusses improving quality assurance on PHP projects through various tools. It introduces tools for syntax checking (PHPLint), documentation (PHPDocumentor), coding standards (PHP_CodeSniffer), duplication detection (PHPCPD), complexity/quality analysis (PDepend, PHPMD), testing (PHPUnit), packaging (Phar), and automation (Phing). Examples are provided of integrating these tools into a sample PHP project to continuously check code quality during development.
Professional PHP: an open-source alternative for enterprise development [Antw...Combell NV
This document discusses PHP as an open-source alternative for enterprise development. It provides an overview of PHP and its advantages, including being easy to learn, flexible, platform independent, and having a large community and libraries. It also discusses best practices for PHP development, such as using frameworks, testing, security, performance, and tools.
The document introduces the Zend Framework. It discusses that the framework is a collection of PHP classes based on PHP 5 best practices. It aims to simplify common tasks, provide a starting point for applications, and demonstrate PHP 5 best practices. The framework strives to make PHP competitive with other technologies and provide high-quality, PHP 5 compatible components. It uses a BSD style license and modular design. Example uses of controllers, input filtering, mailing, and searching are provided.
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Raffi Khatchadourian
Efficiency is essential to support responsiveness w.r.t. ever-growing datasets, especially for Deep Learning (DL) systems. DL frameworks have traditionally embraced deferred execution-style DL code—supporting symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, imperative DL frameworks encouraging eager execution have emerged but at the expense of run-time performance. Though hybrid approaches aim for the “best of both worlds,” using them effectively requires subtle considerations to make code amenable to safe, accurate, and efficient graph execution—avoiding performance bottlenecks and semantically inequivalent results. We discuss the engineering aspects of a refactoring tool that automatically determines when it is safe and potentially advantageous to migrate imperative DL code to graph execution and vice-versa.
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
Bepents tech services - a premier cybersecurity consulting firmBenard76
Introduction
Bepents Tech Services is a premier cybersecurity consulting firm dedicated to protecting digital infrastructure, data, and business continuity. We partner with organizations of all sizes to defend against today’s evolving cyber threats through expert testing, strategic advisory, and managed services.
🔎 Why You Need us
Cyberattacks are no longer a question of “if”—they are a question of “when.” Businesses of all sizes are under constant threat from ransomware, data breaches, phishing attacks, insider threats, and targeted exploits. While most companies focus on growth and operations, security is often overlooked—until it’s too late.
At Bepents Tech, we bridge that gap by being your trusted cybersecurity partner.
🚨 Real-World Threats. Real-Time Defense.
Sophisticated Attackers: Hackers now use advanced tools and techniques to evade detection. Off-the-shelf antivirus isn’t enough.
Human Error: Over 90% of breaches involve employee mistakes. We help build a "human firewall" through training and simulations.
Exposed APIs & Apps: Modern businesses rely heavily on web and mobile apps. We find hidden vulnerabilities before attackers do.
Cloud Misconfigurations: Cloud platforms like AWS and Azure are powerful but complex—and one misstep can expose your entire infrastructure.
💡 What Sets Us Apart
Hands-On Experts: Our team includes certified ethical hackers (OSCP, CEH), cloud architects, red teamers, and security engineers with real-world breach response experience.
Custom, Not Cookie-Cutter: We don’t offer generic solutions. Every engagement is tailored to your environment, risk profile, and industry.
End-to-End Support: From proactive testing to incident response, we support your full cybersecurity lifecycle.
Business-Aligned Security: We help you balance protection with performance—so security becomes a business enabler, not a roadblock.
📊 Risk is Expensive. Prevention is Profitable.
A single data breach costs businesses an average of $4.45 million (IBM, 2023).
Regulatory fines, loss of trust, downtime, and legal exposure can cripple your reputation.
Investing in cybersecurity isn’t just a technical decision—it’s a business strategy.
🔐 When You Choose Bepents Tech, You Get:
Peace of Mind – We monitor, detect, and respond before damage occurs.
Resilience – Your systems, apps, cloud, and team will be ready to withstand real attacks.
Confidence – You’ll meet compliance mandates and pass audits without stress.
Expert Guidance – Our team becomes an extension of yours, keeping you ahead of the threat curve.
Security isn’t a product. It’s a partnership.
Let Bepents tech be your shield in a world full of cyber threats.
🌍 Our Clientele
At Bepents Tech Services, we’ve earned the trust of organizations across industries by delivering high-impact cybersecurity, performance engineering, and strategic consulting. From regulatory bodies to tech startups, law firms, and global consultancies, we tailor our solutions to each client's unique needs.
HCL Nomad Web – Best Practices and Managing Multiuser Environmentspanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-and-managing-multiuser-environments/
HCL Nomad Web is heralded as the next generation of the HCL Notes client, offering numerous advantages such as eliminating the need for packaging, distribution, and installation. Nomad Web client upgrades will be installed “automatically” in the background. This significantly reduces the administrative footprint compared to traditional HCL Notes clients. However, troubleshooting issues in Nomad Web present unique challenges compared to the Notes client.
Join Christoph and Marc as they demonstrate how to simplify the troubleshooting process in HCL Nomad Web, ensuring a smoother and more efficient user experience.
In this webinar, we will explore effective strategies for diagnosing and resolving common problems in HCL Nomad Web, including
- Accessing the console
- Locating and interpreting log files
- Accessing the data folder within the browser’s cache (using OPFS)
- Understand the difference between single- and multi-user scenarios
- Utilizing Client Clocking
The Future of Cisco Cloud Security: Innovations and AI IntegrationRe-solution Data Ltd
Stay ahead with Re-Solution Data Ltd and Cisco cloud security, featuring the latest innovations and AI integration. Our solutions leverage cutting-edge technology to deliver proactive defense and simplified operations. Experience the future of security with our expert guidance and support.
UiPath Agentic Automation: Community Developer OpportunitiesDianaGray10
Please join our UiPath Agentic: Community Developer session where we will review some of the opportunities that will be available this year for developers wanting to learn more about Agentic Automation.
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptxMSP360
Data loss can be devastating — especially when you discover it while trying to recover. All too often, it happens due to mistakes in your backup strategy. Whether you work for an MSP or within an organization, your company is susceptible to common backup mistakes that leave data vulnerable, productivity in question, and compliance at risk.
Join 4-time Microsoft MVP Nick Cavalancia as he breaks down the top five backup mistakes businesses and MSPs make—and, more importantly, explains how to prevent them.
Zilliz Cloud Monthly Technical Review: May 2025Zilliz
About this webinar
Join our monthly demo for a technical overview of Zilliz Cloud, a highly scalable and performant vector database service for AI applications
Topics covered
- Zilliz Cloud's scalable architecture
- Key features of the developer-friendly UI
- Security best practices and data privacy
- Highlights from recent product releases
This webinar is an excellent opportunity for developers to learn about Zilliz Cloud's capabilities and how it can support their AI projects. Register now to join our community and stay up-to-date with the latest vector database technology.
Web & Graphics Designing Training at Erginous Technologies in Rajpura offers practical, hands-on learning for students, graduates, and professionals aiming for a creative career. The 6-week and 6-month industrial training programs blend creativity with technical skills to prepare you for real-world opportunities in design.
The course covers Graphic Designing tools like Photoshop, Illustrator, and CorelDRAW, along with logo, banner, and branding design. In Web Designing, you’ll learn HTML5, CSS3, JavaScript basics, responsive design, Bootstrap, Figma, and Adobe XD.
Erginous emphasizes 100% practical training, live projects, portfolio building, expert guidance, certification, and placement support. Graduates can explore roles like Web Designer, Graphic Designer, UI/UX Designer, or Freelancer.
For more info, visit erginous.co.in , message us on Instagram at erginoustechnologies, or call directly at +91-89684-38190 . Start your journey toward a creative and successful design career today!
Slides for the session delivered at Devoxx UK 2025 - Londo.
Discover how to seamlessly integrate AI LLM models into your website using cutting-edge techniques like new client-side APIs and cloud services. Learn how to execute AI models in the front-end without incurring cloud fees by leveraging Chrome's Gemini Nano model using the window.ai inference API, or utilizing WebNN, WebGPU, and WebAssembly for open-source models.
This session dives into API integration, token management, secure prompting, and practical demos to get you started with AI on the web.
Unlock the power of AI on the web while having fun along the way!
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025BookNet Canada
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, transcript, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Markus Eisele
We keep hearing that “integration” is old news, with modern architectures and platforms promising frictionless connectivity. So, is enterprise integration really dead? Not exactly! In this session, we’ll talk about how AI-infused applications and tool-calling agents are redefining the concept of integration, especially when combined with the power of Apache Camel.
We will discuss the the role of enterprise integration in an era where Large Language Models (LLMs) and agent-driven automation can interpret business needs, handle routing, and invoke Camel endpoints with minimal developer intervention. You will see how these AI-enabled systems help weave business data, applications, and services together giving us flexibility and freeing us from hardcoding boilerplate of integration flows.
You’ll walk away with:
An updated perspective on the future of “integration” in a world driven by AI, LLMs, and intelligent agents.
Real-world examples of how tool-calling functionality can transform Camel routes into dynamic, adaptive workflows.
Code examples how to merge AI capabilities with Apache Camel to deliver flexible, event-driven architectures at scale.
Roadmap strategies for integrating LLM-powered agents into your enterprise, orchestrating services that previously demanded complex, rigid solutions.
Join us to see why rumours of integration’s relevancy have been greatly exaggerated—and see first hand how Camel, powered by AI, is quietly reinventing how we connect the enterprise.
fennec fox optimization algorithm for optimal solutionshallal2
Imagine you have a group of fennec foxes searching for the best spot to find food (the optimal solution to a problem). Each fox represents a possible solution and carries a unique "strategy" (set of parameters) to find food. These strategies are organized in a table (matrix X), where each row is a fox, and each column is a parameter they adjust, like digging depth or speed.
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungenpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-und-verwaltung-von-multiuser-umgebungen/
HCL Nomad Web wird als die nächste Generation des HCL Notes-Clients gefeiert und bietet zahlreiche Vorteile, wie die Beseitigung des Bedarfs an Paketierung, Verteilung und Installation. Nomad Web-Client-Updates werden “automatisch” im Hintergrund installiert, was den administrativen Aufwand im Vergleich zu traditionellen HCL Notes-Clients erheblich reduziert. Allerdings stellt die Fehlerbehebung in Nomad Web im Vergleich zum Notes-Client einzigartige Herausforderungen dar.
Begleiten Sie Christoph und Marc, während sie demonstrieren, wie der Fehlerbehebungsprozess in HCL Nomad Web vereinfacht werden kann, um eine reibungslose und effiziente Benutzererfahrung zu gewährleisten.
In diesem Webinar werden wir effektive Strategien zur Diagnose und Lösung häufiger Probleme in HCL Nomad Web untersuchen, einschließlich
- Zugriff auf die Konsole
- Auffinden und Interpretieren von Protokolldateien
- Zugriff auf den Datenordner im Cache des Browsers (unter Verwendung von OPFS)
- Verständnis der Unterschiede zwischen Einzel- und Mehrbenutzerszenarien
- Nutzung der Client Clocking-Funktion
Autonomous Resource Optimization: How AI is Solving the Overprovisioning Problem
In this session, Suresh Mathew will explore how autonomous AI is revolutionizing cloud resource management for DevOps, SRE, and Platform Engineering teams.
Traditional cloud infrastructure typically suffers from significant overprovisioning—a "better safe than sorry" approach that leads to wasted resources and inflated costs. This presentation will demonstrate how AI-powered autonomous systems are eliminating this problem through continuous, real-time optimization.
Key topics include:
Why manual and rule-based optimization approaches fall short in dynamic cloud environments
How machine learning predicts workload patterns to right-size resources before they're needed
Real-world implementation strategies that don't compromise reliability or performance
Featured case study: Learn how Palo Alto Networks implemented autonomous resource optimization to save $3.5M in cloud costs while maintaining strict performance SLAs across their global security infrastructure.
Bio:
Suresh Mathew is the CEO and Founder of Sedai, an autonomous cloud management platform. Previously, as Sr. MTS Architect at PayPal, he built an AI/ML platform that autonomously resolved performance and availability issues—executing over 2 million remediations annually and becoming the only system trusted to operate independently during peak holiday traffic.
The FS Technology Summit
Technology increasingly permeates every facet of the financial services sector, from personal banking to institutional investment to payments.
The conference will explore the transformative impact of technology on the modern FS enterprise, examining how it can be applied to drive practical business improvement and frontline customer impact.
The programme will contextualise the most prominent trends that are shaping the industry, from technical advancements in Cloud, AI, Blockchain and Payments, to the regulatory impact of Consumer Duty, SDR, DORA & NIS2.
The Summit will bring together senior leaders from across the sector, and is geared for shared learning, collaboration and high-level networking. The FS Technology Summit will be held as a sister event to our 12th annual Fintech Summit.
1. Zend Framework 1.8 workshop
Zend Framework
Presentation
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
2. Zend Framework 1.8 workshop
About Me:
PHP5 Zend Certified Engineer
ZF Contributor since 2008
Freelance Consultant
PHP Community active member
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
3. Zend Framework 1.8 workshop
Zend Framework
• Full Stack Framework
• Component Library
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
4. Zend Framework 1.8 workshop
How to Get It?
• Grab it from the download page:
http://framework.zend.com/download/latest
• Through Subversion:
http://framework.zend.com/svn/framework/standard/trunk/
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
5. Zend Framework 1.8 workshop
How To Install?
Add it to your php.ini include_path directive
include_path = .:/usr/local/lib/php:/PathToZendFrameworkLibrary
That’s it!
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
6. Zend Framework 1.8 workshop
Starting A New Project With Zend_Tool
First requirements:
• For *nix environments copy the zf.sh and zf.php from the ZF/bin
To the same directory as your PHP binary
• For Windows:
•copy the zf.php and zf.bat to the same directory as your
PHP binary
•add the php path to your PATH environment Var:
# Right-click My Computer and select |Properties.
# Select the Environment page.
# In the System Variables area, click on PATH.
# Add the php path to the end in the format VALUE1;VALUE2;c:php
# Click Apply.
# The changes take effect immediately.
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
7. Zend Framework 1.8 workshop
Creating the project “MyProject”
$ zf create project /path/to/non-existent-dir-called-MyProject
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
8. Zend Framework 1.8 workshop
Adding a “MyProject” vhost
Testing environment httpd.conf or httpd-vhosts.conf:
<VirtualHost *:80>
ServerName MyProject
DocumentRoot absolute-path-to-MyProject-folder
ErrorLog logsMyProject-error.log
CustomLog logsMyProject-access.log common
<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Satisfy all
</Directory>
</VirtualHost>
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
9. Zend Framework 1.8 workshop
For windows: Add the following line to the /etc/host file
127.0.0.1 MyProject
Restart apache, fire up the browser and go to: http://MyProject
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
10. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
11. Zend Framework 1.8 workshop
Creating an Action + View
Go to the MyProject directory and issue the following command
to create the helloAction in the IndexController and corresponding view:
$ zf create action hello index
For a full list of commands simply visit:
http://framework.zend.com/manual/en/zend.tool.project.create-a-project.html
Or issue the command:
$ zf --help
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
12. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
13. Zend Framework 1.8 workshop
Creating a Module and Controller
$ zf create module admin
$ zf create controller index 1 admin
Note: Trying to create a controller that already exists in another
Module might result in an error. Depending on the Zend_Tool
Verion you have. The solution is to apply the patch from
ZF Issue Tracker: http://framework.zend.com/issues/browse/ZF-6853
Note: If you applied this patch, make sure all controller names in the admin
module start with Admin_
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
14. Zend Framework 1.8 workshop
Registering the Module
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoloadModuleAdmin()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Admin',
'basePath' => APPLICATION_PATH.'/modules/admin',
));
return $autoloader;
}
}
The method is called automatically by Zend_Application as it starts with _init.
You can choose the remainder of the method name as you like.
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
15. Zend Framework 1.8 workshop
Registering the Module
myProject/application/configs/application.ini
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
16. Zend Framework 1.8 workshop
Setting up the Mysql Database
Add to configs/application.ini [production]
===============================
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = nick
resources.db.params.password = 12345
resources.db.params.dbname = myproject
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
17. Zend Framework 1.8 workshop
Create the database table
CREATE TABLE users (
id int(11) NOT NULL auto_increment,
username varchar(100) NOT NULL,
pwd varchar(32) NOT NULL,
firstname varchar(20) NOT NULL,
PRIMARY KEY (id)
);
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
18. Zend Framework 1.8 workshop
Populate the table
INSERT INTO users (username, pwd, firstname)
VALUES
('NickBelhomme', md5('hello'), 'Nick'),
('ChanieNavez', md5('strong'), 'Chantal'),
('ElvisP', md5('presley'), 'Elvis');
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
19. Zend Framework 1.8 workshop
The Model + DAO
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
20. Zend Framework 1.8 workshop
myProject/application/modules/admin/models/dao/Interface.php
interface Admin_Model_Dao_Interface
{
public function find($id);
public function insert($username, $pwd, $firstname);
public function update($id, $username, $pwd, $firstname);
public function delete($id);
public function findAll();
}
Common interface between all DAOs.
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
21. Zend Framework 1.8 workshop
myProject/application/modules/admin/models/dao/UserDB.php
class Admin_Model_Dao_UserDB extends Zend_Db_Table
implements Admin_Model_Dao_Interface
{
protected $_name = 'users';
public function find($id)
{
Very Simple DAO
$id = (int)$id;
$row = $this->fetchRow('id = ' . $id); (Data Access Object)
if (!$row) {
throw new Exception("Count not find row $id");
}
return $row;
}
public function insert($username, $pwd, $firstname)
{
$data = array(
'username' => $username,
'pwd' => $this->hashPassword($pwd),
'firstname' => $firstname,
);
parent::insert($data);
}
//...
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
22. Zend Framework 1.8 workshop
myProject/application/modules/admin/models/Dao/UserDB.php
class Admin_Model_Dao_UserDB extends Zend_Db_Table
implements Admin_Model_Dao_Interface
{
//…
public function update($id, $username, $pwd, $firstname)
{
$data = array( Very Simple DAO
'username' => $username,
'pwd' => $this->hashPassword($pwd),
(Data Access Object)
'firstname' => $firstname,
);
parent::update($data, 'id = '. (int)$id);
}
public function delete($id)
{
parent::delete('id =' . (int)$id);
}
public function findAll() {
return $this->fetchAll();
}
protected function hashPassword($pwd) {
return md5($pwd);
}
}
?>
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
23. Zend Framework 1.8 workshop
myProject/application/modules/admin/models/User.php
class Admin_Model_User
{
const DAO_CLASS = 'Admin_Model_Dao_UserDB';
protected $dao;
public function __construct() {
$daoClassName = self::DAO_CLASS;
$this->dao = new $daoClassName(); The Model
} using the DAO.
public function find($id)
{
return $this->dao->find($id);
Easy Switching between
} Different data resources
public function insert($username, $pwd, $firstname)
{
return $this->dao->insert($username, $pwd, $firstname);
}
public function update($id, $username, $pwd, $firstname)
{
return $this->dao->update($id, $username, $pwd, $firstname);
}
// ...
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
24. Zend Framework 1.8 workshop
myProject/application/modules/admin/models/User.php
<?php
class Admin_Model_User
{ The Model
// ... using the DAO.
public function delete($id)
{ Easy Switching between
return $this->dao->delete($id); Different data resources
}
public function findAll()
{
return $this->dao->findAll();
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
25. Zend Framework 1.8 workshop
The Actions and Views
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
26. Zend Framework 1.8 workshop
Setting up the admin actions
$ zf create action add index 1 admin
$ zf create action edit index 1 admin
$ zf create action delete index 1 admin
Again if you are using a version of Zend_Tool which isn’t fully module
Aware you can patch the Zend_Tool_Project_Provider_Action with
if (self::hasResource($this->_loadedProfile, $name, $controllerName, $module))
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
27. Zend Framework 1.8 workshop
The Admin_IndexController indexAction
public function indexAction()
{
$users = new Admin_Model_User();
$this->view->users = $users->findAll();
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
29. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
30. Zend Framework 1.8 workshop
The Admin_IndexController deleteAction
REST:
public function deleteAction() irreversible
{ action use
if ($this->getRequest()->isPost()) { POST not
$del = $this->getRequest()->getPost('del'); GET
if ($del == 'Yes') {
$id = $this->getRequest()->getPost('id');
$users = new Admin_Model_User();
$users->delete($id);
}
$this->_redirect('/admin/');
} else {
$id = $this->_getParam('id', 0);
$users = new Admin_Model_User();
$this->view->user = $users->find($id);
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
31. Zend Framework 1.8 workshop
The corresponding delete.phtml view script:
myProject/application/modules/admin/views/scripts/index/delete.phtml
<p>Are you sure that you want to delete
'<?php echo $this->escape($this->user['username']); ?>' aka
'<?php echo $this->escape($this->user['firstname']); ?>'?
</p>
<form action="<?php echo $this->url(array('action'=>'delete')); ?>" method="post">
<fieldset>
<input type="hidden" name="id"
value="<?php echo $this->escape($this->user['id']); ?>" />
<input type="submit" name="del" value="Yes" />
<input type="submit" name="del" value="No" />
</fieldset>
</form>
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
32. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
33. Zend Framework 1.8 workshop
The Admin_IndexController addAction
public function addAction()
{
if ($this->getRequest()->isPost()) {
$action = $this->getRequest()->getPost('action');
if ($action == 'add') {
$username = $this->getRequest()->getPost('username');
$pwd = $this->getRequest()->getPost('pwd');
$firstname = $this->getRequest()->getPost('firstname');
$users = new Admin_Model_User();
$users->insert($username, $pwd, $firstname);
}
$this->_redirect('/admin/');
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
34. Zend Framework 1.8 workshop
The corresponding add.phtml view script:
myProject/application/modules/admin/views/scripts/index/add.phtml
<h2>Add a new User</h2>
<form action="<?php echo $this->url(array('action'=>'add')); ?>" method="post">
<fieldset>
username: <input type="text" name="username"><br/>
password: <input type="password" name="pwd"><br/>
firstname: <input type="text" name="firstname"><br/>
<input type="submit" name="action" value="add" />
</fieldset>
</form>
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
35. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
36. Zend Framework 1.8 workshop
The Admin_IndexController editAction
public function editAction()
{
if ($this->getRequest()->isPost()) {
$action = $this->getRequest()->getPost('action');
if ($action == 'edit') {
$id = $this->getRequest()->getPost('id');
$username = $this->getRequest()->getPost('username');
$pwd = $this->getRequest()->getPost('pwd');
$firstname = $this->getRequest()->getPost('firstname');
$users = new Admin_Model_User();
$users->update($username, $pwd, $firstname);
}
$this->_redirect('/admin/');
} else {
$id = $this->_getParam('id', 0);
$users = new Admin_Model_User();
$this->view->user = $users->find($id);
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
38. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
39. Zend Framework 1.8 workshop
Authentication:
Zend_Auth
Authentication is loosely defined as determining whether
an entity actually is what it purports to be (i.e., identification),
based on some set of credentials.
http://framework.zend.com/manual/en/zend.auth.html#zend.auth.introduction
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
40. Zend Framework 1.8 workshop
Append the DAO and User Classes
interface Admin_Model_Dao_Interface
{
// …
public function findCredentials($username, $pwd);
}
class Admin_Model_Dao_UserDB extends Zend_Db_Table
implements Admin_Model_Dao_Interface
{
// …
public function findCredentials($username, $pwd)
{
$select = $this->select()->where('username = ?', $username)
->where('pwd = ?', $this->hashPassword($pwd));
$row = $this->fetchRow($select);
if($row) {
return $row;
}
return false;
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
41. Zend Framework 1.8 workshop
Append the DAO and User Classes
class Admin_Model_User
{
// ...
public function findCredentials($username, $password)
{
return $this->dao->findCredentials($username, $password);
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
42. Zend Framework 1.8 workshop
Always use a vendor or project prefix
And inform the autoloader of library prefixes
Prepend the application bootstrap
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoloadModuleDefault()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Myp',
'basePath' => dirname(__FILE__)
));
return $autoloader;
}
//...
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
43. Zend Framework 1.8 workshop
Create an application model: The Auth Adapter
myProject/application/models/AuthAdapter.php
class Myp_Model_AuthAdapter implements Zend_Auth_Adapter_Interface
{
protected $username;
protected $password;
protected $user;
public function __construct($username, $password) {
$this->username = $username;
$this->password = $password;
$this->user = new Admin_Model_User();
}
public function authenticate()
{
$match = $this->user->findCredentials($this->username, $this->password);
if(!$match) {
$result = new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, null);
} else {
$user = current($match);
$result = new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $user);
}
return $result;
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
44. Zend Framework 1.8 workshop
The IndexController loginAction
$ zf create action login index 1
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
45. Zend Framework 1.8 workshop
The IndexController loginAction
public function loginAction()
{
$auth = Zend_Auth::getInstance();
if(Zend_Auth::getInstance()->hasIdentity()) {
$this->_redirect('/index/hello');
} else if ($this->getRequest()->isPost()) {
$action = $this->getRequest()->getPost('action');
if ($action == 'login') {
$username = $this->getRequest()->getPost('username');
$pwd = $this->getRequest()->getPost('pwd');
$authAdapter = new Myp_Model_AuthAdapter($username, $pwd);
$result = $auth->authenticate($authAdapter);
if(!$result->isValid()) {
switch ($result->getCode()) {
case Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID:
$this->view->error = 'user credentials not found';
}
} else {
$this->_redirect('/index/hello');
}
}
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
47. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
48. Zend Framework 1.8 workshop
The IndexController helloAction
public function helloAction()
{
if(Zend_Auth::getInstance()->hasIdentity()) {
$this->view->user = Zend_Auth::getInstance()->getIdentity();
}
}
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
49. Zend Framework 1.8 workshop
The corresponding hello.phtml view script:
myProject/application/views/scripts/index/hello.phtml
<?php if(isset($this->user)):?>
welcome <?php echo $this->escape($this->user['firstname']); ?>,
to the MyProject application.
<?php else: ?>
you need to login first.
<a href="<?php echo $this->url(array('action' => 'login')); ?>">login</a>
<?php endif; ?>
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
50. Zend Framework 1.8 workshop
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
51. Zend Framework 1.8 workshop
And that is Authentication.
if(Zend_Auth::getInstance()->hasIdentity())
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
52. Zend Framework 1.8 workshop
What about?
•Authorization (Zend_Acl)
•Filter Input, Escape Output?
•Input Validation (Zend_Validate)
•Input filtering (Zend_Filter)
•Dynamic Forms (Zend_Form)
And all the other great stuff???!!!!
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
53. Zend Framework 1.8 workshop
There is always next time!
1 hour courses, remember??? ;)
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer
54. Zend Framework 1.8 workshop
Resources
•http://blog.nickbelhomme.com
•http://www.slideshare.net/weierophinney/zend-framework-workshop-dpc09
•http://en.wikipedia.org/wiki/Zend_Framework
•http://blog.astrumfutura.com/archives/373-The-M-in-MVC-Why-Models-
are-Misunderstood-and-Unappreciated.html
Source code of this workshop available at:
http://blog.nickbelhomme.com/wp-content/uploads/workshopzf1.8.zip
Nick Belhomme
17 June 2009
PHP5 Zend Certified Engineer