Yii – How Power Comes Introduction, OOP & Design Patterns Presented at: Nextbridge Multan Center Aug 25, 2011.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Configuration management
Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they?
Spring, Hibernate and Web Services 13 th September 2014.
James Martin CpE 691, Spring 2010 February 11, 2010.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Struts Basics SSE USTC Qing Ding. Agenda What is and Why Struts? Struts architecture – Controller: Focus of this presentation – Model – View Struts tag.
Software Architecture Patterns (2). what is architecture? (recap) o an overall blueprint/model describing the structures and properties of a "system"
ASP.NET Programming with C# and SQL Server First Edition
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
UNIT-V The MVC architecture and Struts Framework.
Lecture 2 - Struts ENTERPRISE JAVA. 2 Contents  Servlet Deployment  Servlet Filters  Model View Controllers  Struts  Dependency Injection.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
This chapter is extracted from Sommerville’s slides. Text book chapter
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Singleton Christopher Chiaverini Software Design & Documentation September 18, 2003.
5/5/2005Toni Räikkönen Internet based data collection from enterprises using XML questionnaires and XCola engine CoRD Meeting May 11th 2005.
ASP.NET INTRODUCTION INTO وزارة التربية و التعليم العالي كلية العلوم و التكنولوجيا قسم علوم الحاسوب و تكنولوجيا المعلومات اعداد الاستاذ: عبد الله محمد.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Avalanche Internet Data Management System. Presentation plan 1. The problem to be solved 2. Description of the software needed 3. The solution 4. Avalanche.
Enticy GROUP THE A Framework for Web and WinForms (Client-Server) Applications “Enterprise Software Architecture”
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
Framework Universal & Infinite Software Solution.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
Codeigniter is an open source web application. It occupies a very small amount of space in the memory and is most useful for developers who aim to develop.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
Yii is “yes it is” from this we can know that surely it would be a highly needed technology for website developers for its high performance. It is suitable.
Yii Development. -Yii stands for Yes It Is ! -a fast -Secure -high performance -PHP framework for developing web 2.0 applications. -simply a fine tool.
10 Reasons to Choose the Yii Framework. The development of Yii framework began on January 1, 2008.Yii framework It is an open source application that.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Design Patterns Façade, Singleton, and Factory Methods Team Good Vibrations (1)
Building Secure Web Applications With ASP.Net MVC.
Model View Controller MVC Web Software Architecture.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
The Singleton Pattern SE-2811 Dr. Mark L. Hornick 1.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Design Patterns David Talby. This Lecture Re-routing method calls Chain of Responsibility Coding partial algorithms Template Method The Singleton Pattern.
IOS Best Practices: Avoid the Bloat
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 31. Review Creational Design Patterns – Singleton Pattern – Builder Pattern.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
MVC WITH CODEIGNITER Presented By Bhanu Priya.
Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks.
1 Chapter 12 Configuration management This chapter is extracted from Sommerville’s slides. Text book chapter 29 1.
 An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has.
Mach-II Primer Ben Edwards An Introduction to Mach-II: An event-based, implicit invocation web-application framework.
10 Most Popular PHP Frameworks for Modern Web Development
V7 Foundation Series Vignette Education Services.
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
Cake PHP – OOPS approach for PHP
October 2014 HYBRIS ARCHITECTURE & TECHNOLOGY 01 OVERVIEW.
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
Web Technology Solutions
Top 12 PHP Frameworks 2016.
Chapter 10 Design Patterns.
Yii Framework – The Major Pros and Cons
CO6025 Advanced Programming
Yii - For the Future - Gen Web Development Platform
…and web frameworks in general
JavaServer Faces: The Fundamentals
…and web frameworks in general
Information Hidding Dr. Veton Kepuska.
Top 10 PHP Frameworks in PHP is one of the most sought after choices for programmers. Hypertext Pre-processor is chiefly used as a server-side open.
Presentation transcript:

Yii – How Power Comes Introduction, OOP & Design Patterns Presented at: Nextbridge Multan Center Aug 25, 2011

AGENDA Today’s

Topics we will cover in this presentation Introduction to Yii Core features Patterns that make it Yii

TOPIC 1 Yii Framework

Yii - Definition Fast – Secure – Professional

Why it’s called like that?! Chinese Yi: Easy and simple. Flexibility, ability to change. Persistence. Core principles are always the same.

How it is Fast?

