Discussion:
Using Django to generate Flash/Flex content
SamFeltus
2007-08-13 18:07:41 UTC
Permalink
I was wondering if there was any work on the web to use Django to
generate Flash and Flex content, instead of HTML content? Flash is
rapidly evolving into a more technologically advanced web display
technology. HTML rules for text, but is pretty much useless for
displaying other sorts of ideas and information. I've rolled my own
experiments for generating/editing Flash content in TurboGears and
Django, and it seems a natural way to supplement the assorted Flash
content creation tools.

Maybe I am missing something, but it seems like a large gap in the
Python web stack.

Sam the Gardener

http://samfeltus.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-13 18:59:08 UTC
Permalink
Or, am I missing something and it is a bad idea? I am curious what
more experienced coders think?

Sam the Gardener


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Amirouche
2007-08-13 20:59:46 UTC
Permalink
Post by SamFeltus
Or, am I missing something and it is a bad idea? I am curious what
more experienced coders think?
Sam the Gardener
I'm not experienced coder, but I don't think that it's a bad idea, but
it looks like it's not the primary purpose of Django, you have already
noticed that there isn't any ajax-love in the main source... but some
people are already thinking about Django+Flex some google search may
help you ;)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-14 18:11:10 UTC
Permalink
I don't understand why none of the major Python frameworks embrace
Flash/Flex wholeheartedly, especially with innovations such as
Papervision3D, which will happen in HTML when monkeys fly.

Oh well...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Jon Atkinson
2007-08-14 18:18:41 UTC
Permalink
I think there is a general reticence to move into this area, given
Django's roots in web publishing, where HTML is the lowest common
denominator.

I can't speak on behalf of any of the developers, but I'd imagine that
the news organisations which Django grew from were more concerned with
traditional HTML content than the rich plugin options.

I do believe that I've read on this list recently of someone using
Django to develop GUI applications with wxWidgets, so not everyone is
using Django to generate HTML.

I'd love to hear back from you if you do create anything using Django
with Flash.

Best,

--Jon
Post by SamFeltus
I don't understand why none of the major Python frameworks embrace
Flash/Flex wholeheartedly, especially with innovations such as
Papervision3D, which will happen in HTML when monkeys fly.
Oh well...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Ramdas S
2007-08-14 18:32:20 UTC
Permalink
Post by Jon Atkinson
I think there is a general reticence to move into this area, given
Django's roots in web publishing, where HTML is the lowest common
denominator.
I can't speak on behalf of any of the developers, but I'd imagine that
the news organisations which Django grew from were more concerned with
traditional HTML content than the rich plugin options.
I do believe that I've read on this list recently of someone using
Django to develop GUI applications with wxWidgets, so not everyone is
using Django to generate HTML.
I'd love to hear back from you if you do create anything using Django
with Flash.
Best,
--Jon
Post by SamFeltus
I don't understand why none of the major Python frameworks embrace
Flash/Flex wholeheartedly, especially with innovations such as
Papervision3D, which will happen in HTML when monkeys fly.
Oh well...
Hi,
I agree with Jon! The biggest concern for publishing companies, is I am
afraid still revolves around HTML, and rendering relevant content shipped at
the earliest with minimum management cost. Django has been designed to solve
that problem. And it does that pretty neat.
I think current focus is still in getting many of the basic stuff right,
and quite a lot of code is getting rewritten.
Django unlike other frameworks does not provide any Ajax helpers. But it
is easy to integrate JavaScript and Ajax with Django. I think Django
developers are clear that they will have an agnostic policy as far as Ajax
go. Similar policy might apply to Flex or Flash.
However, I would like to point to http://www.djangoandflex.org.uk/
There seems to be activity there.
Flex to my best of knowledge can be integrated with Django as web server.
Good Luck.
Please note this is based on my observations
RS
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
John Melesky
2007-08-14 18:33:51 UTC
Permalink
Post by SamFeltus
I don't understand why none of the major Python frameworks embrace
Flash/Flex wholeheartedly, especially with innovations such as
Papervision3D, which will happen in HTML when monkeys fly.
Unlike HTML, SWF is essentially executable bytecode for the Flash
virtual machine. As such, translating Python into Flash essentially
requires a compiler. It would be like implementing Python on top of
the Java virtual machine (a la Jython).

In other words, that's not a simple add-on to an existing project;
it's a significant project all by itself.

