The voice of BeeBole

PURE Is Working With The JavaScript Framework Prototype

November 13, 2008 by Mic (JavaScript, PURE)

Thanks to the contribution of Carlos Saltos and Borja Vazquez our JavaScript Template Engine PURE is now working with the JavaScript Framework Prototype

The code is not in the master repository yet, but you can get it in the branch of PURE created by Carlos.

They are also working on the MooTools support.

With the announcement of the DOMAssistant support a few weeks ago, and jQuery initially, it is now three JavaScript libraries that are supported.

Stay tuned

Ruby Like Notation #{ … } To Mix Strings And Variables

November 6, 2008 by Mic (PURE)

New feature for our JavaScript template engine PURE

From revision 1.7 on, there is a new shortcut available to concatenate strings.

We’ll take a similar HTML as our basic Hello World example:

<div>
    Hello <span>World</span>
</div>

Now we remove the “Hello ” string:

<div>
    <span>World</span>
</div>

Here is the JSON we’ll use to render this HTML:

var json = { "name": "Mary" }

And now the directive that will link them both:

var dir = { "span": "Hello #{name}"}

Direct assignation continues to work.

For more information and examples, visit the dedicated Wiki page

Stay tuned

Tips Section For Our JavaScript Template Engine

October 27, 2008 by Yves (PURE)

We have just created a tips section on the PURE Wiki. The given information should help you in your day-to-day use of PURE

All your own tips are more than welcome. Just send us an email with what you’ve got.

And to end this post on really good news, Douglas Crockford, the man behind JSON, just added PURE on JSON.org main page.

Stay Tuned

Our JavaScript Template (PURE) Becomes Cross-Library

October 2, 2008 by Yves (JavaScript, PURE)

We started the development of PURE with the clear goal of developing a cross-library JavaScript template engine.

Since we are using jQuery as our main JS library in the development of our BeeLit solution, it was obvious to start with this one.

Today, we are happy to announce that PURE has moved another step closer to our initial goal as it now also works with DOMAssistant.

I must say, we haven’t really played a big role here. Everything started with a simple message on the DOMAssistant discussion group

Lim Cheng Hong (one of the three developers behind the library) took the challenge in his hands and made the 6 examples of our Getting Started page working with DOMAssistant in just two days.

You can discover those 6 examples with the DOMAssistant library here

So thank you Lim Cheng Hong and thanks to the DOMAssistant team.

We will soon update our wiki and the PURE website with those new examples.

The next steps will be to port PURE on Prototype, MooTools and Dojo.

If you are ready to get your hands dirty with those adaptations, your help will be more than welcome.

Stay tuned

Major Release for our JavaScript Template Engine – PURE

September 18, 2008 by Yves (JavaScript, PURE)

Thanks to your comments and the requests made on our discussion group we have been able to bring PURE to its next step.

This release contains a few corrections but also a lot of new features:

  • Auto-rendering: a new PURE method takes your HTML and your JSON data and merges them automatically. The class attribute is used to map the HTML and the data. (Read more about autoRender and its jQuery version on our Wiki).
  • Functions as directive are called by reference and not serialized
  • Change the id of the template root node (as any other attribute)
  • Better string value handling
  • Use of named properties in iteration “obj.prop” as well as “obj['name']“

We also made some changes to the PURE environment:

  • The source code moved from Google Code to GitHub

We are also actively looking for help in order to port PURE to other JS libraries such as DomAssistant, Dojo, Mootools, Prototype, YUI, …

If you are ready to get your hands dirty, just pass by the discussion group and leave us a message.

Stay tuned

PURE is running on the iPhone

September 11, 2008 by Mic (PURE)

As you may know, Belgium has some oddities.

One of them is a poor phone law that makes consumers pay the full price for a phone, probably one of the highest in the world. This doesn’t bring any cheaper usage cost than our neighbours either.

