• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Light-weight remote scripting

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

thnx

/surrven
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to give you an idea...



#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
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Best regards,
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

G Svensson wrote:Hi,

Thanks for the quick reply.
Do you have an example of a "reasonable JavaScript library". in this case?



Um, did you see my example using jQuery?
 
G Svensson
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused, you ask about IDEs, but only one of the things you list is an IDE (Eclipse). Jaxer is a server, Aptana is a company with an RoR plugin.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

G Svensson wrote:Hi,

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) ?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. you are right. Environment instead of IDE
I will be using Java.
Do yout think Aptana plugin be well suited for my project?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Heavens to Betsy,



You just aged yourself a bit there, David. ;)
 
reply
    Bookmark Topic Watch Topic
  • New Topic