Considerações sobre o lançamento do Ext 4.0

Sorry, this entry is only available in Português.

O tão aguardado Ext 4.0 está aí, e são muitas as novidades: gráficos, padrão MVC, novo pacote de Ext.data, nova estrutura de classes, etc etc etc… Dentre este oceano de alterações confesso que estou tão perdido quanto qualquer outro programador. Não vou ficar aqui ressaltando o que mudou, a equipe Ext fez um ótimo trabalho de publicação através dos vídeos da Sencha Conf, os posts do blog, e também os artigos que são distribuídos com a documentação oficial. Vou aqui somente publicar minhas considerações.

Reaprendendo o Ext

Quem programava Ext 1.0 sofreu com a nova versão 2.0. Era uma versão muito melhor, muito mais rápida, porém extremamente diferente. Traçar o mesmo paralelo entre a versão Ext 3.0 para a 4.0 pode ser um pouco exagerado, mas certos pontos realmente são válidos. A impressão é que você está reaprendendo o framework, porque não foram algumas melhorias pequenas como da versão 3.0 para 3.1, foram coisas essenciais, o código foi praticamente reescrito desde seu núcleo. É preciso voltar aos estudos, assistir apresentações, ler artigos, investir tempo na nova documentação, até adaptar-se a nova versão.

Para começar o sistema de classes mudou. A forma de escrever suas classes não é mais o mesmo. Só neste ponto eu creio que terei de alterar todos os fontes JS das minhas aplicações. Não que tudo vá parar de funcionar, porque a equipe irá lançar um arquivo de migração (Compat.js). Mas para ser 100% complacente com a nova versão, as definições de classes devem mudar.

/*
 *Como eram definidas as classes
 */
Ext.namespace('App.cliente');
App.cliente.Cadastro = Ext.extend(Ext.form.FormPanel, {

	restUrl: '/clientes',
	clienteID: 0,

	initComponent: function() 
	{
		//...
		App.cliente.Cadastro.superclass.initComponent.call(this);
	}
});
Ext.reg('clientecadastro',App.cliente.Cadastro);

/*
 * A nova definição
 */
Ext.define('App.cliente.Cadastro', {

	restUrl: '/clientes',

	config: {
		clienteID: 0
	},

	initComponent: function() 
	{
		//...
		this.callParent();
	}
});

Arquitetura de Aplicação

Outra coisa, pela primeira vez na história da companhia uma arquitetura de aplicação foi publicada. Até então cada ninja Ext resolvia sua aplicação de uma forma. Algums orientados a objetos, outros nem tanto, alguns colocando todos scripts em um diretório, outros dividindo por namespace, etc…




Estrutura dos arquivos

Se adequar a nova estrutura é crucial para poder fazer uso do SDK que está sendo desenvolvido. Este SDK foi comentado na Sencha Conf, e assume que seus fontes e sua aplicação está toda organizada seguindo os padrões Sencha de desenvolvimento. Caso contrário, nada de automatização e algumas surpresinhas que eles estão reservando.

Desempenho

Toda a reescrita do código foi pensada para ter mais robusteza e desempenho. De início posso dizer que com certeza ficou mais rápido. E as explicações são bem óbvias. Primeiro porque houve uma gigante diminuição de elementos DOM para cada componente. O Grid não usa mais um monte de <div> e sim uma <table>, os botões não usam mais uma complicada estrutura porque agora é usado CSS3 para fazer os degradês e cantos arredondas. Também por conta do CSS3 muitos sprites foram eliminados.

Além disso o framework agora conta com carregamento dinâmico. Foi até uma agradável surpresa que minha função Ext.require tenha ido junto. Agora o Ext conta com essa função em seu núcleo, mas com o toque dos programadores Sencha que deram uma bela melhorada nela. O arquivo JS só é carregado quando a classe é requisitada. Mas claro, para isso sua aplicação deve seguir a arquitetura Sencha.

Fiquei com um pouco de dúvida devido ao tamanho dessa versão: 1.1mb. E não é a versão debug, porque esta tem 2.4mb. Ainda estou a procura de melhores esclarecimentos. Não sei se é possível carregar o próprio Ext sob demanda, ou incluir o arquivo de 1mb será a única abordagem.