-johnnnnnnn




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-15 02:21:06 UTC
Permalink
"""I think there is a general reticence to move into this area, given
Django's roots in web publishing, where HTML is the lowest common
denominator. """

That is the point, when HTML is the lowest common denominator, a web
application is limited. HTML is evolving at a snail's pace, whereas
Flash has steadily evolved into something far more sophisticated than
HTML. HTML has it's place, of course.

"""Unlike HTML, SWF is essentially executable bytecode for the Flash
virtual machine. As such, translating Python into Flash essentially
requires a compiler. It would be like implementing Python on top of
the Java virtual machine (a la Jython).

In other words, that's not a simple add-on to an existing project;
it's a significant project all by itself."""

But Flash now has a free command line compiler, so it is easy to
manufacture SWF's from scratch in a Python program. A Python server
with a library of precompiled SWFs to load into each other ought to be
potent. It certainly would set it apart from the other web
frameworks.

I've experimented with the idea in TurboGears and Django. It seems
like an obvious extension to relying solely on HTML as the Web Display
Technology.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
arthur debert
2007-08-15 04:39:07 UTC
Permalink
Hi Sam.

As someone who codes Actionscript for a living, I can understand where
you are coming from.
Post by SamFeltus
That is the point, when HTML is the lowest common denominator, a web
application is limited. HTML is evolving at a snail's pace, whereas
Flash has steadily evolved into something far more sophisticated than
HTML. HTML has it's place, of course.
Depends of what you mean by "more sophisticated".
Flash content can't be indexed by search engines for example. How many
websites do you think can afford to be excluded from search engines?
Flash content requires more processing, besides a proprietary plugin.
This means that for example, people on a 64 bit linux can't read flash
content. iPhone can't either. As the number of people accessing the
web through different devices grow this will be more and more of an
issue . (don't even get me started on flash lite)
Flash content can't be cut and paste normally (browser menus or
browser shortcuts).
Flash content, out of the box, will break the browser's back button.
Flash content, out of the box, will not allow deep linking.

If you take these into consideration you'll see that one of this
issues excludes flash from a lot of projects. When you add them up,
you realize that very, very few sites can rely heavily on flash at
all.

Flash is great for "entertainment sites", or "advertainment". Site
where the wow factor is more important than actual content. Otherwise
flash is great as small pieces: a video player (youtube), a photo
slideshow (flickr)... etc.
Relying in flash to deliver "hard" content (text, navigation... etc)
immediately excluded your content from a lot of technologies and a lot
of users.
Post by SamFeltus
But Flash now has a free command line compiler, so it is easy to
manufacture SWF's from scratch in a Python program.
A " free command line compiler" means free as in beer, it still is
proprietary. If adobe decides to change it's mind on the next release,
or change licensing, it can. The mxmcl compiler, for example, loads
the jvm every-time. This means that if you wish to compile swf files
dynamically you'll be dealing with a couple of seconds of wait, plus a
large memory overhead for each request.

Also, note that your post is too vague. Django "generating flash
content" can mean, among other things:
a) django generates dynamic data, such as the description for a
slideshow. this can be done in xml or JSON, which django has excellent
support for, and it's very straight forward to extend for you specific
use (I've done quite a few of those)
b) django serializing data with AMF. For this check:
http://djangoamf.sourceforge.jp/index.php?DjangoAMF_en
and
http://cheeseshop.python.org/pypi/flashticle
c) django acting as Flash Comm. This involves reverse engeniering
protocols, flv compression and more. (I'd love to use one of these
though, specially live video enconding)
d) django acting as a xml socket server, such as unit (from moock)

The point is, flash has a lot of limitations. Papervision is cool, but
it's not meant at all to replace html. Their weblog for example is
html , and so is the mailing list.
Before people realize javascript could make web apps much more
dynamic, flash seemed like the only option for making apps more
responsive. Today, ajax has killed a lot of reasons to use flash (page
reloading, progress indicator etc). Besides for specific use of rich
media (again video, audio.. etc) and visual effects (papervision and
genereal BitmapData voodo) there's no reason to use flash, and most
hackers doing dynamic websites don't need those things at all.

Also notice than having django acting as a magic backend solution for
issues b), c) and d) is kind of moot. The largest, by far , effort
would be to reverse engineer and implement protocols, codecs and file
formats . Once that was accomplished, having django views hook those
up would be trivial.

