This document provides best practices for WordPress development including caching, database reads/writes, search, browser performance, maintainability, security, third party code, and teams. It recommends using Redis for caching, understanding WP_Query parameters, writing modular feature plugins, thorough documentation, testing, sanitizing inputs, using nonces, and conducting internal code reviews.
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
This document summarizes CouchApps, which are pure CouchDB applications that are standalone and hosted entirely on CouchDB. CouchApps have single step deployment via replication and enforce scalable thinking. The document discusses the couchapp tool for developing CouchApps and the resulting directory structure and design documents. It also covers JavaScript templating, URL routing, sending emails, form validation, and several example CouchApps including a blog.
The document discusses the new JSON REST API for WordPress, which provides a modern REST API for WordPress sites using JSON instead of the outdated XML-RPC format. It allows users to create, read, update and delete WordPress content like posts, pages, users and media through HTTP requests. The API can be accessed through plugins or by making requests directly to the /wp-json/ endpoints. It also supports features like authentication, pagination and filtering to build powerful applications that interact with WordPress content and data.
The document discusses various customization options available in Vibe, including simple out-of-the-box customizations that require no coding like branding, forms, workflows, and templates. It also covers customization options that involve basic HTML, CSS, JavaServer Pages (JSP), and other development options using technologies like SOAP and applications. Specific customization examples provided include modifying styles, creating new forms and landing pages, and developing custom actions for workflows using Java classes.
This document discusses using APEX Nitro to improve the APEX development process. APEX Nitro allows developers to write CSS and JavaScript locally and have changes automatically synced to their APEX application. It provides features like error handling, minification, concatenation, and preprocessing to boost performance and maintainability. The document reviews how to install, configure, and use APEX Nitro to enhance the front-end development experience.
Speed Up Your APEX Apps with JSON and HandlebarsMarko Gorički
The document discusses various methods for generating JSON from SQL queries in Oracle APEX applications. It compares manually concatenating strings, using the apex_util.json_from_* procedures, the PL/JSON library, the APEX_JSON API package, and Oracle REST Data Services (ORDS). The APEX_JSON package is recommended for most cases as it supports generation and parsing, can be used standalone, has a light footprint, and makes conversion from XML easy. Using a templating engine like Handlebars.js with JSON is also presented as a way to dynamically render HTML from database queries.
The document discusses two Ruby gems, Ashikawa::Core and Ashikawa::AR, that provide an interface to the ArangoDB database. Ashikawa::Core provides a low-level driver that abstracts ArangoDB's REST interface, while Ashikawa::AR implements an Active Record pattern for integrating ArangoDB with Rails applications. The document also briefly mentions plans to develop a DataMapper interface (Ashikawa::DataMapper) to support various data sources including ArangoDB.
This document provides a top ten list of tips for improving PHP and web application performance. They include tweaking realpath cache settings, using offline processing whenever possible, writing efficient SQL queries, not executing queries in loops, caching data, using a content delivery network, and using APC caching with apc.stat set to 0. The tips cover optimizing PHP, database, and infrastructure performance.
Put a Button on It: Removing Barriers to Going FastOSCON Byrum
This document discusses removing barriers to fast deployment at Etsy. It summarizes how Etsy optimized its deployment process to allow any engineer to deploy code at any time, rolling forward instead of rolling back in fear. Key aspects included adopting tools like Deployinator, Puppet, and Fabric to automate deployments, committing code directly to trunk, and establishing a culture that defaults to openness, communication, and constant improvement.
Transforming WordPress Search and Query Performance with Elasticsearch Taylor Lovett
This document discusses using Elasticsearch to improve WordPress search capabilities. It introduces ElasticPress, an open-source WordPress plugin that uses Elasticsearch for fast, relevant search across content. The plugin indexes WordPress content into Elasticsearch for complex queries, filtering, advanced relevancy, and more. The document provides installation instructions and examples of advanced queries that ElasticPress enables for WordPress, like searching across taxonomies, post meta, authors, and more in a highly performant way.
This document outlines the agenda for a 5-day training on becoming a web ninja. Day 1 covers why attendees should be ninjas and how to set up their work environments. Day 2 focuses on HTML and CSS basics. Day 3 covers JavaScript and jQuery. Day 4 covers PHP and MySQL. Day 5 has attendees create their own websites combining the skills learned. The document also provides tips on file structures, tools to use, and top web resources for ninjas.
Rapid Prototyping with Solr:
- The presentation will demonstrate how to quickly get documents into Solr, adjust the schema, and build a search user interface leveraging facets, highlighting, and other features.
- Examples will be shown of ingesting different data types like CSV, rich text files, and structured APIs into Solr for rapid prototyping of search applications.
- Tools discussed include using the Solr update handlers, Velocity templates, and Blacklight for building prototypes to get early feedback before full development.
PHP is a widely preferred side-server language, which is the key feature for website development. It is free and an open source for the PHP language that could be used for the uplifting of your website and could help to improve your clientele. PHP codes and HTML codes could be combined and could b used for scripting purpose also.
www.northpolewebservice.com
PHP is a widely preferred side-server language, which is the key feature for website development. It is free and an open source for the PHP language that could be used for the uplifting of your website and could help to improve your clientele. PHP codes and HTML codes could be combined and could b used for scripting purpose also.
https://www.northpolewebservice.com/
Modernizing WordPress Search with ElasticsearchTaylor Lovett
WordPress search is notoriously lacking. Using Elasticsearch and the 10up WordPress plugin ElasticPress, we can do amazing things with search very performantly.
This document outlines several open source semantic web tools, including ontology editors (Protégé, SWeDE), APIs for working with ontologies (Jena, Drive, cwm), persistence and query engines (Sesame, Kowari), and rule frameworks (SweetRules). It provides brief descriptions and links to tool homepages, with a focus on introductions, discriminators, and demonstrations of the capabilities of each tool.
Type safety is extremely important in any application built around a stream / queue. Type definition and evolution can either be built in the application or relied upon the data layer to support it out of the box allowing the application to only concentrate on business logic, not how of data store and evolution. It is this property of the good old relational databases (among others) that make them a favourite among all the modern NoSQL databases. Modern software architectures requires asynchronous communication (via stream / queue). While the data store and query design changes with asynchronous communication, type safety is still equally important.
In this slide deck, used for Apache Con 2021 talk, we will go over ways in which one can force structure (schema) over the streaming data. As an example, we will talk about Apache Pulsar. Apache pulsar offers server as well as client side support for the structured streaming. We have been using pulsar for asynchronous communication among microservices in our nutanix beam and flow security central apps for over 1.5 years in production. This deck presents the technical details on what is schema, how to represent schema, what is available in the apache pulsar server and client side, how we have used pulsar’s schema support to build our use cases and our learnings from them.
This document discusses PHP, which stands for Hypertext Preprocessor. PHP is an open-source server-side scripting language used to create dynamic web pages. PHP code is embedded within HTML and executed on the server-side, so the source code is not visible to clients. PHP can interact with databases like MySQL to retrieve and manipulate data for web pages. The document also provides examples of using PHP with MySQL to create a database.
The Apereo OAE Bootcamp offers an introduction into back-end and front-end development for the Apereo OAE project.
The back-end development part focuses on learning the different extension points behind the scenes in the service layer of OAE. A back-end component for OAE that exposes a REST API is built from scratch.
Back-end development topics include:
- Node.js NPM module system
- OAE back-end application life-cycle
- Data-modelling with Apache Cassandra and writing CQL queries from Node.js
- Using the OAE APIs to expose back-end functionality for the web VIA RESTful APIs
- Writing back-end unit tests using Grunt and Mocha. If time permits, the following will also be covered:
- Integrating with OAE's ElasticSearch query and index functionality
- Integrating with OAE's Activity and Notifications functionality
- Integration with OAE's Admin Configuration functionality
The front-end development part focuses on writing a UI widget using the REST APIs developed in the back-end development part.
Front-end development topics include:
- Integrating with the OAE Widget loading system
- Writing internationalizable templates with TrimPath and the widget i18n and l10n functionality
- Interacting with the core OAE UI APIs
- Using bootstrap 3 to design responsive UI layouts for your widgets
- Writing front-end unit tests using Grunt and CasperJS
If You Have The Content, Then Apache Has The Technology!gagravarr
This document provides a summary of 46 Apache content-related projects and 8 content-related incubating projects. It discusses projects for transforming and reading content like Apache PDFBox, POI, and Tika. Projects for text and language analysis like UIMA, OpenNLP, and Mahout. Projects that work with structured data and linked data like Any23, Stanbol, and Jena. Projects for data management and processing on Hadoop like MRQL, DataFu, and Falcon. Projects for serving content like HTTPD Server, TrafficServer, and Tomcat. Projects that focus on generating content like OpenOffice, Forrest, and Abdera. And projects for working with hosted content like Chemistry and ManifoldCF. The document
This document provides a case study on a project created using open source technology. It discusses analyzing project goals and resources, evaluating open source options based on total cost of ownership, implementing a solution using LAMP stack, and lessons learned. The project was developed using Linux, Apache, MySQL, and PHP based on the needs of a low budget, ability to invest in internal skills, and reduce dependency on external trends. Key steps included preparing the Linux server, using version control and local testing, and engaging the open source community for support.
This document discusses technologies for creating and maintaining web applications. It covers Ruby and the Rails framework. Ruby is designed to be programmer-focused rather than machine-focused, helping create dynamic and self-explained code. Rails enables quickly building web servers through conventions, reuse, single responsibility principles, and features that provide quick setup, deployment, and built-in scalability. The document also discusses front-end architecture with client-side logic, and Rails features for development, deployment, databases, assets, and multi-environment configuration.
Today, there are many companies that are open to the idea of sharing and actively promote Open Source projects.
We, at Neev, not only promote Open Source, but actively utilize Open Source wherever possible in order to increase ROI for customers and decrease time-to-market.
It is the best way to give something back to the community. Neev has, from time-to-time, given back to the Open Source community through contributions that aim to solve critical issues faced by the IT community.
Here are 18 of our innovative Open Source tools.
This is an end-to-end introduction to PowerShell, as an interactive shell but more as a scripting language. From the perspective of a full-stack developer, this presentation covers the basics and six of the common issues that occasional users run into.
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic BeanstalkAmazon Web Services
AWS offers a number of services that help you easily deploy and run applications in the cloud. Come to this session to learn how to choose among these options. Through interactive demonstrations, this session will show you how to get an application running using AWS OpsWorks and AWS Elastic Beanstalk application management services. You will also learn how to use AWS CloudFormation templates to document, version control, and share your application configuration. This session will cover topics like application updates, customization, and working with resources such as load balancers and databases.
This document provides an introduction to open source software. It defines open source software as software with source code that is openly shared and can be redistributed, adapted, and modified. Open source software is created through collaboration between programmers, designers, and testers online. It is initiated by a lead developer who specifies the language, platform, licensing, and goals. Participants then jointly work on specifications and submit code for review and testing. Major examples of open source software discussed include the Linux operating system, the Apache web server, MySQL database, Android mobile OS, and programming languages like PHP. A brief history of open source development is also provided.
CISSP Prep: Ch 9. Software Development SecuritySam Bowne
The document discusses various topics related to software development security including programming concepts, compilers and interpreters, procedural vs object-oriented programming, software development lifecycles, agile development methods, database security, and object-oriented design. It also covers assessing software security through vulnerabilities, maturity models, and testing as well as artificial intelligence techniques.
Docs as Part of the Product - Open Source Summit North America 2018Den Delimarsky
The presentation showcased at the Open Source Summit North America 2018 in Vancouver, BC. It covers the learnings from transitioning the MSDN site functionality and content to docs.microsoft.com.
- Oracle's strategy is to provide a complete, open, and integrated stack including MySQL. They have made investments in open source projects like MySQL to expand the developer community and speed up innovation.
- MySQL 5.5 includes improvements like InnoDB as the default storage engine, semi-synchronous replication, and performance gains of over 300% on benchmarks compared to previous versions.
- The mysqli extension provides full support for modern MySQL features while ext/mysql is limited. mysqlnd provides a native driver for PHP that improves performance versus libmysql. Caching and other mysqlnd plugins provide opportunities to optimize database usage.
Open Source Software – Open Day Oracle 2013Erik Gur
This document outlines a presentation about Oracle's open source software strategy. It discusses what open source software is, how Oracle integrates open source solutions like Linux, GlassFish, MySQL into its product portfolio, benefits of using open source technologies, success stories, and where to find additional information. The presentation covers Oracle's support for technologies like Oracle Linux, GlassFish Server, MySQL, and how customers can leverage these open source products with Oracle's proprietary software and support.
Prometheus lightning talk (Devops Dublin March 2015)Brian Brazil
This document introduces Prometheus, an open-source monitoring system that allows instrumentation of everything including RPCs, interfaces, business logic, and logs. It provides client libraries that make instrumentation easy across many languages. The Prometheus server can handle over a million time series in one instance with no dependencies. It offers dashboards, expression queries, alerts and integrates with many systems. Time series have structured labels allowing flexible aggregation and complex math for rules and alerts. Prometheus costs less than $.001 per time series per month and is developed by SoundCloud, Boxever and Docker with an active community.
Similar to Software Development with Open Source (20)
Finetuning GenAI For Hacking and DefendingPriyanka Aash
Generative AI, particularly through the lens of large language models (LLMs), represents a transformative leap in artificial intelligence. With advancements that have fundamentally altered our approach to AI, understanding and leveraging these technologies is crucial for innovators and practitioners alike. This comprehensive exploration delves into the intricacies of GenAI, from its foundational principles and historical evolution to its practical applications in security and beyond.
UiPath Community Day Amsterdam: Code, Collaborate, ConnectUiPathCommunity
Welcome to our third live UiPath Community Day Amsterdam! Come join us for a half-day of networking and UiPath Platform deep-dives, for devs and non-devs alike, in the middle of summer ☀.
📕 Agenda:
12:30 Welcome Coffee/Light Lunch ☕
13:00 Event opening speech
Ebert Knol, Managing Partner, Tacstone Technology
Jonathan Smith, UiPath MVP, RPA Lead, Ciphix
Cristina Vidu, Senior Marketing Manager, UiPath Community EMEA
Dion Mes, Principal Sales Engineer, UiPath
13:15 ASML: RPA as Tactical Automation
Tactical robotic process automation for solving short-term challenges, while establishing standard and re-usable interfaces that fit IT's long-term goals and objectives.
Yannic Suurmeijer, System Architect, ASML
13:30 PostNL: an insight into RPA at PostNL
Showcasing the solutions our automations have provided, the challenges we’ve faced, and the best practices we’ve developed to support our logistics operations.
Leonard Renne, RPA Developer, PostNL
13:45 Break (30')
14:15 Breakout Sessions: Round 1
Modern Document Understanding in the cloud platform: AI-driven UiPath Document Understanding
Mike Bos, Senior Automation Developer, Tacstone Technology
Process Orchestration: scale up and have your Robots work in harmony
Jon Smith, UiPath MVP, RPA Lead, Ciphix
UiPath Integration Service: connect applications, leverage prebuilt connectors, and set up customer connectors
Johans Brink, CTO, MvR digital workforce
15:00 Breakout Sessions: Round 2
Automation, and GenAI: practical use cases for value generation
Thomas Janssen, UiPath MVP, Senior Automation Developer, Automation Heroes
Human in the Loop/Action Center
Dion Mes, Principal Sales Engineer @UiPath
Improving development with coded workflows
Idris Janszen, Technical Consultant, Ilionx
15:45 End remarks
16:00 Community fun games, sharing knowledge, drinks, and bites 🍻
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Zilliz
Enterprises have traditionally prioritized data quantity, assuming more is better for AI performance. However, a new reality is setting in: high-quality data, not just volume, is the key. This shift exposes a critical gap – many organizations struggle to understand their existing data and lack effective curation strategies and tools. This talk dives into these data challenges and explores the methods of automating data curation.
"Building Future-Ready Apps with .NET 8 and Azure Serverless Ecosystem", Stan...Fwdays
.NET 8 brought a lot of improvements for developers and maturity to the Azure serverless container ecosystem. So, this talk will cover these changes and explain how you can apply them to your projects. Another reason for this talk is the re-invention of Serverless from a DevOps perspective as a Platform Engineering trend with Backstage and the recent Radius project from Microsoft. So now is the perfect time to look at developer productivity tooling and serverless apps from Microsoft's perspective.
Cracking AI Black Box - Strategies for Customer-centric Enterprise ExcellenceQuentin Reul
The democratization of Generative AI is ushering in a new era of innovation for enterprises. Discover how you can harness this powerful technology to deliver unparalleled customer value and securing a formidable competitive advantage in today's competitive market. In this session, you will learn how to:
- Identify high-impact customer needs with precision
- Harness the power of large language models to address specific customer needs effectively
- Implement AI responsibly to build trust and foster strong customer relationships
Whether you're at the early stages of your AI journey or looking to optimize existing initiatives, this session will provide you with actionable insights and strategies needed to leverage AI as a powerful catalyst for customer-driven enterprise success.
Self-Healing Test Automation Framework - HealeniumKnoldus Inc.
Revolutionize your test automation with Healenium's self-healing framework. Automate test maintenance, reduce flakes, and increase efficiency. Learn how to build a robust test automation foundation. Discover the power of self-healing tests. Transform your testing experience.
Choosing the Best Outlook OST to PST Converter: Key Features and Considerationswebbyacad software
When looking for a good software utility to convert Outlook OST files to PST format, it is important to find one that is easy to use and has useful features. WebbyAcad OST to PST Converter Tool is a great choice because it is simple to use for anyone, whether you are tech-savvy or not. It can smoothly change your files to PST while keeping all your data safe and secure. Plus, it can handle large amounts of data and convert multiple files at once, which can save you a lot of time. It even comes with 24*7 technical support assistance and a free trial, so you can try it out before making a decision. Whether you need to recover, move, or back up your data, Webbyacad OST to PST Converter is a reliable option that gives you all the support you need to manage your Outlook data effectively.
The Challenge of Interpretability in Generative AI Models.pdfSara Kroft
Navigating the intricacies of generative AI models reveals a pressing challenge: interpretability. Our blog delves into the complexities of understanding how these advanced models make decisions, shedding light on the mechanisms behind their outputs. Explore the latest research, practical implications, and ethical considerations, as we unravel the opaque processes that drive generative AI. Join us in this insightful journey to demystify the black box of artificial intelligence.
Dive into the complexities of generative AI with our blog on interpretability. Find out why making AI models understandable is key to trust and ethical use and discover current efforts to tackle this big challenge.
Redefining Cybersecurity with AI CapabilitiesPriyanka Aash
In this comprehensive overview of Cisco's latest innovations in cybersecurity, the focus is squarely on resilience and adaptation in the face of evolving threats. The discussion covers the imperative of tackling Mal information, the increasing sophistication of insider attacks, and the expanding attack surfaces in a hybrid work environment. Emphasizing a shift towards integrated platforms over fragmented tools, Cisco introduces its Security Cloud, designed to provide end-to-end visibility and robust protection across user interactions, cloud environments, and breaches. AI emerges as a pivotal tool, from enhancing user experiences to predicting and defending against cyber threats. The blog underscores Cisco's commitment to simplifying security stacks while ensuring efficacy and economic feasibility, making a compelling case for their platform approach in safeguarding digital landscapes.
The History of Embeddings & Multimodal EmbeddingsZilliz
Frank Liu will walk through the history of embeddings and how we got to the cool embedding models used today. He'll end with a demo on how multimodal RAG is used.
Demystifying Neural Networks And Building Cybersecurity ApplicationsPriyanka Aash
In today's rapidly evolving technological landscape, Artificial Neural Networks (ANNs) have emerged as a cornerstone of artificial intelligence, revolutionizing various fields including cybersecurity. Inspired by the intricacies of the human brain, ANNs have a rich history and a complex structure that enables them to learn and make decisions. This blog aims to unravel the mysteries of neural networks, explore their mathematical foundations, and demonstrate their practical applications, particularly in building robust malware detection systems using Convolutional Neural Networks (CNNs).
1. Software Development with "
Open Source
Jon Allen (JJ) – jj@opusvl.com
Birmingham University 2010
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
2. About OpusVL
• Open Source development company
• Based in Rugby, UK
• Founded in 2000
• Business systems (ERP, VOIP, CRM, etc)
• Bespoke software development
• Use and contribute to Open Source
– Code
– Sponsorship
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
3. Open Source
• Who uses Open Source software?
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
4. Open Source
• Who uses Open Source software?
• Who uses…
– Google
– Facebook
– BBC iPlayer
– Amazon
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
5. Open Source
• Who uses Open Source software?
• Who uses…
– Google
– Facebook
– BBC iPlayer
– Amazon
• All built on Open Source software
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
6. What is Open Source Software?
• Licensing model
– Free redistribution
– Source code available
– Modifications and derived works allowed
• Distribution allowed under same terms as original licence
– No discrimination against people or fields of usage
• Typical licenses
– BSD, Apache, GPL, Artistic
• Restrictions vary by license (BSD vs. Copyleft)
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
7. Why Open Source?
• Try before you buy
– Use first, get support later
– Open documentation, support forums, etc
• Source code available
– Can make changes and fix bugs
• Freedom to fork
– No vendor lock-in
• Access to developers
– Speak directly to the author
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
8. What do we use?
• Products
– Debian, Ubuntu, Apache, PostgreSQL, CouchDB,
Asterisk, XEN, OpenERP, DAViCal, Memcached, etc.
• Development tools
– Perl
– Catalyst, Moose, DBIx::Class, Template Toolkit,
DateTime, HTML::FormFu, etc.
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
9. Perl
• Multi-paradigm programming language
– Procedural, Functional, Object-Oriented
• Mature, stable, scalable
– Used in mission-critical systems across the globe
– BBC, Cisco, Amazon, Vodafone, LOVEFiLM
– http://www.perl.org
• Perl 5, version 12.2
– Released 7th September 2010
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
10. CPAN
• Comprehensive Perl Archive Network
– Over 21,000 modules - Perl’s “killer app”
• Interfaces, frameworks, applications, dev tools, file
formats, imaging, databases, and lots more
• Code reuse
– Don’t re-invent the wheel
– Building blocks for applications
• http://search.cpan.org
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
11. Quality Assurance
• Perl has a strong QA culture
• Test-driven development
• CPAN Testers
– Automated testing community
– Every CPAN upload tested with multiple platforms
and Perl versions
– 9,000,000 test reports (500,000 per month)
– http://www.cpantesters.org
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
12. Community
• Perl Mongers – local user groups
– Birmingham, London, Milton Keynes, North West
– http://birmingham.pm.org
• Conferences and workshops
– YAPC – Europe, Asia, Russia, North America
– http://conferences.yapceurope.org/lpw2010
• Online
– http://blogs.perl.org
– Forums, IRC, mailing lists
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
13. Jobs
• Contribute to Open Source projects
– Very impressive on your CV
– Great way to gain experience
• Not just programming
– Documentation, testing, bug triage
• User groups
– Perl Mongers, LUGs, UKUUG, Multipack, PyWM
– Networking – get yourself known
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
14. Software Stack
Client customisations • Core framework
– Catalyst
Client OpusVL
application
components
application
components
– Moose
– DBIx::Class
OpusVL framework modules
DBMS
Core framework modules Ingres,
Catalyst, Moose, DBIx::Class, etc PostgreSQL,
CouchDB, etc
Base software stack
Linux, Apache, Perl
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
15. DBIx::Class
• ORM – Object Relational Mapper
– Database abstraction layer
• Creates objects, classes, and methods
• Writes SQL – improves maintainability
• Easily add new class methods
– Business logic
– Encapsulation
• Use methods, not database queries
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
16. DBIx::Class Schema
• Describes tables and relationships
– Loaded from DB – DBIx::Class::Schema::Loader
CREATE TABLE authors (
id integer primary key,
name text
);
CREATE TABLE books (
id integer primary key,
author_id integer,
title text,
foreign key(author_id) references authors(id)
);
dbicdump Authors 'dbi:SQLite:test.db'
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
17. Using generated classes
• Gives us an Authors class
– Relationships converted to class methods
use Authors;
my $db = Authors->connect("dbi:SQLite:test.db");
my $author = $db->resultset("Author")
->find(name => "Stephen King");
foreach my $book ($author->books) {
say $book->title;
say $book->author->name;
}
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
18. Extending classes
• With a “rate” method added to the Book class
# in Authors/Result/Author.pm
use List::Utils qw/sum/;
sub is_liked {
my $self = shift;
my $total = sum(
map {$_->rating} $self->books->all
);
return ($total / $self->books->count) > 3;
}
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
19. Moose
• Object Oriented programming framework
• Extension of Perl’s native OO
• Improves syntax and facilities
– Method modifiers, introspection, roles, type checking
• Large developer community
• http://moose.perl.org
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
20. Moose example
use MooseX::Declare
class Report extends ‘Document’
with ‘Confidentiality’ {
has ‘total’ => (isa => ‘Num’, default => ‘1000’);
has ‘notes’ => (isa => ‘Str’);
method fake_data {...}
}
role Confidentiality {
before print {
# hide any incriminating data!
};
}
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
21. Catalyst
• Web development framework
• Application server
• Scalable, high performance
– Powers some of the world’s biggest websites
• Structured, maintainable
– URLs dispatched to class methods
• DRY – Don’t Repeat Yourself
– Modular, self-contained components
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
22. What does Catalyst provide?
• Session handling
• Authentication / access control
• Page caching
• Built-in development server
• URL generation
– What’s the URL to reach this method?
• Library of pre-built components
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
23. Catalyst block diagram
View
Stash
User Controller
Model
Business Logic DB
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
24. Model
• Business logic
• Interface to a class
– Data storage (DBIx::Class, LDAP, S3, data files)
– API (REST, SOAP, XMLRPC)
– External system (OpenERP, Asterisk, hardware)
– Any other piece of Perl code
• External to Catalyst
– Used and maintained separately
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
25. View
• Presentation logic
• Renders output as…
– HTML, XML, JSON, PDF, Excel, JPEG, PNG, etc.
– Template::Toolkit
• Messaging
– Email, SMS
• Processing
– Generating thumbnail images
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
26. Controller
• Application logic
– Links Models to Views
• Passes input to the model
• Puts data from the model onto the stash
• Runs the application
– Control flow
– Logging / error handling
– Status codes
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
27. Conclusion
• Open Source gives us the tools to deliver
• The Community makes it possible
• Birmingham Perl Mongers
– http://birmingham.pm.org
• Birmingham Linux User Group
– http://birmingham.lug.org.uk
Software Development with Open Source
Open Source Business Systems
www.opusvl.com
28. Essay question
• Open Source software is often perceived as being non-
commercial as free redistribution is permitted. However,
many companies have managed to turn both the
development and usage of Open Source software into a
profitable business.
– Research the different business models that companies use
to derive commercial benefit from Open Source software.
– Investigate the challenges that companies face in managing
external development and user communities.
Software Development with Open Source
Open Source Business Systems
www.opusvl.com