Howto: Ajax Requests with Extbase and Fluid

Welcome to this short tutorial about Extbase and Ajax. If you are familiar with TYPO3 you might have heard of the eID concept that gives you the possibility to stop the rendering process very early and run your own script instead. That means, only the most needed components are initiated to save memory and time and at the earliest moment possible you output whatever you need. That indeed is a nice feature of TYPO3 but I’m not gonna talk about it this time for different reasons.

Instead I want to introduce another way having the ability to use all the features TYPO3 and Extbase come with. So, let’s get started with a very small new extension. Btw: I recommend you to check out my example extension on github for a better understanding of what I am talking about now.

Continue reading

Posted in Uncategorized | 4 Comments

Error handling with Extbase: Writing own validators

So, here’s the next part of my series about error handling with Extbase and Fluid. This time it’s about writing own validators. But at first I will explain when to use one by a simple example.

Imagine you are about to build a form that creates a new object, let’s say a frontend user. Probably the user needs an email address as a unique identifier to log in with later on. So the model has a property called email.

class Tx_ExtensionName_Domain_Model_ModelName extends Tx_Extbase_DomainObject_AbstractEntity
{
    /**
     * @var string
     * @validate Tx_Extbase_Validation_Validator_EmailAddressValidator
     */
    protected $email= '';
}

Continue reading

Posted in TYPO3 | Tagged , , , , | Leave a comment

Error handling with Extbase: Placing error messages next to fields using partials

Welcome to the next part of my series on error handling with Extbase and Fluid. This time I gonna show you how to place error fields next to the fields that cause them. First time ever I worked with Fluid I just found the ability to display errors as a list. For sure, that’s the easiest way arranging them because you just have to iterate through the error objects and echo the messages.

Continue reading

Posted in TYPO3 | Tagged , , , | 2 Comments

Howto: Build an HTML5 file uploader with Ajax

As an old friend of Flash and the possibilities we got to improve the web experience years ago I am very curios about what is possible without Flash nowadays.

So the first thing I wanted to know, is how to develop a file uploader based on web standards with having the ability to show a progress bar. Now that I write this post, this is a very hot topic because I neither found much information about it nor did I see any website having this feature except Youtube.

As we are talking about the client side of the uploader first it’s all about javascript now. So, a basic understanding of this language is necessary.

Still with me? Alright, what do we need to build this uploader? Simple said it’s two features named File API and XHR2. Never heard of? No problem. Let’s first have a look at the File API.

Continue reading

Posted in HTML5 | Tagged , , , , , , | Leave a comment