Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I am looking for advice on which web programming languages can achieve the following objective:

I am building a website which will allow users to initially search a mysql database I have. The results of this initial search will then be displayed on a results page. I would then like the ability to dynamically create filters based on data in the search results which the user can (de)select to further filter the results. The results should update in real time.

The best example of this I can see is Skyscanner - you make an initial search on a static web form. This then takes you to a results page with the initial search results and it also creates a dynamic filter on the LHS allowing you to filter out certain airlines (for example). This list of airlines is taken from the results dataset (and therefore must be generated dynamically).

How is this best achieved? Is Javascript the way to go or can asp and php also do this?

Many thanks

share|improve this question
    
You will need Ajax for this. On change on some of the filters send a new request with these parameters: all filters and the query string (if you have one). Then get the result and display it. – enenen Jun 14 '13 at 9:25
up vote 2 down vote accepted

JavaScript is definitely the way to go.
You will need ajax. A front end JS templating library would help to display the results.

I would create a JSON web service. Fetch the search results over AJAX and use a frontend templating engine. There are many out there. This linkedin article may be of help selecting.

Edit: What does a templating library do?
It will allow you to define a set of tags to display each search result. When you fetch the data using JSON, you convert this to javascript objects. Your templating framework will generate the html using your result template to display all the values.

If you are not familiar with javascript templating, definitely read about it. Once you know it, you will find yourself applying them in a lot of solutions. I am not recommending any particular engine here, cause each has its benefits and you should decide after considering the features you want to provide.

share|improve this answer
    
Ah yes, Ajax definitely looks like what I need. What would a JS front-end templating library do? Many thanks for your help. – Ben Thompson Jun 14 '13 at 9:41
    
Answered your comment in the edit. – nunespascal Jun 14 '13 at 9:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.