Gráficos

Nesse ponto eu fiquei muito surpreso. O pessoal caprichou e criou uma biblioteca decente de gráficos sem usar flash, nem requerir nenhum plugin adicional. São dezenas de gráficos e opções para todos os gostos. Como tudo é Javascript, tudo pode ser alterado e personalizado sem problemas. Legendas, cores, animações, tooltips, tudo pode ser customizado, extendido ou melhorado. Os gráficos são rápidos e desempenham bem nos browsers modernos. Segundo a equipe até o IE6 suporta os gráficos…



Ext.data

Outro ponto que estou muito ansioso para explorar. O DataStore deixa de ser o chefão e passa a ser somente um complemento. Agora é possível fazer uma modelagem muito mais profissional usando a classe Ext.Model.



//definir um model
Ext.define('User', {
    extend: 'Ext.data.Model',    
    fields: ['id', 'name', 'age'],
    proxy: {
        type: 'rest',
        url : '/users',
        reader: {
            type: 'json',
            root: 'users'
        }
    }
});

//pegar referência do model
var User = Ext.getModel('User');

//criar um usuário
var ed = Ext.create('User', {
    name: 'Ed Spencer',
    age : 25
});

//salvar diretamente sem intervenção de stores
ed.save({
    success: function(ed) {
        console.log("Saved Ed! His ID is "+ ed.getId());
    }
});

//ou carregar 
User.load(123, {
    success: function(user) {
        console.log("Loaded user 123: " + user.get('name'));
    }
});

Temas

O pacote de temas foi alterado radicalmente, e posso dizer que ficou anos-luz a frente da versão anterior. Isso porque todas as imagens sprite para criar cantos arredondados e degradês foram removidas! Tudo agora é feito por CSS, e para o IE6 parece que existe uma solução que cria as imagens sprites sob demanda (confesso não me interessar muito, não dou suporte pra IE6).

Para começar, está sendo utilizado SASS e Compass. SASS é uma ferramenta para deixar o CSS mais legal, permitindo variáveis, funções, enfim, uma nova forma de escrever CSS. Compass é uma biblioteca com funções padrões SASS, para criar degradês, cantos arredondados, e demais efeitos. Essas alterações realmente me agradaram, porque criar temas no Ext era MUITO chato. Para alterar a cor de um simples botão era preciso mudar o sprite inteiro do botão, nos estados normal, pressionado, com o mouse em cima, etc etc etc… chato, chato, chato. Agora é só usar um mixin (uma função CSS) para criar botões das mais diferentes cores.


Conclusões

Como comentei, esse post foi somente para me colocar de volta à escrita e publicar minhas considerações sobre o Ext 4. Eu espero trazer em breve mais conteúdo educacional a medida que eu vou me aprofundando e descobrindo as mudanças do Ext 4.0.

Por agora vou iniciar a mudança de um sistema iniciando pelos temas. Melhor lugar para começar é com a apresentação do Sencha Conf Theming ExtJS 4.0. Vou tentar me localizar com essa nova estrutura de diretórios e publico pra vocês as novidades.

Um forte abraço!

LinkedInDeliciousPinterestTumblrEmailShare

Sencha Touch – um framework HTML 5 para aplicativos móveis

And they did it again! Was not enough for the periodic releases from the Ext JS framework, the Ext team, now with the new name Sencha, took the next big step and introduced the first framework for mobile devices under the HTML 5 standard. See here a few features, and a first analysis of Sencha Touch framework.

Mobile applications without barriers

The first thing that caught my attention was the interface that the framework generates very similar to the standard Apple and Google. But being a web framework, you can create applications similar to existing mobile devices without worrying about the authorization of the manufacturers (read AppStore) or facilities, nor with the software distributions. Just develop, make available on a web server and all mobile device users can use.

I confess that I’m interested in the mobile area, especially with regard to the iPhone. But right away you need to have Mac OS on your computer. It is difficult to be installed on non-apple computers (not impossible but difficult). Then you have to learn objective-C, a language that to me is very boring. And finally you have to respect all the Apple standards because if you not they shouldn’t approve the distribution of your application. It’s easy to see how good was the launch of Sencha Framework. Imagine developing mobile applications using web language, it’s fantastic!

