• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

is there an easier way to do client-side interactivity?

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I don't have any specific problem -- I am looking for some advice about where to go next. I do alot of client-side programming, but I'm completely self-taught and I don't know if there may be easier ways to do what I'm doing.

My problem with javascript is really the convoluted markup -- creating "forms" that students fill in and get feedback on results in very confusing code and many, many id tags. I have started using objects in javascript, which helps, but its still frustrating. What I am wondering is whether there is another java technology which would allow me to do all my client-side interactivity without the overhead of an applet. Would Ajax, servlets, or jsp do anything for me? (I love the Head First books!) Or XML? (I don't really know what XML is, maybe I'm already using it).

If you've gotten this far and want some context -- I have been programming in java for a year or so, before that I used C++ for scientific research. My job is writing interactive web pages to explain mathematical/scientific concepts (laws of probability, balancing chemical equations, stuff like that). For example, I might want to be able to insert chemical equations into a web page with blank spaces for students to fill in. As they fill each space, they can click to check their work and get feedback.

Originally I was going to use java applets, but they load too slowly. So I started using css, javascript and forms instead. Everything I do is client-side (necessarily, given the way the website is set up). And I am the only programmer involved in the project, so I have latitude but no guidance.

Thank you very much! Karen.
 
author
Posts: 4342
40
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd recommend writing some PHP scripts and put them in shared libraries. They should be more powerful than javascript (likely they'll still generate javascript to the user but in a lot fewer lines of code) and they'll be easier to manage.

You might also want to consider JSP, specifically writing your own tag library. The idea is that you write tags similar to HTML but ones that you've defined a TLD file (tag library definition file) and your code can go back to looking for XML-ish (as opposed to the scariness of reading through tons of JSP code).

For a javascript programmer, I recommend PHP for starters since its simpler. Besides, far more internet web servers support PHP than JSP.
 
Grow your own food... or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic