Jump to content

Some advice for starting my content management please


Ender22

Recommended Posts

Hello everyone.

 

I'm about to code my new website, but I would love to get an opinion from the more experienced out there on how to go about it first.

My website will be PHP MySQL based and have multiple users. The users can play different flash files on the site and the flash content will be different depending on different values that are passed into the flash files.

 

As of now I am passing in xml files to the Flash swf's, and I would love to keep it this way as it works great for what I am doing.

 

My question is... what is the best way to give each one of my users their own xml files. (I need 3-5 xml's for each). Should I try to store the xml inside the mysql database then extract it? Should I create an xml file for each user on my server then just put filename variables into the mysql database? Do I need a content managment system (haven't used one of these before).

 

How would you more experienced coders go about this setup? Any advice is much appreciated.

Link to comment
Share on other sites

PHP is capable of generating xml files, just as it can generate images, pdf's, javascript and just about any type of data you can think of. 

 

Usually people will use a database structure to store the attributes that vary by user, and write some code that renders the customized xml as needed, once a user has logged in.

Link to comment
Share on other sites

Hey thanks for the help,

 

Just to make sure I understand. Usually the variables are stored in the database, then the xml is generated on the fly once the page loads for each user?

 

So if I use php to create an xml file like suggested, where is a good place to store it on the server before passing it into the swf? And what's a good way to make sure it is accessible by that user and just that user?

 

I actually have my flash generating the xml data already because things are saved from within the swf files... I guess I would rather just use the xml that is already being generated either by storing it all into a mysql variable (if that's possible) or just saving and accessing a physical xml file.

 

I really think the easiest thing would be just to have a couple xml files created for each user stored on the server and then just access them by their filename with mysql when they load the swf files... is that a bad idea for any reason? Or is this okay to try?

Link to comment
Share on other sites

So if I use php to create an xml file like suggested, where is a good place to store it on the server before passing it into the swf?

 

Why do you need to store it? PHP can generate it dynamically and it can be read directly from AS.

 

I actually have my flash generating the xml data already because things are saved from within the swf files... I guess I would rather just use the xml that is already being generated either by storing it all into a mysql variable (if that's possible) or just saving and accessing a physical xml file.

 

XML, As far as a method of data transport is outdated by far superior methods IMO.

 

I really think the easiest thing would be just to have a couple xml files created for each user stored on the server and then just access them by their filename with mysql when they load the swf files... is that a bad idea for any reason? Or is this okay to try?

 

I'm not sure why you think this is the easiest method. If you truly do believe so, why are you here asking questions?

Link to comment
Share on other sites

This sounds like a good place to make a little AMF (Action Message Format) server, Zend_Amf has a good implementation that supports AMF3 which has much better compression options.  Server side, this would get rid of the XML generation step as it's a matter of binding a class with RPC-like methods.  And be honest Ender does your solution scale very well.  Three files per flash file and per user, if you have 100 flash files, when you get 1000 users you have 300000 files floating around, it gets worse as you get more users.  Also you're sending all those files to your users, that's a headache in of itself.  Read up on AMF to see if it is applicable to your situation.

Link to comment
Share on other sites

Thanks for the advice guys...

 

It is only 3 xml files total for each user... but yes it still doesn't scale very well.

All of my software is already set up to be used with XML so I think I'll take Thorpe's first suggest and just dynamically generate the xml with php then read it into as3 directly.

 

As far as saving information after the swf is finished... (if i was lazy and didnt want to rewrite everything yet) is it possible to store the entire xml code into a database variable before using php to generate the xml? like the entire <thingGroup> <thing> <value1> </value1> <value2> </value2> </thing> </thingGroup> into mysql? Or will I run into problems?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.