<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ajax on Netsensei</title>
    <link>https://www.netsensei.be/tags/ajax/</link>
    <description>Recent content in Ajax on Netsensei</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>nl-NL</language>
    <managingEditor>matthias@netsensei.nl (Matthias Vandermaesen)</managingEditor>
    <webMaster>matthias@netsensei.nl (Matthias Vandermaesen)</webMaster>
    <lastBuildDate>Sat, 18 Apr 2009 17:59:22 +0000</lastBuildDate><atom:link href="https://www.netsensei.be/tags/ajax/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Mollom 0.7.4 and more</title>
      <link>https://www.netsensei.be/2009/04/18/mollom-074-and-more/</link>
      <pubDate>Sat, 18 Apr 2009 17:59:22 +0000</pubDate>
      <author>matthias@netsensei.nl (Matthias Vandermaesen)</author>
      <guid>https://www.netsensei.be/2009/04/18/mollom-074-and-more/</guid>
      <description>&lt;p&gt;One of my ongoing efforts is trying to get WP Mollom translated. I’ve put
the plugin up on the wp-polyglots mailinglist and I’ve received several
translations. Which was enough a reason to tag a new release. So, now you can
enjoy the power of Mollom in these languages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vietnamese (vi)&lt;/li&gt;
&lt;li&gt;Bulgarian (bg_BG)&lt;/li&gt;
&lt;li&gt;Bangla (bn_BD)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ve already written about &lt;a href=&#34;https://www.netsensei.be/archives/mollom-blocks-fifty-million-spam-attempts/&#34;&gt;revising the codebase&lt;/a&gt; and making room for
improvement. I’ve made a small list of things that are on my wanted/todo
list.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More OO&lt;/strong&gt;&lt;br&gt;
At this point, all the functionality is contained in 28 functions. These
functions implement everything from the different calls to the Mollom API,
over handling comment form input to showing a pretty graph. Although most
functionality is comprised to it’s own function, there’s still
lack of a good architectural design. I’ve come to a point now where
adding new features or optimizing code means ripping apart large pieces of the
plugin. For instance, the function that let’s the configuration page
work contains code to handle the form but also to build and show the form.
Boxing functionality limits the ability to reuse code or adapt it efficiently.
Identifying separate segments of functionality and assigning them to their own
classes and functions will make the plugin more agile and able to cope with
change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementing AJAX&lt;/strong&gt;&lt;br&gt;
Over the last iterations, WordPress has incorporated loads of AJAX. This
technology makes it possible to, for instance, moderate a comment without the
need to reload the entire page. And as a bonus, add a nice colored fade
effect. It would be nice to leverage the AJAX API of WordPress and make WP
Mollom more userfriendly. AJAX in Mollom would not only be applied in the
administration panel, but also made available front-end to theme developers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usability&lt;/strong&gt;&lt;br&gt;
The current interface has already gone through several iterations but
there’s still room for improvement. I’m thinking of several
things. Instead of a percentage with no label, it should be a more visual
indication of the spaminess of a comment. Comments that had a CAPTCHA should
stand out more in the list. Pagination needs more refinement. The
configuration page needs some rethinking. The quality indicator in the
moderation module should be more verbose. I would also like to make the plugin
more informative: a better breakdown of statistics and performance monitoring
of the plugin.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hooks&lt;/strong&gt;&lt;br&gt;
Wordpress allows plugin developers to define their own hooks. This enables
plugins to ‘hook’ onto each other. A nice example is Ozh’
Admin Dropdown Menu that allows plugin developers to define a custom icon
through a hook. I would like to keep an eye out for places in the plugin code
where functionality added through third party plugins can generate added
value. Mollom is designed not only to protect comment forms, but any form
that’s presented to an end user. So it would be a plus to make Mollom
protection available to other plugins through well placed hooks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Widgets&lt;/strong&gt;&lt;br&gt;
Wordpress 2.8 will ship with a new improved Widget API. This enables plugin
developers to write easy to create widgets which can display all kinds of neat
things on your blog. An easy to install Mollom widget that displays the
effectiveness of Mollom would be a nice-to-have.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WordPress MU support&lt;/strong&gt;&lt;br&gt;
This is something I’ve been talking a long time about: adding support
for WordPress MU. The current codebase doesn’t allow this in an easy
fashion. Incorporating WordPress MU support is one of the main reasons to
rethink the way the plugin should be designed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s pretty clear this means going back to the drawingboard. Development
should progress pretty fast though, since most of the code which is now in the
current stable version, can be reused. One lesson I’ve learned is that I
should to code the plugin against the development version of WordPress (in this
case: bleeding-edge 2.8) to cope with the changes and make use of newest
features in WordPress.&lt;/p&gt;
&lt;p&gt;In retrospect, the plugin has been a project which I’m working on little
over a year now. The log of wp-mollom.php tells me that I started working on the
plugin itself (after testing the Mollom API and very premature versions in
february-march 2008)  on april, 2nd of last year. So, a bit late: but happy
1st birthday WP Mollom!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>AJAX</title>
      <link>https://www.netsensei.be/2005/09/25/ajax/</link>
      <pubDate>Sun, 25 Sep 2005 09:28:24 +0000</pubDate>
      <author>matthias@netsensei.nl (Matthias Vandermaesen)</author>
      <guid>https://www.netsensei.be/2005/09/25/ajax/</guid>
      <description>&lt;p&gt;Ik zag daarjuist bij &lt;a href=&#34;http://www.7seconden.be/archives/2005/09/21/8-seconden/&#34; title=&#34;7 seconden&#34;&gt;7 seconden&lt;/a&gt; de term AJAX opduiken. Dat is niet de
