CAKEPHP & EXTJS - RESPONSIVE WEB TECHNOLOGIES



Similar documents
An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Development. CakePHP Application. development using the open-source MVC. Step-by-step introduction to rapid web. CakePHP framework.

Framework as a master tool in modern web development

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

Developing ASP.NET MVC 4 Web Applications MOC 20486

Building Rich Internet Applications with PHP and Zend Framework

A Tool for Evaluation and Optimization of Web Application Performance

What s New in IBM Web Experience Factory IBM Corporation

Performance Testing for Ajax Applications

Abstract. Description

Developing ASP.NET MVC 4 Web Applications

What s really under the hood? How I learned to stop worrying and love Magento

Performance Testing Web 2.0

Web Applications Come of Age

GUI and Web Programming

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o :

Advantage of Jquery: T his file is downloaded from

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Credits: Some of the slides are based on material adapted from

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development

IBM Script Portlet for WebSphere Portal Release 1.1

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

Data Visualization in Ext Js 3.4

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Software Requirements Specification For Real Estate Web Site

Front-End Performance Testing and Optimization

Web Development Frameworks

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

Web Programming Languages Overview

IT3503 Web Development Techniques (Optional)

AJAX. Gregorio López López Juan Francisco López Panea

Some Issues on Ajax Invocation

XML Processing and Web Services. Chapter 17

JAVASCRIPT, TESTING, AND DRUPAL

Standards, Tools and Web 2.0

Application layer Web 2.0

The Learn-Verified Full Stack Web Development Program

AppDev OnDemand Microsoft Development Learning Library

Alfresco. Wiley Publishing, Inc. PROFESSIONAL. PRACTICAL SOLUTIONS FOR ENTERPRISE. John Newton CONTENT MANAGEMENT. Michael Farman Michael G.

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1


OIT 307/ OIT 218: Web Programming

Experimenting in the domain of RIA's and Web 2.0

How To Write An Ria Application

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

Enabling AJAX in ASP.NET with No Code

Distance Examination using Ajax to Reduce Web Server Load and Student s Data Transfer

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

DreamFactory & Modus Create Case Study

Elgg 1.8 Social Networking

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

CrownPeak Playbook CrownPeak Hosting with PHP

Server-Side Scripting and Web Development. By Susan L. Miertschin

MASTER DRUPAL 7 MODULE DEVELOPMENT

