Thursday, May 31, 2012

django 1.4, wsgi, flex deploy best practices

I use Flex for the client side and XML between client and server.  I am a “one man team” and so elegance sometimes gets sacrifices for “it works”.   My typical deploy has been

/var/www/html/my flex swf and html code

And

/home/projectname/current/djangositename

 

This works well, except that I have to use absolute URL’s in Flex (including the server name) because Flex will use either absolute or relative to the location of the .swf file.  This means I have to rebuild for different servers.

 

Are there any recommendations of “best practices”

1.       I could have the django view return the html page that includes the swf file.  This has the advantage of allowing django to pass in some flashvars to the application,  the disadvantage is closer coupling (at least for deploy) of client and server; or

2.       I could use the url redirect to allow a relative reference to get redirected to my django home.

 

I’m not an Apache expert and so I defer to the community which is more experienced with these issues for a clean, generic solution I can use going forward as I port to Django 1.4 and CentOs 6.

No comments:

Post a Comment