Welcome Guest, Not a member yet? Register   Sign In
Beginning a large Web Application, seeking guidance
#1

[eluser]roy3600[/eluser]
Hello fellow Code Igniters,

I've been researching and studying this framework for a few weeks now, running through all the great tutorials I've found online and believe I've gotten a good grasp on everything.

I had zero experience with MVC programming (aside from one Ruby on Rails course I took in college), so there was a slight learning curve for me.

I'm about to begin a large web application at my current job (work at a web company). I wanted to tell you about the application and see if you can guide me in any way. Perhaps some helpful plugins/extensions or just some helpful tips.

In a nutshell, this Web Application will be a very large survey. Comprised of around 300 questions and features "forked questions". Forked questions will be questions that lead to other questions based on your response.

For example:
"Does your company offer Employee Benefits". If "Yes", it'll lead to a few questions (perhaps instantly populated via AJAX), if "No", no questions will populate and you'll move on with the survey.

Another feature to this will be benchmarking the data. The client wants a bar graph or pie graph for every question, so users can benchmark their data against the other users. This will be accessible on a different page view. Anyone know of any good JQuery graphing plugins?

One of my fears of this is that it will take users a long time to fill this survey out. With around 300 questions, it may take several hours. We don't and cannot have people timing out half way through, thus I believe we'll need to have the question answers instantly store into the database. Which can be done via Javascript or some other method (please suggest if you know).

That is about it. Our users will be from all over the world, each Country will have different questions based on their country, which I can do via PHP and MYSQL. (if country = "Australia", display these questions, else display none).



I just wanted to give you guys a run down of this project and see if there are any good ways of handling it. I believe Code Igniter will be a great framework to work with, I love how easy and secure it is to use.

My main fear will be building this gigantic 300 question form and having it never time out, and instantly store their answers.

If you have any suggestions or questions please leave them here and if you've dealt with a type of application like this before, please express what you would have wanted to know prior to beginning it.
#2

[eluser]neilmcgann[/eluser]
This will be known as " the form that no-one ever completed" (unless they were paid)...

I'm sure there will be sensible answers using jquery Ajax calls to incrementally save and analyse the form, but better have a good strategy for detecting and discarding part-completed forms before the db fills up with them!
#3

[eluser]weboap[/eluser]
1 - i think a better strategy will be to administer the survey over time, weeks to each user if possible cuz i know i'm not answering 300 question surveys even if they pay me.

2- i think they may be there form generators, that will help you so you can store questions, use ORM for questions relations....will make your life easier changing and maintaining questionnaire and just generating the survey on the fly.

that's all i got today
Good luck
#4

[eluser]TWP Marketing[/eluser]
I have to agree with neilmcgann, unless you design the questionnaire so it can be completed in segments, over time, you will have very low completion rates.

I don't know if your company plans on offering an incentive for answering the questions.
If not, I would suggest it to them.

Consider telling the responders, up front, that the questionnaire is multi-part and can be completed in more than one session. Pledge your eternal debt to the responders for doing this.

You might use an email response system to let your victims/customers know that the next set of questions needs to be answered and give them a link to the next page.

Calculate what level of completion is acceptable and consider rewards for anything over that amount.
Novocaine might be good too.
#5

[eluser]Samus[/eluser]
[quote author="roy3600" date="1337373519"]
I'm about to begin a large web application at my current job (work at a web company). I wanted to tell you about the application and see if you can guide me in any way. Perhaps some helpful plugins/extensions or just some helpful tips.

Another feature to this will be benchmarking the data. The client wants a bar graph or pie graph for every question, so users can benchmark their data against the other users. This will be accessible on a different page view. Anyone know of any good JQuery graphing plugins?

[/quote]
I've used this to generate several dynamic charts:

http://www.highcharts.com/
#6

[eluser]roy3600[/eluser]
Hey guys,

Thanks for the input. We're designing this application for a very large company that WILL have people completing the survey. In return for completing the survey your company gets very important data that you need. I don't think the client wants it in multi-parts because people WILL be filling it out.

Again thanks for the input, this project will be a fun one!

This Highcharts is awesome by the way Samus, thanks!
#7

[eluser]boltsabre[/eluser]
Well if you break the questions into "pages" (perhaps 10 questions per page?), and each time the user submits the page/clicks the "next page" link you can run a DB update for that user and those 10 questions. You can do this either with vanilla html/links, or ajax to get the next 10 questions, your choice.

It would stop you losing lots of data if the user times out/their laptop runs out of juice, power outage, etc.
#8

[eluser]roy3600[/eluser]
Hey boltsabre, this is not a bad idea.

My boss and I are chatting and this sounds reasonable. The main issue we continue to bring up is:

1. Should we hard code these questions in HTML

or

2. Store them all in a database

It seems like the best idea would be storing everything in the database, and pulling out the right questions for the right country taking the survey.

However, we need to have FORKED questions. Meaning if you click "Yes" to a question, more questions will pop up. Then say you answer those, then decide to click "No", it needs to delete the previous forked questions you answered.

I believe we'll need javascript to do the forked questions, which may not allow us to store the questions in a database? Using simple "on clicks" in javascript can create these forked questions, but not sure we can do this if the questions are all stored in a database.
#9

[eluser]boltsabre[/eluser]
Yeah sure you can do this with javascript, what you'll need to do it use "ajax". Ajax will allow you to make a call to a php script (or in CI to to controller method). The script/controller method you call can then in turn can access a database, get your questions, and then display them back on the screen without a page refresh. It's basically the same as just using vanilla html/php, except you don't have to reload the page each time, you just refresh a part of your page with your new content.

As for if you should hard code the questions in html or in a db, I'd be leaning towards the second. This then gives you the flexibility to set up a "back end" where your admin staff can "update/edit/replace" existing questions, delete old ones, add new ones - absolutely no need for them to have any kind of coding skills as it will all be set up for them in forms and stuff.

However, it sounds like a complex problem that will require a good deal of thinking/planning first before you rush off to build it - you'll have to consider your relationships of your "forked" questions and how you'll build this in your DB. Then how you'll go about deleting a users old question if they go back an pick another fork, etc.
#10

[eluser]roy3600[/eluser]
Excellent, thanks again boltsabre!

I will watch the AJAX Tutorial now and see if I can do this.




Theme © iAndrew 2016 - Forum software by © MyBB