Arxia Summer Camp 2015

13 July 2015 § 0

There’s a pretty exciting summer tradition we have going on each year: ARXIA Summer Camp. Working all day with your eyes pinned down to a monitor can get exhausting, no matter how many interesting projects you get involved into and that is the reason why each year we prepare, for more than 6 months, a 4 day getaway together in a semi-remote area.

It starts off with the difficult process of picking the perfect location, a process into which all team members are involved during our weekly Team Talks. Some like mountains, others like the seaside while a remote few urban city breaks, but after weighing in all the pros & cons and several voting sessions, this year’s location was Baia de Aries – a small Romanian town with a population just a bit above 5.000 habitants. It was until 2004 a mining centre extracting, mainly for base metals, with tourist objectives like the monument of nature tree known as the “Emperor’s beech” and the Muncel Monastery, but also a modest waterfall and the well conserved forests.

DSC09415-4

We rented a van (nicknamed “ARXIA mobil”) as we discovered that it is way more fun to travel the entire team in the same car and we departed ARXIA’s office on a rainy Saturday. It was a 2 hours drive from Cluj Napoca to our host pension Roua Muntelui (translation: Mountain Dew – no connection with the beverage with the same name :)

Day #1 – Arrival
Day one started with unpacking and some leisure time to accommodate with the location. The pension had a great pool, unfortunately we couldn’t use it due to bad weather. After a rich Romanian specific lunch, we played some interesting team building games.

Pool time
We got to know each other by playing “Personal Map” – a game where the team had to guess the life of a specific individual.
A team is nothing without good coordination, “The stick” showed us that working together we can accomplish so many things.
It was followed by a stormy debate about life & dead in the game “Lifeboat” – a game where we had to save people based on their profession.

DSC_3670
All those “serious” team building games called for a bit of unwinding & what perfect way to do than to play the old childhood game “The ducks & The hunters”. Rules of the game are simple, 2 people server as hunters, surrounding the rest while trying to hit them with a ball. Last man standing is upgraded to hunter.

DSC_3795
After a quick dinner it was Quiz time! Colleagues prepared a list of questions from various domains and we split in 5 teams – the team to get the most questions right, wins.
Ending the day was of course with a karaoke party – some colleagues showed their passion to music (and money, try to sing Bruno Mars’ – Billionaire), while others became a bit sentimental on the soundtrack of Titanic.

DSC_3996

Day #2 – Competition day
The day after is always the hardest, but the logistics team was prepared to give a wake call to remember – army style, trumpets & knocking on doors!
A bio-friendly breakfast charged our batteries as it turned out we would need lots of energy & creativity for the Photo Hunting competition. I’d say this is the most exciting game we play each year, we split in teams and receive the same list of items to photograph – from “ducks crossing the street” to “darkness”.

1908191_10206787842873035_6231211693593914921_n
Next game was inspired from Lord of the rings I guess, but we were surprised to find out that some colleagues do have experience or even own a bow – in our “Archery” games. Rule is simple – hit a bottle as many times as possible & your team wins. Not even our freshly operated colleague could stand this game out!
Lunch & leisure time followed the games, but even some pool time as the weather started to improve and our colleagues do love some quality time in the pool.

DSC08938-82
They say coding is much like art, well the next game we had to go through truly proved it. “Movie time” requested that we draw a random topic and in 20 minutes we had to come up with a script & also film it, no props, only the objects we wound surrounding the pension. Topics ranged from politics to showbiz, we would publish the videos, but we won’t want to hard the artistic integrity of your colleagues ;)

DSC08968-94
Our coordination skills were once again put up to a challenge it the games “Ski on grass”. Your team would be tied to the same 2 wooden boards while you “run” against an opponent team & time. A video can be seen on your Facebook page.

What is a camp without some sport? We’re proud to have over a quarter of our team composed of girls, but more importantly, girls which didn’t back out of a “Football” game! Teams fought for the ARXIA cup and luckily no red cards were handed during the game.

DSC09307
Life can get dizzy with summer heat, lots of tasks, errands, but not as dizzy as we got in the game “Jump around”. Spin around a stick 10 times, run 10 meters and at the end drink a beer, all timed. Fastest team not fall / throw up wins!
We ended the day with a Mexican themed party or as we called “Fiesta party”. Everyone had to improvise a mexican / spanish inspired outfit and move their body on some bachata rhythm.

