Brian Feaver gives an overview of the Laravel PHP framework. He explains that Laravel is built on Symfony components and provides services and libraries to make interacting with web requests easier. The basics covered include routing, controllers, templating with Blade, and Eloquent ORM. Cool features highlighted are Artisan, dependency injection, queues, middleware, filesystem abstraction, and built-in authentication. Facades are discussed as a way to access underlying services, though injecting services directly is preferable.
This document provides an overview of the Laravel PHP framework, including instructions for installation, directory structure, MVC concepts, and a sample "task list" application to demonstrate basic Laravel features. The summary covers creating a Laravel project, defining a database migration and Eloquent model, adding routes and views with Blade templating, performing validation and CRUD operations, and more.
Brian Feaver gives an overview of the Laravel PHP framework. He explains that Laravel is built on Symfony components and provides services and libraries to make interacting with web requests easier. The basics covered include routing, controllers, templating with Blade, and Eloquent ORM. Cool features highlighted are Artisan, dependency injection, queues, middleware, filesystem abstraction, and built-in authentication. Facades are discussed as a way to access underlying services, though injecting services directly is preferable.
This document provides an overview of the Laravel PHP framework, including instructions for installation, directory structure, MVC concepts, and a sample "task list" application to demonstrate basic Laravel features. The summary covers creating a Laravel project, defining a database migration and Eloquent model, adding routes and views with Blade templating, performing validation and CRUD operations, and more.
This document discusses object-relational mapping (ORM) in PHP. It describes how ORM manages the translation between objects and relational databases. It then covers some common ORM patterns like active record, table gateways and data mappers. It also discusses performance issues with ORM and alternatives like object databases, document databases and JSON storage. Overall, the document suggests carefully choosing an ORM library and considering whether ORM is really needed or if alternative data storage may be better suited.
This document provides an overview of the Laravel PHP framework. It describes key Laravel concepts like MVC architecture, Eloquent ORM, Blade templating, routing, controllers, authentication, Artisan CLI, and Inversion of Control using service providers. It also lists requirements to set up a Laravel project and ways to create one using the Laravel installer or Composer.
Vikas Chauhan presented a document outlining 5 exercises for learning Laravel: 1) Installation and configuration, 2) Writing a Hello World program, 3) Using Laravel Blade templates, 4) Implementing layouts with Blade, and 5) Different types of routes. Each exercise includes multiple tasks with instructions on creating controllers, views, and routes to demonstrate different Laravel features.
This document discusses Android, an open source software stack for mobile devices. It is a complete system comprising an operating system, middleware, and key applications. Android is developed as part of the Open Handset Alliance and is powered by the Linux kernel. It uses Java for application development and includes APIs for graphics, data storage, media, Bluetooth, WiFi and more. Developers write Android apps in Java, which are then compiled to Dalvik bytecode and run on Android devices.
Android Application Devlopment. A Guide for the Intermediate Developer. Degree Thesis in Computer Science presented at Malmo Univerity, School of Technology, Department of Computer Science June 4, 2010.
The document discusses various applications of radar technology across several fields. It describes how radar is used for military purposes like air defense systems and targeting weapons. It also outlines applications in remote sensing, air traffic control, law enforcement, aircraft and ship safety, space exploration, and more. Some specific examples mentioned include using ground penetrating radar to locate buried objects and map landfills, and impulse radar to search rubble for trapped people.
Software Design Patterns in Laravel by Phill SparksPhill Sparks
Laravel makes use of quite a few well-established design patterns that promote reusable object-oriented code. Together, we will investigate the design patterns used in the core of Laravel 4 and discuss how they encourage reusable software.
This document provides an overview of Android mobile application development including:
- Android is an open source software stack for mobile devices including an operating system, middleware, and key applications.
- The Android software architecture includes components like the Linux kernel, libraries, Android runtime, application framework, and applications.
- Key building blocks for Android applications include activities, intents/intent receivers, services, and content providers.
- The Android SDK and Eclipse IDE can be used for application development along with emulators and real devices.
The document discusses best practices for submitting pull requests (PRs) for open source projects on GitHub. It explains that PRs allow for streamlined code review and merging compared to older methods like patches and mailing lists. Some tips include starting with small fixes, thoroughly testing changes, asking maintainers if anything is unclear, and being mindful of timezones when communicating with contributors in other parts of the world. Rejections may occur if a PR is out of scope or breaks compatibility. Dividing large work into separate, well-documented PRs helps maintainers review and approve changes.
This document introduces Gutscript, a new programming language designed for PHP developers that aims to address perceived issues with PHP syntax and semantics. Gutscript code compiles to PHP, allowing reuse of existing PHP libraries. It uses a simpler, more concise syntax inspired by languages like Ruby and Perl. The document provides examples comparing Gutscript and PHP code, demonstrating how Gutscript addresses issues like verbose function definitions, complex namespaces, and inconsistent syntax. It also discusses the Go-based implementation and opportunities for optimization of compiled Gutscript code.
OSDC.TW 2014 building popular open source projectsLin Yo-An
This document provides tips for building popular open source projects. It discusses the importance of critical mass and treating an open source project like a product to market. Key recommendations include giving the project a short, unique, and pronounceable name; providing an easy to understand synopsis; using an open source license; making the project easy to set up and use; documenting details thoroughly; and promoting the project through various media and community engagement. Fostering a positive environment where contributors feel respected and appreciated is also emphasized.
The document provides information about the Go programming language. It discusses the history and creators of Go, key features of the language such as concurrency and garbage collection, basic Go code examples, and common data types like slices and maps. It also covers Go tools, environments, benchmarks showing Go's performance, and examples of companies using Go in production.
This document provides an introduction and overview of the Go programming language. It discusses that Go was created by Ken Thompson and Rob Pike at Google in 2007. It then summarizes some key features of Go, including that it is statically typed, has built-in concurrency, compiles to native binaries, and uses garbage collection. The document also provides an overview of Go tools and environments, basic syntax like variables and functions, and common data types like arrays and slices. It concludes by discussing how to write first Go programs and packages.
Secret sauce of building php applicationsLin Yo-An
The document discusses modern approaches to building PHP applications compared to outdated "stone age" PHP practices. It covers topics like using autoloading via spl_autoload functions instead of require calls, using tools like Composer and class loading standards like PSR-0/PSR-4. This allows PHP code to be compiled more efficiently by the Zend engine and avoids performance issues from requiring many files.
Vim Script allows for programming Vim's interface through scripting. It discusses variables, functions, conditional statements, loops, built-in functions, autocommands, commands, and the runtime directory structure for plugins. The document provides an overview of Vim Script programming with examples.
This document provides information about CPAN (Comprehensive Perl Archive Network) including what it is, how to use it, popular modules, authors, and tips. Some key points:
- CPAN is a repository for Perl modules with over 12,000 modules and 3,400+ authors. It helps avoid duplicating code.
- Popular ways to install modules include using the CPAN shell, CPANPLUS shell, or cpanminus command line tool.
- Useful modules cover areas like web development, databases, testing, graphics, and more. Top authors contribute many modules.
- Documentation for any module can be found via its perldoc or on search.cpan.org.
This document provides an overview of Vim text editor customization and tips. It discusses installing Vim, compiling Vim with additional features, basic editing commands, options for customizing Vim's appearance and behavior, using buffers, windows, and tabpages, solving common problems through plugins, Vim scripting, and selected help topics and resources for learning more.
The document discusses how Vim can improve productivity for Perl coding. It provides examples of using Vim's modes, motions, text objects, syntax highlighting and mappings to more efficiently edit and navigate Perl code. The Normal mode, Insert mode, and Visual mode are demonstrated along with motions, text objects, folding and syntax files that are helpful for Perl. Key mappings are also shown that can make Perl editing more productive in Vim.
This document discusses how Vim can improve productivity for Perl coding. It provides examples of using Vim motions and modes like Normal mode, Insert mode, and Visual mode to efficiently edit code. It also covers Vim features like syntax highlighting, custom syntax files, key mappings, and text objects that are useful for Perl. The document advocates that Vim is a powerful editor rather than an IDE and highlights how it can save significant time compared to less efficient editing methods.
The document discusses various features of the Vim text editor, including modes (normal, insert, visual), text objects, syntax highlighting, encoding, key mappings, tab pages, and folds. It provides examples of motions and operations in normal mode, editing text in insert mode, selecting regions in visual mode, and syntax definitions. It also covers setting the encoding, defining common key mappings, using tab pages, and folding code with different fold methods.
21. Object::Declare
use Object::Declare ['MyApp::Column', 'MyApp::Param'];
my %objects = declare {
param foo =>
!is global,
is immutable,
valid_values are qw( more values );
column bar =>
field1 is 'value',
field2 is 'some_other_value',
sub_params are param( is happy ), param ( is sad );
};
print $objects{foo}; # a MyApp::Param object
print $objects{bar}; # a MyApp::Column object
# Assuming that MyApp::Column::new simply blesses into a hash...
print $objects{bar}{sub_params}[0]; # a MyApp::Param object
print $objects{bar}{sub_params}[1]; # a MyApp::Param object
Audrey Tang
唐鳳
2006
12年4月22⽇日星期⽇日
22. Jifty::DBI
package Simple;
use Jifty::DBI::Schema;
use Jifty::DBI::Record schema {
column foo => type is 'text';
column bar => type is 'text';
};
12年4月22⽇日星期⽇日
23. Jifty::DBI
package TestApp::Model::Phone;
use Jifty::DBI::Schema;
use Jifty::DBI::Record schema {
column user => references TestApp::Model::User by 'id',
is mandatory;
column type => ...;
column value =>
validator is sub { ... },
default is sub { }
;
};
12年4月22⽇日星期⽇日
34. What we need
• Can use PHP closures for validation, default value,
completion ..etc.
• Everything should be lazy.
• Simple API
• No overdesign.
• Mixin schema
• CRUD generation.
• Front-end CRUD integration.
12年4月22⽇日星期⽇日
35. PHP 5.3 Characteristic
• APC is fast.
• json_encode / json_decode (file) are slower than
require a simple array from php source code.
• function is faster than class method.
• class method is slower than properties.
• magic method is slower than normal class method.
• array is faster than object.
12年4月22⽇日星期⽇日
36. $array[] vs array_push
https://github.com/c9s/SimpleBench
12年4月22⽇日星期⽇日
37. Function calls
https://github.com/c9s/SimpleBench
12年4月22⽇日星期⽇日
39. EteDB
• Initialize model schema in runtime.
• Schema is defined in Model (in
__constructor).
• MySQL only.
• dynamic class generator (using eval)
• too slow.
12年4月22⽇日星期⽇日
43. SQLBuilder
• A Simple SQL Generator.
• Prevent Injection.
• Migration generator. (index, alter table...etc)
• Support SQLite, Pgsql, Mysql syntax.
• Pure SQL or with named-parameters.
12年4月22⽇日星期⽇日
109. Roller Router
High performance router for PHP
12年4月22⽇日星期⽇日
110. Roller Router
• APC cache
• FileSystem cache
• Use Array to store routes
• through PHP extension, can dispatch 1607% faster than
pure php version
• Annotation reader support
• RESTful plugin
12年4月22⽇日星期⽇日
116. Auto-generated routes
GET /=/restful/posts
GET /=/restful/posts.json
GET /=/restful/posts.yml
GET /=/restful/posts/23
GET /=/restful/posts/23.json
POST /=/restful/posts/23
DELETE /=/restful/posts/23
12年4月22⽇日星期⽇日
118. <?php
use RollerPluginRESTfulResourceHandler;
use RollerPluginRESTfulGenericHandler;
class MyGenericHandler extends GenericHandler
{
public function create($resource) {
}
public function load($resource,$id) {
}
public function update($resource,$id) {
}
public function delete($resource,$id) {
}
public function find($resource) {
}
}
12年4月22⽇日星期⽇日
119. <?php
namespace LazyBoneResource;
use RollerPluginRESTfulResourceHandler;
use Todo;
use TodoCollection;
class TodoResource extends ResourceHandler
{
public function create()
{
$vars = json_decode($this->readInput(),true);
$todo = new Todo;
$ret = $todo->create($vars);
if( $ret->success ) {
return $todo->toArray();
}
$this->codeBadRequest();
return array( 'error' => $ret->message );
}
public function update($id)
{
$todo = new Todo( $id );
if( ! $todo->id ) {
return $this->codeNotFound();
}
$vars = json_decode($this->readInput(),true);
unset( $vars['created_on'] ); // lazy record bug
if($vars) {
$todo->update( $vars );
return $todo->toArray();
}
return $this->codeBadRequest();
}
....
12年4月22⽇日星期⽇日