Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Add Stats Without Having To Recode The Html


1 reply to this topic

#1 demo100

    Newbie [Level 1]

  • Kontributors
  • Pip
  • 15 posts
  • Gender:Male
  • Location:Montreal
  • myCENT:76.77

Posted 06 May 2010 - 01:24 PM

I am trying to build a small form to keep track of player progression for a game. I want to then put that progression on the a guild website. I have already determined the look, but have not been able to successfully add any type of interactivity, and or dynamic feel to the site and form.

What I would like is simple, to be able to add stats on a daily basis without having to recode the HTML.

Have those stats to bee added automatically when changed, so that I can keep track of progress.

I will post the site and it should be easy to see what I am trying to acomplish, but lack the programing skill to know where to move from here. I am playing with javascript, but I am not sure if I am going in the right direction.

This is the site

http://tfd.guildlaun...9&page_id=62633

Any help would be greatly appreciated, thanks :)

#2 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 07 May 2010 - 02:04 AM

View Postdemo100, on 06 May 2010 - 01:24 PM, said:

What I would like is simple, to be able to add stats on a daily basis without having to recode the HTML.
It is possible, but it is not something that is suitable for JavaScript. What you desire runs along the same concept of the design pattern known as Model-View-Controller. In this case, the model would be the stats information of each player; the view is what renders the data into something viewable, that is, HTML; the controller is what keeps track of the model and view. The view has to be designed with the model in mind; if the model holds a tree-like structure, the view has to be able to work with tree structures. I think a tree model would fit your needs fine. As new data is added to the model, the view will dynamically adjust and display the data the way it is designed to. Hence you would not need to worry about any extra data added to the model, since the model would be designed to store data in one way, which the view was made to iterate through.

JavaScript is a client-side scripting language, therefore the only place fitting for it is the view; it cannot touch on the model, nor can it be part of the controller. Therefore you will need know a server-side scripting language, one that is supported by your web host. Given the site you provide, it seems PHP would be that language. I have no idea of how many others are working with you on the same project, but you'll have to come up with a way for everything to work together. If you're the only one working on this, then though you say you lack programming skill, it would seem that you at least know some PHP. In either case, i would suggest making use of PHP's object oriented programming for this job.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users