DSC09213

Day #3 – Know each other
Everyone woke up on some Balkan music, thanks to the “wake up” agents – a delightful morning & breakfast.
Our CEO kicked-off the day with ARXIA’s long term strategy – the importance of knowing where our company is going and that we are on the same boat, trying to get to the same destination. Afterwards, we started discovering each team members’ vision of a perfect team by finding top 5 common characteristics.

daniel
“Moving Motivators” helped us discover what motivates us, but more importantly to learn about other’s motivation when working together. Each individual had to rate a list of 10 words related to motivation.
Our cooking skill were challenged in the food contest “Bake a bread”. Each team had to bake a letter of the word ARXIA, but also to make sure it tastes really special. We had to vote the best bread and of course compose our company logo with … bread!

DSC09557
As we got used, we finished the day with a party until the dawn.

Day #4 – Departure
After 3 days in a row partying, waking up in the 4th morning proved to be hard, but not impossible. Everyone started to pack their baggages and we headed towards Turda Gorge for some daytime trail hiking. Turda Gorge (Cheile Turzii in Romanian) is a natural reserve (on Hășdate River) situated 6 km west of Turda and about 15 km south-east of Cluj-Napoca, in Transylvania, Romania. The canyon, formed through the erosion of the Jurassic limestone of the mountain, is 2 900 m long and the walls have heights reaching 300 m. The total surface of the canyon is of 324 ha. Cheile Turzii contain one of the richest and most scenic karst landscapes in Romania. More than 1000 plant and animal species (some of them rare or endangered, like the wild garlic or some species of eagle) live here.

DSC09744

We had lunch at the entrance of the gorge and everyone boarded back home to Cluj Napoca after 4 magical days of fun & new insights.

DSC09418-6

 

Author: Tomita Militaru

T3Rookies Summer Camp

7 May 2015 Comments Off

Did you know about T3Rookies? This is a new project, initiated and coordinated with great enthusiasm by Andrea Herzog. The purpose is to gather students and young people, help them integrate in the big TYPO3 community and provide them opportunities, logistics and support to become the developers and contributors of the TYPO3 future.

Arxia is proud to support this project and will offer this summer, from 27th of June – 4th of July 2015 a hands-on training to 6 T3Rookies. We prepared a nice project: a website for a foster home in Cluj, named Aksza. The Rookies will have the opportunity to meet those kids, with ages from 7 to 20 years and focus on learning and school (the oldest one is a student) and create a website from start to end: to conceive the site’s concept, design and content (in 4 languages: English, Romanian, Hungarian and German), of course to implement the site and to optimize it for search engines. The website should be ready and live at the end of the week, so there will be some intensive work (but don’t worry, no more than 6 hours per day), but rewarded in the free time with the great pubs, clubs and bars of Cluj Napoca (which is, this year, awarded with the title European Youth Capital).

And we have a surprize for the attendees: in the same period (25-28 June), one of the best music events in Romania is taking place near Cluj Napoca: Electric Castle

Remember T3EE 2014

15 April 2015 Comments Off

TYPO3 East Europe 2015 has been announced and it will be held on the 13th-14th of November. It is now a good time to remember the previous edition, T3EE 2014.

T3EE 2014 was the second edition of this event, initially started in 2013, its goal was to bring together developers, agencies and community members, from all around Europe. Also this year, Arxia is volunteering the organization of T3EE 2015.

Predating the main event, on Thursday we had a workshop at the Casino Urban Culture Center, organized by Arxia in partnership with the Cluj-Napoca City Hall and Cluj IT Cluster. The workshop focused on sustainable software solutions for the public administration, fostering a dialogue between the institutions from our region and our guests from Germany and the Netherlands, who shared their experiences and best practices in e-government, the use of open standards and web accessibility.

colaj-blog-casino

 

In the evening we had a welcome dinner held at the Matei Corvin restaurant, where we indulged ourselves with tasty local dishes and drinks.

colaj-blog-casa-matei

The main event started on Friday morning, at the Golden Tulip Ana Dome Hotel. At the entrance, the Halloween atmosphere was given to the participants by a vampire, which offered some “blood”, to loosen up a bit.

colaj-photo-2-welcome

