[TYPO3-50-general] a JS framework for TYPO3 5.0 and FLOW3

Robert Lemke robert at typo3.org
Wed Apr 30 19:51:20 CEST 2008


Hi Martin,

Am 27.04.2008 um 11:52 schrieb Martin Kutschker:

> I have thought a bit about the JS problem after UI discussion on the  
> list.
>
> My conclusion is that TYPO3 5.0 or FLOW3 would benefit from a JS
> framework that accompanies it. The base JS code could be independent,
> but there would be some add-on code that ties PHP and JS together.
>
> Why? The 5.0 team has laboured to create a new framework with a (new)
> programming paradigm. It's only natural that the same paradigm is to  
> be
> used in all programming aspects of the application to be written.
> Therefore the JS framework should also adhere to DDD, AOP etc. The
> advantage is that any programmer doesn't need to "switch" between the
> paradigms when he codes PHP and JS to create a FLOW3 web application.
>
> Another advantage I see is that a tied JS framework could be used for
> PHP/JS cross-language object persistence and other nice couplings.
>
> Even more ambitious would be a JS generating PHP system like the  
> Google
> Web Toolkit. The ideas is that you need to know only one language. In
> our case PHP (GWT is in Java).
>
> That said, the team needs a qualified JS developer who evaluates the
> existing JS frameworks and is willing to adopt FLOW3's paradigms for  
> JS.
> Ideally the result would be, like FLOW3, a sub-project for general  
> use.

thank you for sharing your thoughts about this!

I have been looking at various options since I started coding v5 in 2006
and experimented with different JS framework and so forth. However, I
didn't start discussing it in the list so far because it was not yet the
time to really focus on it - many other things had to be done before.

Now we have reached a point where the backend topic comes into play.
During the last days I have resumed playing a bit with different options
and I'd like to share my ideas with you on this list and at the  
developer
days.

Generally I would like to create a JS code generating solution which
decouples the consumer code (extensions etc.) from the actual JS  
framework.
I fear that we won't be able to go so far as GWT but something smaller
and more pragmatic, tailored to what we need could be the solution.

What I would like to achieve is that a FLOW3 / TYPO3 v5 developer only
has to cope with PHP and that all UI widgets exist as true PHP classes.
Currently I don't think that it's possible to create a real live  
connection
between the JS objects and the PHP objects (COMET-like) but I'm convined
that some polling mechanism which creates a messaging channel between
server and client will be good enough to solve our requirements.

As for the client side I would like to create as few business logic and
as few JS code as possible. Although it might have advantages  
performance-wise,
I think that it's more important for us to keep the whole logic at one
(PHP) place.

My favorized framework currently is ExtJS. I have tried out a dozen  
other
frameworks during the last year and I think that ExtJS helps us most  
with
what we need (a rich user interface for the backend).

Finally the question arises how the whole backend layout should be  
defined
and programmed. And my plan for this is (and I've actually tried it  
out already)
to use TypoScript for defining / configuring the backend and then  
render the
objects into JS / HTML code. A backend might then be defined like this:

namespace: default = F3_GUI_...

backend = Application
backend[10] = MenuBar
backend[10].items[1] = MenuItem
...
backend[20] = Window
backend[20].title = "Example Window"
backend[20].items[1] = Tree
backend[20].items[1].dataSource = ...

... you get the idea.

Of course it would be absolutely cool if we'd have a GUI designer  
which allows
you to add / rearrange GUI widgets via drag and drop and allows you to  
save
the whole configuration into TypoScript. By that you could create new  
user
interfaces for standalone FLOW3 application in a few minutes.

Anyway, these are just the rough thoughts. There's a lot more to say  
about
event handling, messaging, localization etc. but first we have to  
agree on
a general strategy (like the above ;-))

See you on the T3DD08!

robert


More information about the TYPO3-project-5_0-general mailing list