I need to make a web application with a light-weight remote scripting solution where images are to be loaded dynamically.
The user clicks on categories and new images will load, without having the whole web page reloaded on each click.
I'd like some guidance about best practices for a solution. I'd rather not use heavy frameworks (Ajax, scriptacolus, prototype, gwt) for this single task. But if it is necessary i need help in finding the most light-weight one.
I have tried Remote scripting with IFRAME but I have a hard time figuring out if that solution will be sufficient. Can anyone with more experience tell me if I will turn up in a dead end.
Please feel free to ask questions since I am not sure that I have provided you with enough details.
Ajax is not a "heavy-weight framework". It's not a framework at all; it's a methodology.
jQuery and Prototype are about as "light-weight" as they get (although there's also MooTools, which I'm not as familiar with) and a few others. Ajax is far and away your best solution--just do it, and use any reasonable JavaScript library. It will save you *huge* amounts of trouble.
#categoryList - your select element with list of categories.
#images - some sort of container (div maybe)
When you do a $.load() you would return the HTML that contains all your img elements referencing that category's images.
Another solution would be very similar except maybe you return some JSON or XML data of images and build the image list via javascript. Very lightweight as David says and not really a lot of code.
G Svensson
Greenhorn
Joined: Jul 26, 2009
Posts: 17
posted
0
Hi,
Thanks for the quick reply.
Do you have an example of a "reasonable JavaScript library". in this case?
I am very interested to learn new things but right now I need help to choose the solution that I do not have the time to first evaluate options.
Yes I saw your example but by the context I didn't realize that it was jQuery. Nice. Thank you.
It will be very helpful.
My last question is about setting up an IDE for my project.
Suggestion:
- Eclipse, Aptana, Jaxter DWR
Will it be lots of unnecessary overhead? Can anything be replaced by a adequate product?
Best regards,
Surrven
Are you doing anything besides HTML and JavaScript? Are you planning on doing the server side work as well? What language (Java, PHP, .NET, Ruby, Python, etc) ?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
David Newton wrote: Aptana is a company with an RoR plugin.
And they have a IDE that is pretty nice for JavaScript.
Eric
G Svensson
Greenhorn
Joined: Jul 26, 2009
Posts: 17
posted
0
Ok. you are right. Environment instead of IDE
I will be using Java.
Do yout think Aptana plugin be well suited for my project?
Heavens to Betsy, just try it. I think Eclipse's JavaScript support is poor, at least compared to IntelliJ, but I've never had to use a plugin just to write JavaScript.