After the opening ceremony, presented by Daniel Homorodean, the presentations started with a speech made by Rens Admiraal entitled “The current state of TYPO3 Neos + the short term roadmap”. The event continued with talks about community software, NEOS and TYPO3 CMS.

colaj-blog-1st-day

After the talks ended, everybody prepared for the main party, the Halloween party, held at Casa TIFF, in a Halloween theme decorated cellar. There you could find: witches, clowns, dark angels, vampires, scuba divers, Frankenstein and even Batman joined the party. Like all the others T3EE parties, we had a great time, with plenty of food, drinks (open bar, how else?) and had a lot of fun together till the break of dawn.

colaj-blog-halloween

The second day started at 10 AM, in the same location, this time on two session tracks. On this day the topics were more diverse, with talks like the TYPO3 Campus Project, Atomic development, WebGL – 3D World in your Browser and so on.

colaj-blog-2nd-day

For the afterparty we went out to a brewery, formerly a local beer factory – Fabrica de Bere Ursus – where as usual we had a good time, shared experiences and talk about different things concerning the TYPO3 world.

All in all, it was another great event, where everybody came together, shared their thoughts, opinions and experiences.

We expect to see you all and experience our future T3EE events!

jQuery UK 2015

11 March 2015 Comments Off

Last week, thanks to Arxia, I was one of the lucky 700 participants who attended the jQuery UK conference. This yearly event is the largest front-end developer conference in the UK.

jquery

The event started with a presentation held by Dave Methvin, the President of the jQuery Foundation, about  ES6 is the answer! What was the problem?. He talked about the new features of ECMAScript 6, that is the next version of the standard expected to be released in mid 2015, and how we can start using this new standard and converting the code using different transpilers, for instance babel, to compile the code into ECMAScript 5 code for browsers that do not support the standard ECMAScript 6. In the second presentation, called mdoular CSS, Mark Otto, the co-creator of Bootstrap, showcased ten guidelines on how to write better CSS.

After the coffee break Soledad Penadés with her presentation The cure for your Web Components hangover demonstated how to make our code more readable and expressive , easier to run and to maintain by using Web Components. In his talk, DevTools State of the Union, Addy Osmani introduced  us the new features of the Chrome DevTools such as paint profiling, animation inspection and updates to the JavaScript editing workflow with V8. Alice Bartlett demonstrated us in her presentation Bin your <select> some alternatives to select boxes in order to meet the needs of less technically skilled users as well as the solution that GOV.UK came up with as a response to this issue.

After lunch, Andy Hume delivered the presentation Architecting resilient front-ends on how to architect client-side code for resilience and how to overcome slow-loading JavaScript or never-loading web fonts that block page render. In her talk, Anything you can paint, I can program better, Jenn Schiffer some projects that she started in order to learn about art, by recreating popular paintings with JavaScript.

The last session started with Estelle Weyl’s presentation about HTML5 Web Forms. She gave us an introduction on some newer form features provided for native date pickers, place holder text, pattern matching, required fields, auto focus, error handling and providing for the right keyboard on smartphones, all without JavaScript. Alex Sexton demonstrated in his presentation, Hacking front-end apps, how to use protective measures for writing secure web apps. The conference ended with Ben Foxall’s demo: Real world jQuery, about how to interact and gather information from our environment.

A big “Thank you” goes to the organizers of the conference for the impeccable organisation and also to the speakers for their very interesting talks!

 Author: Leonard Keresztesi

FAL Code Sprint 2015

15 February 2015 Comments Off

At the end of January I attended to FAL Code Sprint in Essen , organized at the initiative of Andrea Herzog. The result of 3 working days is 71 fixed FAL issues which were merged to the Core. The event was focused on involving new people in the contribution process. T3Rookies involvement was appreciated and they had a great contribution on testing fixed issues and reporting some new ones (that were of course also fixed).

I had a great feeling to know that my work is part of something so important as TYPO3 and it will be used by so many people to create websites. To be sincere, at the beginning I was also kind of scared, as it was my first participation to such an event: I wanted to make a contribution, not only to participate – can I make something useful? But in the end I had 3 great days of coding and deep learning about TYPO3 Core and I was impressed by the focus on writing quality code and testing. I also want to thank Mathias Schreiber, Frans Saris and Fabien Udriot for their help and guidance in terms of code and good practice.
A bonus was the pleasure to talk with people that I already knew, but also to meet some new nice people.