eerste keer de laatste dagen dat ik die zag passeren. Het intrigeerde mij. Wie
of wat is AJAX en wat doet het? Een speurtocht op Wikipedia leverde mij
&lt;a href=&#34;http://en.wikipedia.org/wiki/Ajax_%28programming%29&#34; title=&#34;wikipaedia&#34;&gt;deze uitleg&lt;/a&gt; op. En een definitie:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Asynchronous JavaScript and XML, or Ajax, is a web development technique for
creating interactive web applications using a combination of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTML (or XHTML) and CSS for presenting information&lt;/li&gt;
&lt;li&gt;The Document Object Model manipulated through JavaScript to dynamically display and interact with the information presented&lt;/li&gt;
&lt;li&gt;The XMLHttpRequest object to exchange data asynchronously with the web server. (XML is commonly used, although any format will work, including preformatted HTML, plain text, JSON and even EBML)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Like DHTML, LAMP, or SPA, Ajax is not a technology in itself, but a term that
refers to the use of a group of technologies together. In fact,
derivative/composite technologies based substantially upon Ajax, such as AFLAX
are already appearing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fascinating! Het komt erop neer dat de client niet voor elke interactie terug
moet naar de server. Zoals bijvoorbeeld bij PHP het geval is. Neen. De
afhandeling van de input en output wordt deels afgehandeld door een zogenaamde
AJAX engine en wanneer nodig stuurt die eventueel een HTTP request (onder de
vorm van XML) naar de server. Door een deel van het werk clientside te laten
afhandelen vermijd je een pak overhead. Daardoor wordt je applicatie een pak
responsiever. Beschouw volgende schemaatjes. (overgenomen van J.J. Garret
&lt;a href=&#34;http://www.adaptivepath.com/publications/essays/archives/000385.php&#34; title=&#34;&#34;&gt;Ajax: A New Approach to Web Applications&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://www.adaptivepath.com/images/publications/essays/ajax-fig1.png&#34; alt=&#34;schema 1&#34;&gt;  &lt;img src=&#34;http://www.adaptivepath.com/images/publications/essays/ajax-fig2_small.png&#34; alt=&#34;schema 2&#34;&gt;&lt;/p&gt;
&lt;p&gt;Toch zijn er ook een aantal (klassieke) nadelen aan AJAX verbonden:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Je moet je Javascript uitgebreid testen op crossbrowser-compatibility&lt;/li&gt;
&lt;li&gt;Je kan niet meer betrouwen op de “back” button van je browser om
naar de vorige staat te gaan. Browsers gaan er immers vanuit dat een pagina in
zijn geheel wordt geladen en niet in stukjes zoals bij AJAX het geval is. Een
oplossing bestaat momenteel uit kunst en vliegwerk met iFrames.&lt;/li&gt;
&lt;li&gt;Hetzelfde geldt voor het bookmarken van pagina’s.&lt;/li&gt;
&lt;li&gt;Aangezien HTTP verkeer binnen een AJAX framework asynchroon moet je als
ontwikkelaar de latency tussen actie en http request goed in het oog houden.
Of het resultaat is juist het omgekeerde van wat je voor ogen had: je
interface reageert een pak trager op interactie.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wie gebruikt er nu AJAX? Een aantal groten implementeren deze technologie reeds.
Bijvoorbeeld &lt;a href=&#34;http://www.flickr.com&#34; title=&#34;&#34;&gt;Flickr&lt;/a&gt; en &lt;a href=&#34;http://gmail.google.com&#34; title=&#34;&#34;&gt;Google GMail&lt;/a&gt; of &lt;a href=&#34;http://maps.google.com/&#34; title=&#34;&#34;&gt;Google Maps&lt;/a&gt;. Het is
allesinds een technologie om in het oog te houden. De voordelen zijn immers
legio en de mogelijkheden onbeperkt.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>