Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Peristence Web Service for Rich Client Java (Swing) applications -


i rewriting client-server rich client database application (swing) three-tiered application netbeans rcp rich-client.

by default hibernate , other jpa providers can used in very cumbersome way rich clients (native database connection not cutting through firewalls, loosing lazy-loading, conceptual problems managing session/entitymanager lifecycles...etc other problems). 1 needs kind of extension using them comfortably in rich clients.

normally, rich clients call webservices in business logic tier (on server). usually, dedicated web-service methods handle crud operations of every object type. now, i wouldn't write custom web-service crud operations of each , every persistent class of application thought there may generic persistence web-service these kind of operations can handle @ least of crud operations of application.

is there such persistence service???

here details of ideas/requirements:

the service should work jpa-annotated pojos should use kind jpa persistence provider on server. currently, using hibernate if actively supports hibernate, plus. of course pojo classes must included in server side jpa configuration, don't expect handle kind of unknown pojos.

i wouldn't create separate value objects or data transfer objects sending data between client , server parts of service. use only jpa annotated pojos transfer. believe standard practice nowadays.

the client should receive data , send data http requests server-side of service, in order lessen firewall communication problems. http proxy usage should configurable.

the client side of persistence service can pojo list results executed jpa ql queries (sent simple query string, optionally ** named parameters** sent in request). these queries sent client in form of webservice call or simple http request servlet. nice if several jpa queries sent in 1 request. client receives result of requests lists of pojos may have lazy-loaded collections , object references (these not sent server in query-time).

the client side of persistence service should able fulfill lazy-loading requests automatically/transparently, when client application accesses lazy-loaded attribute in pojo (at later point in time, not @ initial query). so, transparent lazy loading should remain working after pojo has been transferred client.

new, updated/dirty or to-be-deleted pojos can sent client side of persistence service server changes get persisted , success/failure statuses sent (e.g. id given newly persisted pojos). several to-be-saved pojos sent in 1 request.

it should have mechanism marking transaction boundaries, more 1 independent http service calls executed in 1 database transaction (keeping session/entitymanager.begintransaction(), commit() , rollback()).

would nice if validation , access control checks plugged server component.

is there such persistence service project??? possibly extension shipped jpa persistence provider?

when designed similar app in 2002, searched far , wide framework use, had run our own. transporting sub-graphs of persistent objects swing client done translating dto (datatransferobjects) objects, maintained attribute mapping , information if attribute being dirtied client. on way server, dirtied attributes updated in trx.

you might want use jdo 2.0 persistence layer. supports detaching objects or sub-trees persistent object graph, sending detached objects on wire , re-attaching in later transaction.

however, lose ability minimize data send across wire.

best bet far: run own mechanism , add createdto , updatefromdto method persistent objects, i'd happy proven wrong.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -