December 13, 2010 Swathi Vegesna. Committee Members Dr. Chris Pollett Dr. Sami Khuri Dr. T.Y.Lin

Similar documents
Web-based IDE for Interfacing View Controller

Introduction to PHP. Handling Html Form With Php. Decisions and loop. Function. String. Array

PHP & My SQL Duration-4-6 Months

Model-Controller Interfacing using Struts-Based Web Application

PROFESSIONAL TRAINING

Programming in PHP Have you Cake? Presenter: Nguyen Thanh Hai Mar. 30 th, 2014

Get in Touch Module 1 - Core PHP XHTML

Static Webpage Development

DevShala Technologies A-51, Sector 64 Noida, Uttar Pradesh PIN Contact us

A Model-Controller Interface for Struts-Based Web Applications

Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

ASP.NET MVC Training

20486: Developing ASP.NET MVC 4 Web Applications

Client-Side Page Element Web-Caching

Course Details. Skills Gained. Who Can Benefit. Prerequisites. View Online URL:

Full Stack Web Developer

Full Stack Web Developer

Web Application Server CakePHP

Course 20486B: Developing ASP.NET MVC 4 Web Applications

Developing ASP.NET MVC 4 Web Applications

PHP MVC Framework (CakePHP)

CakePHP. Getting ready. Downloading CakePHP. Now that you have PHP installed let s create a place in htdocs for your CakePHP development:

All India Council For Research & Training

Reading Writing Speaking Reading Writing Speaking. English Intermediate Intermediate Elementary Intermediate Intermediate Elementary

Unveiling Zend Studio 8.0

Web development using PHP & MySQL with HTML5, CSS, JavaScript

Developing ASP.NET MVC 4 Web Applications

Developing ASP.Net MVC 4 Web Application

COURSE 20486B: DEVELOPING ASP.NET MVC 4 WEB APPLICATIONS

20486: Developing ASP.NET MVC 4 Web Applications (5 Days)

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Developing ASP.NET MVC 4 Web Applications

An Introduction to JavaScript & Bootstrap Basic concept used in responsive website development Form Validation Creating templates

All Applications Release Bulletin January 2010

Web Development Course (PHP-MYSQL-HTML5.0)

CMS Training. Web Address for Training Common Tasks in the CMS Guide

Web Database Programming

Visual Studio Course Developing ASP.NET MVC 5 Web Applications

Mix It Up: Visual Studio 2010 and ASP.NET 4.0. Singapore 25 March 2009

Developing ASP.NET MVC 5 Web Applications. Course Outline

Skills Canada National Competition. Contest Description. 17- Web Site Development / Secondary and Post-Secondary May 27-30, Saskatoon

Create-A-Page Design Documentation

Software. Full Stack Web Development Intensive, Fall Lecture Topics. Class Sessions. Grading

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Joomla

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Drupal

Creating HTML files using Notepad

How to Install (then Test) the NetBeans Bundle

20486-Developing ASP.NET MVC 4 Web Applications

Networking & The Web. HCID 520 User Interface Software & Technology

Professional Course in Web Designing & Development 5-6 Months

Asynchronous JavaScript + XML (Ajax)

Instructor s Notes Web Data Management Web Client/Server Concepts. Web Data Management Web Client/Server Concepts

,

Kendo UI. Builder by Progress : Using Kendo UI Designer

Rails: Views and Controllers

PHP & PHP++ Curriculum

Ajax Quick View Pro Extension

Ampliación de Bases de Datos

jquery in Domino apps

IJSRD - International Journal for Scientific Research & Development Vol. 3, Issue 02, 2015 ISSN (online):

Technology Feasibility October 22, 2013

Project. Minpeng Zhu

Simple AngularJS thanks to Best Practices

1. Setup a root folder for the website 2. Create a wireframe 3. Add content 4. Create hyperlinks between pages and to external websites

What's New in Sitecore CMS 6.4

CAKEPHP. Blog tutorial

PHP / MYSQL DURATION: 2 MONTHS

Developing ASP.NET MVC 5 Web Applications