Integrating Ext JS with Sencha Touch

We must not confuse one framework with another. Ext JS is a web framework and Sencha Touch a mobile framework. But the team has said in his blog that the data layer is the same in both Sencha Touch as in Ext 4 (forthcoming). Knowing this, to turn a desktop application in mobile, you just have to reprogram the interface. All the data layer, queries to the database, and everything that relates to the server side (PHP, ASP.NET, Java, etc. ..) will remain equal!

Concluding

It is readily apparent that the “mobile wave” is increasing. First with the iPhone launch, a decent smartphone, without squeezed keyboard, not intuitive navigation, and etc (don’t want to join the discussion) … And then with the launching of multiple applications and development of even more advanced smartphones. It seems that the Sencha Touch greatly facilitate the migration to this platform.

It is also evident that the Sencha team is aware of new standards, and there is the promise of major advances in existing products in the company, mainly Ext JS. They have created a framework using CSS 3, demonstrating its ability to do the same in Ext Framework. Only the implementation of CSS 3 in the Ext JS represent one of the greatest advances made, because all images and sprites to build gradient and rounded corners would be exempt.

Congratulations to Sencha team! And you? What do you think the news? Cheers!

LinkedInDeliciousPinterestTumblrEmailShare

Ext agora é Sencha

I confess I’m as surprised as any other member of the community. From day to night Ext JS announces a major move, joining force with the largest frameworks in the “touch applications” and graphics area, jqTouch and Raphaël.  Maybe the news had not have repercussions both the name of the company had not been changed.

Ext JS is still the same

According to information the Ext JS Framework was not discontinued or changed, or anything! He exists and while keeping your name, but is promising to add more value. That, to me, will only create more strength to the framework! Initially I received the news with great enthusiasm, this will only create even more opportunities for those working with the Ext.

Nor should we worry about the rest of the products because they have warned that these changes did not affect the development of Ext JS, GWT Ext, Ext Core, and Ext Designer. Perhaps the names will be changed, but for now the codes remain the same.

Jack Slocum leaves the company

Jack, Ext founder, is leaving the company. We have no statement from him, but Jamie Avins (development team) already said:

He decided to focus some other things and hasn’t been active in the Ext community for a while. Jack’s decision to become less active was his and his alone (please no crazy conspiracy theories).

More news…

At first the team is doing enough mystery, and we do not have much news. When asked how the Ext JS would integrate with jqTouch (jQuery based framework) Jamie said:

You won’t have to wait long for that answer.

So let’s wait! ExtDesenv will be constantly updating and bringing the best information to you. Cheers!

LinkedInDeliciousPinterestTumblrEmailShare

Ext ION: rumors of a new product

Finally Ext Designer has been released! Developers around the world were able, last week, to download their 14 days trial copy of the software. The videos and demos posted previously reflected well the final product, which has drag ‘n drop features, integration with data from a server, instant preview, export code and etc … The team is still working hard over the designer and we are all certain that the product will suffer good updates until the end of the year.

But the post today is not to discuss the designer, but the rumors of a possible new product from Ext JS team! Designer’s demos available last year ran on the Adobe Air platform, but what we saw in the final version was not quite in line with what we know about Air Applications. Installer was totally different, not using the default Adobe Air, and also the s.o. files were different.

I noticed, when I installed, that the .dll files were pre-named with Qt, which is a Nokia cross-platform framework. So the team had ditched Air and opted for Nokia Qt?

I thought I had closed the question, but today, watching the video of Ext JS meetup organized by Jay Garcia, I noticed what is perhaps the new Ext JS product. It’s called ION and would be an API for developing cross-platform apps (based on Qt?). My impression is that the team is aware of the tendency to create web applications that run on desktop and go into the Air/Titanium Market with their own solution.

Anyway, rumors are exciting, and can be confirmed within 1 to 2 months. Let’s wait and hope, perhaps, another great product of Ext JS.

LinkedInDeliciousPinterestTumblrEmailShare

Razões para comprar o Ext Designer