I've done a few all flash websites with django in the back end. I'm
pretty happy using JSON to send data in and out (I hope to try amf
soon). I did wish there was something like Flash Communication Server
open source and written in python but I am not holding my breath for
it. If you think most data send to flash can easily be xml, JSON on
html (variables to the embed tag) django is well suited for feeding
flash content.

Cheers
Arthur


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-15 06:56:52 UTC
Permalink
I was thinking of A - D, for Django serving information for Flash
also.

But mainly I was thinking of...

E. Compiling Flash content ahead of time with a Python web framework.
Basically, creating a browser based environment to create content
(supplementing, not replacing the Flash/Flex/etc tools). The tool has
a library of ActionScript classes, SWFs from other sources, images,
flvs, mp3, etc to compile into a SWF before the user requests it.
Basically, you create a swf in the browser, edit and recompile it in
the browser until it is done, then publish to the site. Django
generates ActionScript instead of HTML/JS etc. It seems to work
pretty easily.

F. A live section that has a library of content, including SWF,
database info, images, video, audio that is designed to load a master
swf created in E.

As to Flash being more sophisticated, I mean HTML is only good at
textual information. I was thinking content that expands human
expression beyond the HTML web, overlays and augments it, not replaces
it. It seems to me we are at the beginning of an explosion of non
text content on the web.

Here are some crude examples of experimental content created by
TurboGears and Django in the browser (with GIMP, Photoshop, MXMLC and
a text editor). The code has issues of course, I am a gardener
Googling Python and ActionScript 3 as I go along. :)

http://samfeltus.com/site_index.html

PS I appreciate everyone's input.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Patrick Lauber
2007-08-15 11:00:18 UTC
Permalink
I work as a Flash Developer and Django Programmer.

You don't and you shouldn't compile flash on a request basis.
You should make your flash app smart enough that you can give it some
parameters or let it talk with the backend with something like django-
amf.
Then it can load images, mp3 etc. or display something. With flex you
can do some nice data bindings with django-amf.

Just for reference there is a command-line compiler for AS2 too:
called mtasc and is used by the very nice eclipse plugin "fdt" by
powerflasher.de

cheers
Post by SamFeltus
I was thinking of A - D, for Django serving information for Flash
also.
But mainly I was thinking of...
E. Compiling Flash content ahead of time with a Python web framework.
Basically, creating a browser based environment to create content
(supplementing, not replacing the Flash/Flex/etc tools). The tool has
a library of ActionScript classes, SWFs from other sources, images,
flvs, mp3, etc to compile into a SWF before the user requests it.
Basically, you create a swf in the browser, edit and recompile it in
the browser until it is done, then publish to the site. Django
generates ActionScript instead of HTML/JS etc. It seems to work
pretty easily.
F. A live section that has a library of content, including SWF,
database info, images, video, audio that is designed to load a master
swf created in E.
As to Flash being more sophisticated, I mean HTML is only good at
textual information. I was thinking content that expands human
expression beyond the HTML web, overlays and augments it, not replaces
it. It seems to me we are at the beginning of an explosion of non
text content on the web.
Here are some crude examples of experimental content created by
TurboGears and Django in the browser (with GIMP, Photoshop, MXMLC and
a text editor). The code has issues of course, I am a gardener
Googling Python and ActionScript 3 as I go along. :)
http://samfeltus.com/site_index.html
PS I appreciate everyone's input.
Divio GmbH
Patrick Lauber
Rich Media Architect
Bachstrasse 15
CH-8038 Zürich

Fon +41 44 480 12 40
Fax +41 44 480 12 71
Mobile +41 76 390 22 23

Mail ***@divio.ch
Web http://www.divio.ch






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
arthur debert
2007-08-15 13:44:21 UTC
Permalink
I'll second Patrick's opinion.

It's an interesting idea, but I doubt it will be practical at all to
put together classes at the backend and make that into an application
somehow. You're probably better off developing modules, precompiled
swf with functionality and a shell loading what modules you will have
on a given app. That information , plus data for these modules can
easily be generated from django as xml, json even amf.

I do think, however of two, kind of far fetched cases for dynamic
compiling:
a) Generating flex swfs by a gui editor at the browser, effectivily
recreating some of FlexBuilder's functionality. You could develop a
Drag and Drop GUI editor that uses django to output the mxml an have
that fed to the compiler to generate a swf file.
b) Having assets embedded into a swf, to make it easier to deal with
preloading and reduce latency for a large number of small files