Perch Documentation. U of M - Department of Computer Science. Written as a COMP 3040 Assignment by Cameron McKay, Marko Kalic, Riley Draward

D2L Brightspace. The Content Tool. University Information Technology Services. Learning Technologies, Training, & Audiovisual Outreach

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes

Oracle Service Cloud Integration for Developers Ed 1

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

EIE4432 Web Systems and Technologies Project Report. Project Name: Draw & Guess GROUP 21. WatermarkPDF. shenxialin shen

MARKET RESPONSIVE PRESTASHOP THEME USER GUIDE

Zend Studio 3.0. Quick Start Guide

Building a Mapping Application Start-to-Finish

JavaScript Functions, Objects and Array

Xerte. Guide to making responsive webpages with Bootstrap

QUALTRICS QUALTRICS BASIC USAGE USER GUIDE EXTERNAL DOCUMENT. Writer Date Version Celine Montigny 10/09/2010 V1.0 VALIDATION. Name Function Date

Pemrograman Web MVC Programming and Design Pattern. Dosen: Dr. Eng. Herman Tolle

Acceptance Test Plan and Cases (ATPC)

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL.

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Getting started with Marketing

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "

Unable To Access An Error Message. Corresponding To Your Field Name. Codeigniter >>>CLICK HERE<<<

20486 Developing ASP.NET MVC 5 Web Applications

About the Authors. Who Should Read This Book. How This Book Is Organized

Web Premium- Advanced UI Development Course. Duration: 08 Months. [Classroom and Online] ISO 9001:2015 CERTIFIED

Getting Started with the ArcGIS API for JavaScript. Julie Powell, Paul Hann

Extending Yioop! Abilities to Search the Invisible Web

How to Edit Your Website

Requirements Specification

Microsoft Developing ASP.NET MVC 4 Web Applications

Oracle Service Cloud Integration for Develope

Ektron Advanced. Learning Objectives. Getting Started

Revision for Grade 7 ASP in Unit :1&2 Design & Technology Subject

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

SEEM4570 System Design and Implementation. Lecture 6 Game Part II

Transcription:

December 13, 2010 Swathi Vegesna Committee Members Dr. Chris Pollett Dr. Sami Khuri Dr. T.Y.Lin

Agenda Goal Tools used Design Features Implementation Conclusion

Goal Build the View Component of a Web-based IDE that enables users to create a Web application in PHP on the CakePHP framework

Motivation Why Web-based IDE? Current available IDE s Desktop-Based Needs software Installation Maintenance costs (updating softwares) No remote access to code Lacks implementation of development Framework No MVC architecture No consistent Folder and File structure No proper toolbar to build the Views

Web-Based IDE on CakePHP Browser-based code development environment Provides Remote Access Reduces hardware costs and management overhead CakePHP based Web applications Consistent and Well organized Eases development of Web applications

Tools & Softwares Web Server : Apache Database: MySQL Language: PHP FrameWorks: CakePHP, jquery Text Editor: CKEditor Debug Tool: FireBug Browsers: compatible with Firefox, IE 8, Chrome, Safari

CakePHP One Among top 5 open source frameworks for PHP after Yii, Zend and CodeIgniter Design Patterns Model-View-Controller Object-Relational Mapping Active Record pattern Front Controller pattern Turns an application into a maintainable, modular and rapidly developed package. Application consistency and logicality

Building Web applications in CakePHP Folder Structure Cake app Models Controllers Views Webroot Config Naming conventions Filenames are underscored class names Model class names should be singular and CamelCased. Controller class names should be plural, CamelCased, and end in Controller. Views are named after the controller functions they display (using underscores).

Preliminary Work Book collection Website Experiment with CakePHP to build a Web application. Performance Tests on JavaScript Frameworks Select the best JavaScript framework. Draggable and Droppable classes Experiment with jquery library. Layout of the IDE Build a prototype of the GUI.

Book collection Website Goal Build model component Get Model- Controller interactivity Get View-Controller interactivity Web Pages Built Home page Registration page Login page Book collection page Book Cart Page Book Collection Page

