<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="braeker.org" -->
<rss version="2.0">
    <channel>
        <title>braeker.org - JavaScript, Web, Programming, Life.</title>
        <description><![CDATA[braeker.org - JavaScript, Web, Programming, Life.]]></description>
        <link>http://blog.braeker.org/</link>
        <lastBuildDate>Mon, 09 Jun 2008 16:23:02 +0100</lastBuildDate>
        <generator>braeker.org</generator>
        <image>
            <url>http://blog.braeker.org/img/logo-blog-estrela.png</url>
            <title>braeker.org</title>
            <link>http://blog.braeker.org/</link>
        </image>
        <webMaster>Eduardo Lundgren</webMaster>
        <item>
            <title>jQuery UI 1.5: Rethinking Our Approach to UI</title>
            <link>/blog/2008/06/09/jquery-ui-1-5-rethinking-our-approach-to-ui</link>
            <description><![CDATA[<img style="float: right; margin-left: 15px; margin-top: 5px;" alt="ws_Path_of_Light_1024x768.jpg" id="image195" src="http://jquery.com/blog/wp-content/uploads/2008/06/ws_Path_of_Light_1024x768.jpg" width="250">
<p>When we first started with the UI project, we set out to build a
generic, basic, and simple way of adding and extending core interaction
to DOM elements. However, we soon found that our approach wasn’t
working for UI. Using the “simple” approach, we were only able to serve
simple interaction modules, but not full featured UI widgets. The
second problem was that some plugins came from external sources making
the UI suite seem disjointed and inconsistent.</p>
<p>All of this occurred right after we released 1.0 and we immediately
realized it was time to reconsider our path. We had to find a approach
that kept the <em>simplicity of jQuery</em> while making it possible to add full featured widgets to UI. We also already knew that <strong>something very simple to use is very challenging to develop</strong>. The first task was to build a generic API that allowed for <strong>maximum flexibility</strong> while being <strong>amazingly simple</strong>. The next task was making it similarly simple to develop plugins for that API.</p>
<h3>One API to Rule Them All</h3>
<p>What we came up with, was an API that <strong>removed 95% of our exposed methods</strong>, and kept only <strong>one single overloaded method per plugin</strong>. For example:</p>
<ul><li><em>$(”div”).draggable()</em> creates a draggable</li><li><em>$(”div”).draggable(”destroy”)</em> destroys it</li><li><em>$(”div”).draggable(”method”)</em> calls another method on the plugin.</li></ul>
<p>The new API also makes all callbacks behave similarly, exposes the
default options for each plugin and intelligently cleans up plugins
using remove(). We also made it possible to update plugin options on
the fly, and added smaller updates that make UI feel like one suite.</p>
<p>In order to make this happen, we <strong>removed the jquery.dimensions.js</strong> (which can now be found in jQuery core), <strong>the ui.mouse.js and the *.ext.js dependancies</strong>, <strong>introduced a ui.core.js</strong> (which includes many useful helpers) and created the <a href="http://docs.jquery.com/UI_Developer_Guide#Widgets">jQuery UI widget factory</a> which makes creating a new plugin for UI amazingly simple while making it very difficult to break the API.</p>
<h3>Stability, Debugging, Testing and jquery.simulate</h3>
<p>It was extremely important that jQuery UI v1.5 was not only
feature-rich but also stable. We took several steps to greatly improve
our debugging and testing including the setup of our <a href="http://ui.jquery.com/bugs">own dedicated bugtracker</a> with jQuery UI specific version and milestone targeting. We also invested a lot of time into <a href="http://ui.jquery.com/bugs/browser/trunk/tests">new unit tests</a> that make use of the jQuery test suite <a href="http://dev.jquery.com/view/trunk/qunit">Qunit</a>. Finally, we created <a href="http://ui.jquery.com/bugs/browser/trunk/tests/simulate/jquery.simulate.js">jquery.simulate.js</a>, a plugin specifically designed to <strong>fire true browser events</strong>.
This means, you can actually tell the plugin to pick up your draggable,
move it to a certain position and release it again, just if you’d be
talking to a real testing person.</p>
<h3>The Need for Effects: Enter Enchant</h3>
<p>One of the great things in being able to take a step back is that it
offers a totally different perspective on what a full-featured UI
solution should offer. While jQuery UI v1.0 was currently offering a
nice suite of UI controls, users were in need of solid effects like
those offered in libraries such as <a href="http://script.aculo.us/">script.aculo.us</a> and jQuery UI’s former inspiration, <strong>Interface</strong>.
Unfortunately, Interface was no longer being updated which left a bit
of a hole in terms of effects; hence a new project called “Enchant” was
born. Originally planned to be released as a complementary library to
jQuery and jQuery UI, we realized that it made perfect sense to merge
Enchant with jQuery UI allowing users easy access to advanced effects
and UI controls from one solution.</p>
<p>We’re proud to announce that <strong>Enchant is now a part of jQuery UI</strong> and jQuery users now have a unified solution for their effects and UI needs. The jQuery UI effects can be <strong>used standalone</strong> or together with UI and have a separate core which extends the jQuery core to introduce <strong>advanced easing, class transitions (morphing)</strong> and <strong>color animations</strong>. All effects are tightly integrated into the main API and can be used as standalone ( <em>$(..).effect() </em>) or directly from within jQuery methods you already know ( <em>hide()/show()</em> ).</p>
<p>Overall, we already have <strong>more than 15 ready-to-use effects</strong> for you to use in your projects, not only those <strong>provided by script.aculo.us</strong> (<em>blind,bounce,drop,fold,slide …</em>), but also fresh, new effects (<em>transfer, explode. clip, scale</em>) that make jQuery UI a great library enhancing your applications!</p>
<p>As promised in one of the last blog posts, it comes with a <a href="http://docs.jquery.com/UI/Effects">complete documentation</a> and a <a href="http://ui.jquery.com/repository/real-world/effects">combined demo</a> page to let you see them in action.<br>
<a href="http://ui.jquery.com/themeroller"><img style="float: right; margin-left: 15px; margin-bottom: 5px; margin-top: 5px;" alt="themeRoller_ui_full.png" id="image193" src="http://jquery.com/blog/wp-content/uploads/2008/06/themeRoller_ui_full.png" width="300"></a></p>
<h3>Roll Your Own Themes: ThemeRoller!</h3>
<p>One of the first things that a user typically wants to do when using
new UI controls is “skin” them to match their site’s color schemes.
Obviously, when you have UI controls from varying sources, the ability
to provide a consistent “theme” across all controls becomes much more
difficult since most component authors have their own method of
skinning their controls. We took a serious look at this and made it a
priority to have a consistent default theme that users could use as a
template for customizing jQuery UI’s set of widgets.<br>
We reached out to Boston-based <a href="http://www.filamentgroup.com/">Filament Group</a>
for some help in this and they were all for it. Being very invested in
jQuery, they saw this as a great opportunity to further help the
project. Well, what went from an discussion outlining a single default
theme quickly blossomed into jQuery UI’s killer app; <em><strong>ThemeRoller</strong></em>.</p>
<p><a href="http://ui.jquery.com/themeroller">ThemeRoller</a> offers a <strong>unique approach to theming UI components</strong> specifically built for jQuery UI. With ThemeRoller, you can <strong>create your very own theme</strong> for your project within minutes. It’s completely intuitive, comes wich rich controls to <strong>change the color and design of each state</strong>, and then <strong>previews your theme with the actual UI components</strong> as you work!</p>
<p>You now have literally <strong>millions of combinations</strong> to
chose from. Any theme you create can be reached by copying the URL at
any point in your progress; and after you’ve played with it enough, you
can click the download button and a <strong>ZIP package is generated</strong> with the css file, the images and a demo page.</p>
<p>In addition, ThemeRoller also includes a theme gallery to browse for
downloads and inspiration. Creating a theme for your application
doesn’t get any easier than this; it’s simply that amazing.<br>
We really want to extend our deepest gratitude to the amazingly talented folks at the <a href="http://www.filamentgroup.com/">Filament Group</a> for creating this amazing application.</p>
<p>Oh and by the way, you can also reach ThemeRoller by direct URL at: <a href="http://themeroller.com/">ThemeRoller.com</a>. If you want to know more about this great app and how it’s done, visit the <a href="http://www.filamentgroup.com/lab/introducing_themeroller_design_download_custom_themes_for_jquery_ui/">excellent blog writeup</a> by Filament Group!</p>
<h3>Plugin Stabilization and Enhancements</h3>
<p>The biggest improvements and changes were done on individual plugin
code. Almost every plugin has been completely rewritten from scratch to
optimize stability and performance and every plugin now comes with a
bug changelog. We also focused heavily on enhancing options and
increasing flexibility (e.g. connecting sortables to draggables) to
allow our plugins to be used in almost every environment.</p>
<p>The best way to get a full feel for every enhancement to jQuery UI’s components is to review the <a href="http://docs.jquery.com/UI_1.5_Changelog">changelog</a>.
It’s fairly extensive and gives an indication of the incredible effort
put in by the UI team. In the near future, we’ll be creating postings
and articles which outline the newest features of UI’s components. In
the meantime, we suggest you read our <a href="http://jquery.com/blog/2008/02/12/jquery-ui-15b-new-api-more-features-huge-performance-boost/">blog post about jQuery UI 1.5b</a>, which explains many of the mouse interaction changes (sortables, draggables, slider), and dig through the <a href="http://docs.jquery.com/UI">documentation</a> and the <a href="http://docs.jquery.com/UI_1.5_Changelog">changelog</a> yourself.</p>
<h3>Downloading</h3>
<p><strong>jQuery UI v1.5:</strong></p>
<p><em>Final Release:</em> <a href="http://ui.jquery.com/download">http://ui.jquery.com/download</a></p>
<p>You can also checkout the full release of jQuery UI v1.5 from the <a href="http://docs.jquery.com/UI/Subversion">Subversion repository.</a></p>
<h3>There’s more to come!</h3>
<p><img style="float: right; margin-left: 15px; margin-top: 5px;" alt="coverflow.png" id="image194" src="http://jquery.com/blog/wp-content/uploads/2008/06/coverflow.png" width="250"></p>
<p>This has truly been an amazing effort and we’re very proud to be
able to offer a comprehensive UI solution to the jQuery community.</p>
<p>We’re already planning the next release and have a huge roadmap that
contains plugins like grid, tooltips, menus, colorpickers,
autocompletes and much more. Many of them are already done and commited
code-wise. We’ve also planned plugins using new technologies like
Webkit’s css transforms (see the recent <a href="http://paulbakaus.com/?p=6">coverflow plugin</a>), so stay tuned.</p>
<p>None of this would’ve been possible if not for the amazing efforts and dedication the <a href="http://ui.jquery.com/about">jQuery UI team</a>.
They’ve dedicated so much of their personal and professional time to
create this amazing library and they deserve so much credit for their
hard work. We also want to thank the jQuery core team, with whom we
worked closely together to integrate many needed features into the
jQuery core itself.</p>
<p>Last but certainly not least, we want to give a VERY special thanks the <a href="http://liferay.com/">Liferay</a> staff, who invested countless hours into the development of the <a href="http://ui.jquery.com/">new UI website</a>, and with whom we worked closely together to stabilize jQuery UI for all kinds of enterprise situations.</p>
Thank you for all of your support, <strong>the jQuery UI Team. (<a href="http://jquery.com/blog/">http://jquery.com/blog/</a>)<br></strong><strong><em>
</em></strong>]]></description>
            <author>Eduardo Lundgren</author>
            <category>jQuery UI</category>
            <pubDate>Mon, 09 Jun 2008 19:22:55 +0100</pubDate>
            <guid>40</guid>
        </item>
        <item>
            <title>What is the best way to inject wbr tags inside a long word?</title>
            <link>/blog/2008/05/15/what-is-the-best-way-to-inject-wbr-tags-inside-a-long-word</link>
            <description><![CDATA[The <wbr> tag means: <span style="font-style: italic;">"The browser may insert a line break here, if it wishes." It the browser does not think a line break necessary nothing happens"</span> - <a target="_blank" href="http://www.quirksmode.org/oddsandends/wbr.html">Check the overhauling on ppk</a>.<br><br>If you type a <span style="font-weight: bold;">looooooooooooooooong </span>word
on google talk of Gmail it injects <wbr> tags from 15 by 15. We
know there is a lot of ways to write a solution to do it, some of them
looking for a better performance another looking for elegance.<br><br>I
was wondering how is the best way to insert <wbr> tags inside a
long string, off course, the solution can be used to insert any piece
of string inside another.<br><br>

The first solution I found have a better performance:

<br><br>

<div class="colored javascript"><code><pre>function wbr(str, r) {
	r = r || 15;
    var t = str.length, out = "";
   
    for (var i = 0; i < Math.ceil(t/r); i++)
        out = [ out, [str.slice(i*r, i*r+r), i*r+r >= t ? "" : "&lt;wbr&gt;"].join("") ].join("");
   
    return out;
};
</pre></code></div>

<br><br>

The second, is more elegant, but have a worse performance: 

<br><br>

<div class="colored javascript"><code><pre>function wbr2(str) {
	var wbr = "&lt;wbr&gt;", r = arguments[1] || 15, i = 1, out = "";
	
	str.replace(/(.{1})/g, function(piece) {
		out = [out, piece, i++%r==0 ? wbr : "" ].join("");
	});
	
	return out;
} 
</pre></code></div>

<br><br>Trying some of the functions above:<br>
<br>

<div class="colored javascript">// the first solution
//alert( wbr("abcdefghij", 5) );

// the second
alert( wbr2("abcdefghij", 5) );
</div>

<br><font style="font-weight: bold;" size="2">Do you have another intresting way to do this injection?</font> <br>I'm eager to know your ideas!<br>
<br><br>

<hr/><br>

After a quick chat with <a target="_blank" href="http://ejohn.org/">John Resig</a> he gave me in amazing <span style="font-weight: bold;">3 minutes</span> another way to do it, check his idea below: (thanks John!)<br>
<br>

<div class="colored javascript">function wbr_john(str, num) { 
	return str.replace(RegExp("(\\w{" + num + "})([^\\b])", "g"), function(all,text,char){
		return text + "&lt;wbr&gt;" + char;
	});
}
</div>]]></description>
            <author>Eduardo Lundgren</author>
            <category>JavaScript</category>
            <pubDate>Thu, 15 May 2008 22:56:55 +0100</pubDate>
            <guid>39</guid>
        </item>
        <item>
            <title>jQuery UI has a new home</title>
            <link>/blog/2008/05/06/jquery-ui-has-a-new-home</link>
            <description><![CDATA[ I just finish (with Paul and Joan) the release candidate of <span style="background-color: rgb(255, 255, 0);">new</span> <span style="font-weight: bold;">jQuery UI Site</span> (<a href="http://ui.jquery.com/" target="_blank">ui.jquery.com</a>). I'm  thrilled to announce that now we have new site features -  <a target="_blank" href="http://ui.jquery.com/download_builder/">download builder</a> already including effects, a <a  target="_blank" href="http://ui.jquery.com/demos">real-world demo carousel</a>, and a <a href="http://ui.jquery.com/functional_demos/"  target="_blank">functional demo suite</a> that makes it easy to see and try out UI examples and their syntax. <br>
<br>
Also planned for the next weeks is a theme section with directions
on downloading UI themes and how to make them, and a tutorials section
that will feature easy tutorials to easily learn controlling UI widgets.<br>
<br>
A big thanks and kudos goes to <a target="_blank" href="http://www.liferay.com/">Liferay’s </a>Art Director <a target="_blank" href="http://www.brianedwardmiller.com/">Brian Miller</a>, and all <a target="_blank" href="http://ui.jquery.com/about/">jQuery UI Team</a>.&nbsp;]]></description>
            <author>Eduardo Lundgren</author>
            <category>jQuery UI</category>
            <pubDate>Wed, 07 May 2008 02:55:39 +0100</pubDate>
            <guid>38</guid>
        </item>
        <item>
            <title>jQuery Enchant becomes part of jQuery UI</title>
            <link>/blog/2008/05/06/jquery-enchant-becomes-part-of-jquery-ui</link>
            <description><![CDATA[I am really excited with the fact that, after many weeks of discussions,
Me, Paul and all jQuery UI team decided to announce that the <strong>unreleased jQuery effects suite “Enchant”</strong>, earlier introduced as sister library to jQuery UI, is now a <strong>part of jQuery UI</strong>. With the 1.5b4 release, you’ll see a bunch of new files in the project’s folder!<br><br>The jQuery UI effects can be <strong>used standalone</strong> or together with UI and have a separate core, which extend the jQuery core to introduce <strong>easing, class transitions (morphing)</strong> and <strong>color animations</strong>. All further effects are tighly integrated into the main API and can be used as standalone ( <em>$(..).effect() </em>) or directly from within jQuery methods you already know (<em>hide()/show()</em>).<br><br>There’s no documentation for the rich effect API at this point, but
we’ll make sure it’s released before the final release of jQuery UI
1.5. In the meantime, feel free to start digging through the code - and
watch more more blog posts discussing the new effects!<br><br>Overall, we have <strong>more than 15 ready-to-use effects</strong> for you to use in your projects, not only including <strong>everything you know from script.aculo.us</strong> (<em>blind,bounce,drop,fold,slide …</em>), but also fresh new effects (<em>transfer, explode. clip, scale</em>) for you to enjoy!<br><br><a href="http://jquery.com/blog/">http://jquery.com/blog/</a><p></p>]]></description>
            <author>Eduardo Lundgren</author>
            <category>jQuery UI</category>
            <pubDate>Mon, 12 May 2008 01:07:58 +0100</pubDate>
            <guid>37</guid>
        </item>
        <item>
            <title>braeker.org no ar, preview e inspiration!</title>
            <link>/blog/2008/04/20/braeker-org-no-ar-preview-e-inspiration</link>
            <description><![CDATA[<p>Uma coisa bastante comum que acontece com meus códigos e invenções é
que ficam todos obsoletos e esquecidos dentro da pasta backups do meu
htdocs, então, decidi há alguns meses criar um blog para poder dar o
"deploy" nas idéias e compartilha-lás com os interessados no assunto.<br>
  <br>
No início tentei blogar no WordPress e no Blogspot, que apesar de serem
ótimos sistemas de "blogagem" não supriram minhas expectativas quanto à
tecnologia. Eu também havia decidido em não perder muito tempo com a
construção de um sistema de blog, devido ao fato de participar de
outros projetos como o <a href="http://ui.jquery.com/" mce_href="http://ui.jquery.com" target="_blank">jQuery UI</a>,
cujo qual sou membro ativo desde 2007. Diante destes fatos, fui
prototipar e construir um software que suprisse essa "tal" necessidade,
então lancei a primeira versão. Claro que o projeto é <u><b>Beta</b></u>,
tem muita coisa a ser feita principalmente na administração, fora que
ainda não decidi o futuro dele (publicar ou nao publicar?).<br>
</p>

<p>As tecnologias e técnicas utilizadas no Blog baseiam-se em algumas
filosofias e frameworks que eu venho apostando nos últimos breathings
de programação.<br>
</p>

<ul><li>Acompanhando as idéias do <a href="http://developer.yahoo.com/performance/" mce_href="http://developer.yahoo.com/performance/" target="_blank">Yahoo! Exceptional Performance team</a> que a filosofia é <i>"evangelizes best practices for improving web performance"</i>, criei uma classe chamada <b>YFast </b>(analogia
a YSlow da Yahoo!) em PHP (irei postar sobre ela em breve) que faz todo
o controle de Etags, Expires Header, Gzip, maxAge, etc. A YFast
gerencia todo carregamento, compactação e cabeçalhos de qualquer tipo
de arquivo do seu site, principalmente CSS e Javascript. <br>
  </li></ul>

<ul><li><a href="http://www.hufersil.com.br/lumine/" mce_href="http://www.hufersil.com.br/lumine/" target="_blank">Lumine - Database Mapping For PHP</a>,
também foi utilizado. O Lumine framework visa facilitar o
desenvolvimento de aplicações web com integração à banco de dados,
tornando as tarefas mais comuns como consultas, atualizações, inserções
e remoções mais fáceis e descomplicadas, uma vez que trabalha com os
registros como se fossem objetos. Pra quem conhece Hibernate e sabe
todas as vantagens de não ter que ficar escrevendo SQLs o tempo inteiro
o Lumine é uma boa alternativa quando for usar PHP.</li></ul>

<ul><li>Para o Front-End utilizei o jQuery e alguns plugins dele
(validation, ajaxForm, ifixpng) e um pequeno Framework de Blog em
Javascript criado por mim para facilitar os efeitos, renderizações,
cache control e eventos.</li></ul>

<ul><li>Para "compilação" que de uma maneira mais honesta posso
dizer, para concatenação e compactação dos JavaScripts e CSS, utilizei
o Apache Ant combinado com o <a style="background: transparent url(img/external.png) no-repeat scroll right center; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; padding-right: 13px;" href="http://developer.yahoo.com/yui/compressor/" mce_href="http://developer.yahoo.com/yui/compressor/" target="_blank">Yui Compressor</a>,
também será um post futuramente, no qual irei mostrar como utilizar Ant
para criar versões de produção do sistema, que é de muita utilidade
para quem pretende fazer projetos seguindo padrões de performance e
organização comos os da Yahoo.</li></ul>

<p>Basicamente foram utilizadas as tecnologias citadas para criação da
versão beta do sistema. Quem se mostrar interessado nas idéias
abordadas, incluindo o sistema de blog, pode <a href="http://www.braeker.org/blog/feed/" mce_href="/blog/feed/" target="_blank">assinar o  nosso feed</a> ou entrar em contato comigo.<br>
  <br>
  Espero que gostem!
  Qualquer dúvida ou sugestão no  About tem meus contatos.</p>]]></description>
            <author>Eduardo Lundgren</author>
            <category>Blog</category>
            <pubDate>Sun, 20 Apr 2008 04:55:37 +0100</pubDate>
            <guid>36</guid>
        </item>
    </channel>
</rss>