It was announced here, February 19 on ExtDesenv, the pre-sale of Ext Designer, the visual editor for Ext JS. From there began an intense discussion whether it is worth purchasing the product or not. This post is a bit of my point of view and also comments from the community about it, go ahead!

What is Ext Designer

Few know but there is an official blog post providing more information and downloadable trial version of the software. In this version you can only create the screens and make prints. You can’t save any work or export the generated code. In addition there are videos showing the use of the editor. All these features are enough to give an idea of what is the designer.

Features

Drag and drop

Do not handle code, just drag and configure the components on a more intuitive way as possible. This is very positive, since we can create interfaces much more quickly than by code. People with the slightest knowledge of Ext JS can still benefit from the option of creating prototypes, which can then be improved by an Ext programmer.

Data connection

It is possible to integrate your XML or JSON data source with Ext Designer, to see your grid and other components being populated with data. Further increases productivity and creates a clear separation between data and interface. You can have a developer involved only on the server side, creating the data sources, and another in parallel creating interfaces. At the end of the work everything is attached by Ext Designer.

Save and export code

Export object-oriented code directly into the IDE of your choice. According to Jack Slocum “the code is worthy to be considered as written by himself”, but if you don’t like it you have the option to export and modify it in an IDE. The hardest part has been done, which is the creation and configuration of components.

Screenshots

As mentioned, people with minimal knowledge of Ext can prototype screens and then take screenshots. Impress your client building an interface in front of him.

And much more like saving pre-defined components for reuse, and undo and restore feature. These resources are exciting enough, but it’s enough to do a pre-sale?

Comments from community

Follow a few questions from the community forum and the responses from Ext JS team:

Q: Will it be possible to import existing projects?
A: Not for the initial release.

Q: What are your pricing plans for updates? Do you get updates for free?
A: Initially we had thoughts of an annual fee, but decided to scrap that based on community feedback.The designer is a perpetual license. This means you buy it once without any obligations to upgrade annually.We will also be providing free updates and enhancements for the designer until we announce our next version (just like ext 2 -> ext 3).

Q: Will it be possible to add support for custom components like extensions and plugins?
A: Yes. We built the designer with community extensions and the developers that support them in mind.We will be announcing more on this in the coming months.

Q: Will there be an evaluation version of the latest release of the product? Would be nice to gen and experiment code before actually purchasing.
A: We plan on offering a trial after we release the product.The limited time, 50% off promotion is following the tradition we started with version 1.x of Ext JS.

Q:How can I convince, for example, my boss to do Ext Designer pre-sale without any assurance that it will improve productivity?
A: The pre-order is heavily geared towards our community that do not require any formal approval processes. We are working on a trial, but it won’t be available until after the pre-order sale is over.

Q: When will be the official release?
A: We’re planning doing it at end of march, next to day 21.

Q: What are the advantages using Ext Designer?
A:

Using Ext Designer as a productivity tool will save you time and improve your deliverables.

It’s not intended to replace any aspect of your existing workflow, just improve it.As an example, we envision contractors spending their time with clients more productively by building interfaces in real time. The Ext Designer will also empower end users to participate in the planning and maintenance of applications, allowing you to focus on building applications faster.

The Designer is IDE independent, as such, the code generation can output to a directory of your choosing where you and your favorite editor take over.

At the end of the day, the Designer will bring a refined experience to our community, customers, and end users.

Author’s opinion

I consider myself one of those community programmers that need formal approval to make purchases like this. However only to see the product demo, videos, and comments by the development team I am convinced (and my bosses) that this will be the tool that will improve the entire process of creating interfaces. Analysts may prototypes and save their work. When I starting working on the project it will already have the prototype attached and I can take care on improving the code both through the designer, and after giving final touches to the code with an IDE. Our licenses have been acquired, and we are excited waiting for the final release.

Congratulations team Ext JS for the great work. Releases like this only confirm the confidence by the community in your work.

LinkedInDeliciousPinterestTumblrEmailShare

1 ano de ExtDesenv: novos recursos e layout