Implementation Model Class class Book extends AppModel { var $name = Book'; } Controller Class View class BooksController extends AppController { var $name = 'PartnerLocators ; function index() { $this->set( books', $this->book->find('all')); } } <?php foreach ($books as $book):?> <tr> <td><?php echo $book[book ]['Title'];?></td> <td> <?php echo $book[ Book']['Author'];?></td> </tr> <?php endforeach;?>

Performance Tests on JavaScript Frameworks Frameworks Grade Performance score HTTP requests Weight jquery A 84 10 10.2K YUI B 76 14 97.2 K jquery DOJO A 80 11 76.4 K Prototype B 78 12 40.5 K Fast Speed and test less & weight weight test (Firebug) library Most widely used. Highly effective and short code Compatible with all browsers Slick Speed Test (Slick speed tool)

Draggable and Droppable classes $(".tab").draggable({ helper:'clone', cursor: 'move' }); $("#area").droppable({ accept: '.tab', drop: function(event, ui) { var d = ui.draggable.attr("id"); createtable(d); }});

Layout of the IDE Menu Bar Projects Display and Code Editor Tool bar & Help Menu

Architecture (MVC)

Design Folder Structure

Naming Conventions Model class names should be singular and CamelCased. Ide ide.php Table name ides Controller class names should be plural, CamelCased, and end in Controller. IdesController ides_controller.php Views are named after the controller functions they display (using underscores). getfile( ) /cakephpide/views/ides/get_file.ctp

Features Different features of the View Component of Web-based IDE include: Create Views Edit Views Design and Edit modes Form build Toolbar Preview of Web application

Create View On a Right Click on Views folder, creation of a new view

Implementation function createview(){ /*Get the data from the view form*/ $this_project = $this->ide->find('first', array('fields' => array('ide.id, Ide.project_name, Ide.project_path'), 'conditions' => array('ide.id' => $project_id))); if($this_project){ if(!$this->ide->is_view_available($project_id, $view_name){ return("-1"); }else{ $this->create_view_skeleton_file($view_name, $view_filename); return (int) $this->ide->viewcomponent->save(); }} else return 0; } Create File Ajax call to the create the file Check for existence If exists complain else create a view file

Edit View On a Right Click on Views file, opens the view file to edit

Implementation function read_view_file(project_name, component_name){ /* On successful ajax call */ { msg_div = htmlspecialchars_decode(msg); msg_text = msg.replace(/\n/gi, "<br>"); msg_text = msg.replace(/\s/gi, " "); $('#viewarea').html(' ').html(msg_div); // design mode $('#edit_panel textarea#myvoiceid').val(msg_text); // edit mode } } Read File Ajax call to the file and fetch the data Modify the data according Display the data both in design and edit modes

Implementation function save_view_file(){ var fileio = $('#edit_panel textarea#myvoiceid').data('fileio'); var content = encodeuricomponent($('.editpanel textarea#myvoiceid').val()); var component_type = fileio.component_type; var component_filename = fileio.component_filename; $.ajax({'type' : 'POST', 'url' : write_file_url, data : 'component_filename='+component_filename+'&content='+content, success: function(msg){} }); } Save File Get the code form the edit mode the data through Ajax call Write into the file

Design mode of the Views Design mode Using Toolbar to build the views

Implementation $("#design_tab").click(function() { $(.formelements').draggable ({ helper:'clone', cursor: 'move' }); var h = htmlspecialchars_decode($('.editpanel textarea#myvoiceid').val()); h = h.replace(" ", " "); $('#viewarea').html(' ').html(h); }); All the elements are made draggable Gets the content from the edit mode Displays the content

Edit mode of the Views Edit mode Can modify the view code and save the file

Implementation $("#edit_tab").click(function() { $(.formelements').draggable("destroy"); var h = htmlentities($('#viewarea').html()); h = h.replace(" ", " "); h = h.replace(/\>\n/gi, ">"); h = h.replace(/\>/gi, ">\n"); h = h.replace(/\s/gi, " "); $('.editpanel textarea#myvoiceid').val(h); }); Destroys the draggable nature of the elements Fetches the modified content from the design mode Replaces the HTML entities Displays the code in the Text editor

Form build Toolbar Tool bar and Help Menu for View component

Implementation $(".formelements").draggable({ helper:'clone', cursor: 'move' }); Create the draggable objects of the elements in the toolbar Create the droppable element of the dic in the design mode On drop event implemented the features Create a view element Make them draggle Right click implementation $(".viewfile").droppable({ accept: '.formelements', drop: function(event, ui) { $('.viewfile').append(form); $(".drag").draggable({ cursor: 'move', containment: "parent }); append_rightclick(); $("#divform"+formid).resizable(); $("#field"+formid).droppable({ accept: '.formelements', drop: function(event, ui){ addelement(d, fid); append_rightclick(); } }); } });

View-Controller Interactivity Edit Form Displaying various Controller functions for the form action

Implementation function getformfunctions(){ /*get the data from the view form*/ $all_contents = file($cfile_path); $obj = $this->instantiate_controller($project_name, $controller_name, $controller_filename); if($obj){ results = get_class_methods(get_class($obj)); } print(json_encode($results)); } Get controller Functions Read all the controller file Fetch all the class methods Send the list of controller functions

Preview of Web application On a Right Click on Project for a preview, new window with the web application is displayed.

Implementation $("span.project").contextmenu({ menu: 'projectmenu }, function(action, el, pos) { if(action == 'preview'){ popitup(url); } }); $function popitup(url) { newwindow =window.open(url,'name', 'height=350,width=400'); if (window.focus) { newwindow.focus() } return false; } Right click implementation on the project Call the function to preview Preview of the web application Open a new window to display the web application

User Testing Feedback from 3 graduate students GUI is very user friendly Form Toolbar is a best feature View-controller Interactivity is very challenging Fast as no sluggish behavior in cursor movement Response to Feedback: Modified Toolbar to display the form elements only when a form created. Included help menu at bottom of the Toolbar. Included a generic CSS file.

Comparison with Phpanywhere Features Proposed IDE Phpanywhere MVC pattern Implemented N/A Framework CakePHP N/A Tools to build Views Available N/A Preview Available N/A Tabs N/A Available Code Indentation N/A Available Syntax highlighting N/A Available

Performance Testing R e s p o s e t i m e s 18 16 14 12 10 8 6 4 2 Phpanywhere vs Web-based IDE developed ( s e c s ) 0 Load the IDE List the Porjects create project open file save file switch projects Create Form Actions Create Label Create Text Field Create Text Area Create Drop Downs Create Radio Button Create Check Buttons Phpanywhere Web-based IDE developed

Conclusion View Component of the Web-based IDE developed Enables users to create CakePHP view templates Provides user-friendly GUI to edit the templates Eases creation of HTML Forms Establishes a View Controller interaction IDE developed eases the development of CakePHP based Web applications

References CakePHP. Retrieved November 06, 2010, from http://cakephp.org/ Top 10 Ranking PHP Frameworks. Retrieved November 14, 2010 from http://www.phpframeworks.com/top-10-php-frameworks/ Model View Controller. Retrieved November 06, 2010 from http://en.wikipedia.org/wiki/model%e2%80%93view%e2%80%93controller Web Server. Retrieved November 06, 2010 from http://en.wikipedia.org/wiki/web_server Apache HTTP server. Retrieved November 06, 2010 from http://httpd.apache.org/ MySQL. Retrieved November 06, 2010 from http://en.wikipedia.org/wiki/mysql PHP. Retrieved November 06, 2010 from http://www.php.net/ PhpMyAdmin. Retrieved November 06, 2010 from http://www.phpmyadmin.net/home_page/index.php JQuery. Retrieved November 06, 2010 from http://jquery.com/ FireBug. Retrieved November 06, 2010 from http://getfirebug.com/ CKEditor. Retrieved November 06, 2010 from http://ckeditor.com/ Phpanywhere. Retrieved November 20, 2010 from http://phpanywhere.net/overview

Thank you

Questions