This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 138736 - Mobile Client To Web Application Recreates Serializable Classes
Summary: Mobile Client To Web Application Recreates Serializable Classes
Status: NEW
Alias: None
Product: javame
Classification: Unclassified
Component: Web Services (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-01 17:05 UTC by vprise
Modified: 2013-07-24 08:29 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vprise 2008-07-01 17:05:35 UTC
Currently the Mobile Client To Web Application recreates a client side class that matches the approximate structure of
the server side class. This works nicely for passing data structures but doesn't work as well for shared classes that
might include common algorithms such as validation etc... It doesn't copy documentation or other elements either.
While this functionality is useful for some use cases (such as the ability to stick SE/EE code in the class) I'd like to
have the ability to specify that I want the serialized class just copied to the client and not recreated. This would
include all documentation and all methods within the class. 
Obviously if I use features unavailable in MIDP this will fail which is reasonable to expect making this feature off by
default would also make sense in that regard.
Comment 1 Denis Anisimov 2008-11-19 16:13:38 UTC
We can find a way how it can be possibly realized.
But I want to understand real necessity of such enhancement .
Serializable class has main purpose : it is container for data 
that will be transferred over network.
Why do you need other content of such class locally in generated code 
( such as documentation , etc... ) ?
All this stuff you have inside original classes on server side.
Comment 2 vprise 2008-11-19 17:09:29 UTC
Validation on the server side is great but in many cases you don't want to make the round trip to the server only to
fail on something that could be tested on the client. I can duplicate my code which is exactly what I do today using
copy and paste after the mobile client generated the code on the client... 
These classes act as ValueObject patterns from Java EE and are thus excellent points for some basic validations (e.g.
illegal characters etc.) and excellent for some calculations. It is a requirement in many banking systems that all
calculations be done using exactly the same code on the server and client to avoid mistakes.