Regarding swf dynamic generation the Mtasc compiler that Patrick
mentioned is great. Also for AS2 there's swf mill that could create a
library of swf files from an xml.
Also, Adobe has an Apache module for the compiler:
http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS

I have no idea how stable or buggy that is, but it might be
interesting.

Cheers
Arthur
Post by Patrick Lauber
I work as a Flash Developer and Django Programmer.
You don't and you shouldn't compile flash on a request basis.
You should make your flash app smart enough that you can give it some
parameters or let it talk with the backend with something like django-
amf.
Then it can load images, mp3 etc. or display something. With flex you
can do some nice data bindings with django-amf.
called mtasc and is used by the very nice eclipse plugin "fdt" by
powerflasher.de
cheers
Post by SamFeltus
I was thinking of A - D, for Django serving information for Flash
also.
But mainly I was thinking of...
E. Compiling Flash content ahead of time with a Python web framework.
Basically, creating a browser based environment to create content
(supplementing, not replacing the Flash/Flex/etc tools). The tool has
a library of ActionScript classes, SWFs from other sources, images,
flvs, mp3, etc to compile into a SWF before the user requests it.
Basically, you create a swf in the browser, edit and recompile it in
the browser until it is done, then publish to the site. Django
generates ActionScript instead of HTML/JS etc. It seems to work
pretty easily.
F. A live section that has a library of content, including SWF,
database info, images, video, audio that is designed to load a master
swf created in E.
As to Flash being more sophisticated, I mean HTML is only good at
textual information. I was thinking content that expands human
expression beyond the HTML web, overlays and augments it, not replaces
it. It seems to me we are at the beginning of an explosion of non
text content on the web.
Here are some crude examples of experimental content created by
TurboGears and Django in the browser (with GIMP, Photoshop, MXMLC and
a text editor). The code has issues of course, I am a gardener
Googling Python and ActionScript 3 as I go along. :)
http://samfeltus.com/site_index.html
PS I appreciate everyone's input.
Divio GmbH
Patrick Lauber
Rich Media Architect
Bachstrasse 15
CH-8038 Zürich
Fon +41 44 480 12 40
Fax +41 44 480 12 71
Mobile +41 76 390 22 23
Web http://www.divio.ch
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-15 16:21:52 UTC
Permalink
"""You don't and you shouldn't compile flash on a request basis. """

I wasn't suggesting that. I was suggesting a tool to prebuild swfs in
a browser (to supplement not replace the Flash/Flex tools, which
require a large learning curve to do anything). Then, have a library
of content (swfs, audio, video etc), that can be loaded at run time on
the server.

"""I do think, however of two, kind of far fetched cases for dynamic
compiling: """

I think it falls into these categories of far fetched cases... :)

Anyways, it's just an experiment. I'll stick the latest version up on
the net tonight in case someone else finds it amusing...




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Jon Atkinson
2007-08-15 16:26:48 UTC
Permalink
Post by SamFeltus
Anyways, it's just an experiment. I'll stick the latest version up on
the net tonight in case someone else finds it amusing...
I would be interested in seeing this. Could you make some of the
source available?

--Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-15 16:47:30 UTC
Permalink
I'd be happy to put it up before midnight tonight Alabama time. I
need to clean out the DB setts, images and such, and include a simple
example...

It will be on this page...

http://samfeltus.com/site_index.html
Post by Jon Atkinson
Post by SamFeltus
Anyways, it's just an experiment. I'll stick the latest version up on
the net tonight in case someone else finds it amusing...
I would be interested in seeing this. Could you make some of the
source available?
--Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-16 02:40:39 UTC
Permalink
It's up, in a raw pre-Alpha version with a simple tutorial.

http://samfeltus.com/django/SonomaSunshine_v0.1_raw_for_django.tar.gz

I'll be upgrading it again soon...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
SamFeltus
2007-08-18 18:29:25 UTC
Permalink
FWIW

There is a greatly improved version up...

It's a pre alpha version of a website to create/edit Flash movies...

http://samfeltus.com/django/SonomaSunshine_v0.13_raw_for_django.tar.gz

I'd be happy to spend some time on explaining/improving it if anyone
ever found it interesting.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Continue reading on narkive:
Loading...