Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Common validation logic (from MVC newbie)

Thread Tools

Common validation logic (from MVC newbie)
Posts: n/a
I have some validation logic that I was hoping to write in a single
place and then use it whenever needed, in any layer of my system. I
could write it in java and use it anywhere on the server side, which is
great. But what could I do to also access this SAME logic ON the
client, i.e. without making a round trip to the server? My client uses
JSPs/Struts... Do I have to "port" my validation code to Javascript
just so I can run it on the client?

Thanks in advance for any advice.

Reply With Quote
Ryan Dillon
Posts: n/a
Yes. Without making a round trip to the server there is really no way
to avoid replicating the validation in JavaScript. You could do some
funky stuff with hidden frames (and even funkier stuff that Google
seems to use) to prevent the page from actually refreshing, and still
do the validation server side. But probably it would be easiest to just
do it in JavaScript.

Ryan Dillon
Code Canvas Technologies
RapidJ - Rapid Java Web Development

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Logic Map/Logic Flow Chart. (Example Provided) spike Python 8 02-09-2010 12:31 PM
Asynchronous Logic Gates and Analog Logic Gates Jyoti Ballabh Software 3 11-26-2009 06:48 PM
No MVC Project Template after installing ASP.NET MVC 1.0 Crazy Cat ASP .Net 1 09-03-2009 08:02 PM
WebForms X MVC? Why MVC? Give me reasons to migrate my web apps to it please. Pros x Cons! Thanks! Paulo ASP .Net 3 12-04-2008 03:00 AM
differences between Spring WebFlow,Spring MVC,and String Portlet MVC? rmn190 Java 2 01-10-2008 02:27 AM