WEB 2.0, E-LEARNING 2.0, EAD 2.0 PARA ONDE CAMINHA A EDUCAÇÃO A DISTÂNCIA?
Meu projeto final - Neobase 2.0
-
Upload
saulo-vallory -
Category
Technology
-
view
303 -
download
2
description
Transcript of Meu projeto final - Neobase 2.0
Neobase 2.0A evolução do framework para desenvolvimento web visando as necessidades do mercado
Sobre o framework
Desenvolvimento totalmente orientado a objetos
Baseado em componentes
Dirigido a eventos
Manipulação da interface através de código no servidor
Separação entre o HTML e a lógica de criação da interface
Sincronização do estado da interface no cliente e no servidor
Comunicação cliente-servidor transparente utilizando AJAX
Necessidades identificadas
Cache de páginas e de consultas ao banco
Internacionalização
Log de erros
Controle da aplicação através da configuração
Suportar outros serviços comuns à aplicações web
Proposta de trabalho
Novas API’s de cache, log, internacionalização e serviços
Hot spot: Application
Reestruturação do framework
Pacote de exceções
Outras melhorias
Otimização do monitoramento de alterações utilizando uma variação do padrão observer
Redução do tamanho da mensagem de sincronização de 50% a 75%
Abstração da renderização da saída
Simplificação da manipulação de eventos
Simplificação da criação de componentes
Comparação das estruturasAntiga estrutura de pacotes (esq.) e nova (direita)
Neobase 2.0 em ação
Sobre o site<?php require_once('loadBaze.php'); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:php="http://www.neoconn.com/namespaces/php" version="1.0"><head><title>NeoBase PHP Framework</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><!-- (en) Add your meta data here --><link href="/css/basemod.css" rel="stylesheet" type="text/css" /><!--[if lte IE 7]><link href="/css/basemod-ie.css" rel="stylesheet" type="text/css" /><![endif]--><link href="/css/default.css" rel="stylesheet" type="text/css" /><link href="/css/internal.css" rel="stylesheet" type="text/css" /><style>#aboutLink { color: #EF9900;}</style></head><body><div id="page_margins"> <div id="page_content"> <php:UIHelper id="header" sectionName="about" /> <div id="main"> <div id="content" class="clearfix"> <php:PlaceHolder id="mainContent" /> </div> </div> <php:UIHelper id="footer" /> </div></div></body></html>
/layouts/InternalLayout.php
Sobre o site
<div id="page_margins"> <div id="page_content"> <php:UIHelper id="header" sectionName="about" /> <div id="main"> <div id="content" class="clearfix"> <php:PlaceHolder id="mainContent" /> </div> </div> <php:UIHelper id="footer" /> </div></div>
/layouts/InternalLayout.php
Sobre o site
<div id="page_margins"> <div id="page_content"> <php:UIHelper id="header" sectionName="about" /> <div id="main"> <div id="content" class="clearfix"> <php:PlaceHolder id="mainContent" /> </div> </div> <php:UIHelper id="footer" /> </div></div>
/layouts/InternalLayout.php
Componente Placeholder
<?php require_once('loadBaze.php'); ?><php:Panel id="mainContent"> <img src="/images/tx_the_motivation.jpg" alt="The Motivation" /> The motivation is lorem ipsum factus! <img src="/images/tx_main_features.jpg" alt="Main Features" /> Something about the features goes here <img src="/images/tx_the_future.jpg" alt="The Future" /> What is waiting for us?</php:Panel>
/about.php
Componente UIHelperimport('system.web.ui.PageComponent');
class UIHelper extends PageComponent implements IRenderable, IRenderer{ public static $baseFolder; public function hasCustomRenderer() { return true; } public function getCustomRenderer() { return $this; } public function render(IRenderable $object, IWriter $writer) { $content = file_get_contents(self::$baseFolder.str_replace('.',DIRECTORY_SEPARATOR, $this->id).'.html'); $writer->write(preg_replace_callback('|\\{\\{([\\w_]+)\\}\\}|', array($this, 'replaceHook'), $content)); }
public function replaceHook($matches) { if($this->hasAttribute($matches[1])) return $this->getAttribute($matches[1]); return $matches[0]; }}
UIHelper::$baseFolder = System::getApp()->getConfig()->DocRoot .'/helpers/';
/classes/site/ui/UIHelper.class.php
Componente UIHelperimport('system.web.ui.PageComponent');
class UIHelper extends PageComponent implements IRenderable, IRenderer{ public static $baseFolder; public function hasCustomRenderer() { return true; } public function getCustomRenderer() { return $this; } public function render(IRenderable $object, IWriter $writer) { $content = file_get_contents(self::$baseFolder.str_replace('.',DIRECTORY_SEPARATOR, $this->id).'.html'); $writer->write(preg_replace_callback('|\\{\\{([\\w_]+)\\}\\}|', array($this, 'replaceHook'), $content)); }
public function replaceHook($matches) { if($this->hasAttribute($matches[1])) return $this->getAttribute($matches[1]); return $matches[0]; }}
UIHelper::$baseFolder = System::getApp()->getConfig()->DocRoot .'/helpers/';
/classes/site/ui/UIHelper.class.php
Mensurando o trabalho
0
16000
32000
48000
64000
80000
PHP Comentários Javascript HTMLTotal
Neobase Neobase 2.0
Estatísticas providas por ohloh.net
Mensurando o trabalho
Neobase Neobase 2.0
Linhas de código
Esforço estimado
Custo estimado
31.782 73.820
5 pessoa-anos 11 pessoa-anos
$ 269.499 $ 613.536
Estatísticas providas por ohloh.net