I have before created a quick Ajax Framework for one of my projects. It was an ASP.Net Website (C#). There was not a lot of Ajax type functions so I just made a new Page with nothing in it and in the code behind file I put some code in the Page_Load method which would look for an action in the request and then call the appropriate method.
I am in the same scenario again and I am finding that I am tempted to do the same again. I am letting the user create a new accommodation. Two of the fields that belong with accommodation are accommodation type and area. Both of these fields are maintained by the users so they can CRUD both of these fields on other pages. I was thinking that if the area or accommodation type did not yet exist it would be irritating to have to go to another page. So instead I want to give them the functionality of adding new areas and adding new accommodation types on the same form. So I have tickboxes for the accommodation type, when they click new I present them a textbox they enter the value and click add. It makes an Ajax call to the database to add the value and then a new tickbox appears if successful else an error message. Very similar for area except I will be using a drop down list.
This time however I am using some jQuery too. I am not that familiar with jQuery’s Ajax libraries YET. My question is, ‘Is there a…
- Better
- Easier
- Smarter
- More Extendable
- All of the above
way of doing this.’ If so can you please point me in the right direction.
Given that with VS2008 there’s support for AJAX already built into the IDE (and with jQuery support coming), I think you’ll find it tough to come up with something which is not only a better user experience but also a better developer experience.
The Visual Studio team not only have a lot of resources invested in making this work well, but they also know how to integrate features into the IDE, almost certainly better than you do (and with more access to do so, I suspect).
If you want to do this for fun (or as part of MonoDevelop, for instance), that makes sense – but from a productivity point of view, I’d just stick to Visual Studio.