White Paper On. Single Page Application. Presented by: Yatin Patel

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Pentesting Web Frameworks (preview of next year's SEC642 update)

INTERNET PROGRAMMING AND DEVELOPMENT AEC LEA.BN Course Descriptions & Outcome Competency

Sitecore Dashboard User Guide

Rich-Internet Anwendungen auf Basis von ColdFusion und Ajax

From Desktop to Browser Platform: Office Application Suite with Ajax

Enterpise Mobility Lexicon & Terminology

Caplin Trader 1.4. Catalog Of Documents. August 2009 C O N F I D E N T I A L

IBM Digital Experience. Using Modern Web Development Tools and Technology with IBM Digital Experience

SellerDeck 2013 Reviewer's Guide

Developing Cross-platform Mobile and Web Apps

IT3504: Web Development Techniques (Optional)

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

Whitepaper. Rich Internet Applications. Frameworks Evaluation. Document reference: TSL-SES-WP0001 Januar

Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.

Web Testing. Main Concepts of Web Testing. Software Quality Assurance Telerik Software Academy

A Comparison of Open Source Application Development Frameworks for the Enterprise

Browser tools that make web development easier. Alan Seiden Consulting alanseiden.com

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Web Cloud Architecture

IGW+ Certificate. I d e a l G r o u p i n W e b. International professional web design,

Certified Selenium Professional VS-1083

Ajax: A New Approach to Web Applications

YouTrack MPS case study

JISIS and Web Technologies

Coding for Desktop and Mobile with HTML5 and Java EE 7

Modern Web Development From Angle Brackets to Web Sockets

ASP.NET: THE NEW PARADIGM FOR WEB APPLICATION DEVELOPMENT

Portals and Hosted Files

Web Design Technology

10CS73:Web Programming

Fig (1) (a) Server-side scripting with PHP. (b) Client-side scripting with JavaScript.

Design and Functional Specification

Art of Code Front-end Web Development Training Program

Porting Legacy Windows Applications to the Server and Web

Cloud Computing. Chapter 2 Software as a Service (SaaS)

W3Blender Overview Custom Application & Web Development Services

FormAPI, AJAX and Node.js

(An) Optimal Drupal 7 Module Configuration for Site Performance JOE PRICE

Lecture 9 Chrome Extensions

Ajax Design and Usability

Transcription:

CAKEPHP & EXTJS - RESPONSIVE WEB TECHNOLOGIES Davor Lozić, Alen Šimec Tehničko veleučilište u Zagrebu Sažetak Ovaj rad prikazuje današnje, moderne tehnologije za responzivni web. Prikazuje način na koji ove različite tehnologije komuniciraju na webu i potrebne uvjete za siguran i brz rad ovih tehnologija. Članak detaljno opisuje rad serverskih alata kao što je CakePHP i klijentkih alata kao što je ExtJS. Pojmovi kao što su MVC, JSON, AJAX komunikacija, HTTP zahtjevi i odgovori su također objašnjeni. Rad detaljno opisuje i proces od otvaranja stranice na klijentskoj strani do stvaranja odgovora na strani servera. Ključne riječi: Internet, responzivni web, MVC tehnologija, server-klijent komunikacija Abstract This paper presents descriptions of today s modern technologies for a responsive web applications. It presents the way how those different technologies communicates on the web and what are the dependencies for a secure and fast work of this technologies. In applied research, concepts for server-side tools like CakePHP and client-side tools like ExtJS are explained in depth. Terms like MVC, JSON, AJAX communication, HTTP request and response are also explained. This paper also shows the complete proces from opening the page on client s side and creating the response on the server s side. Key-Words: Internet, responsive web, MVC technology, server-client communication 1 INTRODUCTION Today in the world of the Internet, you can literally do everything. You can surf the web, be on the social networks, read the news or just buy anything you want. The question which I would try to answer is, what is the technology behind all of this grid of information. How is it even possible to have the entire web application somewhere in the world and use it in your home? First of all, you have two things. You have your own home computer, connected to the Internet, of course. At the other side of the line, there is a server computer specialized for many things and one of them is giving answers to your questions, specialized questions. That 'specialization' is called protocol and the most famous of all is TCP-IP and the whole Internet depends on it. 2 MVC TECHNOLOGIES MVC (model-view-controller) is currently one of the best programming technique. In a simple web application, inside of a file you can have a lots of different technologies: HTML, CSS, JavaScript, PHP etc. but in MVC programming model, you divide those technologies and create some conventions. 2.1 MVC LAYERS Model layer it's the M in MVC and it's the biggest layer. Whenever you have to work with data(base) you work with the Model. Connection to database, retrieving, saving and changing data, it's all part of this layer. View layer also called a presentation layer. Here you include your HTML, CSS, JavaScript, headers, footers, anything you want to show to user. Controller layer it's the connecting layer. Everything which doesn't belong in Model or View, belongs here. His main purpose is connecting the data from model to the presentation layer View. 2.2 MVC REQUEST How does a simple request look like in MVC? [2] 1. Browser makes a request to: www.application.com/users/read.

2. Controller gets the request and sees that you need users controller and the action read inside of it. 3. Inside the read action you are calling the Model. 4. User's Model gets the data you need and sends it back to the Controller. 5. Controller gets the data and prepares it for the View. 6. View gets the data from Controller and sends the HTML to the user's browser. Almost every request goes through these steps. Sometimes you don't need any data so the steps 3. and 4. are not necessary. 2.3 CAKEPHP CakePHP is one of the most famous PHP frameworks. PHP is a server-side language and CakePHP is the MVC framework for PHP. Of course, every framework has some of the advantages and disadvantages. DRY don t repeat yourself never duplicate your code. When you want to share code, always use Components which you can include in any Controller or put it inside of AppController, parent of all Controllers. Duplicated code is hard to maintain, change and creates unnecessary work. Convention over configuration you see the real CakePHP magic when you use Cake s convention rules. Table names inside the database are always plural, Models are singular, Controllers are plural concatenated with Controller word and Views are plural and inside the folder named by Controller. When you are using this convention, CakePHP connects Model, Controller and the View and does the whole request for you. If you don t follow this convention, you need to specify details inside those modules. Special folder structure all files inside CakePHP have a place where they need to be. Advantages [5]: Simple configuration Open Source, OOP convention over configuration bake scripts friendly URLs rich query API Disadvantages: documentation needs some work learning curve leak of understanding the Cake background CakePHP really makes coding easier. Earlier, if you ve created five web applications, you ve wrote instrucions for log in and user registration five times. CakePHP has implemented those actions into Components and all you have to do is create the configuration array inside the component and the framework will do the work for you. 2.3.1 CAKEPHP CONCEPTS CakePHP has several concepts and rules. DRY, convention over configuration, special folder structure, and scaffolding are some of them. Picture 1 special folder structure As you can see, CakePHP has a really clear structure and you always know where to put your source code. Scaffolding is a technique supported by most MVC frameworks in which the programmer may write some specifications that describes how the application database may be used and, in this case CakePHP, internally generates the code for you and you can check your application on-the-fly.

example is Store in ExtJS. Store is a collection of Models, collection of data. Then, you connect the grid, View, to the store and whatever you change inside the Store it will automatically be visible inside the Grid. 3 SERVER-CLIENT AJAX COMMUNICATION Picture 2 CakePHP Request [5] 2.4 EXTJS ExtJS is Sencha's solution for a MVC JavaScript library. It's great for creating huge and rich web applications. [3] With ExtJS you have a lot of features: textfields, textareas, listboxes and comboboxes, grids, trees, sliders etc. It's not about the UI, it's about the functionality behind this huge framework such as Ajax calls, DOM scripting etc. Advantages [4]: working with data (pagination, filtration, sorting) simple grids CSS out-of-the-box consistent look in the whole application Sencha tools for packaging great documentation Disadvantages: learning curve size of the library CSS very easy to get lost hard debugging not free for commercial software ExtJS framework makes client-side programming easier, specially web design. Concept of programming in this framework looks like a big JavaScript object full of configuration. You just put the configuration object and the framework renders everything for you. Just like CakePHP, ExtJS has DRY concepts, conventions and special folder structure.[7] Great benefit of using this framework is also a portability, you don t have to write one version of code for Internet Explorer and the second version for every other browser. MVC model in this framework is implemented really sophisticated. The AJAX stands for Asynchronous JavaScript and XML. It's a development technique where you get the data from the server without refreshing the whole page. If you look Facebook's chat system, ebay's on mouse hover pictures etc. you will see that you have a desktop-like application. So, you create a request, send data and wait for the server's response. The data being sent is JSON (JavaScript Object Notation) or XML (extensible Markup Language). Both technologies are just standardized text with their own beneficial.[6] You use XML when you send some configuration or simple data and JSON when you send much more data. In this case, we are reading and writing to a grid so here we are using JSON. Picture 3 JSON example 4 CONCLUSION Although this technologies are relatively new, today, many applications use MVC and AJAX. Users want desktop-like applications and they get that with those technologies which are, at least, free for open-source projects. Today, community support is really big and you can get help and response on many forums in a few hours, sometimes minutes. Another advantage, just looking at the source code of these open source projects, you can learn a lot and that s what s all about for many great developers.

5 REFERENCES: 1] David Golding; Beginning CakePHP: From Novice to Professional, Apress, 2008. 2] Mariano Iglesias; CakePHP 1.3 Application Development; Packt Publishing Ltd.; 2011. 3] Crysfel Villa; Armando Gonzalez; Learning Ext JS 4.; Packt Publishing Ltd.; 2013. 4] Ahsanul Bari; CakePHP Application Development: Step-by-step introduction to rapid web development using the open-source MVC CakePHP framework; Packt Publishing Ltd.; 2008. 5] Bartosz Porebski; Karol Przystalski; Leszek Nowak; Building PHP Applications with Symfony, CakePHP, and Zend Framework; Wiley Publishing; 2011. 6] Jesus Garcia; Ext JS in Action; Manning Publication; 2011. 7] Nicholas C. Zakas; Professional JavaScript for Web Developers; John Wiley & Sons, Inc.; 2012.