Finally the new ExtDesenv is online! I’ve been hiding for a while investing time in reshaping the portal that is now published! This month we’re celebrating 1 year of existence, and nothing better than giving a general review. I started this project in a very simply way, with a very cheap hosting and a standard wordpress layout. Now ExtDesenv has a very good hosting from DreamHost and a personalized layout.

My greatest achievement is perhaps the inclusion of multi-language plugin, which allows me to create posts in both Portuguese and English. Adding my little knowledge in English with a little help from Google Translate I will try to meet our friends outside of Brazil, seeking a higher profile not only to ExtDesenv, as well as the Brazilian community of programmers. We have very good projects here and I’m sure we can make beneficial trade with outsiders. Please consider that I am not a native language speaker so I can make many grammatical errors that I hope you help me to correct writing to my email.

Besides this feature it is also important to comment the new posts, comments and tags navigation made with Ajax. It is possible to see the latest posts, the most popular, most recent comments, and tags from the blog.

Also, I tried a lot to search a good twitter plugin to put here on the blog. The old one show only my tweets, while this search twetts of various authors and also by subject, in case #extjs. So all you have going on in twitter about Ext and tweets of people I follow, will appear alongside.

In addition I changed the examples page. I was using a layout based on the official examples page, and decided to make my own more integrated into the blog.

And to complete, a “bookcase” with books and suggested list of interesting links, so that I can share with you good resources that I find about our Ext JS world and RIA development.

I am very pleased with the overhaul and now I have everything (almost) done I can concentrate on making articles, tutorials and resume my idea of writing courses. I hope you enjoy and appreciate the new portal, as you have been done in that 1 year of ExtDesenv life.

Sincerely

LinkedInDeliciousPinterestTumblrEmailShare

Nova versão do Ext JS: 3.1.1

Tive o prazer de abrir meu e-mail hoje pela manhã e receber um email da equipe Ext JS intitulado “Ext JS 3.1.1 Release‏”. A nova versão está aí!Não para revolucionar totalmente como ocorreu da 2.2 para a 3.0, mas para dar conformidade aos planos da equipe de lançar correções e pequenas melhorias de tempos em tempos. Abaixo extrai algumas alterações que julgo importante citar, para ver a lista completa consulte o Log de Alterações.

  • Alterado comportamento para que quando seja adicionado itens a um toolbar desabilitado, o item também fique desabilitado
  • Adicionada correção para cancelar evento quando a tecla ESC fizer uma janela Ext.Window fechar
  • Novo tema denominado “Access” promete melhor acessibilidade e é implementado em alguns exemplos
  • Ext.menu.Menu agora suporta propriedade zIndex
  • Adicionada constante para especificar a largura mínima de uma caixa de mensagem Ext.MessageBox
Download Ext JS 3.1.1

Download Ext JS 3.1.1

LinkedInDeliciousPinterestTumblrEmailShare

Nova versão lançada: Ext JS 3.1

Otimizar: a palavra-chave da nova versão

Forma-se sempre uma expectativa muito grande quando a equipe Ext lança uma nova versão de seu framework. Dessa vez não foi diferente. A versão 3.1 é proclamada como a versão que “coloca a casa em ordem”. Segundo a equipe o framework inteiro foi varrido em busca de vazamentos de memórias e oportunidades de otimização. Em post oficial a equipe explica o que foi feito para melhorar a performance do framework: remover referências que permitiam vazamentos de memória, remover chamadas redundantes para gerenciar layout de componentes e refatorar o núcleo de eventos Ext.EventManager.

Novas extensões adicionadas

Também para satisfação geral da comunidade a equipe não deixou de adicionar novos componentes! São extensões já consagradas que agora estão sendo incluídas no framework. Notem que quando digo incluídas não quero dizer que agora são parte do arquivo ext-all.js. Esses fontes foram admitidos pela equipe Ext e agora são gerenciados por eles, mas o seu código não faz parte do arquivo ext-all.js. Ao invés disso eles estão na pasta ux dentro de examples. Isso evita que o tamanho do framework cresça e cresça cada dia mais.