Check more on typo3.org.

 Author: Alina Fleșer

Christmas gifts for needy children

11 December 2014 Comments Off

Christmas is approaching fast and with it, the magic of the holiday season is installed, together with the desire to bring joy and happiness to their loved ones.

Guided by the wise words of Emanuel Swedenborg, “True charity is the desire to be useful to others without thought of receiving a reward“, at the beginning of December, we decided to put a smile on the face of children from an orphanage. Our desire was to make them forget, even if just for a moment, about the difficulties they face every day.

This year we focused on the orphanage “House for street children – Aksza“, which houses 20 children aged between 7 and 20 years.

We had an exciting experience because we met some very special children who wanted nothing more than the barely minimum they needed. They enjoyed our visit as much as we did helping them and they rewarded us with a very nice carol.

We thank them for the very warm welcoming they showed us.

coll2

T3CON14 and the CMS revolution

22 October 2014 Comments Off

We are living great times, an era transformed by the internet, the easy reach to information, the power of communication that enhances our experiences, weather we work, we study, we shop or we just have fun. Already always connected, through many devices and interfaces, assaulted by channels that transmit us information, emotion, persuasion, in a permanent state of “new” which we incorporate fast into our lives, can we envision what tomorrow will bring ? Can we, as individual web developers and web agencies, be part and drive this accelerated evolution, instead of reactively adapt to the new trends ?

This year at the TYPO3 Conference in Berlin, I felt enlightened by the feeling that I am in the best possible industry right now – the inspired presenters, the great people of the TYPO3 community, everybody was energized by this acknowledgement: the web transforms, we are transforming it, we ride the wave of change, or if we are not doing it yet, we should get up there fast.

con21

The nhow hotel, the inspiring location of the conference

Far from being a complete review, this is a collection of notes from the presentations that I could attend and from the discussion that I had during the first 2 days of the conference.

The T3CON14 was opened by Kasper Skårhøj, once again back on stage in front of the community that he has started years ago. Well witted and inspiring, he reminded us a powerful thing: When time passed over us, we don’t remember and don’t value the “hard work” that we did, but the fun that we had, the passion that we put on what we like, the value that we create in the world. When you put passion, you create great things. Thus, follow your bliss, even if sometimes this leads to changes in your path. And do what you like, so that you never “work” again.

con3

Ric van Westhreenen told us that if we are embracing responsive webdesign we are stupid :) A bit puzzled at first, I ended in agreement. We should do websites for the users, not for the screens. We would be stupid if we just re-organize the information to fit on the screens of any device, without considering the user experience, the context in which he is using the website, the path towards his goal. In the last years, we moved fast through the necessary steps: the responsive design to fit the websites on all the screens of the devices, the adaptive design considers the specific presentation of information and functionality adapted for the device, and now towards the situational design, that considers the context in which you use the website: on the road with poor signal, in the shop trying to compare reviews of products, or at home relaxed in front of your big screen, your needs and possibilities are different, and the websites should “know” this.

I knew that we are in for a great talk when Rasmus Skjoldan took the stage to tell us about building digital experiences with TYPO3 Neos, a product greatly influenced by his vision of moving beyond the boundaries of the “old ways” of presenting structured content through which you navigate in the browser, seeing language as the only relevant target user segmentation. There are no boundaries for information, we should not resume to be web centric, or even worse, think in “pages” and “content trees”, but we would greatly benefit if we are ready to provide complete digital experienced, through all media, to everybody.

From Morten Gade we received the provocation to remove the “management” from the “CMS”. Through our websites, we target our audience through the content, which after all creates the competitive difference for the end users. Emphasizing the “management” could hinder the freedom of good, relevant content creation . A CMS, or better said a CS ( a “Content System”) should be “a tool that allows us to develop ideas, to produce, to cooperate”, a platform for the facilitation of better content, which “should adapt to the organizational context of the producer” instead of setting structured boundaries. The system which allows the content creators to unleash their potential will be a clear winner of the the future market.
For Timour Chafik, the reality is a mosaic of stories. And so it is for all of us, thus we should always remember this when we create websites and their content, marketing campaigns, advertising and anything else that has the purpose to engage our target. Stories are everywhere, and sometimes we might forget that in our companies, as in any company, “there are people who have stories that are waiting to be told”. This is a huge potential that we should be smart to use when we create any project, as from the free flow of ideas and stories that are shared we can generate innovative approaches and ultimately create projects and products that matter for our users, not just from the informative perspective, but also create emotion, inspire, engage them, lead them to identify themselves with the “story” that we are telling.