How it is Secure? Cross-site Scripting Prevention Cross-site Request Forgery Prevention Cookie Attack Prevention Built-in Authentication and Authorization – Cookie based Login – Access Control Filter – Handling Authorization Result – Role-based Access Control – Configureable Authorization Manager

How it is Professional? MVC Database Access Objects (DAO) Query Builder Active Record DB Migration Skinning & Theming Automatic Code generation Best parts from all Frameworks

How it is Professional? MVC Database Access Objects (DAO) Query Builder Active Record DB Migration Skinning & Theming Automatic Code generation Best parts from all Frameworks

Yii History Prado (2004) ▼ Yii 1.0 (2008) ▼ Yii 1.1 (2010) ▼ Yii2 (?)

Why reinventing the wheel?

Why reinventing the wheel ? Sometimes it’s better to invent a better wheel!

Why reinventing the wheel & Why MVC? When Prado was developed there were at least no competitors. Prado took ASP.NET ideas that were ―not from this world. MVC is popular and convenient. Frameworks of 2008 weren’t that good.

Why reinventing the wheel & Why MVC? When Prado was developed there were at least no competitors. Prado took ASP.NET ideas that were ―not from this world. MVC is popular and convenient. Frameworks of 2008 weren’t that good.

Yii Team 6 developers. Tech. writer. ~50 translators. Priority: – Code stability. – Code reliability. – Consistent style.

TOPIC 2 Yii - Features

Yii Features Model-View-Controller (MVC) design pattern Database Access Objects (DAO), Query Builder, Active Record, DB Migration Form input and validation AJAX-enabled widgets Authentication and authorization Skinning and theming Web services Internationalization (I18N) and localization (L10N) Layered caching schem Error handling and logging Security Unit and functionality testing Automatic code generation Compliance to XHTML Purely object-oriented Friendly with third-party code Detailed documentation Extension library

Yii Main Features MVC Active Record Integration with jQuery Widgets integrated with Jquery Themes and translation

Yii – Typical Flow

Flow of execution

TOPIC 3 Patterns that make it Yii

What do you think? ?

What makes it Yii - 1 Borrowing Ideas

Is it Good?

Borrowing Ideas Copy-paste is evil. Think. Analyze. Take the best and leave the rest.

What makes it Yii - 2 OOP Pattern

Yii - Component CComponent is the base class for all components. CComponent implements the protocol of defining, using properties and events. What makes it Yii - 1

What makes it Yii - 3 Design Patterns

What are design patterns? The words ”Object Oriented Design” repeated on wall paper An industry buzzword that gets you into meetups Recurring solutions to common software development challenges Mind bending algorithms of confusion and indigestion

What are design patterns? The words ”Object Oriented Design” repeated on wall paper An industry buzzword that gets you into meetups Recurring solutions to common software development challenges Mind bending algorithms of confusion and indigestion

The Lazy Load Pattern Lazy loading is the process of delaying the instantiation of an object until the instance is needed. We all know the mantra, lazy programmers are the best programmers.

The Lazy Load Pattern

Delays resource consumption until it is needed, which may be never Is relatively easy to understand Offers an encapsulated means of creating objects Offers an encapsulated means of storing objects for use later

The Registry Pattern A registry is an object that other objects can use to access data, settings, values and other objects from a sort of internal storehouse.

The Registry Pattern

Maintaining values throughout a request Setting/getting configuration values Allowing access to variables within an application without globals For Windows user, causing hours and hours of grief when corrupt

The Singleton Pattern The singleton patterns ensures that one and only one instance of an object exists.

The Singleton Pattern

Pro: You know you have the same instance available at all times. Con: One and only one instance is all you get. Pro: Instantiates itself for you so all you need to do is get it. Con: Autoinstantiation diminishes flexibility of argument passing. Pro: Since it is singleton it can replace global variable declaration. Con: Since it is singleton it can replace global variable declaration.

The Factory Method Pattern The factory method is a method whose sole purpose in life is to create objects. Most commonly (and really per definition) the factory method is an interface method that delegates object instantiation decisions to subclasses. However, it also commonly acceptable to say that a method that creates objects (both of known and unknown classes) is a factory method.

The Factory Method Pattern

Encapsulates object creation Allows a range of functionality for error trapping, loading, etc Does not need to know anything about what it is creating Easy to read, easy to understand Lightweight, fast and can be made into a static method

Now its your turn to speak

YII – HOW POWER COMES Introduction, OOP & Design Patterns Designed & delivered by: Nazar Hussain Training Manager Presented at: Nextbridge Multan Center Aug 25, 2011