As novas extensões são:

  • TreeGrid: permite ter um TreePanel com características de Grid
    TreeGrid

  • LockingGrid: excelente adição que permite congelar certas colunas enquanto usamos o scroll em outras.
    Grid-Locking
  • ColumnHeaderGroup: permite agrupar o cabeçalho das colunas de um grid.
    Grid-Column-Grouping

E mais…

A equipe ainda criou novos exemplos como um formulário utilizado o poderoso e ainda pouco usado layout vbox, um grid utilizando recursos de filtro e um outro formulário onde é possível editar as labels dos campos.

Não tive tempo de realizar muitos testes porque eu já quis logo republicar o anúncio da nova versão aqui no ExtDesenv. Em breve estarei realizando a atualização da versão anterior 3.0 para a nova em um sistema grande e posto qualquer eventual observação.

Forte abraço e até em breve!

LinkedInDeliciousPinterestTumblrEmailShare

Ext Designer Preview

Anunciado o mais novo preview do Ext Designer para deixar os membros da comunidade ainda mais ansiosos! Devo confessar que a cada lançamento de versão me surpreendo mais. Agora está presente as seguintes funcionalidades:

  • Duplicar componentes – é possível especificar uma coluna toda de um formulário, clicar em duplicar, e uma nova coluna idêntica será gerada logo ao lado
  • Transformar componentes – para criar um grid editável (EditorGrid) a partir de um grid normal (GridPanel) basta um click
  • Desfazer e Restaurar – Implementado o famoso ctrl-z para voltar um passo editado ou avançar
  • Filtro nas configurações – Para encontrar mais facilmente uma configuração em específico em meio a tantas outras foi criado um filtro
  • Atualização automática – O Designer verifica atualizações automaticamente e pergunta ao usuário se deseja baixar a versão mais recente
  • Screenshots – não seria bom desenhar uma tela, apertar no botão “imprimir tela” e ver um screenshot da aplicação?

Instalação

Eu já baixei e testei a aplicação. Quando baixei veio um arquivo .zip e eu esperava um .air. Me perdi um pouco na hora de instalar até que me deu a idéia de renomear o arquivo e executar. Funcionou beleza (: Para quem quiser ta aí a dica:

baixe a versão mais antiga do designer
Instale
Baixe a nova versão
Renomeie para .air
Instale

Não preciso comentar que você precisa ter o Adobe Air instalado, preciso?

Aos que não podem instalar, foi criado um vídeo mostrando todas as novidades do designer, vale muito a pena conferir no post oficial.

Novidades futuras

Integração com Extesões (UX)

Sim, está em desenvolvimento o suporte a extensões de todos os tipos (Componentes, Plugins e Layouts). Quando completarmos a infraestrutura do marketplace mais detalhes virão de como implementar sua própria extensão para o designer. Aaron Conran

Geração de código

Geração de código ainda não está disponível no designer. Isso virá na versão “Pro” que será lançada em um mês. Se você deseja dar uma olhada no que o código irá parecer:  http://www.extjs.com/forum/showthread.php?p=378242#post378242 Aaron Conran

É isso aí pessoal, a comunidade cresce cada vez mais, o framewok se torna ainda melhor! Nada mal ter uma aplicação para desenhar as telas hein? Até a próxima!

LinkedInDeliciousPinterestTumblrEmailShare

O maior portal de Ext JS do Brasil

É com muito prazer que eu anuncio a criação do ExtDesenv.com.br, o maior portal de Ext JS do Brasil. Há 6 meses atrás o extdesenv blog foi criado sob os domínios do blogspot. Já existia um excelente fórum, o ext js br, que conta com uma comunidade muito ativa, porém faltava um portal que abordasse o ext na forma de blog, foi para preencher essa necessidade que o ExtDesenv foi criado.

Hoje o ExtDesenv conta com domínio próprio e grandes planos pro futuro. O blog está com um visual muito melhor, contando com posts em destaques e diversas ferramentas que o wordpress proporciona. Além disso, existe a novidade da seção Cursos. Já está sendo criado um curso básico de Ext JS que até final do ano estará aparecendo por aqui, aguarde!

Agradeço o apoio de todos os leitores e prometo grandes publicações aqui no ExtDesenv! Até em breve!

LinkedInDeliciousPinterestTumblrEmailShare