From a general perspective to something more concrete, TYPO3 Neos received a well deserved focus on several talks, as while the entire CMS market is about to enter a revolution, we in the TYPO3 community are already living one, through Neos.

As Robert Lemke ensured us, we will soon have the translation support at our hands in the upcoming 1.2 version, in fact we could already seen it at work during his presentation, in a real project. While Neos is still not spread out as people might still wait for the promised features from 1.2 and 1.3, there are no doubts for the ones who already started to use it that also from the development perspective it brings a solid advantage. It is much easy to learn than the TYPO3 CMS, in fact we saw ourselves at Arxia and through the public workshop that we did in Cluj for fellow web programmers that getting into Neos and doing a first project is quite easy and does not even require prior knowledge of TYPO3 CMS ( though it helps of course ). And after the first projects done, we should be able to state, as Robert does, that “the speed of development is higher with Neos”, once you’ve passed the learning phase.

I was eagerly looking to see a real large scale Neos project, so I welcomed the showcase of venstre.dk, a site done for the largest and oldest political party in Denmark. With over 10,000 members who can manage their own profile, generate and change information, this was a big challenge to prove that anyone, without prior technical knowledge, would be able to start working with the content with ease just after their first login, without reading manuals and spending hours in training.

An interesting talk from Martin Helmich showed us that there are possibilities to automate the migration from a TYPO3 CMS instance to TYPO3 Neos. Well, at least some automation is possible, making easier for the developers to start from something instead of doing everything from scratch once again. As the interest will raise in this type of migration I the future, we should expect to see more mature tools, moving further from the stage of prototype, which will help us undertake this challenge.

con1

The CMS to Neos migration mapping

This was the first T3CON where I saw talks about outsourcing. Maybe from some of the audience the subject is new, especially the presentation of the top problems that agencies are facing when contracting work abroad. Misscomunication or lack of communication and quality level ranked on top of the issues. For us, as long time TYPO3 outsourcing providers, there were no surprises, as we know the issues and overheads that both sides are facing during an outsourcing relationship, and when such a relation is not treated with responsibility and engagement for a long term perspective, things might turn wrong.

Weather during the presentations, or while talking with the people in the coffee breaks and social events, I have found out that there are already more and more agencies who work with Neos and with Flow, that there are already large projects launched, some maybe more discrete as they were not publicly presented yet, and there are even more in the making. This was a very encouraging sign for me, proving that Arxia did the right thing by starting to work with Neos and Flow in production from the beginning of 2014.

As we all know, there is much more to a T3CON than just the presentations. It was great to meet people, discussing during coffee breaks and at social events, learning what others are doing and talking about the future of TYPO3, the trends, the challenges, the community, the events and the projects. I was also pleased to see that many people knew already about the TYPO3 East Europe ( www.t3ee.org ) event that we are organizing in Cluj-Napoca, Romania. I liked a lot finding out about Andrea Herzog’s “TYPO3 Rookies” project, which aims to integrate faster into the TYPO3 world the youngsters, interns and developers who are just starting their career. After all TYPO3 is about community, its people, their willingness to contribute, to have initiatives and to start projects, to create events, to move things forward, all joined in a partnership culture, supporting the development of the platforms from which we all benefit.

In all, T3CON14 was a great event, bringing a lot of inspiration about the future that we are called to shape, about the perspectives of the TYPO3 product family and the TYPO3 community.

 Author: Daniel Homorodean

SmartWeb Conference 2014

3 October 2014 Comments Off

Thanks to Arxia, on the 23rd of September I had the opportunity to attend the SmartWeb Conference, “A conference for East-European web designers and developers, bringing you an exquisite lineup of speakers”. This was the second edition which took place in Bucharest.

enhance

The event kicked off with a presentation from Jeremy Keith: Enhance. He focused on the need for semantics in Web development, progressive enhancement and how to keep things simple if possible. He explained how to use structural honesty like <button> instead of <span onclick> or material honesty: border radius instead of multiple elements with background images. In the second presentation of the first session, Kaelig a front-end developer for theguardian.com, showed us some solutions that have been implemented using SASS to help designers and developers to work together better.