So it came as a kind of consolation when I saw PURE running smoothly on my brand new iPhone 3G.

PURE on iPhone

Ok, it’s an easy shot as Safari is running there. But that’s good news for web applications using PURE.

Even if we’ll have to build specific screens for the smaller devices, we’ll be able to use the same technology, back-end services and share some templates between the desktop and the smart phone versions.

Moreover, the rendering speed was really good. We will show some benchmarks soon.

I can’t wait on what Google/HTC will ship in a couple of months.

Using PURE on the Server Side

August 12, 2008 by Yves (JavaScript, PURE)

We built PURE with the idea of having the rendering of the HTML on the client.

The idea behind it is to decentralize the power needed to run the application to the clients and also to lower the bandwidth needed (by sending just small pieces of JSON).

If this is good in our context (creation of a business application), some people might have good reasons to render the HTML on the server side.

For example, if you need to have the content of your application or website indexed by Google (for SEO).

We have planned to bring the logic of PURE to our Erlang back-end for our own needs (like sending tables to Excel for example) and there is nothing that should stop anybody from doing the same with any other back-end language.

But there is also the possibility to run the JavaScript on the server side.

While we have received comments about Spidermonkey or Rhino, we have never performed tests until now.

We have however received a message from Davey Waterson, JavaScript Architect from Aptana, telling us that:

PURE works unchanged out of the box with Jaxer running as serverside JS

Have a look at his example. You can also check out the Aptana website for more information about Jaxer

Davey will soon publish new examples of integration between PURE and Jaxer on the Aptana Forum

We’ll keep you updated.

On a more personal note, PURE has been entirely built on Aptana Studio and it was a great surprise to read that the same company was paying attention to our project.

Stay tuned

New Release for PURE

August 10, 2008 by Yves (PURE)

The launch of PURE (our JavaScript rendering engine), this week has been an exciting moment for the BeeBole team.

While the number of visits to our post introducing the solution reached 5145 hits the first day, our dedicated website for PURE started to gain attention.

More than 7000 of you came to discover the tool during the first week and some of you already started using the solution, like Jimmy from the blog Just Talk About Web.

The first wave of feedback that we got from various places (Reddit or our Google Group) has been really helpful and led us to release a new version of PURE (v1.3). Find the release note here.

Many thanks for your support.

Generate HTML from a JSON Without any Template but HTML and Javascript

July 31, 2008 by Mic (JavaScript, PURE)

A few weeks back now, we started the development of our new web application BeeLit.

Of course we had to make several important choices for our IT architecture.

We started by choosing a light, flexible and really fast back-end as mentioned in our post: Why Erlang ?

For the front-end, we wanted the browser to be the center for rendering and aggregating services. (Read our post about True Aggregation, the Browser as a Platform).

To achieve this goal, we had to decide for:

  1. a JavaScript library to ease the cross-browser issues and advanced DOM functionality
  2. a communication language between the browser and the back-end: JSON ? XML ?
  3. a template engine to render the back-end services in HTML

We chose jQuery as our JS library (the reasons of this choice will be detailed in a future post).

We decided to go for JSON as the preferred communication language between the browser and Erlang.

The main reason being:

JSON is JavaScript, and JavaScript is THE language of the browser that runs the client logic.

When an AJAX kind of call returns a JSON, your JavaScript code understands it natively.

When an XML is returned, in some ways, you have to convert it fully or partially to JavaScript variables. Then the data becomes useful in your browser. This remains true even if you use XSLT for the rendering.

Don’t get me wrong. It doesn’t mean that we are closing the door on XML and that we won’t aggregate XML services from other API’s in our solutions. It took almost 10 years for the IT Industry to replace ASCII files with XML. And nowadays, you can find plenty of API’s working with XML. So XML is here to stay.

But receiving JSON data in a browser simplifies the developer’s life dramatically.
(Read the rest of the article…)

© 2008 BeeBole | powered by WordPress with Barecity