SlideShare una empresa de Scribd logo
1 de 24
Feature SDK / API Presentation By: Kumar Pratikpratikk@langoor.net
Overview: Feature Development What a developer should know before coding? How widgets work on editor? How to create your own feature? Creating your first feature ( Hello World! ) Adding components (widget) to your feature SDK / API – Quick Overview Response from feature/widgets to editor & website Form  Html  Code framework functions Install setProperty getProperty hasProperty Zend DB API
What should you know before coding? HTML & CSS JavaScript (Jqueryframework) PHP 5.3 MySQL  ZendDB
Youtube widget
Creating your first feature (hello world)
Feature Database Every feature has its own database When a feature is installed on a domain, it creates a new database (copying from the feature master database) Developer can access the database using phpMyAdmin A feature can have multiple widgets in it, and all the widgets will use the same database for accessing its data.
Feature Database Access database using phpMyAdmin
Feature Database Access database using phpMyAdmin
// feature.php  - Feature Main Installer Class // Class pratikHelloWorld extends baseFeature { 	private $key = ‘d21a868268f8a43b268ee4937a1d8161'; var $db; var $instance_id; 	public function __construct($db, $instance_id = -1){ 		$this->db = $db; 		$this->instance_id = $instance_id; 	} 	public function setInstanceId($instance_id){ 		$this->instance_id = $instance_id; 	} 	public function install($data = array()){     if(LFeature::setupComplete($this->key,$this->instance_id)){ $response['done'] = 1; 		$response['action'] = "openWidgetPopup"; 		$response['new_widgets'] = LWidget::getWidgetIdsByFeatureKey($this->key); 	    }else{ 	          	throw new Exception('Unable to Complete setup'); 	    } 	return $response; 	} //---------------- Developer Code ---------------- // }
// pratikHelloWorldView/widget.php  - Feature Main Installer Class // Class pratikHelloWorldView extends baseWidget { //---------------- Developer Code ---------------- var $id; public function __construct($id, $params=array(), $db){ 	$this->db = $db; 	$this->id = $id; } public function getId()		{	return $this->id;	} public function hasProperty()	{	return 0; 		} public function delete()		{			} private function get()		{			} public function getData()		{			} public static function install($params = array()){ 	$response['done'] =  1; 	$response['widget_instance_id'] = -1; 	return $response; }		   public functiongetHtml($extra_class=array(),$extra_in_line_style=''){     $html = '<div style="width:100%; padding-bottom:10px;">';     $html .= "Hello world!";     $html .= '</div>';     return $html; } public functiongetEditorHtml($extra_class=array(),$extra_in_line_style=''){	return $this->getHtml($extra_class,$extra_in_line_style);} // }
SDK / API -  Response formatcreating a form response (install/getProperty function) $response = array(); $response['done'] = 0; $response['action'] = "openDialog"; $response['dialogContent'] = array(								"title"=>'User Comment Widget',							"contentType"=>'form',						"formaction"=>'install',						"content" => array(							  "fields" => array(								array(								     "label" => 'Name',							     "name" => 'name',							     "value" => '',							    "inputType" => 'input',						    "class" => 'required' // jQuery Validators												 )																)					),								"buttonLabel"=>"Install",						"type" => "centered“ );
SDK / API -  Responsecreating a html response (install/getProperty function) $response = array(); $response['done'] = 0; $response['action'] = "openDialog"; $response['dialogContent'] = array(								"title"=>'User Comment Widget',						"contentType"=>‘html',							"content" => “<h2>html content</h2><br /> This is a test content”,			"buttonLabel"=>"Install",						"type" => "centered“ 	);
SDK / API -  Responsefor opening widget panel (install/getProperty function) $response = array(); $response['done'] =  1; $response['step'] = ++$step; $response['widget_instance_id'] = $this->db->lastInsertId();
SDK / API  -  Responsecreating a html response with form (install/getProperty function) $html = “ <h2>html content</h2> <br /> This is a test content  <form action=“addcomment”><table> 	<tr>	<td>Name</td> 		<td><input type = “text” name=“name”></td> 	</tr><tr> 		<td>Age</td> 		<td><input type = “text” name=“age” class=“requirednumber”></td> 	</tr> </table></form> “; $response = array(); $response['done'] = 0; $response['action'] = "openDialog"; $response['dialogContent'] = array(								"title"=>'User Comment Widget',						"contentType"=>‘html',							"content“ => $html, 		"buttonLabel"=>“Add Entry",							"type" => "centered“ 	);
Creating a form handler for widget // widget.php Public function addcomment($params){ 	$params= $params[0]; 	$name = $params['name']; 	$age= $params[‘age']; 	$sql = "insert into `l_w_pratikHelloWorld_entry` (`name`, `age`) values (?,?)"; $res = $this->db->query($sql,array($name,$age)); 	return true; }
Zend DB Sample Query $stmt = $db->query(             'SELECT * FROM bugs WHERE reported_by = ? AND bug_status = ?',             array('goofy', 'FIXED')         ); $stmt = $db->query('SELECT * FROM bugs');  while ($row = $stmt->fetch()) {     echo $row['bug_description']; } $stmt = $db->query('SELECT * FROM bugs');  $rows = $stmt->fetchAll();  echo $rows[0]['bug_description'];
Thank you! Kumar  Pratik pratikk@langoor.net

Más contenido relacionado

La actualidad más candente

Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014JWORKS powered by Ordina
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem Saleh
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with PythonTakuro Wada
 
Writer APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorWriter APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorTony Tam
 
Apache Cordova: Overview and Introduction
Apache Cordova: Overview and IntroductionApache Cordova: Overview and Introduction
Apache Cordova: Overview and IntroductionGabriele Falasca
 
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaUsing the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaArun Gupta
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Chinmoy Mohanty
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsandyinthecloud
 
Introduction to Swagger
Introduction to SwaggerIntroduction to Swagger
Introduction to SwaggerKnoldus Inc.
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overviewmrdon
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahiericjamesblackburn
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPIScott Triglia
 
ACL in CodeIgniter
ACL in CodeIgniterACL in CodeIgniter
ACL in CodeIgnitermirahman
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterSachin G Kulkarni
 

La actualidad más candente (20)

Creation&imitation
Creation&imitationCreation&imitation
Creation&imitation
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Cucumber_Capybara
Cucumber_CapybaraCucumber_Capybara
Cucumber_Capybara
 
React Native
React NativeReact Native
React Native
 
Flash Testing with Selenium RC
Flash Testing with Selenium RCFlash Testing with Selenium RC
Flash Testing with Selenium RC
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
Google cloud endpoints
Google cloud endpointsGoogle cloud endpoints
Google cloud endpoints
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with Python
 
Writer APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorWriter APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger Inflector
 
Apache Cordova: Overview and Introduction
Apache Cordova: Overview and IntroductionApache Cordova: Overview and Introduction
Apache Cordova: Overview and Introduction
 
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaUsing the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
 
Introduction to Swagger
Introduction to SwaggerIntroduction to Swagger
Introduction to Swagger
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overview
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahi
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
 
ACL in CodeIgniter
ACL in CodeIgniterACL in CodeIgniter
ACL in CodeIgniter
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
 

Destacado

Platform - Technical architecture
Platform - Technical architecturePlatform - Technical architecture
Platform - Technical architectureDavid Rundle
 
PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014Cloud Sung
 
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKCreating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKMark van Aalst
 
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarIntro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarSalesforce Developers
 
The Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK AdoptionThe Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK AdoptionKate Pietrelli
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerSalesforce Developers
 
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDKDeep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDKAmazon Web Services
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Salesforce Developers
 
Building a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsBuilding a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsSalesforce Developers
 

Destacado (9)

Platform - Technical architecture
Platform - Technical architecturePlatform - Technical architecture
Platform - Technical architecture
 
PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014
 
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKCreating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
 
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarIntro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
 
The Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK AdoptionThe Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK Adoption
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime Debugger
 
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDKDeep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
Building a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsBuilding a Single Page App with Lightning Components
Building a Single Page App with Lightning Components
 

Similar a Feature SDK Overview

ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Phpfunkatron
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's CodeWildan Maulana
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolGordon Forsythe
 
WCMTL 15 - Create your own shortcode (Fr)
WCMTL 15 - Create your own shortcode (Fr)WCMTL 15 - Create your own shortcode (Fr)
WCMTL 15 - Create your own shortcode (Fr)MichaelBontyes
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkDirk Haun
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial IntroPamela Fox
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...webhostingguy
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplicationolegmmiller
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
WordPress as a Content Management System
WordPress as a Content Management SystemWordPress as a Content Management System
WordPress as a Content Management SystemValent Mustamin
 
Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)Pamela Fox
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress DevelopmentAdam Tomat
 
Introduccion app engine con python
Introduccion app engine con pythonIntroduccion app engine con python
Introduccion app engine con pythonsserrano44
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)arcware
 

Similar a Feature SDK Overview (20)

Extend sdk
Extend sdkExtend sdk
Extend sdk
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Introduction to Zend Framework
Introduction to Zend FrameworkIntroduction to Zend Framework
Introduction to Zend Framework
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_Tool
 
WCMTL 15 - Create your own shortcode (Fr)
WCMTL 15 - Create your own shortcode (Fr)WCMTL 15 - Create your own shortcode (Fr)
WCMTL 15 - Create your own shortcode (Fr)
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
WordPress as a Content Management System
WordPress as a Content Management SystemWordPress as a Content Management System
WordPress as a Content Management System
 
Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorppt
 
Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 
Introduccion app engine con python
Introduccion app engine con pythonIntroduccion app engine con python
Introduccion app engine con python
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 

Más de Harsha Nagaraj

Más de Harsha Nagaraj (6)

Designer toolkit demo
Designer toolkit demoDesigner toolkit demo
Designer toolkit demo
 
Designer toolkit
Designer toolkitDesigner toolkit
Designer toolkit
 
Designer toolkit demo
Designer toolkit demoDesigner toolkit demo
Designer toolkit demo
 
Designer toolkit demo
Designer toolkit demoDesigner toolkit demo
Designer toolkit demo
 
Designer toolkit
Designer toolkitDesigner toolkit
Designer toolkit
 
Extend overview
Extend overviewExtend overview
Extend overview
 

Último

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Feature SDK Overview

  • 1. Feature SDK / API Presentation By: Kumar Pratikpratikk@langoor.net
  • 2. Overview: Feature Development What a developer should know before coding? How widgets work on editor? How to create your own feature? Creating your first feature ( Hello World! ) Adding components (widget) to your feature SDK / API – Quick Overview Response from feature/widgets to editor & website Form Html Code framework functions Install setProperty getProperty hasProperty Zend DB API
  • 3. What should you know before coding? HTML & CSS JavaScript (Jqueryframework) PHP 5.3 MySQL ZendDB
  • 5. Creating your first feature (hello world)
  • 6. Feature Database Every feature has its own database When a feature is installed on a domain, it creates a new database (copying from the feature master database) Developer can access the database using phpMyAdmin A feature can have multiple widgets in it, and all the widgets will use the same database for accessing its data.
  • 7. Feature Database Access database using phpMyAdmin
  • 8. Feature Database Access database using phpMyAdmin
  • 9.
  • 10.
  • 11.
  • 12. // feature.php - Feature Main Installer Class // Class pratikHelloWorld extends baseFeature { private $key = ‘d21a868268f8a43b268ee4937a1d8161'; var $db; var $instance_id; public function __construct($db, $instance_id = -1){ $this->db = $db; $this->instance_id = $instance_id; } public function setInstanceId($instance_id){ $this->instance_id = $instance_id; } public function install($data = array()){ if(LFeature::setupComplete($this->key,$this->instance_id)){ $response['done'] = 1; $response['action'] = "openWidgetPopup"; $response['new_widgets'] = LWidget::getWidgetIdsByFeatureKey($this->key); }else{ throw new Exception('Unable to Complete setup'); } return $response; } //---------------- Developer Code ---------------- // }
  • 13. // pratikHelloWorldView/widget.php - Feature Main Installer Class // Class pratikHelloWorldView extends baseWidget { //---------------- Developer Code ---------------- var $id; public function __construct($id, $params=array(), $db){ $this->db = $db; $this->id = $id; } public function getId() { return $this->id; } public function hasProperty() { return 0; } public function delete() { } private function get() { } public function getData() { } public static function install($params = array()){ $response['done'] = 1; $response['widget_instance_id'] = -1; return $response; } public functiongetHtml($extra_class=array(),$extra_in_line_style=''){ $html = '<div style="width:100%; padding-bottom:10px;">'; $html .= "Hello world!"; $html .= '</div>'; return $html; } public functiongetEditorHtml($extra_class=array(),$extra_in_line_style=''){ return $this->getHtml($extra_class,$extra_in_line_style);} // }
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. SDK / API - Response formatcreating a form response (install/getProperty function) $response = array(); $response['done'] = 0; $response['action'] = "openDialog"; $response['dialogContent'] = array( "title"=>'User Comment Widget', "contentType"=>'form', "formaction"=>'install', "content" => array( "fields" => array( array( "label" => 'Name', "name" => 'name', "value" => '', "inputType" => 'input', "class" => 'required' // jQuery Validators ) ) ), "buttonLabel"=>"Install", "type" => "centered“ );
  • 19. SDK / API - Responsecreating a html response (install/getProperty function) $response = array(); $response['done'] = 0; $response['action'] = "openDialog"; $response['dialogContent'] = array( "title"=>'User Comment Widget', "contentType"=>‘html', "content" => “<h2>html content</h2><br /> This is a test content”, "buttonLabel"=>"Install", "type" => "centered“ );
  • 20. SDK / API - Responsefor opening widget panel (install/getProperty function) $response = array(); $response['done'] = 1; $response['step'] = ++$step; $response['widget_instance_id'] = $this->db->lastInsertId();
  • 21. SDK / API - Responsecreating a html response with form (install/getProperty function) $html = “ <h2>html content</h2> <br /> This is a test content <form action=“addcomment”><table> <tr> <td>Name</td> <td><input type = “text” name=“name”></td> </tr><tr> <td>Age</td> <td><input type = “text” name=“age” class=“requirednumber”></td> </tr> </table></form> “; $response = array(); $response['done'] = 0; $response['action'] = "openDialog"; $response['dialogContent'] = array( "title"=>'User Comment Widget', "contentType"=>‘html', "content“ => $html, "buttonLabel"=>“Add Entry", "type" => "centered“ );
  • 22. Creating a form handler for widget // widget.php Public function addcomment($params){ $params= $params[0]; $name = $params['name']; $age= $params[‘age']; $sql = "insert into `l_w_pratikHelloWorld_entry` (`name`, `age`) values (?,?)"; $res = $this->db->query($sql,array($name,$age)); return true; }
  • 23. Zend DB Sample Query $stmt = $db->query(             'SELECT * FROM bugs WHERE reported_by = ? AND bug_status = ?',             array('goofy', 'FIXED')         ); $stmt = $db->query('SELECT * FROM bugs');  while ($row = $stmt->fetch()) {     echo $row['bug_description']; } $stmt = $db->query('SELECT * FROM bugs');  $rows = $stmt->fetchAll();  echo $rows[0]['bug_description'];
  • 24. Thank you! Kumar Pratik pratikk@langoor.net