The second session started with Marko Dungonjic’s presentation: Fixing Lorem Ipsum with Content Prototyping. He presented some ideas about “content prototyping” method to replace the famous but slightly useless “lorem ipsum” text and lifelike images. The second session ended with Harry Roberts presentation: What Is A CSS Framework Anyway? . He talked about the difference between UI Toolkit and CSS Framework:”UI Toolkit gets the job done, CSS Framework gets the job started.” and why it’s not ok to use UI Toolkit’s like Bootstrap for custom designs.

flexbox

After lunch, the third session started with Remy Sharp’s presentation, Muddling your way in real-time, in which he showcased how to build real-time applications with NodeJS using Primus. In the second presentation of the third session, Leveling Up With Flexbox,  Zoe Gillenwater showed us that we already use Flexbox and how to ensure easy fallback for browsers that do not support it.

The last session started with Ana Tudor’s presentation: CSS: Use and Abuse. She showed us how to build complex animations and drawings with CSS3.The conference ended with Bruce Lawson’s presentation: Bruce’s Tour of the Sausage Factory about web standardisation.

A big thanks goes to the organizers of this conference for a very good organisation and also to the speakers for their very interesting presentations.

Photo Credit: SmartWeb.

 Author: Leonard Keresztesi

Exercise with extbase and Ajax

25 July 2014 Comments Off

Introduction

This example is a dummy problem, which aims to create a basis for explaining the use of 3 concepts: format parameter, StandaloneView and PHP based views. The solution works with TYPO3 version >= 6.0

The problem

Let’s suppose that we need to implement the following task: we have a page that looks, at load, like in the below model:

Box C

When clicking on the link “Show Items” from box A, 2 new boxes (D & E) should be loaded, without page refresh (ajax call)

Box E

 

We will assume that Box D and Box E display the same records, let’s call them Items. Let’s also consider that Box D and Box E need to be templatable. As we can’t include the both boxes in the same Fluid template, due to the page layout, we need 2 different Fluid templates, one for each box. As they display the same records, for performance reasons, we can load them using a single ajax call, which will return a JSON object with 2 attributes, having as values the HTML for Box D and the HTML for BOX E. On clicking the title of the Item, the user will be redirected to a page displaying the details of the item.

Solution

Let’s call the extension test_extension, the controller Test.We will need:
an action to return the JSON, let’s call it ajax,
an action to display the detail (single) page of the item, let’s call it show
let’s consider we would also need an action to display the “Show items” link (although in the current example this is not necessary), let’s call it tease

So we need to resolve 2 issues: 1. the ajax call should return a JSON and 2. the ajax action should parse 2 different templates.

1. The ajax call should return a JSON

Let’s suppose we registered the plugin in ext_localconf.php with the name Test:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
Arxia.’ . $_EXTKEY,
‘Test’,
array(
Test=> ajax,show,tease,
),
);

The most convenable solution to handle this ajax request is using typenum (typenum allows to create different versions of the same page, accessible by adding the type GET/POST parameter in the url of the page). So we need to configure a new version of the site (let’s choose typenum 121) in the test_extension/Configuration/Typoscript/setup.txt file.

My favorite way of including a plugin through Typoscript is to actually select a content (tt_content). A container page may be used to add the content. This is my favorite way because we will have access to all the configurations of the plugin’s flexform – that will allow to an advanced editor to easily change some parameters, like the page which contains the records.

testPage = PAGE
testPage.typeNum = 121
testPage.config.disableAllHeaderCode = 1
testPage.config.additionalHeaders = Content-type:application/json
testPage.config.xhtml_cleaning = 0
testPage.10 = CONTENT
testPage.10{
table = tt_content

#
# a content of type plugin, will have in the list_type field a value which will respect the following format
# <extensionname>_<plugin_name>, in lowercase; if the extension name has “_” they will be ignored;
# as we registered the plugin Test in ext_localconf.php, the list_type value will be “testextension_test”;
# adding the below condition, we ensure that no undesired content is selected
#
select.andWhere = list_type = “testextension_test”
select.pidInList = <the container page id>

renderObj < tt_content

# below we remove tt_content default wrapping
# and preserve only the plugin output
renderObj.stdWrap >
renderObj.list.10 >
renderObj.list.20.stdWrap >

}

Although we can simply return the JSON from the action, let’s return it from a view, as, in real life, some output related decisions may be managed from the view. But as we may need the PHP power inside the view, we are going to use a PHP based view. This type of view use pure PHP to generate the output.

We need to add the file corresponding the view in the folder <extension>/Classes/View/<ControllerName>. The file name should follow the naming convention <Action><Format>.php. We need the format to be JSON, so the path for our file should be “test_extension/Classes/View/Test/AjaxJson.php”.

The view should extend TYPO3\CMS\Extbase\Mvc\View\AbstractView (which implements the interface TYPO3\CMS\Extbase\Mvc\View\ViewInterface) and it should implement the method render. Let’s consider that we will assign to the view, from the ajax action, 2 variables: boxAContent and boxBContent. We will retrieve them as keys of the variables attribute of the view. The content of our view file will be:

<?php
namespace Arxia\TestExtension\View\Test;

class AjaxJson extends \TYPO3\CMS\Extbase\Mvc\View\AbstractView {

public function render() {
$jsonArray = array(
‘boxAContent’ => $this->variables['boxAContent'],
‘boxBContent’ => $this->variables['boxBContent']
);
return json_encode($jsonArray);
}
}
?>

However, we need to tell extbase the request is in JSON format, in order to correctly recognize the view. We can do this using the less known parameter: format. Also let’s suppose we want to cache the JSON response (as any other page would be cached). We will create the link to “Show items” in Box A. As this is outputted by the tease action, we also have a corresponding view, which should contain the following code:

<f:link.action action=”ajax” controller=”Test” format=”json” pageType=”121″>
<f:translate key=”LLL:EXT:test_extension/Resources/Private/Language/locallang_db.xlf:show_items” />
</f:link.action>

The parameter format will add tx_testextension_test[format]=json, which will tell extbase that the request is using JSON format. After we have this link, we can use Javascript to change the normal navigation when clicking the link with an ajax request.

2. The ajax action should parse 2 different templates (Fluid files)

In order to parse from an action 2 different Fluid files, we will need to use a special view provided by extbase: TYPO3\CMS\Fluid\View\StandaloneView. We will create in Test controller a protected function which also assign to the specific template some variables. Let’s consider we added the Fluid files in Partial folder, as they may be used in other FLUID views.

protected function renderFileTemplate($templateFile, $variables) {
$view = $this->objectManager->get(‘TYPO3\\CMS\\Fluid\\View\\StandaloneView’);

$view->setControllerContext($this->controllerContext);

$extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);

// generate the template path
$relativeTemplateFilePath = $extbaseFrameworkConfiguration['view']['partialRootPath'] . $this->request->getControllerName() . ‘/’ . $templateFile;
$absoluteTemplateFilePath = TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($relativeTemplateFilePath);
$view->setTemplatePathAndFilename($absoluteTemplateFilePath);

// asign variables to the template
$view->assignMultiple($variables);

return $view->render();
}

The ajax action will call this function 2 times and it will assign the result of the 2 parsed templates to the PHP based view

public function ajaxAction() {
$items = $this->itemRepository->findAll();

// generate Box A
$boxATemplate = ‘BoxA.html’;
$variables = array(‘items’ => $items);
$boxAContent = $this->renderFileTemplate($boxATemplate, $variables));
$this->view->assign(‘boxAContent’, $boxAContent);

// generate Box B
$boxBTemplate = ‘BoxB.html’;
$variables = array(‘items’ => $items);
$boxAContent = $this->renderFileTemplate($boxATemplate, $variables));
$this->view->assign(‘boxBContent’, $boxBContent);
}

Final thoughts
Although the above example is just a dummy problem, all of the 3 concepts may be used in various real problems. An example of a real-life problem solved by StandaloneView can be found here: forge.typo3.org: How to use the Fluid Standalone view to render template based emails

Other useful links are:

Notes:
Most of the comments code were removed in order to save space.

 

Author: Alina Fleşer

TYPO3 Neos – Ready for production?

30 June 2014 Comments Off

TYPO3 Neos logo

TYPO3 Neos is the next-generation open source content management system made by the TYPO3 community. Neos is based on the PHP framework TYPO3 Flow.
There was & still is a lot of hype lately around the new TYPO3 product, TYPO3 Neos, that makes many people ask one simple question: Is TYPO3 Neos ready for production? For different clients, with different needs, for “impossible” projects?
Many TYPO3 agencies ask if Neos is ready for production. We will try to answer, from our direct experience gathered while implementing several Neos projects

TYPO3 Neos hands on - Case Study #1

Naturally, we were excited when we saw the first opportunity to propose TYPO3 Neos as a solution for a small local institution that had an old website on a deprecated platform. The reason we chose to go with TYPO3 Neos was a combination of eagerness to try it on a real world project and also because it really fit well with the needs of our client. Our client’s editors were people who weren’t technical at all, people from the medical sector. TYPO3 Neos is a perfect candidate for simple editor:

  1. Simple editing method
  2. Short learning period
  3. No training required
  4. Intuitive use

Having experience with TYPO3 Flow was also a factor when we made the decision for TYPO3 Neos because the CMS itself is no more than a TYPO3 Flow application.

TYPO3 Neos 1.0 was the starting point for us and during the development we saw how easy custom elements can be created with the power of nodes & TypoScript 2.0. But what hurt us the most was the acute lack of documentation. Finding the right documentation was not a matter of looking into wikis, but mailing lists or even IRC chats on Freenode channel #typo3-neos
That can be really frustrating, but with lots of coffee & patience that can be overcome.

The project didn’t hit us with any surprises and development went really smooth despite that fact that it was a new CMS for everyone involved in the team. Version 1.0 was buggy especially in the backend, problems usually occurred with the editing of content, most of the times exception were thrown if the user deleted content in some cases.
After delivery we were surprised that the client didn’t need any training, everything was so intuitive for him that content was added by editors without any help / training from our side. Impressive.

TYPO3 Neos hands on - Case Study #2

Another project that came to us as a explicit request for TYPO3 Neos, gave us the opportunity to test drive the freshly released TYPO3 Neos 1.1. We must say that the Neos team did a great job making a more stable version, problems that usually occurred in backend were fixed and a great improvement in performance was very welcomed. Also, some new minor features were introduced, like node type switching, which was badly needed for editors.

But the localization & translation are still missing from the backend, although the foundation was set already in 1.1. For now, the easiest way to do multilingual websites with TYPO3 Neos is to use the old fashion way that was used also early on in TYPO3 CMS, different page trees for each language. The TYPO3 Neos team promises to deliver Content Dimensions, an alternative to the translation handling that currently exists in TYPO3 CMS. The content dimension concept is the foundation to work with different content variants and have a very flexible localization solution in Neos. The user interface to work with content dimensions and translations will be part of the next version (1.2).
For example, you can have more than languages, you could make variants of a content element for people ages 13 -25 and other variants for people ages 26 +. This cool features will help websites present relevant information not only by language, but also depending on the website user characteristics.

Getting back to our project, integration of template was easy and even if the website was multilanguage we managed to get by the missing translations infrastructure quite easily.
Since the website was responsive, we needed to target different devices and here our experience with Flow / Fluid kicked in. This is one of the advantages of TYPO3 Neos for agencies that are working with Extbase / Fluid / Flow is that even if they never touched it, it will feel familiar and custom plugins will be no more than simple packages. But most of the time you won’t need dedicated plugins, like extensions in TYPO3 CMS. Nodes & Fluid are extremely flexible that in most cases you won’t need a plugin.

TYPO3 Neos & Deployment

Another aspect that we love about TYPO3 Neos is deployment. Having from the start each website as a Flow package is just awesome, during development and also after. Working with a team under VCS is extremely easy and once you are done, all the content can be exported into a single XML file. No database dumps, we just installed a fresh Neos on the clients server and installed the package, et voila! Everything was working perfectly.

Production ready can have different meanings for different people, but some key factors are still missing:

  1. Translation / localization
  2. Multi domain support
  3. Documentation

Once all the above are stable and in good shape, we can state that TYPO3 Neos is indeed production ready.

Conclusion

TYPO3 Neos is already good for small presentation websites, we are glad to see how easy the inexperienced editors get to manage the content with Neos and we believe that given time it will have a bright future.

We believe in the power & concepts that TYPO3 Neos brings to the CMS market and with the new skills we acquired, we are ready to deliver TYPO3 Neos projects!

Author: Tomita Militaru